/* ============================================================
   SHIVSHAKTI SMS — Premium Design System v2.0
   Deep Blue + Saffron palette · Inter font · WCAG 2.1 AA
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand palette */
  --primary:        #1a3a6e;
  --primary-mid:    #1e4d9e;
  --primary-light:  #2563eb;
  --accent:         #f37021;
  --accent-light:   #fb923c;
  --accent-glow:    rgba(243,112,33,.18);

  /* Semantic colours */
  --success:        #059669;
  --success-bg:     #d1fae5;
  --danger:         #dc2626;
  --danger-bg:      #fee2e2;
  --warning:        #d97706;
  --warning-bg:     #fef3c7;
  --info:           #0284c7;
  --info-bg:        #dbeafe;
  --purple:         #7c3aed;
  --purple-bg:      #ede9fe;

  /* Surface & bg */
  --bg:             #f0f4fa;
  --surface:        #ffffff;
  --surface-2:      #f8fafc;
  --border:         #e2e8f0;
  --border-light:   #f1f5f9;

  /* Text */
  --text:           #0f172a;
  --text-2:         #334155;
  --text-3:         #64748b;
  --muted:          #94a3b8;

  /* Sidebar */
  --sb-bg:          #0f1f3d;
  --sb-bg-2:        #162540;
  --sb-border:      rgba(255,255,255,.07);
  --sb-text:        #94a3b8;
  --sb-text-active: #ffffff;
  --sb-accent:      #f37021;
  --sb-hover-bg:    rgba(255,255,255,.06);
  --sb-active-bg:   rgba(243,112,33,.14);
  --sb-width:       256px;
  --sb-collapsed:   68px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,.1),  0 10px 10px rgba(0,0,0,.04);

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-full: 9999px;

  /* Motion */
  --ease:    cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(0,0,.2,1);
  --fast:    150ms;
  --normal:  250ms;
  --slow:    400ms;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans Devanagari', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════ */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sb-width);
  background: var(--sb-bg);
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(99,102,241,.12) 0%, transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(243,112,33,.08) 0%, transparent 50%);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: width var(--normal) var(--ease);
  z-index: 200;
  border-right: 1px solid var(--sb-border);
}
.sidebar.collapsed { width: var(--sb-collapsed); }

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--sb-border);
  flex-shrink: 0;
  min-height: 72px;
}
.logo-circle {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(243,112,33,.4);
  transition: transform var(--fast) var(--ease);
}
.logo-circle:hover { transform: scale(1.08); }
.brand-title {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--normal) var(--ease);
}
.brand-sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--normal) var(--ease);
}
.sidebar.collapsed .brand-title,
.sidebar.collapsed .brand-sub { opacity: 0; width: 0; }

/* Nav scroll area */
.nav-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 16px;
}
.nav-scroll::-webkit-scrollbar { width: 3px; }
.nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }

/* Nav sections */
.nav-section {
  padding: 14px 18px 5px;
  font-size: 9.5px;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 1.2px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--normal) var(--ease);
}
.sidebar.collapsed .nav-section { opacity: 0; }

/* Nav links */
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 18px;
  color: var(--sb-text);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 1px 10px 1px 0;
  transition: background var(--fast) var(--ease),
              color var(--fast) var(--ease),
              border-color var(--fast) var(--ease);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav a .nav-icon { font-size: 16px; flex-shrink: 0; line-height: 1; }
.nav a .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--normal) var(--ease), width var(--normal) var(--ease);
}
.sidebar.collapsed .nav a .nav-label { opacity: 0; width: 0; }
.sidebar.collapsed .nav a { padding: 9px 0; justify-content: center; margin-right: 0; border-left: 0; border-radius: 0; }

.nav a:hover {
  background: var(--sb-hover-bg);
  color: #e2e8f0;
  text-decoration: none;
  border-left-color: rgba(243,112,33,.5);
}
.nav a.active {
  background: var(--sb-active-bg);
  color: var(--sb-text-active);
  border-left-color: var(--sb-accent);
  font-weight: 600;
}
.nav a.active .nav-icon { filter: drop-shadow(0 0 6px rgba(243,112,33,.7)); }

/* Sidebar footer (collapse btn) */
.sb-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--sb-border);
  flex-shrink: 0;
}
.sb-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--sb-hover-bg);
  border: 1px solid var(--sb-border);
  color: var(--sb-text);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.sb-collapse-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.sb-collapse-icon { font-size: 16px; transition: transform var(--normal) var(--ease); }
.sidebar.collapsed .sb-collapse-icon { transform: rotate(180deg); }
.sidebar.collapsed .sb-collapse-btn span:last-child { display: none; }

