/* ============================================================================
   SIM GTK Annur Prima - Tema Hijau-Emas (Identitas YP. Annur Prima)
   ============================================================================ */

:root {
  --emerald-900: #093520;
  --emerald-800: #0f5132;
  --emerald-700: #146c43;
  --emerald-600: #198754;
  --emerald-500: #22a066;
  --emerald-100: #e7f4ed;
  --emerald-50:  #f3faf6;

  --gold-600: #b8860b;
  --gold-500: #d4af37;
  --gold-400: #f0c952;
  --gold-100: #fdf6dc;

  --bg-page: #f0f6f2;
  --surface: #ffffff;
  --text-main: #1b2d23;
  --text-muted: #587063;
  --border-soft: #d7e7dd;

  --ok-bg: #d1e7dd;     --ok-fg: #0f5132;     --ok-bd: #a3cfbb;
  --warn-bg: #fff3cd;   --warn-fg: #856404;   --warn-bd: #ffe69c;
  --bad-bg: #f8d7da;    --bad-fg: #842029;    --bad-bd: #f1aeb5;

  --shadow-sm: 0 2px 8px rgba(15, 81, 50, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 81, 50, 0.10);
  --shadow-lg: 0 22px 50px rgba(9, 53, 32, 0.18);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald-700); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- LOGIN PAGE ---------------- */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.22), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(25, 135, 84, 0.35), transparent 40%),
    linear-gradient(135deg, #072918 0%, #0f5132 52%, #156e45 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

.login-pattern {
  position: fixed;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: radial-gradient(#f0c952 1.2px, transparent 1.2px);
  background-size: 26px 26px;
}

.faq-corner-btn {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(240, 201, 82, 0.5);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
}
.faq-corner-btn:hover { background: var(--gold-500); color: var(--emerald-900); }

.login-card {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  border-top: 6px solid var(--gold-500);
  padding: 32px 30px 28px;
}

.login-brand {
  text-align: center;
  margin-bottom: 22px;
}
.login-brand img { width: 72px; height: 72px; margin-bottom: 8px; }
.login-brand h1 { margin: 0; font-size: 21px; color: var(--emerald-900); font-weight: 800; }
.internal-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-100);
  color: #7a5800;
  border: 1px solid #ead282;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.login-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.form-group { margin-bottom: 15px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--emerald-900); margin-bottom: 6px; }
.form-control, .form-select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #cfe0d6;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.14);
}

.input-password-wrap { position: relative; }
.input-password-wrap .form-control { padding-right: 44px; }
.toggle-pw-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
}
.toggle-pw-btn:hover { color: var(--emerald-700); }

