/* ================================================================
   TDRS — Technical Documents Register System
   Premium Enterprise CSS
   TIES Co. Ltd | Dar es Salaam, Tanzania
   ================================================================ */

:root {
  --navy: #0B1F3A;
  --navy-light: #122850;
  --navy-lighter: #1a3460;
  --royal: #1D4ED8;
  --royal-light: #2563eb;
  --royal-lighter: #3b82f6;
  --gold: #D4AF37;
  --gold-light: #e4c547;
  --gold-muted: #b8963a;
  --white: #FFFFFF;
  --bg: #F0F4F8;
  --card: #FFFFFF;
  --card-alt: #F8FAFC;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-md: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.07);
  --shadow-lg: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --sidebar-width: 260px;
  --topbar-height: 64px;
  --transition: all .2s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

/* ── Layout ────────────────────────────────────────────────── */
.tdrs-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.tdrs-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

/* ── Sidebar Brand ─────────────────────────────────────────── */
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-muted));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--navy);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(212,175,55,.3);
}
.brand-name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .5px;
  line-height: 1.2;
}
.brand-sub {
  display: block;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Sidebar Nav ───────────────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.3);
  padding: 4px 8px 8px;
  margin-top: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item i { font-size: 16px; flex-shrink: 0; }
.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.nav-item.active {
  background: linear-gradient(135deg, var(--royal), var(--royal-light));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(29,78,216,.4);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}

/* ── Sidebar Footer ────────────────────────────────────────── */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  text-decoration: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.user-card:hover { background: rgba(255,255,255,.07); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-muted));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--navy);
  flex-shrink: 0; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--white); line-height: 1.3; }