/* ── Main area ──────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--surface);
  padding: 0 24px;
  height: 62px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--r-sm);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.mobile-menu-btn:hover { background: var(--bg); }

.topbar h1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.topbar .breadcrumb {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
}

/* Live clock */
#live-clock {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

/* User box */
.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.user-info { line-height: 1.3; }
.user-name { font-weight: 600; font-size: 13px; color: var(--text); }
.user-role { font-size: 11px; color: var(--muted); text-transform: capitalize; }

/* ── Content ────────────────────────────────────────────────── */
.content { padding: 24px; flex: 1; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 12px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--fast) var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); }
.card > *:not(.card-header):not(.table-wrap):not(.updates-tabs):not(.tab-panel) {
  padding: 20px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, #1e4d9e 100%);
  border-bottom: 3px solid var(--accent);
}
.card-header h2, .card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .2px;
}
.card-header a {
  color: #fcd34d;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.card-header a:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   STAT CARDS (Dashboard)
═══════════════════════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }

.stat-card::after {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: currentColor;
  opacity: .04;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  transition: transform var(--fast) var(--ease);
}
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-3deg); }

.stat-icon.bg-primary { background: linear-gradient(135deg, #3b82f6, var(--primary)); }
.stat-icon.bg-success { background: linear-gradient(135deg, #34d399, var(--success)); }
.stat-icon.bg-warning { background: linear-gradient(135deg, #fbbf24, var(--warning)); }
.stat-icon.bg-danger  { background: linear-gradient(135deg, #f87171, var(--danger)); }
.stat-icon.bg-info    { background: linear-gradient(135deg, #38bdf8, var(--info)); }
.stat-icon.bg-purple  { background: linear-gradient(135deg, #a78bfa, var(--purple)); }
.stat-icon.bg-accent  { background: linear-gradient(135deg, var(--accent-light), var(--accent)); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 11.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 4px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  border: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease),
              filter var(--fast) var(--ease);
  text-decoration: none;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }

.btn-primary   { background: linear-gradient(135deg, var(--primary-mid), var(--primary)); color: #fff; box-shadow: 0 2px 8px rgba(26,58,110,.3); }
.btn-success   { background: linear-gradient(135deg, #10b981, var(--success)); color: #fff; box-shadow: 0 2px 8px rgba(5,150,105,.3); }
.btn-danger    { background: linear-gradient(135deg, #f87171, var(--danger)); color: #fff; box-shadow: 0 2px 8px rgba(220,38,38,.3); }
.btn-warning   { background: linear-gradient(135deg, #fbbf24, var(--warning)); color: #fff; box-shadow: 0 2px 8px rgba(217,119,6,.3); }
.btn-info      { background: linear-gradient(135deg, #38bdf8, var(--info)); color: #fff; box-shadow: 0 2px 8px rgba(2,132,199,.3); }
.btn-secondary { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.btn-accent    { background: linear-gradient(135deg, var(--accent-light), var(--accent)); color: #fff; box-shadow: 0 2px 8px rgba(243,112,33,.35); }
.btn-light     { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); box-shadow: var(--shadow-xs); }
.btn-light:hover { background: var(--border-light); }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 11px 26px; font-size: 14.5px; border-radius: var(--r-md); }

/* ═══════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-2);
  letter-spacing: .15px;
}

.form-control,
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date],
input[type=tel],
input[type=search],
select,
textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease),
              background var(--fast) var(--ease);
}
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243,112,33,.15);
  background: #fffcfa;
}
.form-control:hover,
input[type=text]:hover,
input[type=email]:hover,
input[type=password]:hover,
input[type=number]:hover,
input[type=date]:hover,
input[type=tel]:hover,
select:hover,
textarea:hover {
  border-color: #94a3b8;
}
textarea { min-height: 90px; resize: vertical; }
select { cursor: pointer; }

/* Grid helpers */
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.col, .col-3, .col-4, .col-6, .col-8, .col-12 { padding: 0 8px; }
.col   { flex: 1; }
.col-3 { flex: 0 0 25%;      max-width: 25%; }
.col-4 { flex: 0 0 33.333%;  max-width: 33.333%; }
.col-6 { flex: 0 0 50%;      max-width: 50%; }
.col-8 { flex: 0 0 66.66%;   max-width: 66.66%; }
.col-12{ flex: 0 0 100%;     max-width: 100%; }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: flex-end;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 120px; }
.filter-bar label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}
table.data-table th {
  background: var(--surface-2);
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-2);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
table.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  vertical-align: middle;
}
table.data-table tbody tr {
  transition: background var(--fast) var(--ease);
}
table.data-table tbody tr:hover { background: #fef9f5; }
table.data-table tbody tr:last-child td { border-bottom: 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-success   { background: var(--success-bg); color: #065f46; }
.badge-danger    { background: var(--danger-bg);  color: #991b1b; }
.badge-warning   { background: var(--warning-bg); color: #92400e; }
.badge-info      { background: var(--info-bg);    color: #1e40af; }
.badge-secondary { background: #f1f5f9;           color: var(--text-3); }
.badge-accent    { background: #fff4ee;            color: #c2410c; }
.badge-purple    { background: var(--purple-bg);  color: #5b21b6; }

/* ═══════════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  border-left: 4px solid transparent;
}
.alert-success  { background: var(--success-bg); color: #065f46; border-left-color: var(--success); }
.alert-danger   { background: var(--danger-bg);  color: #991b1b; border-left-color: var(--danger);  }
.alert-warning  { background: var(--warning-bg); color: #92400e; border-left-color: var(--warning); }
.alert-info     { background: var(--info-bg);    color: #1e3a8a; border-left-color: var(--info);    }
.alert .close   { background: none; border: 0; font-size: 18px; cursor: pointer; color: inherit; flex-shrink: 0; opacity: .7; }
.alert .close:hover { opacity: 1; }
.alert-dismissible { animation: slideIn var(--normal) var(--ease-out); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  list-style: none;
  gap: 4px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.page-item .page-link {
  display: flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px;
  padding: 0 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--primary-light);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--fast) var(--ease);
}
.page-item .page-link:hover { background: var(--info-bg); border-color: var(--info); color: var(--info); text-decoration: none; }
.page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary-mid), var(--primary));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(26,58,110,.3);
}
.page-item.disabled .page-link { color: var(--muted); cursor: not-allowed; background: var(--surface-2); }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0b1d3a 0%, #15315e 45%, #5a1f0a 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}
.login-card h2 { color: var(--primary); text-align: center; margin-bottom: 6px; }
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════
   CERTIFICATES & ID CARDS
═══════════════════════════════════════════════════════════════ */
.certificate {
  background: #fff;
  padding: 48px;
  border: 6px double var(--primary);
  max-width: 900px;
  margin: 20px auto;
  position: relative;
  border-radius: var(--r-md);
}
.certificate-header {
  text-align: center;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.certificate-header h2 { color: var(--primary); font-size: 22px; margin-bottom: 4px; }
.certificate-header .address { color: var(--muted); font-size: 12px; }
.certificate-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin: 24px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.certificate-body { font-size: 15px; line-height: 2.1; text-align: justify; color: #111; }
.certificate-footer { display: flex; justify-content: space-between; margin-top: 60px; font-weight: 700; }

.idcard {
  width: 340px; height: 540px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 0;
  display: inline-block;
  margin: 10px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  vertical-align: top;
}
.idcard .head { padding: 14px; text-align: center; border-bottom: 2px solid rgba(255,255,255,.2); }
.idcard .head h4 { font-size: 13px; margin-bottom: 2px; }
.idcard .head small { font-size: 10px; opacity: .85; }
.idcard .photo {
  width: 120px; height: 140px;
  background: rgba(255,255,255,.95);
  margin: 18px auto;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #94a3b8;
  border: 3px solid rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.idcard .info { padding: 0 22px; font-size: 12.5px; line-height: 1.7; }
.idcard .info b { color: #fde68a; }

/* ═══════════════════════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════════════════════ */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 8px 0;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Separator heading inside forms */
.form-section-title {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--primary);
  background: linear-gradient(90deg, var(--info-bg), transparent);
  border-left: 3px solid var(--primary-light);
  padding: 7px 12px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 6px 0 2px;
}

/* Divider */
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; }

/* Back-to-top */
#back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--normal) var(--ease), transform var(--normal) var(--ease);
  z-index: 999;
}
#back-to-top.show { opacity: 1; transform: none; }
#back-to-top:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

/* Mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .footer, .no-print, #back-to-top { display: none !important; }
  .main, .content { padding: 0; margin: 0; }
  body { background: #fff; font-size: 12px; }
  .card { box-shadow: none; border: 1px solid #ccc; border-radius: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .col-3, .col-4, .col-6, .col-8 { flex: 0 0 100%; max-width: 100%; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--normal) var(--ease);
    z-index: 200;
    width: var(--sb-width) !important;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .mobile-menu-btn { display: flex !important; }
  .sb-footer { display: none; }
  .topbar { padding: 0 14px; }
  .content { padding: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  #live-clock { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-group { width: 100%; }
}