.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.captcha-img-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f4faf6;
  border: 1.5px solid #cfe0d6;
  border-radius: 10px;
  padding: 4px 8px;
}
.captcha-refresh {
  background: var(--emerald-100);
  border: none;
  color: var(--emerald-800);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captcha-refresh:hover { background: var(--gold-100); color: #7a5800; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600)); color: #fff; box-shadow: 0 6px 16px rgba(15,81,50,.22); }
.btn-primary:hover { background: linear-gradient(135deg, var(--emerald-900), var(--emerald-700)); }
.btn-gold { background: linear-gradient(135deg, #d4af37, #e7c655); color: #1d2b22; box-shadow: 0 4px 12px rgba(212,175,55,.28); }
.btn-outline { background: #fff; color: var(--emerald-800); border-color: #b7d3c2; }
.btn-outline:hover { background: var(--emerald-50); }
.btn-danger { background: #dc3545; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* Loading overlay animasi tunggu saat masuk */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 53, 32, 0.82);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.loading-overlay.active { display: flex; }
.spinner-ring {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(240, 201, 82, 0.25);
  border-top-color: var(--gold-400);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- PORTAL GURU: LAYOUT & LEFT RAIL ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, var(--emerald-900), var(--emerald-800) 65%, var(--emerald-700));
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--gold-500);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-brand img { width: 38px; height: 38px; }
.topbar-title { font-weight: 800; font-size: 16px; line-height: 1.2; }
.topbar-sub { font-size: 11.5px; color: var(--gold-400); font-weight: 600; }
.topbar-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.topbar-chip {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(240,201,82,0.35);
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff;
}

.portal-shell {
  display: flex;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  gap: 24px;
  position: relative;
}

/* Left circular icon rail */
.nav-rail {
  width: 78px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
  height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  background: var(--surface);
  border-radius: 28px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  z-index: 30;
}

.rail-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--emerald-50);
  border: 1.5px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all .22s ease;
  text-decoration: none;
}
.rail-item:hover {
  background: var(--emerald-100);
  color: var(--emerald-800);
  border-color: var(--emerald-500);
  text-decoration: none;
}
.rail-item.active {
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 81, 50, 0.30);
  border-color: var(--gold-400);
}
.rail-item .rail-tooltip {
  position: absolute;
  left: 62px;
  background: var(--emerald-900);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: all .18s ease;
  box-shadow: var(--shadow-sm);
}
.rail-item:hover .rail-tooltip { opacity: 1; transform: translateX(0); }

/* Tombol Keluar yang melebar bertuliskan Logout saat disorot */
.rail-logout-wrap {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: center;
}
.rail-logout {
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff0f1;
  color: #b02a37;
  border: 1.5px solid #f5c2c7;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width .28s ease, background .2s ease, color .2s ease;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}
.rail-logout svg { flex-shrink: 0; }
.rail-logout span { opacity: 0; transition: opacity .2s ease; }
.rail-logout:hover {
  max-width: 130px;
  background: #dc3545;
  color: #fff;
  border-color: #dc3545;
  box-shadow: 0 8px 18px rgba(220,53,69,.28);
  text-decoration: none;
}
.rail-logout:hover span { opacity: 1; }

.portal-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------------- CARDS & SECTIONS ---------------- */
.section-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
  scroll-margin-top: 84px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--emerald-100);
}
.section-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: var(--emerald-900);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--emerald-100);
  color: var(--emerald-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Profile Hero */
.profile-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #f5fbf7 0%, #fffdf4 100%);
  border: 1px solid #d5e8dc;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
}
.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 4px solid var(--gold-500);
  box-shadow: 0 8px 20px rgba(15,81,50,0.16);
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; color: var(--emerald-900); }
.profile-unit-line { font-size: 14.5px; font-weight: 600; color: var(--emerald-700); margin-bottom: 8px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--emerald-100);
  color: var(--emerald-800);
}
.pill-gold { background: var(--gold-100); color: #7a5800; border: 1px solid #ecd485; }

/* Two-column Key-Value Grid */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}
.kv-item {
  display: flex;
  flex-direction: column;
  padding: 9px 12px;
  background: #fbfdfc;
  border: 1px solid #e7f0ea;
  border-radius: 10px;
}
.kv-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.kv-val { font-size: 14px; font-weight: 600; color: var(--text-main); margin-top: 2px; word-break: break-word; }

/* Validation Banner + Barcode */
.val-meta-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f3faf6, #fffdf5);
  border: 1.5px solid #cfe3d7;
  border-radius: 14px;
  margin-bottom: 18px;
}
.val-meta-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.val-meta-item small { display: block; font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.val-meta-item strong { font-size: 14px; color: var(--emerald-900); }
.barcode-box { text-align: center; background: #fff; padding: 8px 12px; border-radius: 10px; border: 1px solid #dbe9e0; }
.barcode-text { font-family: monospace; font-size: 10.5px; color: var(--emerald-800); margin-top: 2px; }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.st-hijau { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-bd); }
.st-kuning { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-bd); }
.st-merah { background: var(--bad-bg); color: var(--bad-fg); border: 1px solid var(--bad-bd); }

/* 11-Row Validation Accordion Table */
.val-table { border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.val-row { border-bottom: 1px solid var(--border-soft); }
.val-row:last-child { border-bottom: none; }
.val-row-head {
  display: grid;
  grid-template-columns: 44px 210px 1fr 140px 36px;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  background: #fff;
  transition: background .15s;
}
.val-row-head:hover { background: #f8fcf9; }
.val-no {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--emerald-100); color: var(--emerald-800);
  font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.val-title { font-weight: 700; font-size: 13.5px; color: var(--emerald-900); }
.val-summary { font-size: 13px; color: var(--text-muted); }
.val-chevron { transition: transform .2s; color: var(--text-muted); justify-self: end; }
.val-row.open .val-chevron { transform: rotate(180deg); }
.val-row-body {
  display: none;
  padding: 14px 18px 16px 68px;
  background: #fafdfb;
  border-top: 1px dashed #d7e7dd;
  font-size: 13.5px;
}
.val-row.open .val-row-body { display: block; }

/* Honor 12 Months Cards */
.honor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.honor-card {
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 15px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform .15s, box-shadow .15s;
}
.honor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-500); }
.honor-month { font-weight: 800; font-size: 14.5px; color: var(--emerald-900); }
.honor-amount { font-size: 16px; font-weight: 800; color: var(--emerald-700); }

