/* Clark Dashboard Styles — extracted from app.html */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0b0b12; --bg-alt: #101018; --card: rgba(20,20,31,0.88);
  --text: #d1d5db; --heading: #e8e8f0; --muted: #9ca3af; --soft: #6b7280;
  --line: rgba(255,255,255,0.08); --brand: #2980B9; --brand-bg: rgba(41,128,185,0.1);
  --accent: #F39C12; --success: #27AE60; --danger: #E74C3C;
}
body { background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; min-height: 100vh; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: var(--bg-alt); border-right: 1px solid var(--line); padding: 20px 0; flex-shrink: 0; position: fixed; top: 0; bottom: 0; overflow-y: auto; }
.main { flex: 1; margin-left: 240px; padding: 24px 32px; }

/* Sidebar */
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 0 20px 24px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sidebar-logo img { width: 28px; height: 28px; }
.sidebar-logo span { font-weight: 800; font-size: 18px; color: var(--heading); }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; transition: all 0.2s; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.03); color: var(--heading); }
.nav-item.active { background: var(--brand-bg); color: var(--brand); border-left-color: var(--brand); font-weight: 700; }
.nav-item .nav-icon { width: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-item .nav-icon svg { display: block; }
.nav-section { font-size: 10px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; color: var(--soft); padding: 16px 20px 6px; }

/* Auth screen */
.auth-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 40px; max-width: 400px; width: 100%; text-align: center; }
.auth-card h2 { font-size: 24px; font-weight: 800; color: var(--heading); margin-bottom: 8px; }
.auth-card p { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.auth-input { width: 100%; padding: 12px 16px; background: rgba(0,0,0,0.3); border: 1px solid var(--line); border-radius: 10px; color: var(--heading); font-family: 'JetBrains Mono', monospace; font-size: 13px; margin-bottom: 12px; outline: none; transition: border-color 0.2s; }
.auth-input:focus { border-color: var(--brand); }
.auth-input::placeholder { color: var(--soft); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--heading); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--heading); font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-card.brand .stat-value { color: var(--brand); }
.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.success .stat-value { color: var(--success); }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--soft); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.table tr:hover td { background: rgba(255,255,255,0.02); }

/* Badge */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-brand { background: var(--brand-bg); color: var(--brand); }
.badge-success { background: rgba(39,174,96,0.15); color: var(--success); }
.badge-accent { background: rgba(243,156,18,0.15); color: var(--accent); }
.badge-danger { background: rgba(231,76,60,0.15); color: var(--danger); }

/* Progress bar */
.progress-wrap { background: rgba(255,255,255,0.06); border-radius: 8px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 8px; transition: width 0.5s ease; background: var(--brand); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: none; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.2s; font-family: Inter, sans-serif; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #3498DB; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-outline:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.03); }

/* Info rows */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); }
.info-value { color: var(--heading); font-weight: 600; }

/* Page title */
.page-title { font-size: 22px; font-weight: 800; color: var(--heading); margin-bottom: 6px; }
.page-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* Tab content */
.tab-page { display: none; }
.tab-page.active { display: block; }

/* List items */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; cursor: default; }
.list-item:hover { background: rgba(255,255,255,0.02); }
.list-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.list-body { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-meta { font-size: 12px; color: var(--soft); margin-top: 2px; }

/* Empty */
.empty-state { text-align: center; padding: 48px 20px; color: var(--soft); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; display: block; }

/* User bar */
.user-bar { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); margin-top: auto; position: absolute; bottom: 0; left: 0; right: 0; background: var(--bg-alt); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-bg); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 700; color: var(--heading); }
.user-role { font-size: 11px; color: var(--muted); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .mobile-nav { display: flex !important; }
}

.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg-alt); border-top: 1px solid var(--line); z-index: 50; padding: 6px 0; }
.mobile-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; font-size: 10px; color: var(--muted); cursor: pointer; transition: color 0.2s; }
.mobile-nav-item.active { color: var(--brand); }
.mobile-nav-item .mnav-icon { display: flex; align-items: center; justify-content: center; }
.mobile-nav-item .mnav-icon svg { display: block; }