@charset "UTF-8";
/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
:root {
  --primary: #2563eb; --primary-hover: #1d4ed8; --primary-light: rgba(37, 99, 235, 0.1);
  --accent: #f97316; --accent-hover: #ea6c09; --accent-light: rgba(249, 115, 22, 0.1);
  --background: #09090b; --surface: #111113; --surface-secondary: #1a1a1f; --surface-hover: #222228;
  --border: #27272a; --border-light: #3f3f46;
  --text: #fafafa; --text-muted: #a1a1aa; --text-subtle: #71717a;
  --success: #22c55e; --success-light: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b; --warning-light: rgba(245, 158, 11, 0.1);
  --danger: #ef4444; --danger-light: rgba(239, 68, 68, 0.1);
  --info: #3b82f6; --info-light: rgba(59, 130, 246, 0.1);
  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --sidebar-width: 260px; --topbar-height: 64px;
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5rem; font-weight: 600; color: var(--text); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    cursor: pointer; transition: all var(--transition);
    user-select: none; gap: 0.5rem; white-space: nowrap;
}
.btn:disabled, .btn.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.btn-primary { background-color: var(--primary); color: #fff; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--surface-secondary); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background-color: var(--surface-hover); }
.btn-ghost { background-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background-color: var(--surface-hover); color: var(--text); }
.btn-danger { background-color: var(--danger); color: #fff; }
.btn-success { background-color: var(--success); color: #fff; }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-icon { padding: 0.5rem; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
    content: ''; position: absolute; width: 1em; height: 1em;
    border: 2px solid rgba(255,255,255,0.3); border-radius: 50%;
    border-top-color: currentColor; animation: spin 0.6s linear infinite;
}

/* Inputs & Forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 0.625rem 0.875rem; font-size: 0.875rem;
    background-color: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); transition: all var(--transition);
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light);
}
.form-input:disabled, .form-select:disabled, .form-textarea:disabled { opacity: 0.6; cursor: not-allowed; background-color: var(--surface-secondary); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-error .form-input, .form-error .form-select, .form-error .form-textarea { border-color: var(--danger); }
.form-error .form-hint { color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group .form-input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
.checkbox-custom, .radio-custom { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; }
.file-upload-area {
    border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem;
    text-align: center; cursor: pointer; transition: all var(--transition);
}
.file-upload-area:hover { border-color: var(--primary); background-color: var(--surface-secondary); }

/* Cards */
.card { background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); background-color: var(--surface-secondary); display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.stat-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.stat-card-value { font-size: 1.5rem; font-weight: 600; }
.stat-card-label { font-size: 0.875rem; color: var(--text-muted); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; padding: 0.125rem 0.5rem;
    font-size: 0.75rem; font-weight: 500; border-radius: 9999px;
    background-color: var(--surface-secondary); color: var(--text); border: 1px solid var(--border);
}
.badge-primary { background-color: var(--primary-light); color: var(--primary); border-color: rgba(37,99,235,0.2); }
.badge-success { background-color: var(--success-light); color: var(--success); border-color: rgba(34,197,94,0.2); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); border-color: rgba(245,158,11,0.2); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.badge-info { background-color: var(--info-light); color: var(--info); border-color: rgba(59,130,246,0.2); }
.badge-sm { font-size: 0.65rem; padding: 0.1rem 0.4rem; }
.badge-lg { font-size: 0.875rem; padding: 0.25rem 0.75rem; }
.status-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background-color: currentColor; display: inline-block; margin-right: 0.375rem; }

/* Tables */
.table-container { overflow-x: auto; width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.875rem; }
.table th, .table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }
.table th { background-color: var(--surface-secondary); font-weight: 500; color: var(--text-muted); }
.table tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background-color: var(--surface-hover); }
.table-row-actions { display: flex; gap: 0.5rem; opacity: 0; transition: opacity var(--transition); }
.table tr:hover .table-row-actions { opacity: 1; }

