/* ==========================================================================
   Digital Signage Theme & Engine - PT. BPR Mega Mas Lestari
   Ultra-Responsive Design System for All TVs (1080p, 4K, 720p, Portrait) & Web Browsers
   ========================================================================== */

:root {
  --color-primary: #B5122A;
  --color-primary-dark: #7A0A1B;
  --color-primary-light: #D91C3C;
  --color-secondary: #0F172A;
  --color-accent: #F7B500;
  --color-accent-light: #FFD043;
  --color-accent-glow: rgba(247, 181, 0, 0.35);
  --color-bg: #F1F5F9;
  --color-card: #FFFFFF;
  --color-card-muted: #F8FAFC;
  --color-text: #0F172A;
  --color-text-muted: #64748B;
  --color-text-light: #94A3B8;
  --color-border: #E2E8F0;
  --color-border-subtle: #CBD5E1;
  --color-success: #10B981;
  
  --font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 28px rgba(181, 18, 42, 0.15);
  --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.06);
  
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* TV Safe Zone & Spacing Defaults */
  --tv-safe-pad-x: clamp(8px, 1.4vw, 24px);
  --tv-safe-pad-y: clamp(6px, 1.2vh, 18px);
  --grid-gap: clamp(6px, 0.9vw, 14px);
}

/* ==========================================================================
   GLOBAL RESET & ROOT SCALING
   Fluid Typography calculated from Viewport Width & Height
   ========================================================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body, button, input, select, textarea {
  font-family: var(--font-family);
}

/* Ensure Font Awesome and any icon font never inherit text font-family or wrong font-weight */
.fa, .fas, .fa-solid {
  font-family: "Font Awesome 6 Free", "FontAwesome" !important;
  font-weight: 900 !important;
  font-style: normal;
  display: inline-block;
  line-height: 1;
}
.far, .fa-regular {
  font-family: "Font Awesome 6 Free", "FontAwesome" !important;
  font-weight: 400 !important;
  font-style: normal;
  display: inline-block;
  line-height: 1;
}
.fab, .fa-brands {
  font-family: "Font Awesome 6 Brands", "FontAwesome" !important;
  font-weight: 400 !important;
  font-style: normal;
  display: inline-block;
  line-height: 1;
}
.fa::before, .fas::before, .far::before, .fal::before, .fad::before, .fab::before,
.fa-solid::before, .fa-regular::before, .fa-brands::before, [class*="fa-"]::before {
  font-family: inherit !important;
}

html {
  /* Fluid base font: scales gracefully from 720p TV to 4K TV */
  font-size: clamp(12px, 0.8vw + 0.35vh, 22px);
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.35;
}

/* Base Fullscreen Signage TV Canvas */
.signage-wrapper {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: var(--tv-safe-pad-y) var(--tv-safe-pad-x);
  gap: var(--grid-gap);
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at 10% 20%, #F8FAFC 0%, #EDF2F7 100%);
}

/* ==========================================================================
   1. HEADER SECTION (Corporate Glassmorphism & Status)
   ========================================================================== */
.header-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #8A0C1E 100%);
  padding: clamp(6px, 1.1vh, 14px) clamp(12px, 1.4vw, 24px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: #FFFFFF;
  position: relative;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 20px);
  min-width: 0;
}

.logo-wrapper {
  background: #FFFFFF;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.header-logo {
  height: clamp(34px, 4.8vh, 64px);
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.brand-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: clamp(1.1rem, 1.45vw, 1.85rem);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.brand-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(8px, 1.1vw, 16px);
  font-size: clamp(0.65rem, 0.72vw, 0.95rem);
  color: #FFE4E6;
  margin-top: 3px;
  font-weight: 500;
}

.brand-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.brand-meta i {
  color: var(--color-accent);
  font-size: 0.85em;
}

.meta-highlight {
  color: var(--color-accent) !important;
  font-weight: 700 !important;
}

