:root {
  --red: #ef2d34;
  --red-dark: #c91f28;
  --navy: #081936;
  --navy-2: #103262;
  --navy-3: #1e4b86;
  --gold: #c99a3c;
  --gold-light: #f1d286;
  --green: #159455;
  --green-soft: #e5f7ed;
  --amber: #a56a00;
  --amber-soft: #fff1cf;
  --blue-soft: #e6efff;
  --purple-soft: #f0e8ff;
  --surface: #ffffff;
  --bg: #f3f6fb;
  --line: #dce4ef;
  --muted: #64748b;
  --text: #142033;
  --shadow: 0 18px 50px rgba(8, 25, 54, .12);
  --shadow-dark: 0 22px 60px rgba(0, 0, 0, .28);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); }
button, input, select { font: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
small { color: var(--muted); }

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  font-weight: 850;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--navy), var(--navy-3)); box-shadow: 0 10px 22px rgba(16, 50, 98, .18); }
.btn-gold { color: #432e00; background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.btn-light { color: var(--navy); background: #eef3f9; }
.btn-danger { color: #a41922; background: #fee8ea; }
.btn-excel { color: white; background: linear-gradient(135deg, #107c41, #1aa35a); }
.btn-block { width: 100%; }

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 5% 0%, rgba(239,45,52,.10), transparent 24%),
    radial-gradient(circle at 95% 0%, rgba(201,154,60,.12), transparent 22%),
    var(--bg);
}
.admin-header {
  width: min(1480px, calc(100% - 34px));
  margin: 0 auto;
  padding: 20px 0 12px;
  display: grid;
  grid-template-columns: minmax(250px, 360px) 1fr auto;
  align-items: center;
  gap: 24px;
}
.admin-header .brand-logo { width: 100%; max-height: 74px; object-fit: contain; object-position: left center; }
.admin-header-copy { text-align: right; }
.admin-header-copy h1 { margin: 0; font-size: clamp(28px, 3vw, 44px); color: var(--navy); }
.admin-header-copy p { margin: 7px 0 0; color: var(--muted); line-height: 1.5; }
.admin-jump-nav {
  width: min(1480px, calc(100% - 34px));
  margin: 6px auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(16,50,98,.08);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(8,25,54,.06);
  position: sticky;
  top: 8px;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.admin-jump-nav a { text-decoration: none; font-weight: 800; color: var(--navy-2); padding: 8px 12px; border-radius: 10px; }
.admin-jump-nav a:hover { background: #eef3f9; }
.admin-main { width: min(1480px, calc(100% - 34px)); margin: 0 auto; padding-bottom: 44px; }
.admin-section { scroll-margin-top: 90px; margin-bottom: 28px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.section-heading span, .section-kicker { color: var(--red); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; font-weight: 900; }
.section-heading h2, .settings-panel h2 { margin: 4px 0 0; color: var(--navy); font-size: clamp(24px, 2.2vw, 34px); }
.mini-kpis { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mini-kpis span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 999px; color: var(--navy-2); background: white; border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(8,25,54,.05); }
.mini-kpis b { color: var(--red); font-size: 18px; }
.admin-layout { display: grid; grid-template-columns: 430px minmax(0, 1fr); gap: 22px; align-items: start; }
.admin-side { display: grid; gap: 18px; }
.panel { background: rgba(255,255,255,.98); border: 1px solid rgba(16,50,98,.08); border-radius: var(--radius); box-shadow: var(--shadow); padding: 21px; }
.panel-title { margin: 0 0 17px; color: var(--navy); font-size: 22px; }
.panel-note { margin: -6px 0 15px; color: var(--muted); line-height: 1.55; font-size: 13px; }
.form-body { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-group { display: grid; gap: 7px; }
.form-group label { color: var(--navy-2); font-size: 13px; font-weight: 800; }
.form-group label small { font-weight: 600; }
.form-control {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #cfd9e6;
  border-radius: 12px;
  background: white;
  color: var(--navy);
  outline: none;
}
.form-control:focus { border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(30,75,134,.09); }
.file-control { padding: 8px; }
.inline-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.inline-input span { color: var(--muted); font-size: 12px; font-weight: 700; }
.status-help { display: flex; flex-wrap: wrap; gap: 8px; }
.status-help span { padding: 7px 9px; border-radius: 9px; background: #f4f7fb; color: var(--muted); font-size: 11px; }
.status-help b { color: var(--navy-2); }
.form-message, .import-result { min-height: 20px; font-size: 13px; line-height: 1.5; }
.form-message.success, .import-result.success { color: #08783f; }
.form-message.error, .import-result.error { color: #b21f2a; }
.import-result.loading { color: var(--navy-2); }
.import-result ul { margin: 7px 0 0; padding-left: 18px; }
.admin-data-panel { min-width: 0; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.search-group { display: flex; gap: 10px; flex: 1; }
.compact-control { max-width: 190px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.admin-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 15px; }
.admin-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.admin-table th { padding: 13px 12px; text-align: left; color: white; background: linear-gradient(90deg, var(--red), var(--red-dark)); font-size: 13px; white-space: nowrap; }
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.admin-table tbody tr:nth-child(even) td { background: #f8fafd; }
.admin-table td small { display: block; margin-top: 4px; line-height: 1.4; }
.row-actions { display: flex; gap: 7px; }
.icon-btn { border: 0; border-radius: 9px; padding: 8px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.icon-btn.edit { color: white; background: var(--navy-2); }
.icon-btn.delete { color: #a41922; background: #fee8ea; }
.empty-admin { padding: 42px 20px; text-align: center; color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 66px; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.status-spk { color: var(--green); background: var(--green-soft); border: 1px solid #b9e5cd; }
.status-hp { color: var(--amber); background: var(--amber-soft); border: 1px solid #f2d893; }
.status-mp { color: #245c9d; background: var(--blue-soft); border: 1px solid #bfd3ef; }
.invite-fleet { color: #174d85; background: #e3edfa; border: 1px solid #bfd2e8; }
.invite-retail { color: #713da2; background: var(--purple-soft); border: 1px solid #d9c5ed; }
.branch-badge { margin-top: 5px; color: #7b5508; background: #fff3d7; border: 1px solid #efd99c; }
.settings-panel { display: grid; grid-template-columns: minmax(240px, .7fr) 1.3fr; gap: 24px; align-items: center; }
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)) auto; gap: 12px; align-items: end; }

.display-page { min-height: 100vh; overflow: hidden; background: var(--navy); color: white; }
.monitor-shell {
  height: 100svh;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  gap: clamp(8px, .8vw, 14px);
  padding: clamp(10px, 1vw, 18px);
  background:
    radial-gradient(circle at 10% 0%, rgba(239,45,52,.22), transparent 30%),
    radial-gradient(circle at 78% 0%, rgba(201,154,60,.18), transparent 27%),
    linear-gradient(150deg, rgba(255,255,255,.03), transparent 38%),
    var(--navy);
}
.monitor-header {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, .9fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.10);
}
.monitor-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.monitor-logo { width: clamp(120px, 13vw, 210px); max-height: 60px; object-fit: contain; background: white; border-radius: 12px; padding: 7px 10px; }
.monitor-eyebrow { color: var(--gold-light); font-size: clamp(10px, .8vw, 14px); letter-spacing: .08em; text-transform: uppercase; font-weight: 800; }
.monitor-header h1 { margin: 4px 0 0; font-size: clamp(28px, 3.2vw, 54px); line-height: 1; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hilux-hero { position: relative; height: clamp(86px, 10vw, 140px); overflow: hidden; border-radius: 17px; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 66%); }
.hilux-slide { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; opacity: 0; transform: translateX(24px) scale(.97); transition: opacity .7s ease, transform .7s ease; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); }
.hilux-slide.active { opacity: 1; transform: none; }
.monitor-meta { text-align: right; display: grid; justify-items: end; gap: 3px; }
.clock { color: var(--gold-light); font-size: clamp(22px, 2vw, 35px); font-weight: 900; }
.today { color: #d9e3f0; font-size: clamp(11px, .8vw, 15px); }
.fullscreen-btn { margin-top: 6px; padding: 8px 11px; border-radius: 10px; border: 1px solid rgba(241,210,134,.4); background: rgba(255,255,255,.08); color: white; font-weight: 800; cursor: pointer; }
.monitor-content { min-height: 0; overflow: hidden; }
.view-layout { height: 100%; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); gap: clamp(8px, .7vw, 12px); }
.simple-kpi-grid { display: grid; gap: clamp(8px, .7vw, 12px); }
.simple-kpi-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.simple-kpi-grid.invitation-kpis { grid-template-columns: 1.2fr repeat(4, minmax(0,1fr)); }
.simple-kpi {
  min-height: clamp(74px, 8vh, 104px);
  padding: clamp(12px, 1.2vw, 20px);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--navy);
  background: linear-gradient(135deg, #fff, #edf3fb);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.simple-kpi span { color: #51627a; font-weight: 850; font-size: clamp(12px, 1vw, 17px); }
.simple-kpi strong { color: var(--navy); font-size: clamp(34px, 4vw, 66px); line-height: 1; }
.simple-kpi.grand { color: white; background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.simple-kpi.grand span, .simple-kpi.grand strong { color: white; }
.simple-kpi.branch-1 { border-bottom: 5px solid var(--gold); }
.simple-kpi.branch-2 { border-bottom: 5px solid #4b7ec1; }
.simple-kpi.branch-3 { border-bottom: 5px solid #38a36a; }
.simple-kpi.hot { border-bottom: 5px solid #e0a324; }
.simple-kpi.medium { border-bottom: 5px solid #4c87cb; }
.branch-card-line { display: grid; grid-template-columns: minmax(250px, .8fr) 2.2fr; gap: 12px; }
.spv-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.spv-kpi-grid .simple-kpi { min-height: clamp(74px, 8vh, 104px); }
.spv-kpi-grid .simple-kpi strong { font-size: clamp(32px, 3.4vw, 58px); }
.monitor-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,.98);
  border: 2px solid rgba(201,154,60,.65);
  box-shadow: var(--shadow-dark);
}
.panel-heading { min-height: 62px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--navy); background: linear-gradient(90deg, #eef4fb, #fff); border-bottom: 1px solid var(--line); }
.panel-heading span { color: var(--red); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 900; }
.panel-heading h2 { margin: 2px 0 0; font-size: clamp(17px, 1.4vw, 25px); }
.panel-heading > b { color: white; background: var(--navy-2); padding: 8px 13px; border-radius: 999px; font-size: clamp(12px, .9vw, 16px); white-space: nowrap; }
.data-scroll-viewport, .invitation-scroll-viewport { min-height: 0; overflow-y: auto; overflow-x: hidden; scroll-behavior: auto; scrollbar-width: thin; scrollbar-color: var(--gold) transparent; }
.data-scroll-viewport::-webkit-scrollbar, .invitation-scroll-viewport::-webkit-scrollbar { width: 8px; }
.data-scroll-viewport::-webkit-scrollbar-thumb, .invitation-scroll-viewport::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 20px; }
.monitor-table { width: 100%; border-collapse: collapse; table-layout: fixed; color: var(--navy); }
.monitor-table th { position: sticky; top: 0; z-index: 2; padding: clamp(9px, .8vw, 13px); text-align: left; color: white; background: linear-gradient(90deg, var(--red), var(--red-dark)); font-size: clamp(11px, .85vw, 15px); }
.monitor-table td { padding: clamp(9px, .85vw, 14px); border-bottom: 1px solid var(--line); border-right: 1px solid #eef2f7; font-size: clamp(12px, 1vw, 18px); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.monitor-table tbody tr:nth-child(even) td { background: #f6f9fd; }
.monitor-table td:first-child, .monitor-table th:first-child { width: 5%; text-align: center; }
.simple-monitor-table th:nth-child(2) { width: 24%; }
.simple-monitor-table th:nth-child(3) { width: 15%; }
.simple-monitor-table th:nth-child(4) { width: 24%; }
.simple-monitor-table th:nth-child(5) { width: 24%; }
.simple-monitor-table th:nth-child(6) { width: 10%; }
.customer-cell { color: var(--navy-2); font-weight: 900; }
.monitor-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: .75em; }
.unit-main { font-weight: 800; }
.unit-sub { margin-top: 3px; color: var(--muted); font-size: .76em; }
.branch-chip { display: inline-flex; padding: 7px 10px; border-radius: 999px; color: #725006; background: #fff1cf; border: 1px solid #efd58d; font-size: .82em; font-weight: 900; }
.empty-table { padding: 40px !important; text-align: center; color: var(--muted); }

.invitation-layout { grid-template-rows: auto minmax(0,1fr); }
.invitation-scroll-viewport { display: grid; gap: 12px; padding-right: 3px; }
.guest-spv-section, .guest-group { border-radius: 18px; background: rgba(255,255,255,.98); color: var(--navy); overflow: hidden; box-shadow: var(--shadow-dark); border: 1px solid rgba(201,154,60,.5); }
.guest-spv-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; padding: 12px; }
.guest-spv-summary { min-height: 82px; padding: 13px; border-radius: 14px; display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; background: linear-gradient(135deg, #f5f8fc, #fff); border: 1px solid var(--line); }
.guest-spv-summary span { grid-column: 1 / -1; color: var(--red); font-size: 10px; text-transform: uppercase; font-weight: 900; letter-spacing: .06em; }
.guest-spv-summary strong { font-size: clamp(13px, 1vw, 18px); }
.guest-spv-summary b { color: white; background: var(--navy-2); padding: 7px 9px; border-radius: 10px; font-size: clamp(12px, .9vw, 16px); }
.guest-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.guest-group-heading { padding: 13px 15px 7px; display: flex; align-items: center; justify-content: space-between; }
.guest-group-heading span { color: var(--red); font-size: 10px; text-transform: uppercase; font-weight: 900; }
.guest-group-heading h2 { margin: 3px 0 0; font-size: clamp(18px, 1.5vw, 26px); }
.guest-group-count { min-width: 74px; text-align: center; color: white; background: var(--red); border-radius: 14px; padding: 8px; }
.guest-group-count b { display: block; font-size: 26px; }
.guest-group-count small { color: white; }
.guest-inline-metrics { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 15px 11px; }
.guest-inline-metrics span { padding: 6px 9px; border-radius: 999px; color: var(--navy-2); background: #edf3fa; font-size: 11px; }
.guest-table th:nth-child(2) { width: 31%; }
.guest-table th:nth-child(3) { width: 33%; }
.guest-table th:nth-child(4), .guest-table th:nth-child(5) { width: 15%; }

.monitor-footer { min-height: 48px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 14px; align-items: center; color: #dbe5f1; }
.mode-controls { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.mode-controls::-webkit-scrollbar { display: none; }
.mode-button { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.14); color: white; background: rgba(255,255,255,.07); padding: 9px 12px; border-radius: 10px; font-size: clamp(10px, .75vw, 13px); font-weight: 900; cursor: pointer; }
.mode-button.active { color: var(--navy); background: var(--gold-light); border-color: var(--gold-light); }
.mode-button.invitation-mode.active { color: white; background: var(--red); border-color: var(--red); }
.rotation-state { min-width: 230px; display: grid; gap: 5px; font-size: 11px; }
.rotation-track { height: 5px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.16); }
.rotation-track span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--gold-light); transition: width .1s linear; }
.last-updated { font-size: 11px; white-space: nowrap; }

@media (max-width: 1180px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settings-panel { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .settings-grid .btn { grid-column: 1 / -1; }
  .monitor-header { grid-template-columns: 1fr minmax(270px, .8fr) auto; }
  .monitor-logo { width: 120px; }
  .monitor-header h1 { font-size: 30px; }
}

@media (max-width: 900px) {
  .admin-header { grid-template-columns: 1fr auto; }
  .admin-header .brand-logo { grid-column: 1 / -1; width: 300px; }
  .admin-header-copy { text-align: left; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .mini-kpis { justify-content: flex-start; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .monitor-header { min-height: 86px; grid-template-columns: 1fr auto; }
  .hilux-hero { display: none; }
  .monitor-meta { grid-column: 2; grid-row: 1; }
  .today { display: none; }
  .simple-kpi-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .simple-kpi { min-height: 68px; padding: 10px; }
  .simple-kpi span { font-size: 10px; }
  .simple-kpi strong { font-size: 34px; }
  .branch-card-line { grid-template-columns: 1fr; }
  .simple-kpi.branch-total { display: none; }
  .guest-group-grid { grid-template-columns: 1fr; }
  .monitor-footer { grid-template-columns: 1fr auto; }
  .rotation-state { display: none; }
}

@media (max-width: 720px) {
  .admin-header, .admin-main, .admin-jump-nav { width: min(100% - 20px, 1480px); }
  .admin-header { grid-template-columns: 1fr; gap: 12px; }
  .admin-header .brand-logo { grid-column: auto; width: 270px; }
  .admin-side { grid-template-columns: 1fr; }
  .form-row, .settings-grid { grid-template-columns: 1fr; }
  .search-group { flex-direction: column; }
  .compact-control { max-width: none; }
  .tool-actions { display: grid; grid-template-columns: 1fr; }
  .admin-table-wrap { border: 0; overflow: visible; }
  .admin-table { min-width: 0; }
  .admin-table thead { display: none; }
  .admin-table tbody { display: grid; gap: 12px; }
  .admin-table tr { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: 0 8px 22px rgba(8,25,54,.07); }
  .admin-table td, .admin-table tbody tr:nth-child(even) td { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 10px; padding: 8px 4px; border: 0; background: transparent; word-break: break-word; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 900; }

  .monitor-shell { padding: 8px; min-height: 500px; }
  .monitor-header { min-height: 72px; padding: 8px 10px; }
  .monitor-logo { width: 90px; padding: 4px 6px; }
  .monitor-eyebrow { display: none; }
  .monitor-header h1 { font-size: 20px; }
  .clock { font-size: 18px; }
  .fullscreen-btn { padding: 7px 8px; font-size: 10px; }
  .simple-kpi-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
  .simple-kpi-grid.invitation-kpis { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
  .simple-kpi { min-height: 54px; border-radius: 11px; padding: 7px; display: grid; justify-items: center; text-align: center; }
  .simple-kpi span { font-size: 8px; }
  .simple-kpi strong { font-size: 24px; }
  .spv-kpi-grid { gap: 5px; }
  .spv-kpi-grid .simple-kpi strong { font-size: 23px; }
  .panel-heading { min-height: 48px; padding: 7px 10px; }
  .panel-heading h2 { font-size: 14px; }
  .panel-heading > b { font-size: 10px; padding: 6px 8px; }
  .monitor-table { min-width: 760px; }
  .data-scroll-viewport { overflow-x: auto; }
  .monitor-table th, .monitor-table td { font-size: 11px; padding: 8px; }
  .guest-spv-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .guest-spv-summary { min-height: 68px; padding: 9px; }
  .guest-spv-summary strong { font-size: 11px; }
  .guest-spv-summary b { font-size: 10px; }
  .monitor-footer { min-height: 38px; grid-template-columns: 1fr; }
  .last-updated { display: none; }
  .mode-button { padding: 7px 9px; font-size: 9px; }
}

.launcher-page, .login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(239,45,52,.14), transparent 28%),
    radial-gradient(circle at top right, rgba(201,154,60,.16), transparent 25%),
    linear-gradient(160deg, #f7f9fc, #edf2f8);
}
.launcher-card, .login-card {
  width: min(900px, 100%);
  padding: clamp(26px, 4vw, 46px);
  border-radius: 28px;
  text-align: center;
  background: white;
  border: 1px solid rgba(16,50,98,.08);
  box-shadow: var(--shadow);
}
.launcher-card .brand-logo { width: min(430px, 80%); margin: 0 auto 20px; }
.launcher-card h1, .login-card h1 { margin: 0; color: var(--navy); font-size: clamp(28px, 4vw, 48px); }
.launcher-card p, .login-card p { max-width: 720px; margin: 14px auto 0; color: var(--muted); line-height: 1.65; font-size: 16px; }
.launcher-actions { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.launcher-link { min-height: 58px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; text-decoration: none; color: white; font-weight: 900; }
.launcher-link.admin { background: linear-gradient(135deg, var(--navy), var(--navy-3)); }
.launcher-link.display { background: linear-gradient(135deg, var(--red), var(--red-dark)); }
.check-list { display: grid; gap: 10px; margin: 22px 0; text-align: left; }
.check-item { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #f4f7fb; }
.check-item.ok span { color: var(--green); }
.check-item.bad span { color: var(--red); }
@media (max-width: 620px) { .launcher-actions { grid-template-columns: 1fr; } }

@media (max-width: 900px) {
  .monitor-header { grid-template-columns: minmax(0,1fr) 110px auto; }
  .hilux-hero { display: block; height: 68px; }
  .monitor-meta { grid-column: 3; grid-row: 1; }
}
@media (max-width: 540px) {
  .monitor-header { grid-template-columns: minmax(0,1fr) 78px auto; gap: 6px; }
  .hilux-hero { height: 54px; }
  .monitor-logo { width: 78px; }
  .monitor-header h1 { font-size: 17px; }
}
.branch-divider td {
  position: sticky;
  top: 39px;
  z-index: 1;
  padding: 9px 14px !important;
  color: white !important;
  background: linear-gradient(90deg, var(--navy-2), var(--navy-3)) !important;
  border: 0 !important;
  text-align: left !important;
}
.branch-divider td strong { margin-right: 12px; font-size: 1.05em; }
.branch-divider td span { color: var(--gold-light); font-size: .82em; font-weight: 800; }

/* Version 8: Jambi All memakai tiga tabel cabang yang bergerak per halaman secara bersamaan */
.all-view-layout { grid-template-rows: auto minmax(0, 1fr); }
.all-branch-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, .7vw, 12px);
}
.all-branch-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  border: 2px solid rgba(201,154,60,.5);
  box-shadow: var(--shadow-dark);
}
.all-branch-panel.branch-panel-1 { border-top: 5px solid var(--gold); }
.all-branch-panel.branch-panel-2 { border-top: 5px solid #4b7ec1; }
.all-branch-panel.branch-panel-3 { border-top: 5px solid #38a36a; }
.all-branch-heading {
  min-height: 60px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--navy);
  background: linear-gradient(90deg, #eef4fb, #fff);
  border-bottom: 1px solid var(--line);
}
.all-branch-heading span {
  color: var(--red);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.all-branch-heading h2 { margin: 2px 0 0; font-size: clamp(17px, 1.35vw, 24px); }
.all-branch-heading > b {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: white;
  background: var(--navy-2);
  font-size: clamp(10px, .8vw, 14px);
}
.all-branch-page {
  padding: 5px 10px;
  text-align: right;
  color: var(--muted);
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 800;
}
.all-branch-table-wrap { min-height: 0; overflow: hidden; }
.all-branch-table { height: 100%; }
.all-branch-table th,
.all-branch-table td { padding: clamp(7px, .62vw, 10px); font-size: clamp(10px, .76vw, 14px); }
.all-branch-table th:first-child,
.all-branch-table td:first-child { width: 7%; }
.all-branch-table th:nth-child(2) { width: 31%; }
.all-branch-table th:nth-child(3) { width: 20%; }
.all-branch-table th:nth-child(4) { width: 20%; }
.all-branch-table th:nth-child(5) { width: 22%; }
.all-branch-table .customer-cell small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .72em;
  font-weight: 700;
  white-space: normal;
}
.all-branch-table td { white-space: normal; word-break: break-word; }
.all-branch-table tbody { animation: tablePageEnter .35s ease both; }
@keyframes tablePageEnter {
  from { opacity: .25; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.branch-monitor-table th:nth-child(2) { width: 23%; }
.branch-monitor-table th:nth-child(3) { width: 15%; }
.branch-monitor-table th:nth-child(4) { width: 22%; }
.branch-monitor-table th:nth-child(5) { width: 17%; }
.branch-monitor-table th:nth-child(6) { width: 18%; }

@media (max-width: 1150px) {
  .all-branch-grid { grid-template-columns: 1fr; overflow-y: auto; padding-right: 3px; }
  .all-branch-panel { min-height: 420px; }
}

@media (max-width: 720px) {
  .all-branch-panel { min-height: 360px; }
  .all-branch-table { min-width: 620px; }
  .all-branch-table-wrap { overflow-x: auto; }
}