.user-role { font-size: 11px; color: rgba(255,255,255,.45); }
.sidebar-logout {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-logout:hover { background: rgba(220,38,38,.2); color: #f87171; }

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.sidebar-toggle {
  background: none; border: none;
  font-size: 20px; color: var(--text-muted);
  cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--border-light); color: var(--text); }
.topbar-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb-item-tdrs { display: flex; align-items: center; gap: 4px; }
.breadcrumb-sep { color: var(--border); }
.topbar-search {
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  width: 240px;
  transition: var(--transition);
}
.topbar-search:focus-within {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}
.topbar-search i { color: var(--text-muted); font-size: 14px; }
.topbar-search input {
  border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text); width: 100%;
  font-family: var(--font);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 36px; height: 36px;
  background: none; border: none;
  border-radius: var(--radius-sm);
  font-size: 18px; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.topbar-btn:hover { background: var(--border-light); color: var(--text); }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: #ef4444;
  color: white; font-size: 10px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ── Notification Dropdown ─────────────────────────────────── */
.notif-dropdown { width: 340px; padding: 0; border: 1px solid var(--border); box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.notif-header { padding: 14px 16px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; color: var(--text); transition: var(--transition); }
.notif-item:hover { background: var(--card-alt); }
.notif-item.unread { background: #f0f7ff; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.notif-info .notif-icon { background: #dbeafe; color: var(--royal); }
.notif-title { font-size: 12.5px; font-weight: 500; }
.notif-time { font-size: 11px; color: var(--text-muted); }
.notif-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.notif-footer { display: block; padding: 10px 16px; text-align: center; font-size: 12.5px; color: var(--royal); border-top: 1px solid var(--border); text-decoration: none; }

/* ── Page Content ──────────────────────────────────────────── */
.page-content { flex: 1; padding: 24px; }
.messages-container { margin-bottom: 16px; }
.tdrs-alert {
  border: none; border-radius: var(--radius-sm);
  font-size: 13.5px; padding: 12px 16px;
}
.tdrs-alert-success { background: #f0fdf4; color: #166534; }
.tdrs-alert-error { background: #fef2f2; color: #991b1b; }
.tdrs-alert-warning { background: #fffbeb; color: #92400e; }

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left {}
.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 4px;
  line-height: 1.3;
}
.page-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Cards ─────────────────────────────────────────────────── */
.tdrs-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.tdrs-card:hover { box-shadow: var(--shadow); }
.tdrs-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title-sm {
  font-size: 14px; font-weight: 700;
  color: var(--navy); margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.card-title-sm i { color: var(--royal); }
.tdrs-card-body { padding: 20px; }

/* ── KPI Stats ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}
.kpi-card.kpi-blue::before { background: var(--royal); }
.kpi-card.kpi-gold::before { background: var(--gold); }
.kpi-card.kpi-green::before { background: #10b981; }
.kpi-card.kpi-red::before { background: #ef4444; }
.kpi-card.kpi-purple::before { background: #8b5cf6; }
.kpi-card.kpi-cyan::before { background: #06b6d4; }

.kpi-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.kpi-blue .kpi-icon { background: #dbeafe; color: var(--royal); }
.kpi-gold .kpi-icon { background: #fef3c7; color: var(--gold-muted); }
.kpi-green .kpi-icon { background: #d1fae5; color: #10b981; }
.kpi-red .kpi-icon { background: #fee2e2; color: #ef4444; }
.kpi-purple .kpi-icon { background: #ede9fe; color: #8b5cf6; }
.kpi-cyan .kpi-icon { background: #cffafe; color: #06b6d4; }

.kpi-value {
  font-size: 28px; font-weight: 800; line-height: 1.1;
  color: var(--navy);
}
.kpi-label {
  font-size: 12px; color: var(--text-muted);
  font-weight: 500; margin-top: 2px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-tdrs-primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white); border: none;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; white-space: nowrap;
}
.btn-tdrs-primary:hover {
  background: linear-gradient(135deg, var(--navy-light), var(--royal));
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11,31,58,.3);
}
.btn-tdrs-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-muted));
  color: var(--navy); border: none;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn-tdrs-gold:hover {
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,175,55,.4);
}
.btn-tdrs-outline {
  background: transparent;
  color: var(--navy); border: 1.5px solid var(--border);
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn-tdrs-outline:hover { border-color: var(--navy); background: var(--card-alt); }
.btn-tdrs-ghost {
  background: transparent; color: var(--text-muted);
  border: none; padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 13px; cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none;
}
.btn-tdrs-ghost:hover { background: var(--border-light); color: var(--text); }
.btn-sm-icon {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); font-size: 14px;
  cursor: pointer; transition: var(--transition);
  border: none; text-decoration: none;
}

/* ── Status Badges ─────────────────────────────────────────── */
.badge-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  text-transform: uppercase;
}
.badge-IFC  { background: #dcfce7; color: #15803d; }
.badge-IFR  { background: #dbeafe; color: #1d4ed8; }
.badge-IFA  { background: #fef3c7; color: #b45309; }
.badge-IFT  { background: #ede9fe; color: #7c3aed; }
.badge-AFC  { background: #d1fae5; color: #065f46; }
.badge-IFI  { background: #cffafe; color: #0e7490; }
.badge-AB   { background: #f3f4f6; color: #374151; }
.badge-TBP  { background: #f1f5f9; color: #64748b; }
.badge-CANC { background: #fee2e2; color: #dc2626; }
.badge-project-active    { background: #d1fae5; color: #065f46; }
.badge-project-on_hold   { background: #fef3c7; color: #b45309; }
.badge-project-completed { background: #dbeafe; color: #1d4ed8; }
.badge-project-archived  { background: #f3f4f6; color: #374151; }
.badge-project-cancelled { background: #fee2e2; color: #dc2626; }

/* ── Tables ────────────────────────────────────────────────── */
.tdrs-table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.tdrs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tdrs-table thead th {
  background: var(--navy);
  color: rgba(255,255,255,.85);
  padding: 12px 14px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .8px;
  white-space: nowrap;
  border: none;
  position: sticky; top: 0;
}
.tdrs-table thead th:first-child { color: var(--gold); }
.tdrs-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text); vertical-align: middle;
}
.tdrs-table tbody tr:hover { background: #f8fafc; }
.tdrs-table tbody tr:last-child td { border-bottom: none; }
.tdrs-table .doc-number {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--royal);
  font-weight: 500;
}
.tdrs-table .doc-title { max-width: 280px; }
.tdrs-table .doc-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filter-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: var(--text-muted); }
.filter-bar .form-control,
.filter-bar .form-select {
  font-size: 13px; border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  padding: 6px 10px;
  background: var(--bg);
  color: var(--text);
  height: 34px;
}
.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
  outline: none;
}

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-tdrs {
  height: 6px; border-radius: 10px;
  background: var(--border);
  overflow: hidden;
}
.progress-tdrs .progress-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--royal), var(--royal-lighter));
  transition: width .6s ease;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.form-section-title {
  font-size: 14px; font-weight: 700;
  color: var(--navy); margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.form-section-title i { color: var(--royal); }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13.5px;
  transition: var(--transition);
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
}
.form-control:focus, .form-select:focus {
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
  outline: none;
}
label.form-label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); margin-bottom: 5px;
}

/* ── Inline Edit ───────────────────────────────────────────── */
.inline-edit-cell {
  position: relative; cursor: pointer;
}
.inline-edit-cell:hover::after {
  content: '\F4CB';
  font-family: 'bootstrap-icons';
  font-size: 11px;
  color: var(--royal);
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  opacity: .7;
}
.inline-edit-cell.editing::after { display: none; }
.inline-input {
  width: 100%; border: 1.5px solid var(--royal);
  border-radius: 4px; padding: 4px 8px;
  font-size: 12.5px; font-family: var(--font);
  background: white; outline: none;
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}

/* ── Project Card ──────────────────────────────────────────── */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(29,78,216,.2);
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--royal));
}
.project-card .project-number {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--royal);
  font-weight: 600; letter-spacing: .5px;
  margin-bottom: 6px;
}
.project-card .project-title {
  font-size: 14px; font-weight: 700;
  color: var(--navy); margin-bottom: 8px;
  line-height: 1.4;
}
.project-card .project-meta {
  font-size: 12px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 12px;
}
.project-card .project-meta span {
  display: flex; align-items: center; gap: 4px;
}

/* ── Auth ──────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--navy) 0%, #0d2a4e 40%, #1a3d6e 100%);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29,78,216,.25), transparent 70%);
  pointer-events: none;
}
.auth-page::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -10%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.12), transparent 70%);
  pointer-events: none;
}
.auth-panel {
  width: 480px;
  margin: auto;
  padding: 24px;
  position: relative; z-index: 1;
}
.auth-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--gold), var(--gold-muted));
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--navy);
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(212,175,55,.35);
}
.auth-title {
  font-size: 24px; font-weight: 800; color: var(--navy);
  margin-bottom: 4px;
}
.auth-subtitle { font-size: 13px; color: var(--text-muted); }
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

/* ── Charts area ───────────────────────────────────────────── */
.chart-container { position: relative; }

/* ── DataTables overrides ──────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 13px;
  margin-left: 6px;
}
.dataTables_wrapper .dataTables_length select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 13px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: white !important;
  border-radius: 6px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.current) {
  background: var(--border-light) !important;
  color: var(--navy) !important;
  border-color: var(--border) !important;
  border-radius: 6px;
}
.dataTables_wrapper .dataTables_info { font-size: 12.5px; color: var(--text-muted); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Utilities ─────────────────────────────────────────────── */
.text-navy { color: var(--navy) !important; }
.text-gold { color: var(--gold) !important; }
.bg-navy { background: var(--navy) !important; }
.font-mono { font-family: var(--font-mono) !important; }
.table-scroll { overflow-x: auto; }
.cursor-pointer { cursor: pointer; }
.gap-2 { gap: 8px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tdrs-sidebar { transform: translateX(-100%); }
  .tdrs-sidebar.mobile-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .tdrs-main { margin-left: 0; }
  .page-content { padding: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .filter-bar { padding: 12px; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 999;
  }
  .sidebar-overlay.active { display: block; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}
@media (min-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ── Loading Spinner ───────────────────────────────────────── */
.tdrs-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; opacity: .3; margin-bottom: 16px; display: block; }
.empty-state h4 { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; }
