/* {{SYSTEM_NAME}} - 主框架样式 */
/* 此文件仅用于 index.html，内容页使用 iframe-content.css */

:root {
    --primary-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 64px;
    --header-height: 64px;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 9999px;
    animation: spin 0.8s linear infinite;
}

.loading-sm { width: 16px; height: 16px; border-width: 1.5px; }
.loading-lg { width: 32px; height: 32px; border-width: 3px; }

.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left-color: var(--success-color); }
.toast-warning { border-left-color: var(--warning-color); }
.toast-error { border-left-color: var(--danger-color); }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 250ms ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 250ms ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-text {
    color: #6b7280;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .sidebar { width: var(--sidebar-collapsed-width); }
    .sidebar .menu-text, .sidebar .logo-text { display: none; }
    .main-content { margin-left: var(--sidebar-collapsed-width); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); width: var(--sidebar-width); }
    .sidebar.mobile-open .menu-text, .sidebar.mobile-open .logo-text { display: block; }
    .main-content { margin-left: 0; }
}
