/* ================================================================
   GSMC - Gold Seal Medical College
   Modern Mobile-App Responsive Design System
   Compact, Crisp, Aesthetic & Highly Polished
   ================================================================ */

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

:root {
  --navy:       #151b2e;
  --navy-2:     #1e2538;
  --navy-light: #2c3550;
  --blue:       #0057b7;
  --blue-2:     #0284c7;
  --blue-soft:  #e0f2fe;
  --gold:       #b4830b;
  --gold-2:     #d97706;
  --gold-soft:  #fef3c7;
  --bg:         #f4f6fa;
  --card:       #ffffff;
  --text:       #1e293b;
  --text-muted: #64748b;
  --border:     #e2e8f0;
  --border-subtle: #edf2f7;
  --success:    #15803d;
  --success-bg: #dcfce7;
  --warning:    #b45309;
  --warning-bg: #fef3c7;
  --danger:     #b91c1c;
  --danger-bg:  #fee2e2;
  --radius:     9px;
  --radius-sm:  6px;
  --radius-pill: 20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow:     0 2px 8px -2px rgba(0,0,0,0.05), 0 1px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg:  0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 10px -4px rgba(0,0,0,0.04);
  --trans:      all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 13px; /* Compact base sizing across entire application */
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 { font-size: 1.25rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.95rem; }
h4 { font-size: 0.85rem; }

a { color: var(--blue-2); text-decoration: none; transition: var(--trans); }
a:hover { color: var(--blue); }

/* ============================================================
   BUTTONS (Sleek, Compact, Aesthetic)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--trans);
  line-height: 1.3;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0); }

.btn-primary { background: linear-gradient(135deg, #0284c7, #0057b7); color: #fff; border-color: transparent; }
.btn-primary:hover { background: linear-gradient(135deg, #0369a1, #004494); color: #fff; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-light); color: #fff; }

.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }

.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }

.btn-outline {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--blue-2);
  color: var(--blue-2);
  background: #f8fafc;
}

.btn-block {
  width: 100%;
  display: flex;
  justify-content: center;
}
.btn-lg {
  padding: 0.55rem 1.15rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* Micro Action Buttons */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.58rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--trans);
  text-decoration: none;
  line-height: 1.25;
}
.btn-sm.view    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.btn-sm.edit    { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.btn-sm.delete  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.btn-sm.success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.btn-sm.primary { background: var(--blue-2); color: #fff; }
.btn-sm:hover   { opacity: 0.92; transform: translateY(-1px); }

.action-btns {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

/* ============================================================
   FORM CONTROLS (Compact, Clean, Touch-friendly)
   ============================================================ */
.form-group {
  margin-bottom: 0.85rem;
}
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.3rem;
}
.form-control, .form-select {
  width: 100%;
  padding: 0.48rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  transition: var(--trans);
  outline: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 2.5px rgba(2, 132, 199, 0.12);
}
.input-icon {
  position: relative;
}
.input-icon .form-control {
  padding-left: 2.2rem;
}
.input-icon .icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.help {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ============================================================
   BADGES (Micro-labels)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  line-height: 1.2;
}
.badge-confirmed { background: var(--success-bg); color: var(--success); }
.badge-declined  { background: var(--danger-bg); color: var(--danger); }
.badge-pending   { background: var(--warning-bg); color: var(--warning); }
.badge-muted     { background: #f1f5f9; color: var(--text-muted); }

/* ============================================================
   ALERTS (Compact notifications)
   ============================================================ */
.alert {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}
.alert i { font-size: 0.9rem; margin-top: 1px; flex-shrink: 0; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ============================================================
   PAGE HEADER & BREADCRUMB
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.page-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.page-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.page-header .actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb a { color: var(--blue-2); }
.breadcrumb .sep { opacity: 0.5; font-size: 0.7rem; }

/* ============================================================
   CARDS & CONTAINERS
   ============================================================ */
.card, .gsmc-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.9rem;
}

.gsmc-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.gsmc-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.icon-blue   { background: #e0f2fe; color: #0284c7; }
.icon-gold   { background: #fef3c7; color: #b45309; }
.icon-green  { background: #dcfce7; color: #15803d; }
.icon-red    { background: #fee2e2; color: #b91c1c; }
.icon-purple { background: #f3e8ff; color: #7e22ce; }

.gsmc-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.gsmc-card-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============================================================
   TABLES & TABLE CARD
   ============================================================ */
.table-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}
.table-toolbar {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fbfcfe;
}
.table-toolbar h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
thead th {
  background: #f8fafc;
  padding: 0.55rem 0.8rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
tbody td {
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

/* Filter Bar */
.filter-bar {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  box-shadow: var(--shadow-sm);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.filter-group label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.filter-group select, .filter-group input {
  padding: 0.38rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  outline: none;
  background: #fff;
  transition: var(--trans);
}
.filter-group select:focus, .filter-group input:focus {
  border-color: var(--blue-2);
}
.search-input { position: relative; }
.search-input input { padding-left: 1.8rem; min-width: 160px; }
.search-input i { position: absolute; left: 0.6rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.78rem; }

/* ============================================================
   STATS GRID (Compact Modern KPI Cards)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .stats-grid { grid-template-columns: repeat(5, 1fr); gap: 0.75rem; } }

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--trans);
}
.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.stat-card .stat-icon {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.stat-card .stat-number {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-card .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}
.stat-card .stat-change {
  font-size: 0.68rem;
  margin-top: 0.25rem;
  font-weight: 600;
}
.stat-up   { color: var(--success); }
.stat-down { color: var(--danger); }

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .chart-grid { grid-template-columns: 1fr 1fr; } }
.chart-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-sm);
}
.chart-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

/* ============================================================
   IMPORT STEPS WIZARD (Compact, Mobile responsive)
   ============================================================ */
.import-steps {
  display: flex;
  gap: 0;
  margin-bottom: 1.1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.import-step {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.35rem;
  border-bottom: 2.5px solid transparent;
  transition: var(--trans);
}
.import-step.active {
  border-bottom-color: var(--blue-2);
  background: #f0f9ff;
}
.import-step.done {
  border-bottom-color: var(--success);
}
.import-step .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 auto 0.2rem;
}
.import-step.active .num { background: var(--blue-2); color: #fff; }
.import-step.done .num   { background: var(--success); color: #fff; }
.import-step .lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.import-step.active .lbl { color: var(--blue-2); font-weight: 700; }

.upload-area {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 0.85rem;
  text-align: center;
  cursor: pointer;
  background: #fafcff;
  transition: var(--trans);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--blue-2);
  background: #f0f9ff;
}
.upload-area i {
  font-size: 1.6rem;
  color: #16a34a;
  margin-bottom: 0.35rem;
}
.upload-area h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.upload-area p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Radio Option Pills */
.option-radio-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.option-radio-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  cursor: pointer;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  transition: var(--trans);
  flex: 1;
  min-width: 140px;
}
.option-radio-item:hover, .option-radio-item:has(input:checked) {
  background: #f0f9ff;
  border-color: var(--blue-2);
}
.option-radio-item input[type="radio"] {
  accent-color: var(--blue-2);
}

/* Mapping Table */
.mapping-table { width: 100%; border-collapse: collapse; }
.mapping-table th { background: #f8fafc; padding: 0.45rem 0.65rem; font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
.mapping-table td { padding: 0.4rem 0.65rem; border-bottom: 1px solid var(--border); font-size: 0.76rem; }
.mapping-table select { width: 100%; padding: 0.32rem 0.5rem; border: 1.5px solid var(--border); border-radius: 5px; font-size: 0.76rem; }

/* Report Cards Grid */
.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
@media (max-width: 480px) {
  .report-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}
.report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--trans);
}
.report-card:hover {
  border-color: var(--blue-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.report-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  flex-shrink: 0;
}
.report-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.report-card-desc {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.65rem;
  flex: 1;
}

/* ============================================================
   ADMIN LAYOUT (Desktop & Mobile Drawer)
   ============================================================ */
.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 230px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: -230px;
  height: 100vh;
  z-index: 200;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.admin-sidebar.open { left: 0; }
@media (min-width: 992px) {
  .admin-sidebar { left: 0; position: sticky; top: 0; height: 100vh; }
}

.sidebar-header {
  padding: 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.sidebar-header img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}
.sidebar-header .brand-text .title { font-size: 0.88rem; font-weight: 700; color: #fff; }
.sidebar-header .brand-text .sub   { font-size: 0.65rem; color: rgba(255,255,255,0.6); }

.sidebar-nav { flex: 1; padding: 0.5rem 0; }
.nav-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4);
  padding: 0.55rem 0.85rem 0.2rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: var(--trans);
  border-left: 2.5px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: rgba(2, 132, 199, 0.18);
  color: #fff;
  border-left-color: var(--blue-2);
  font-weight: 600;
}
.nav-item i { width: 16px; text-align: center; font-size: 0.82rem; }

.sidebar-footer {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.15);
}
.admin-user { display: flex; align-items: center; gap: 0.5rem; }
.admin-user .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
}
.admin-user .info .name { font-size: 0.76rem; font-weight: 600; color: #fff; }
.admin-user .info .role { font-size: 0.65rem; color: rgba(255,255,255,0.6); }

/* Admin Main Content */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 0.85rem;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.admin-topbar .page-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
@media (min-width: 576px) { .admin-topbar .page-title { max-width: 350px; font-size: 0.95rem; } }

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  display: none;
  color: var(--navy);
  font-size: 1.1rem;
}
@media (max-width: 991px) { .hamburger-btn { display: flex; align-items: center; } }

.admin-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.admin-topbar .admin-badge {
  font-size: 0.7rem;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.admin-content {
  padding: 0.85rem;
  flex: 1;
}
@media (min-width: 768px) {
  .admin-content { padding: 1.25rem 1.5rem; }
}

.admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 150;
}
.admin-overlay.show { display: block; }

/* ============================================================
   STUDENT PORTAL (Mobile App Aesthetic)
   ============================================================ */
.portal-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.portal-topbar {
  background: linear-gradient(135deg, var(--navy), #0b3469);
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.portal-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.85rem;
  width: 100%;
}
.portal-topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.portal-topbar .brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.portal-topbar .brand-text .name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.portal-topbar .brand-text .sub {
  font-size: 0.64rem;
  color: rgba(255,255,255,0.7);
}

/* Desktop Topbar Navigation */
.portal-desktop-nav {
  display: none;
}
.portal-desktop-actions {
  display: none;
}

@media (min-width: 992px) {
  .portal-desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
  }
  .portal-desktop-nav a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 500;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: var(--trans);
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .portal-desktop-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }
  .portal-desktop-nav a.active {
    background: rgba(2, 132, 199, 0.28);
    font-weight: 600;
    color: #e0f2fe;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
  }
  .portal-desktop-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }
  .portal-student-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.2rem 0.65rem 0.2rem 0.3rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .portal-student-pill .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue-2);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .portal-student-pill .st-info {
    line-height: 1.15;
  }
  .portal-student-pill .st-name {
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .portal-student-pill .st-idx {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.64rem;
    font-family: monospace;
  }
  .portal-topbar .menu-btn {
    display: none !important;
  }
}

.portal-topbar .menu-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive Content Container */
.portal-content {
  padding: 0.75rem 0.75rem 80px;
  flex: 1;
  width: 100%;
}
@media (min-width: 768px) {
  .portal-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.25rem 1rem 30px;
  }
}
@media (min-width: 992px) {
  .portal-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 40px;
  }
}

/* Multi-column Portal Grid */
.portal-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .portal-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 1rem;
    align-items: start;
  }
  .portal-grid.equal {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 992px) {
  .portal-grid {
    grid-template-columns: 1.35fr 1fr;
    gap: 1.25rem;
  }
  .portal-grid.equal {
    grid-template-columns: 1fr 1fr;
  }
}
.portal-main-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}
.portal-side-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

/* Native Mobile Style Bottom Bar - SHOWN ON MOBILE ONLY */
.portal-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  height: 52px;
  box-shadow: 0 -3px 12px rgba(0,0,0,0.05);
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 768px) {
  .portal-bottom-nav {
    display: none !important; /* CRITICAL: Never show mobile bottom bar on tablet or desktop */
  }
}
.portal-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  gap: 0.15rem;
  transition: var(--trans);
}
.portal-bottom-nav a i {
  font-size: 0.95rem;
}
.portal-bottom-nav a.active {
  color: var(--blue-2);
}
.portal-bottom-nav .nav-confirm {
  background: linear-gradient(135deg, #0284c7, #0057b7);
  color: #fff !important;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  margin-top: -14px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  font-size: 1rem !important;
  flex: none !important;
}

/* Welcome Banner (Student) */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #0d3b7a 100%);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.welcome-banner .congratulations {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fbbf24;
  margin-bottom: 0.2rem;
}
.welcome-banner h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
  line-height: 1.25;
}
.welcome-banner p {
  font-size: 0.75rem;
  opacity: 0.88;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0.5rem 0.3rem;
}
.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}
.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #fff;
}
.step-circle.done { background: var(--success); border-color: var(--success); color: #fff; }
.step-circle.active { background: var(--blue-2); border-color: var(--blue-2); color: #fff; box-shadow: 0 0 0 2px rgba(2,132,199,0.25); }
.step-label { font-size: 0.6rem; color: var(--text-muted); font-weight: 600; line-height: 1.1; }

/* Countdown */
.countdown-card {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-radius: var(--radius);
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  color: #fff;
  text-align: center;
}
.countdown-card.safe { background: linear-gradient(135deg, #16a34a, #15803d); }
.countdown-card.warning { background: linear-gradient(135deg, #d97706, #b45309); }
.countdown-card.passed { background: linear-gradient(135deg, #64748b, #475569); }
.countdown-card .days { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.countdown-card .label { font-size: 0.74rem; opacity: 0.9; margin-top: 0.2rem; font-weight: 600; }
.countdown-card .deadline-text { font-size: 0.68rem; opacity: 0.8; margin-top: 0.35rem; }

/* Info Rows */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-weight: 500; }
.info-value { font-weight: 600; color: var(--navy); text-align: right; }

/* Fee Table */
.fee-table { width: 100%; border-collapse: collapse; }
.fee-table th { background: var(--navy); color: #fff; padding: 0.5rem 0.7rem; font-size: 0.72rem; font-weight: 600; text-align: left; }
.fee-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--border); font-size: 0.78rem; }
.fee-table tr:last-child td { border-bottom: none; font-weight: 700; background: #f8fafc; }
.fee-table .amount { text-align: right; font-weight: 600; color: var(--navy); }

/* Confirm Options */
.confirm-option {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #fff;
}
.confirm-option:hover { border-color: var(--blue-2); background: #f0f9ff; }
.confirm-option.selected { border-color: var(--blue-2); background: #f0f9ff; }
.confirm-option.selected-report { border-color: var(--success); background: #f0fdf4; }
.confirm-option.selected-not { border-color: var(--danger); background: #fef2f2; }
.confirm-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue-2); flex-shrink: 0; }
.confirm-option .option-icon { font-size: 1.25rem; flex-shrink: 0; }
.confirm-option .option-text strong { display: block; font-size: 0.82rem; }
.confirm-option .option-text span { font-size: 0.7rem; color: var(--text-muted); }

/* Document card */
.doc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  transition: var(--trans);
  margin-bottom: 0.6rem;
}
.doc-card:hover { border-color: var(--blue-2); box-shadow: var(--shadow-sm); }
.doc-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-info h4 { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info p { font-size: 0.7rem; color: var(--text-muted); }

/* Receipt Card */
.receipt-card {
  background: linear-gradient(135deg, var(--navy), #0d3b7a);
  border-radius: var(--radius);
  padding: 1.1rem;
  color: #fff;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
}
.receipt-ref {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fbbf24;
  text-align: center;
  margin-bottom: 0.35rem;
  font-family: monospace;
}
.receipt-status { text-align: center; margin-bottom: 0.75rem; }
.receipt-rows { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 0.65rem; }
.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.76rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.receipt-row:last-child { border-bottom: none; }
.receipt-row .lbl { opacity: 0.75; }
.receipt-row .val { font-weight: 600; text-align: right; }

/* Login Page */
.gsmc-login-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(circle at 50% 25%, #132847 0%, #0c1a2e 60%, #070d18 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  width: 100%;
}
.login-card {
  background: rgba(255,255,255,0.98);
  border-radius: 16px;
  padding: 1.75rem 1.4rem;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.4);
  box-sizing: border-box;
}
.login-logo { text-align: center; margin-bottom: 1rem; }
.login-logo img { width: 68px; height: 68px; border-radius: 50%; object-fit: contain; }
.login-title { text-align: center; margin-bottom: 0.25rem; }
.login-title h1 { font-size: 1.25rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.login-title .subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

.btn-primary-gsmc {
  width: 100%;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, #0284c7, #0057b7);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--trans);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.btn-primary-gsmc:hover {
  background: linear-gradient(135deg, #0369a1, #004494);
  transform: translateY(-1px);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Form layout helpers */
.form-card { background: var(--card); border-radius: var(--radius); padding: 1.1rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.form-section-title { font-size: 0.85rem; font-weight: 700; color: var(--navy); padding-bottom: 0.35rem; border-bottom: 1.5px solid var(--border); margin-bottom: 0.75rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 576px) {
  .form-row.col-2 { grid-template-columns: 1fr 1fr; }
  .form-row.col-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Announcements card */
.announcement-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 3.5px solid var(--gold-2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.6rem;
}
.announcement-card h4 { font-size: 0.82rem; font-weight: 700; margin-bottom: 0.2rem; }
.announcement-card p  { font-size: 0.74rem; color: var(--text-muted); }

/* Utilities */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-navy   { color: var(--navy); }
.text-sm     { font-size: 0.74rem; }
.fw-bold     { font-weight: 700; }
.mt-1 { margin-top: 0.4rem; }  .mt-2 { margin-top: 0.75rem; }  .mt-3 { margin-top: 1.25rem; }
.mb-1 { margin-bottom: 0.4rem; } .mb-2 { margin-bottom: 0.75rem; } .mb-3 { margin-bottom: 1.25rem; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 0.4rem; } .gap-2 { gap: 0.75rem; }
.w-100 { width: 100%; }

/* Mobile viewport adjustments (< 480px, including 302px) */
@media (max-width: 480px) {
  html { font-size: 12.5px; }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
  .page-header h1 { font-size: 1.05rem; }
  .page-header .actions {
    width: 100%;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
  }
  .page-header .actions .btn, .page-header .actions .btn-sm {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  .admin-topbar .page-title {
    flex: 1;
    min-width: 0;
    max-width: none;
    font-size: 0.82rem;
  }
  .admin-topbar .admin-badge { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .stat-card { padding: 0.65rem 0.75rem; }
  .stat-card .stat-number { font-size: 1.25rem; }
  .stat-card .stat-label { font-size: 0.65rem; }
  .table-toolbar { padding: 0.5rem 0.75rem; }
  .table-toolbar h3 { font-size: 0.78rem; }
  thead th, tbody td { padding: 0.42rem 0.55rem; font-size: 0.72rem; }
  .login-card { padding: 1.25rem 0.95rem; }
  .portal-content { padding: 0.6rem 0.6rem 75px; }
  .filter-bar { padding: 0.6rem; gap: 0.4rem; }
  .filter-group select, .filter-group input { width: 100%; font-size: 0.75rem; }
  .search-input input { min-width: 100%; }
}

@media (max-width: 360px) {
  html { font-size: 12px; }
  .admin-content { padding: 0.55rem 0.5rem; }
  .card, .gsmc-card { padding: 0.75rem 0.65rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .stat-card { padding: 0.5rem 0.55rem; }
  .stat-card .stat-number { font-size: 1.15rem; }
  .stat-card .stat-icon { font-size: 0.95rem; }
  .stat-card .stat-label { font-size: 0.62rem; }
  .report-grid { gap: 0.5rem; }
  .option-radio-item { min-width: 100%; }
}

/* ============================================================
   REPORTS CENTER (index + viewer)
   ============================================================ */
.rpt-filter-card { padding: 0.75rem 0.9rem; margin-bottom: 0.85rem; }
.rpt-filter-title { font-size: 0.74rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.35rem; }
.rpt-filter-title i { color: var(--blue-2); }
.rpt-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.rpt-filter .filter-group { flex: 1 1 170px; min-width: 0; }
.rpt-filter .filter-group select, .rpt-filter .filter-group input { width: 100%; }
.rpt-filter-actions { display: flex; gap: 0.4rem; flex: 0 0 auto; }

.rpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 0.6rem; margin-bottom: 1rem; }
.rpt-kpi {
  background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--kpi, var(--blue-2));
  border-radius: var(--radius); padding: 0.6rem 0.7rem; display: flex; align-items: center; gap: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.rpt-kpi-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--kpi, var(--blue-2)); background: color-mix(in srgb, var(--kpi, #0284c7) 12%, #fff);
}
.rpt-kpi-num { font-family: 'Outfit', sans-serif; font-size: 1.12rem; font-weight: 700; line-height: 1.1; color: var(--navy); }
.rpt-kpi-lbl { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); font-weight: 600; margin-top: 1px; }

.rpt-group { margin-top: 1.1rem; }
.rpt-group-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.rpt-group-head h2 { font-size: 0.86rem; font-weight: 700; color: var(--navy); margin: 0; }
.rpt-group-head .line { flex: 1; height: 1px; background: var(--border); }
.rpt-group-head .count { font-size: 0.64rem; font-weight: 700; color: var(--text-muted); background: #f1f5f9; border-radius: 20px; padding: 0.1rem 0.5rem; }

.rpt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.rpt-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem 0.9rem;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: var(--trans); position: relative; overflow: hidden;
}
.rpt-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c-fg, var(--blue-2)); }
.rpt-card:hover { border-color: var(--c-fg, var(--blue-2)); box-shadow: var(--shadow); transform: translateY(-1px); }
.rpt-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.rpt-card-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; background: var(--c-bg); color: var(--c-fg); flex-shrink: 0; }
.rpt-badge { font-size: 0.62rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 20px; background: var(--c-bg); color: var(--c-fg); white-space: nowrap; }
.rpt-card-title { font-size: 0.82rem; font-weight: 700; color: var(--navy); margin-bottom: 0.2rem; font-family: 'Outfit', sans-serif; }
.rpt-card-desc { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 0.7rem; flex: 1; }
.rpt-card-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.35rem; }

.rpt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.38rem 0.4rem;
  font-size: 0.7rem; font-weight: 600; border-radius: 6px; border: 1px solid var(--border); background: #fff;
  color: var(--text); text-decoration: none; cursor: pointer; transition: var(--trans); line-height: 1.2; white-space: nowrap; font-family: 'Inter', sans-serif;
}
.rpt-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.rpt-btn.view  { color: #0369a1; border-color: #bae6fd; background: #f0f9ff; }
.rpt-btn.excel { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.rpt-btn.pdf   { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.rpt-btn.navy  { color: #fff; background: var(--navy); border-color: var(--navy); }
.rpt-btn.ghost { color: var(--navy); background: #f1f5f9; }
.rpt-btn.lg { padding: 0.45rem 0.85rem; font-size: 0.74rem; }

.rpt-c-blue   { --c-fg: #1d4ed8; --c-bg: #eff6ff; }
.rpt-c-green  { --c-fg: #15803d; --c-bg: #dcfce7; }
.rpt-c-red    { --c-fg: #b91c1c; --c-bg: #fee2e2; }
.rpt-c-amber  { --c-fg: #b45309; --c-bg: #fef3c7; }
.rpt-c-slate  { --c-fg: #475569; --c-bg: #f1f5f9; }
.rpt-c-indigo { --c-fg: #4338ca; --c-bg: #e0e7ff; }
.rpt-c-teal   { --c-fg: #0f766e; --c-bg: #ccfbf1; }
.rpt-c-purple { --c-fg: #7e22ce; --c-bg: #f3e8ff; }
.rpt-c-gold   { --c-fg: #a16207; --c-bg: #fef9c3; }

/* Viewer */
.rpt-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.7rem; }
.rpt-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.68rem; padding: 0.22rem 0.6rem; border-radius: 20px; background: #fff; border: 1px solid var(--border); color: var(--text-muted); }
.rpt-chip i { color: var(--blue-2); font-size: 0.66rem; }
.rpt-chip strong { color: var(--navy); font-weight: 700; }
.rpt-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.5rem; margin-bottom: 0.8rem; }
.rpt-sum { background: #fffbeb; border: 1px solid #fde68a; border-left: 3px solid #f59e0b; border-radius: var(--radius-sm); padding: 0.45rem 0.65rem; }
.rpt-sum-v { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.15; }
.rpt-sum-l { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.35px; color: #92400e; font-weight: 700; }

.rpt-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.rpt-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); background: #fbfcfe; }
.rpt-toolbar-right { display: flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; color: var(--text-muted); }
.rpt-toolbar select { padding: 0.3rem 0.5rem; border: 1.5px solid var(--border); border-radius: 6px; font-size: 0.72rem; background: #fff; }
.rpt-search { position: relative; flex: 1 1 220px; max-width: 340px; }
.rpt-search i { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.72rem; }
.rpt-search input { width: 100%; padding: 0.38rem 0.65rem 0.38rem 1.9rem; border: 1.5px solid var(--border); border-radius: 6px; font-size: 0.76rem; outline: none; }
.rpt-search input:focus { border-color: var(--blue-2); box-shadow: 0 0 0 2.5px rgba(2,132,199,0.12); }
.rpt-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.rpt-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.rpt-table thead th { background: #0f2744; color: #fff; font-size: 0.64rem; padding: 0.6rem 0.75rem; border-bottom: 2px solid #f59e0b; }
.rpt-table tbody td, .rpt-table tfoot td { padding: 0.5rem 0.75rem; font-size: 0.76rem; border-bottom: 1px solid #f1f5f9; }
.rpt-table tbody tr:nth-child(even) { background: #fafbfd; }
.rpt-table tbody tr:hover { background: #f0f9ff; }
.rpt-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rpt-table .ctr { text-align: center; }
.rpt-table .mono { font-family: 'Courier New', monospace; font-weight: 700; color: var(--blue-2); font-size: 0.73rem; }
.rpt-table .is-index { color: var(--text-muted); font-size: 0.7rem; width: 38px; }
.rpt-table .is-primary { font-weight: 700; color: var(--navy); }
.rpt-table tfoot td { font-weight: 800; background: #f1f5f9; color: var(--navy); border-top: 2px solid var(--navy); }
.rpt-pill { display: inline-flex; align-items: center; font-size: 0.64rem; font-weight: 700; padding: 0.12rem 0.5rem; border-radius: 20px; }
.rpt-pill.green { background: #dcfce7; color: #15803d; }
.rpt-pill.red   { background: #fee2e2; color: #b91c1c; }
.rpt-pill.amber { background: #fef3c7; color: #b45309; }
.rpt-pill.blue  { background: #e0f2fe; color: #0369a1; }
.rpt-pill.slate { background: #f1f5f9; color: #475569; }
.rpt-empty { text-align: center; padding: 2.2rem 1rem; color: var(--text-muted); font-size: 0.78rem; display: none; }
.rpt-empty.show { display: block; }
.rpt-empty i { display: block; font-size: 1.6rem; color: #cbd5e1; margin-bottom: 0.5rem; }
.rpt-pager { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.55rem 0.8rem; border-top: 1px solid var(--border); font-size: 0.7rem; color: var(--text-muted); background: #fbfcfe; }
.rpt-pager-btns { display: flex; align-items: center; gap: 0.3rem; }
.rpt-pager button { padding: 0.28rem 0.6rem; border: 1px solid var(--border); background: #fff; border-radius: 6px; font-size: 0.7rem; font-weight: 600; cursor: pointer; color: var(--navy); }
.rpt-pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.rpt-pager button:not(:disabled):hover { border-color: var(--blue-2); color: var(--blue-2); }

/* Viewer — phones: every row becomes a card */
@media screen and (max-width: 640px) {
  .rpt-table-scroll { overflow-x: visible; }
  .rpt-table, .rpt-table tbody, .rpt-table tfoot, .rpt-table td { display: block; width: 100%; }
  .rpt-table thead { display: none; }
  .rpt-table tr { display: block; margin: 0.55rem 0.6rem; width: auto; border: 1px solid var(--border); border-radius: 8px; padding: 0.3rem 0.7rem; background: #fff; box-shadow: var(--shadow-sm); }
  .rpt-table tbody tr:nth-child(even) { background: #fff; }
  .rpt-table tfoot tr { background: #f1f5f9; border-color: var(--navy); }
  .rpt-table td, .rpt-table tbody td, .rpt-table tfoot td {
    display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
    padding: 0.32rem 0; border-bottom: 1px dashed #e8edf3; font-size: 0.74rem; white-space: normal; text-align: right;
    border-top: none; background: transparent; word-break: break-word;
  }
  .rpt-table td::before { content: attr(data-label); font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; text-align: left; flex-shrink: 0; }
  .rpt-table td:last-child { border-bottom: none; }
  .rpt-table td.is-index { display: none; }
  .rpt-table td.is-primary { justify-content: flex-start; text-align: left; font-family: 'Outfit', sans-serif; font-size: 0.88rem; border-bottom: 1px solid var(--border); padding-bottom: 0.45rem; margin-bottom: 0.1rem; }
  .rpt-table td.is-primary::before { display: none; }
  .rpt-table .mono { font-size: 0.72rem; }
  .rpt-toolbar { padding: 0.55rem 0.6rem; }
  .rpt-search { max-width: none; flex-basis: 100%; }
  .rpt-toolbar-right { width: 100%; justify-content: space-between; }
  .rpt-pager { justify-content: center; text-align: center; }
  .rpt-card-actions .rpt-btn { padding: 0.45rem 0.3rem; }
  .rpt-filter-actions { width: 100%; }
  .rpt-filter-actions .btn { flex: 1; }
}
@media (max-width: 480px) {
  .rpt-kpis { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .rpt-kpi { padding: 0.5rem 0.55rem; gap: 0.45rem; }
  .rpt-kpi-icon { width: 26px; height: 26px; font-size: 0.7rem; }
  .rpt-kpi-num { font-size: 1rem; }
  .rpt-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .rpt-summary { grid-template-columns: 1fr 1fr; }
  .rpt-viewer-actions { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr 1fr; gap: 0.35rem; }
  .rpt-viewer-actions .rpt-btn.back { grid-column: 1 / -1; }
}

/* Print */
@media print {
  .admin-sidebar, .admin-topbar, .hamburger-btn, .btn, .action-btns, .portal-bottom-nav, .portal-topbar, .rpt-noprint { display: none !important; }
  .admin-main, .portal-content { margin: 0; padding: 0; max-width: 100%; }
  body { background: #fff; font-size: 11pt; }
  .rpt-table-wrap { border: none; box-shadow: none; }
  .rpt-table-scroll { overflow: visible; }
  .rpt-table thead th { background: #0f2744 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rpt-table td, .rpt-table th { font-size: 8.5pt; padding: 0.25rem 0.4rem; }
  .rpt-pill, .rpt-sum { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rpt-table tr { page-break-inside: avoid; }
}