/* Navigation - Sidebar */
.sidebar {
    width: var(--sidebar-width); height: 100vh; position: fixed; top: 0; left: 0;
    background-color: var(--surface); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; z-index: 40; transition: transform var(--transition);
}
.sidebar-logo { height: var(--topbar-height); padding: 0 1.5rem; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-nav-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.875rem;
    transition: all var(--transition);
}
.sidebar-nav-item:hover { background-color: var(--surface-hover); color: var(--text); }
.sidebar-nav-item.active { background-color: var(--primary-light); color: var(--primary); font-weight: 500; }
.sidebar-section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); padding: 1rem 0.75rem 0.5rem; font-weight: 600; }

/* Navigation - Topbar */
.topbar {
    height: var(--topbar-height); position: sticky; top: 0; z-index: 30;
    background-color: rgba(17, 17, 19, 0.8); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); padding: 0 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}
.page-layout .topbar { margin-left: var(--sidebar-width); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1rem; }
.notification-bell { position: relative; cursor: pointer; color: var(--text-muted); }
.notification-bell:hover { color: var(--text); }
.notification-bell .badge { position: absolute; top: -5px; right: -5px; padding: 0 4px; font-size: 0.6rem; min-width: 16px; text-align: center; }

/* Modals */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 50;
    opacity: 0; visibility: hidden; transition: all var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    width: 100%; max-width: 500px; box-shadow: var(--shadow-lg);
    transform: scale(0.95); transition: transform var(--transition);
    max-height: 90vh; display: flex; flex-direction: column;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-sm { max-width: 320px; }
.modal-lg { max-width: 800px; }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1.125rem; font-weight: 600; margin: 0; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.25rem; border-radius: var(--radius-sm); }
.modal-close:hover { background-color: var(--surface-secondary); color: var(--text); }
.modal-body { padding: 1.5rem; overflow-y: auto; }
.modal-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; background-color: var(--surface-secondary); }

/* Toasts */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 60; display: flex; flex-direction: column; gap: 0.75rem; }
.toast {
    display: flex; align-items: flex-start; gap: 0.75rem; width: 320px;
    padding: 1rem; background-color: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.toast.closing { animation: toastSlideOut 0.2s ease-in forwards; }
.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-icon { flex-shrink: 0; margin-top: 0.125rem; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.toast-message { flex: 1; font-size: 0.875rem; }
.toast-title { font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
.toast-desc { color: var(--text-muted); }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0; margin-left: auto; }

/* Tabs */
.tabs { display: flex; flex-direction: column; }
.tab-list { display: flex; border-bottom: 1px solid var(--border); gap: 1.5rem; }
.tab-item {
    padding: 0.75rem 0; font-size: 0.875rem; font-weight: 500; color: var(--text-muted);
    background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer;
    transition: all var(--transition);
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { padding: 1.5rem 0; display: none; }
.tab-panel.active { display: block; }

/* Breadcrumbs */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--text); }
.breadcrumb-separator { color: var(--border-light); }
.breadcrumb-item.active { color: var(--text); font-weight: 500; pointer-events: none; }

/* Dropdowns */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 200px;
    background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); z-index: 40; padding: 0.5rem 0;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all var(--transition);
}
.dropdown.active .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem;
    font-size: 0.875rem; color: var(--text); cursor: pointer; transition: background var(--transition);
    text-decoration: none; width: 100%; border: none; background: none; text-align: left;
}
.dropdown-item:hover { background-color: var(--surface-secondary); }
.dropdown-divider { height: 1px; background-color: var(--border); margin: 0.5rem 0; }

/* Utilities */
.flex { display: flex; } .flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; } .text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Layouts */
.page-layout { min-height: 100vh; display: flex; background: var(--background); }
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 2rem; display: flex; flex-direction: column; min-height: calc(100vh - var(--topbar-height)); }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .page-layout .topbar, .main-content { margin-left: 0; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
}
@media (max-width: 768px) {
    .form-row { flex-direction: column; gap: 0; }
    .content-grid { grid-template-columns: 1fr; }
}
