:root { --primary: #1e40af; --primary-dark: #1e3a8a; --primary-light: #3b82f6; --secondary: #64748b; --accent: #2563eb; --success: #059669; --warning: #d97706; --danger: #dc2626; --info: #0891b2; --dark: #1e293b; --dark-alt: #334155; --bg: #ffffff; --bg-secondary: #f8fafc; --bg-tertiary: #f1f5f9; --border: #e2e8f0; --text-primary: #0f172a; --text-secondary: #475569; --text-muted: #64748b; --shadow: 0 1px 3px rgba(0,0,0,0.1); --shadow-md: 0 4px 6px rgba(0,0,0,0.1); --shadow-lg: 0 10px 15px rgba(0,0,0,0.1); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; background: var(--bg-tertiary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }
[v-cloak] { display: none !important; }

/* Loading */
.loading-screen { display: flex; justify-content: center; align-items: center; height: 100vh; background: var(--dark); }
.loading-content { text-align: center; color: white; }
.loading-spinner { border: 4px solid rgba(37,99,235,0.2); border-top: 4px solid var(--accent); border-radius: 50%; width: 48px; height: 48px; animation: spin 0.8s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Login */
.login-container { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--dark); }
.login-box { background: white; padding: 48px; border-radius: 8px; box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; border-top: 3px solid var(--accent); }
.login-logo { font-size: 32px; font-weight: 700; color: var(--dark); text-align: center; margin-bottom: 8px; }
.login-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 32px; font-size: 14px; }

/* Layout */
.app-container { display: flex; height: 100vh; background: var(--bg); animation: fadeIn 0.3s; }

/* Sidebar */
.sidebar { width: 260px; background: var(--dark); color: white; display: flex; flex-direction: column; box-shadow: 2px 0 8px rgba(0,0,0,0.1); }
.sidebar-header { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo { font-size: 24px; font-weight: 700; color: white; text-align: center; margin-bottom: 4px; }
.sidebar-header > div:last-child { text-align: center; color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-menu { list-style: none; }
.nav-item { margin-bottom: 2px; padding: 0 12px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 6px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; }
.nav-link:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-link.active { background: rgba(37,99,235,0.2); color: white; font-weight: 600; }
.nav-icon { font-size: 18px; width: 20px; text-align: center; }

/* Sidebar User */
.sidebar-user { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); }
.sidebar-user-label { color: rgba(255,255,255,0.5); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 8px; }
.sidebar-user-name { color: white; font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.sidebar-user-email { color: rgba(255,255,255,0.6); font-size: 12px; margin-bottom: 2px; }
.sidebar-user-role { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 4px; }
.sidebar-user .btn { margin-top: 12px; width: 100%; }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.header { background: white; padding: 16px 32px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.page-title { font-size: 22px; font-weight: 600; color: var(--text-primary); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.mobile-menu { display: none; }
.content { flex: 1; padding: 24px 32px; overflow-y: auto; background: var(--bg-tertiary); }

/* Cards */
.card { background: white; border-radius: 6px; padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--bg-tertiary); }
.card-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.metric-card { background: white; border-radius: 6px; padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.metric-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.metric-value { font-size: 32px; font-weight: 700; color: var(--text-primary); }
.metric-trend { display: inline-flex; align-items: center; font-size: 13px; padding: 2px 8px; border-radius: 4px; font-weight: 500; margin-top: 8px; }
.trend-up { color: var(--success); background: rgba(5,150,105,0.1); }
.trend-down { color: var(--danger); background: rgba(220,38,38,0.1); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text-primary); font-size: 14px; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: white; color: var(--text-primary); transition: all 0.15s; }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* Buttons */
.btn { padding: 9px 18px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 2px 4px rgba(37,99,235,0.3); }
.btn-secondary { background: white; color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-tertiary); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-icon { background: transparent; border: none; padding: 8px; cursor: pointer; font-size: 18px; color: var(--text-secondary); }
.btn-icon:hover:not(:disabled) { color: var(--text-primary); background: var(--bg-tertiary); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tables */
.data-table, .table { width: 100%; border-collapse: collapse; }
.data-table th, .table th { background: var(--bg-tertiary); padding: 12px 16px; text-align: left; font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td, .table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:hover, .table tr:hover { background: var(--bg-secondary); }

/* Status */
.status { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 500; gap: 4px; }
.status-success { background: rgba(5,150,105,0.1); color: var(--success); }
.status-warning { background: rgba(217,119,6,0.1); color: var(--warning); }
.status-danger { background: rgba(220,38,38,0.1); color: var(--danger); }
.status-primary { background: rgba(37,99,235,0.1); color: var(--accent); }

/* Alerts */
.alert { padding: 14px 16px; border-radius: 6px; margin: 12px 0; border-left: 3px solid; font-size: 14px; }
.alert-danger { background: #fef2f2; border-color: var(--danger); color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--warning); color: #92400e; }
.alert ul { margin: 8px 0 0 20px; }

/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: white; border-radius: 8px; padding: 32px; max-width: 600px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--bg-tertiary); }
.modal-title { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.modal-footer { margin-top: 24px; padding-top: 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--bg-tertiary); }

/* Notifications */
.notification { position: fixed; bottom: 20px; right: 20px; background: white; padding: 16px 20px; border-radius: 6px; box-shadow: var(--shadow-lg); max-width: 400px; z-index: 1001; border: 1px solid var(--border); font-size: 14px; }
.notification.success { border-left: 4px solid var(--success); }
.notification.error { border-left: 4px solid var(--danger); }

/* Misc */
.progress-bar { width: 100%; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.4s; }
.upload-zone { border: 2px dashed var(--border); border-radius: 6px; padding: 40px; text-align: center; background: var(--bg-secondary); }
.upload-zone:hover { border-color: var(--accent); background: rgba(37,99,235,0.03); }
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.monitor-item { background: white; border-radius: 6px; padding: 16px; border-left: 3px solid var(--accent); border: 1px solid var(--border); }
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab { padding: 12px 20px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text-secondary); font-size: 14px; font-weight: 500; background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.page-btn { padding: 6px 12px; border: 1px solid var(--border); background: white; cursor: pointer; border-radius: 4px; color: var(--text-primary); font-size: 14px; }
.page-btn:hover:not(:disabled) { background: var(--bg-secondary); }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.chart-container { position: relative; height: 400px; margin-top: 20px; }

/* Responsive */
@media (max-width: 768px) { .sidebar { position: fixed; z-index: 999; transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } .mobile-menu { display: flex !important; } .dashboard-grid, .form-row, .monitor-grid { grid-template-columns: 1fr; } .header, .content { padding: 16px; } }