.header-status {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 16px);
  flex-shrink: 0;
}

.brand-date-pill {
  background: var(--color-accent);
  color: #111827;
  font-size: clamp(0.68rem, 0.75vw, 0.95rem);
  font-weight: 800;
  padding: clamp(4px, 0.6vh, 8px) clamp(10px, 0.9vw, 16px);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.header-clock-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: clamp(4px, 0.6vh, 8px) clamp(12px, 1.2vw, 20px);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: baseline;
  gap: 6px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.clock-digits {
  font-size: clamp(1.4rem, 1.9vw, 2.6rem);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.clock-tz {
  font-size: clamp(0.58rem, 0.65vw, 0.8rem);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 1px;
}

/* ==========================================================================
   2. MAIN BODY SECTION: Proportional Landscape Grid
   ========================================================================== */
.main-body {
  display: flex;
  flex: 1;
  min-height: 0; /* Crucial for child flex scrolling prevention */
  width: 100%;
  gap: var(--grid-gap);
}

/* Left Panel: Video Media (Top) & Quick Cards (Bottom) */
.left-panel {
  flex: 56; /* 56% width on widescreen TV for optimal media + menu */
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
}

/* Right Panel: Rates & Financial Products */
.right-panel {
  flex: 44; /* 44% width on widescreen TV for spacious 2-column rates */
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.9vh, 12px);
  overflow: hidden; /* Prevent ugly scrollbar on TV */
}

/* ==========================================================================
   3. MEDIA DISPLAY PLAYER FRAME (16:9 Aspect Video / Slider)
   ========================================================================== */
.video-frame-container {
  flex: 1;
  min-height: 0;
  background: #000000;
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.media-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
}

.media-item.active {
  opacity: 1;
  pointer-events: auto;
}

.media-item img,
.media-item video,
.media-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  display: block;
}

.media-loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #94A3B8;
}

.loader-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin-anim 1s linear infinite;
}

.loader-text {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@keyframes spin-anim {
  to { transform: rotate(360deg); }
}

/* Overlay Floating Controls (Audio & Fullscreen) */
.media-controls-overlay {
  position: absolute;
  bottom: clamp(8px, 1.2vh, 16px);
  left: clamp(8px, 1.2vw, 16px);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.media-controls-overlay:hover {
  opacity: 1;
}

.control-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: clamp(4px, 0.6vh, 8px) clamp(10px, 1vw, 16px);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: clamp(0.68rem, 0.72vw, 0.88rem);
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.control-btn:hover, .control-btn:focus {
  background: var(--color-primary);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  color: #FFFFFF;
  outline: none;
}

/* ==========================================================================
   4. QUICK MENU GRID CARDS (6 Proportional Cards)
   ========================================================================== */
.quick-menu-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(6px, 0.8vw, 10px);
  flex-shrink: 0;
}

.menu-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: clamp(5px, 0.7vh, 8px) clamp(5px, 0.6vw, 8px);
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.5vw, 8px);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  min-width: 0;
}

.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.menu-icon-box {
  width: clamp(24px, 3.2vh, 36px);
  height: clamp(24px, 3.2vh, 36px);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, #850B1D 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.65rem, 0.75vw, 0.95rem);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(181, 18, 42, 0.25);
}

.menu-text {
  flex: 1;
  min-width: 0;
}