/* Resume Dual Columns & Pendidikan Timeline */
.resume-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.sub-card {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  background: #fcfefd;
}
.sub-card h4 {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--emerald-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.timeline {
  position: relative;
  padding-left: 22px;
  border-left: 2.5px solid var(--emerald-500);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tl-item { position: relative; }
.tl-dot {
  position: absolute;
  left: -29px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-500);
  border: 2.5px solid var(--emerald-800);
}
.tl-year { font-size: 12px; font-weight: 800; color: var(--emerald-700); }
.tl-school { font-weight: 700; font-size: 14px; color: var(--text-main); }
.tl-meta { font-size: 12.5px; color: var(--text-muted); }

/* Data Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 12px; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
table.data-table th {
  background: var(--emerald-50);
  color: var(--emerald-900);
  font-weight: 700;
  text-align: left;
  padding: 11px 12px;
  border-bottom: 2px solid var(--border-soft);
  white-space: nowrap;
}
table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf4ef;
  vertical-align: top;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tfoot td { background: #f8fcf9; font-weight: 800; border-top: 2px solid var(--border-soft); }

/* Tabs */
.tabs-bar { display: flex; gap: 8px; border-bottom: 2px solid var(--emerald-100); margin-bottom: 16px; }
.tab-btn {
  padding: 9px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
}
.tab-btn.active { color: var(--emerald-800); border-bottom-color: var(--gold-500); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); }
.alert-warning { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd); }
.alert-danger  { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-bd); }
.alert-info    { background: #e8f4f8; color: #0c5460; border-color: #bee5eb; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 40, 24, 0.58);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: #fff;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--gold-500);
}
.modal-hdr {
  padding: 16px 22px;
  background: var(--emerald-50);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-hdr h3 { margin: 0; font-size: 17px; color: var(--emerald-900); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 20px 22px; }

/* Backoffice Sidebar Layout */
.bo-shell { display: flex; min-height: calc(100vh - 63px); }
.bo-sidebar {
  width: 256px;
  background: #fff;
  border-right: 1px solid var(--border-soft);
  padding: 18px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bo-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--text-main);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: all .15s;
}
.bo-nav-link:hover { background: var(--emerald-50); color: var(--emerald-800); text-decoration: none; }
.bo-nav-link.active { background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600)); color: #fff; }
.bo-content { flex: 1; min-width: 0; padding: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--emerald-600);
}
.stat-card.gold { border-left-color: var(--gold-500); }
.stat-card.warn { border-left-color: #f0ad4e; }
.stat-card.bad  { border-left-color: #dc3545; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.stat-val { font-size: 26px; font-weight: 800; color: var(--emerald-900); margin-top: 4px; }

/* Responsive Mobile Bottom Bar */
@media (max-width: 960px) {
  .honor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resume-grid, .kv-grid, .stat-grid { grid-template-columns: 1fr; }
  .val-row-head { grid-template-columns: 36px 1fr auto; }
  .val-summary { display: none; }
  .bo-shell { flex-direction: column; }
  .bo-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border-soft); }
}

@media (max-width: 820px) {
  .portal-shell { flex-direction: column; padding: 14px 12px 92px; }
  .nav-rail {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    top: auto;
    width: auto;
    height: 64px;
    flex-direction: row;
    justify-content: space-around;
    padding: 6px 10px;
    border-radius: 20px;
  }
  .rail-item { width: 42px; height: 42px; }
  .rail-item .rail-tooltip { display: none; }
  .rail-logout-wrap { margin-top: 0; width: auto; }
  .rail-logout { height: 42px; min-width: 42px; max-width: 42px; padding: 0 10px; }
}

@media print {
  .no-print, .nav-rail, .topbar, .bo-sidebar { display: none !important; }
  body { background: #fff; }
  .section-card { box-shadow: none; border: 1px solid #ccc; }
}
