/* Shared Cinema Benchmark portal theme for the operational report tools. */
:root {
  /* Light Theme (Default) */
  --bg-0: #F6F7F9;
  --bg-1: #FFFFFF;
  --bg-2: #F0F2F5;
  --bg-panel: #FFFFFF;
  --bg-base: #F6F7F9;
  --bg-card: #FFFFFF;
  --bg-card2: #F0F2F5;
  --bg-header: #FFFFFF;
  --input-bg: #FFFFFF;
  
  --cine-red: #C24141;
  --cine-red2: #A53737;
  --accent-blue: #3557D6;
  --accent: #3557D6;
  --accent-glow: rgba(53, 87, 214, 0.1);
  --accent-gold: #B7791F;
  --accent-cyan: #3557D6;
  --accent-green: #16845B;
  
  --text-1: #111827;
  --text-2: #374151;
  --text-3: #596273;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #596273;
  
  --border: #DDE1E7;
  --border2: #D8DDE5;
  --border-focus: rgba(53, 87, 214, 0.45);
  --border-color: #DDE1E7;
  --border-accent: #D8DDE5;
  
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);

  --bg-primary: #FFFFFF;
  --bg-secondary: #F6F7F9;
  --bg-card-hover: #F0F2F5;
}

[data-theme="dark"] {
  --bg-0: #0F1115;
  --bg-1: #151922;
  --bg-2: #1B202A;
  --bg-panel: #151922;
  --bg-base: #0F1115;
  --bg-card: #151922;
  --bg-card2: #1B202A;
  --bg-header: #151922;
  --input-bg: #151922;
  
  --cine-red: #EF4444;
  --cine-red2: #DC2626;
  --accent-blue: #6C83FF;
  --accent: #6C83FF;
  --accent-glow: rgba(108, 131, 255, 0.15);
  --accent-gold: #F59E0B;
  --accent-cyan: #6C83FF;
  --accent-green: #10B981;
  
  --text-1: #F3F4F6;
  --text-2: #D1D5DB;
  --text-3: #98A2B3;
  --text-primary: #F3F4F6;
  --text-secondary: #D1D5DB;
  --text-muted: #98A2B3;
  
  --border: #282F3B;
  --border2: #333C4D;
  --border-focus: rgba(108, 131, 255, 0.45);
  --border-color: #282F3B;
  --border-accent: #333C4D;
  
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);

  --bg-primary: #151922;
  --bg-secondary: #1B202A;
  --bg-card-hover: #282F3B;
}


body.portal-tool {
  background: var(--bg-base) !important;
  color: var(--text-1) !important;
}

body.portal-tool::before { display: none !important; }
body.portal-tool .header,
body.portal-tool .top-bar {
  background: var(--bg-header) !important;
  border-color: var(--border) !important;
  box-shadow: 0 1px 0 var(--border) !important;
}
body.portal-tool .header::before {
  background: linear-gradient(90deg, var(--cine-red), var(--cine-red2), var(--accent-gold)) !important;
}
body.portal-tool .header h1,
body.portal-tool .brand h1 {
  background: none !important;
  color: var(--text-1) !important;
  -webkit-text-fill-color: var(--text-1) !important;
  letter-spacing: -.02em !important;
  text-transform: none !important;
}
body.portal-tool .panel,
body.portal-tool .controls,
body.portal-tool .card,
body.portal-tool .stat-card,
body.portal-tool .summary-card,
body.portal-tool .tbl-container {
  background: var(--bg-card) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-card) !important;
}
body.portal-tool input,
body.portal-tool select,
body.portal-tool textarea {
  background: var(--input-bg) !important;
  color: var(--text-1) !important;
  border-color: var(--border) !important;
}
body.portal-tool input:focus,
body.portal-tool select:focus,
body.portal-tool textarea:focus {
  border-color: var(--cine-red) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .1) !important;
}
body.portal-tool .btn-gold,
body.portal-tool .btn-fetch,
body.portal-tool .btn.primary {
  background: var(--cine-red) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
body.portal-tool .btn-ghost,
body.portal-tool .btn.secondary {
  background: transparent !important;
  color: var(--text-2) !important;
  border: 1px solid var(--border) !important;
}
body.portal-tool table thead,
body.portal-tool thead tr,
body.portal-tool thead th { background: var(--bg-card2) !important; }
body.portal-tool th { color: var(--text-3) !important; border-color: var(--border2) !important; }
body.portal-tool td { color: var(--text-2) !important; border-color: var(--border) !important; }
body.portal-tool tbody tr:hover { background: var(--bg-card2) !important; }
body.portal-tool .theme-btn { display: none !important; }
body.portal-tool ::selection { background: var(--accent-glow); color: var(--text-1); }

body.weekend-portal .container { max-width: 1640px; padding: 18px 24px; }
body.weekend-portal .header { padding: 22px; margin-bottom: 18px; border-radius: 16px; }
body.weekend-portal .controls { padding: 16px; margin-bottom: 18px; border-radius: 14px; }
body.weekend-portal .movie-card,
body.weekend-portal .cinema-card,
body.weekend-portal .section-card { background: var(--bg-card) !important; border-color: var(--border) !important; }

/* Weekend Report MIS Reference Card: Header and Total Row Color Protections */
body.weekend-portal .ref-card-table thead th,
body.weekend-portal .ref-card-table thead th * {
  background: #0f2b5c !important;
  color: #ffffff !important;
}

/* Weekend Report MIS Reference Card: Total Row Blue Background with White Font (Same as Header) */
body.weekend-portal .ref-total-row td,
body.weekend-portal .ref-total-row td * {
  background-color: #0f2b5c !important;
  color: #ffffff !important;
}

body.weekend-portal .ref-total-row td {
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
}

body.weekend-portal .ref-total-row td.ref-change-pos,
body.weekend-portal .ref-total-row td.ref-change-pos * {
  color: #4ade80 !important;
}

body.weekend-portal .ref-total-row td.ref-change-neg,
body.weekend-portal .ref-total-row td.ref-change-neg * {
  color: #f87171 !important;
}

body.box-office-portal .main { background: var(--bg-base); }
body.box-office-portal .panel-head { border-color: var(--border) !important; }
body.show-count-portal .main-content { background: var(--bg-base); }