.menu-title {
  font-size: clamp(0.62rem, 0.68vw, 0.85rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-sub {
  font-size: clamp(0.55rem, 0.6vw, 0.75rem);
  color: var(--color-text-muted);
  margin-top: 2px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.menu-sub i {
  font-size: 0.8em;
  color: var(--color-primary);
}

/* ==========================================================================
   5. RIGHT PANEL: RATES & FINANCIAL PRODUCTS
   ========================================================================== */
.rates-section {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: clamp(6px, 1vh, 12px) clamp(8px, 1vw, 14px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(4px, 0.7vh, 8px);
}

.section-title {
  font-size: clamp(0.7rem, 0.8vw, 0.95rem);
  font-weight: 800;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: clamp(4px, 0.7vh, 8px);
}

.section-header-flex .section-title {
  margin-bottom: 0;
}

.section-title i {
  color: var(--color-primary);
}

.live-pill {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  font-size: clamp(0.55rem, 0.6vw, 0.75rem);
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse-anim 1.6s ease-in-out infinite;
}

@keyframes pulse-anim {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.effective-badge {
  font-size: clamp(0.58rem, 0.62vw, 0.75rem);
  color: var(--color-text-muted);
  font-weight: 600;
  background: var(--color-card-muted);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
}

/* 5.1 Indicator Cards (BI Rate & LPS BPR) */
.indicator-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 0.8vw, 10px);
}

.indicator-card {
  background: var(--color-card-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: clamp(6px, 0.8vh, 10px) clamp(6px, 0.8vw, 10px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.indicator-card.highlight {
  border-color: rgba(247, 181, 0, 0.6);
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%);
  box-shadow: 0 0 12px var(--color-accent-glow);
}

.indicator-name {
  font-size: clamp(0.62rem, 0.68vw, 0.82rem);
  font-weight: 700;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.indicator-val {
  font-size: clamp(1.25rem, 1.7vw, 2.2rem);
  font-weight: 900;
  color: var(--color-text);
  line-height: 1.15;
  margin: 2px 0;
  font-variant-numeric: tabular-nums;
}

.indicator-val.accent {
  color: var(--color-primary);
  text-shadow: 0 1px 2px rgba(181, 18, 42, 0.2);
}

.indicator-effective {
  font-size: clamp(0.55rem, 0.58vw, 0.72rem);
  color: var(--color-text-light);
  font-weight: 600;
}

/* 5.2 Tabungan Section (Dynamic Responsive Grid) */
.tabungan-wrapper {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tabungan-container {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* Strict 50% columns, prevents overflow */
  gap: clamp(5px, 0.7vh, 8px);
  align-content: start;
}

.tabungan-card {
  background: var(--color-card-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: clamp(5px, 0.7vh, 8px) clamp(8px, 0.8vw, 12px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.tabungan-card:hover {
  border-color: var(--color-primary-light);
  background: #FFFFFF;
}

.tabungan-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 6px;
}

.tabungan-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.tabungan-title-wrap i {
  color: var(--color-primary);
  font-size: clamp(0.7rem, 0.8vw, 0.95rem);
  flex-shrink: 0;
}

.tabungan-name {
  font-size: clamp(0.68rem, 0.75vw, 0.92rem);
  font-weight: 800;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.tabungan-rate-val {
  font-size: clamp(0.95rem, 1.1vw, 1.4rem);
  font-weight: 900;
  color: var(--color-primary);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  background: rgba(181, 18, 42, 0.08);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  line-height: 1.15;
}

.tabungan-desc {
  font-size: clamp(0.52rem, 0.58vw, 0.72rem);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  line-height: 1.15;
}

/* 5.3 Deposito Section (Tenor Matrix Grid) */
.deposito-wrapper {
  flex-shrink: 0;
}

.deposito-container {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vh, 8px);
}

.deposito-card-row {
  background: var(--color-card-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: clamp(4px, 0.6vh, 8px) clamp(8px, 0.8vw, 12px);
}

.deposito-title {
  font-size: clamp(0.65rem, 0.72vw, 0.88rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: clamp(3px, 0.4vh, 6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deposito-tenor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(4px, 0.5vw, 8px);
}

.deposito-tenor-box {
  background: linear-gradient(135deg, var(--color-primary) 0%, #850B1D 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xs);
  padding: clamp(3px, 0.4vh, 6px) 2px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(181, 18, 42, 0.2);
}

.tenor-label {
  font-size: clamp(0.52rem, 0.58vw, 0.72rem);
  font-weight: 700;
  opacity: 0.9;
  text-transform: uppercase;
}

.tenor-rate {
  font-size: clamp(0.75rem, 0.9vw, 1.25rem);
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
}

.card-loading-placeholder {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 12px;
  text-align: center;
}

/* ==========================================================================
   6. TICKER RUNNING BANNER (Hardware-Accelerated Smooth Marquee)
   ========================================================================== */
.ticker-banner {
  flex-shrink: 0;
  height: clamp(32px, 4.2vh, 46px);
  background: linear-gradient(90deg, var(--color-primary) 0%, #8A0C1E 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ticker-badge {
  background: var(--color-accent);
  color: #111827;
  font-size: clamp(0.68rem, 0.75vw, 0.95rem);
  font-weight: 900;
  padding: 0 clamp(14px, 1.4vw, 24px);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0% 100%);
  padding-right: clamp(20px, 2vw, 32px);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.ticker-content-wrap {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-running-move {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-anim 40s linear infinite;
  will-change: transform;
}

.ticker-node {
  display: inline-block;
  font-size: clamp(0.78rem, 0.88vw, 1.15rem);
  font-weight: 600;
  color: #FFFFFF;
  padding: 0 16px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ticker-divider {
  color: var(--color-accent);
  font-weight: 900;
  margin: 0 12px;
}

@keyframes ticker-anim {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

/* ==========================================================================
   7. FOOTER DISCLAIMER BAR (Clean Corporate White Theme)
   ========================================================================== */
.disclaimer-bar {
  flex-shrink: 0;
  height: clamp(22px, 2.8vh, 32px);
  background: #FFFFFF;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(10px, 1.2vw, 20px);
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.disclaimer-text {
  font-size: clamp(0.55rem, 0.6vw, 0.8rem);
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.disclaimer-text i {
  color: var(--color-success);
}

.admin-shortcut-link {
  color: #94A3B8;
  text-decoration: none;
  font-size: clamp(0.55rem, 0.6vw, 0.75rem);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
}

.admin-shortcut-link:hover, .admin-shortcut-link:focus {
  color: var(--color-primary);
  background: rgba(181, 18, 42, 0.08);
  outline: none;
}

/* ==========================================================================
   8. PORTRAIT / VERTICAL TOTEM TV DISPLAY (@media orientation: portrait)
   Common for standing kiosk and totem displays in bank lobbies
   ========================================================================== */
@media (orientation: portrait), (max-aspect-ratio: 1/1) {
  .signage-wrapper {
    overflow-y: hidden;
  }

  .main-body {
    flex-direction: column;
  }

  .left-panel {
    flex: 50;
  }

  .video-frame-container {
    aspect-ratio: 16 / 9;
    flex: none;
    height: 38vh;
  }

  .quick-menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .right-panel {
    flex: 50;
    overflow-y: auto;
  }

  .tabungan-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   9. TABLET & SMALL BROWSER WINDOWS (Responsive Fallback)
   ========================================================================== */
@media (max-width: 960px) and (orientation: landscape) {
  .quick-menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tabungan-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html {
    overflow: auto;
  }

  body {
    overflow: auto;
  }

  .signage-wrapper {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .header-status {
    width: 100%;
    justify-content: space-between;
  }

  .main-body {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .video-frame-container {
    height: 240px;
    flex: none;
  }

  .quick-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tabungan-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   10. 4K ULTRA HD TV OPTIMIZATIONS (3840 x 2160)
   ========================================================================== */
@media (min-width: 2560px) {
  :root {
    --tv-safe-pad-x: 36px;
    --tv-safe-pad-y: 28px;
    --grid-gap: 20px;
  }

  .header-bar {
    padding: 18px 36px;
  }

  .clock-digits {
    font-size: 3.2rem;
  }

  .indicator-val {
    font-size: 2.8rem;
  }
}
