/* ==========================================================================
   NEET Admission Companion - Design System (Light Theme)
   ========================================================================== */

/* Design Tokens & Theme Colors */
:root {
  --bg-govt-banner: #0f2a4a; /* Deep Corporate Navy Blue */
  --bg-nav: #1e3a8a;         /* Royal Navy */
  --bg-nav-active: #172554;  /* Active link navy */
  --bg-page: #f8fafc;        /* Soft gray page body */
  
  --primary: #1e3a8a;        /* Brand Primary */
  --primary-light: #eff6ff;  /* Extremely light blue */
  --primary-hover: #1d4ed8;
  --secondary: #475569;      /* Slate Gray text */
  --border-color: #cbd5e1;   /* Slate border */
  --border-focus: #3b82f6;   /* Sky Blue */
  
  --text-main: #0f172a;      /* Almost black */
  --text-muted: #64748b;     /* Muted slate gray */
  
  /* Status Colors */
  --color-high: #15803d;     /* Deep green */
  --bg-high: #f0fdf4;        /* Light green alert background */
  --color-mid: #b45309;      /* Amber / Orange */
  --bg-mid: #fef3c7;         /* Light amber background */
  --color-low: #b91c1c;      /* Deep red */
  --bg-low: #fef2f2;         /* Light red background */
  --color-info: #0369a1;     /* Blue */
  --bg-info: #f0f9ff;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --transition-fast: all 0.15s ease-in-out;
  
  --max-content-width: 1200px;
}

/* Global Reset & Base Elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

a {
  color: var(--bg-nav);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout Grid */
.portal-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   OFFICIAL HEADER & TOP NAVIGATION
   ========================================================================== */

/* Corporate banner at very top */
.govt-header {
  background: var(--bg-govt-banner);
  color: white;
  padding: 1.25rem 0;
  border-bottom: 3px solid var(--border-focus); /* Blue line indicator */
}

.header-container {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.govt-emblem {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-headings {
  display: flex;
  flex-direction: column;
}

.govt-sub {
  font-size: 0.65rem;
  font-weight: 700;
  color: #60a5fa; /* Light blue highlight */
  letter-spacing: 1px;
  text-transform: uppercase;
}

.govt-main-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: white;
  margin: 0.1rem 0;
}

.govt-ministry {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.header-meta-box {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.meta-row {
  font-size: 0.75rem;
  color: #cbd5e1;
}

.meta-row strong {
  color: white;
}

/* Horizontal Main Navigation Bar */
.portal-nav-bar {
  background: var(--bg-nav);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 1rem;
  cursor: pointer;
}

.nav-links-wrapper {
  display: flex;
}

.nav-link {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition-fast);
  border-bottom: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.nav-link.active {
  background: var(--bg-nav-active);
  color: white;
  font-weight: 600;
  border-bottom-color: var(--border-focus); /* Blue active bar */
}

.candidate-state-tag {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* Green blinking light */
  border-radius: 50%;
  display: inline-block;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Announcements Marquee */
.announcements-ticker-bar {
  background: #f1f5f9; /* Bright clean gray ticker */
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  max-width: 100vw;
  overflow: hidden;
}

.ticker-label {
  background: #1e3a8a; /* Deep blue label */
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.40rem 0.8rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ticker-content {
  flex-grow: 1;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0 0.5rem;
}

/* ==========================================================================
   PORTAL MAIN BODY & DUAL COLUMN LAYOUT
   ========================================================================== */
.portal-body-wrapper {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex-grow: 1;
}

.content-view {
  display: none;
  animation: fade-in 0.2s ease-out;
}

.content-view.active-view {
  display: block;
}

.dual-column-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.layout-column-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.layout-column-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 90px;
}

/* Bulletin / Section Card */
.bulletin-section {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border-top: 3px solid var(--bg-nav); /* Top blue border */
}

.bulletin-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.bulletin-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Side Card elements */
.portal-side-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.portal-side-card.card-primary {
  border-top: 3px solid var(--border-focus); /* Blue top */
}

.side-card-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  padding: 0.75rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.side-card-body {
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.side-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.btn-side-action {
  width: 100%;
  text-align: left;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-side-action:hover {
  background: var(--primary-light);
  border-color: var(--border-focus);
}

.side-link-list {
  list-style: none;
}

.side-link-list li {
  border-bottom: 1px solid #f1f5f9;
}

.side-link-list li a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.side-link-list li a:hover {
  background: #f8fafc;
  color: var(--bg-nav);
  text-decoration: none;
}

.support-info-item span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-top: 0.1rem;
}

/* Stepper steps */
.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.flow-step {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
  text-align: center;
}

.step-num {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--border-focus);
  display: block;
  margin-bottom: 0.4rem;
}

.flow-step h5 {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.flow-step p {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   FORM CONTROLS & TABLES (OFFICIAL REGISTRY FORMAT)
   ========================================================================== */

/* Split Form/Table Layout */
.split-view-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.filter-panel {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25rem;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--bg-nav);
}

.filter-panel h3 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

/* Flat registry style input fields */
.input-styled, .select-styled {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: var(--text-main);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition-fast);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.input-styled:focus, .select-styled:focus {
  border-color: var(--bg-nav);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

/* Category Pill selectors */
.pill-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pill-option {
  position: relative;
}

.pill-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-label {
  display: block;
  background: white;
  border: 1px solid #cbd5e1;
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pill-option input[type="radio"]:checked + .pill-label {
  background: #f0f6ff;
  border-color: var(--bg-nav);
  color: var(--bg-nav);
}

.pill-label:hover {
  background: #f8fafc;
}

.results-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-header-box {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--border-focus);
}

.results-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.results-count strong {
  color: var(--text-main);
  font-size: 0.9rem;
}

/* Data Tables Styling */
.table-section-container {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
}

.data-table th {
  background-color: var(--bg-table-header);
  color: #334155;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.data-table tbody tr:hover {
  background-color: #f1f5f9;
}

.badge-status {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  border: 1px solid transparent;
}

.badge-status.high { background-color: var(--bg-high); color: var(--color-high); border-color: #bbf7d0; }
.badge-status.medium { background-color: var(--bg-mid); color: var(--color-mid); border-color: #fef08a; }
.badge-status.low { background-color: var(--bg-low); color: var(--color-low); border-color: #fecaca; }

.btn-table-action {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-table-action:hover {
  background: var(--bg-page);
  border-color: #cbd5e1;
}

/* Alerts and Banners */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}

.alert-info {
  background-color: var(--bg-info);
  border-color: #bae6fd;
  color: var(--color-info);
}

.alert-success {
  background-color: var(--bg-high);
  border-color: #bbf7d0;
  color: var(--color-high);
}

.alert-warning {
  background-color: var(--bg-mid);
  border-color: #fef08a;
  color: var(--color-mid);
}

/* ==========================================================================
   CHOICE PREFERENCE SHEET & QUIZ
   ========================================================================== */
.preference-list-container {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.preference-item {
  display: grid;
  grid-template-columns: 50px 1fr 100px 60px;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: white;
}

.preference-item:hover {
  background: #f8fafc;
}

.pref-rank {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--bg-nav);
}

.pref-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-main);
}

.pref-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.pref-controls {
  display: flex;
  gap: 0.2rem;
}

.btn-pref-ctrl {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-pref-ctrl:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--text-main);
}

.btn-pref-remove:hover {
  background: var(--bg-low);
  color: var(--color-low);
  border-color: #fca5a5;
}

.preference-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid var(--border-color);
  border-top: none;
  padding: 1rem 1.25rem;
  border-radius: 0 0 4px 4px;
  box-shadow: var(--shadow-sm);
}

.btn-print {
  background: #0f172a;
  color: white;
  border: none;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-print:hover {
  background: #1e293b;
}

.counseling-empty-state {
  text-align: center;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 3.5rem 2rem;
  box-shadow: var(--shadow-sm);
}

.empty-state-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.counseling-empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.counseling-empty-state p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

/* Quiz Controls */
.quiz-container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  border-top: 3px solid var(--bg-nav);
}

.quiz-header {
  margin-bottom: 1.5rem;
}

.quiz-progress-wrapper {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.quiz-progress-bar-bg {
  height: 3px;
  background: #e2e8f0;
  border-radius: 1.5px;
  overflow: hidden;
}

.quiz-progress-bar-fill {
  height: 100%;
  background: var(--bg-nav);
  width: 0%;
  transition: width 0.2s ease;
}

.quiz-question-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 0.8rem;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.quiz-option-card {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quiz-option-card:hover {
  background: #f8fafc;
}

.quiz-option-card.selected {
  border-color: var(--bg-nav);
  background: #f0f5fa;
}

.option-text {
  font-size: 0.82rem;
  font-weight: 500;
}

.option-indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
}

.quiz-option-card.selected .option-indicator {
  border-color: var(--bg-nav);
  background: var(--bg-nav);
}

.quiz-footer-actions {
  display: flex;
  justify-content: space-between;
}

.btn-quiz-prev {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-quiz-next {
  background: var(--bg-nav);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Quiz Results layout */
.quiz-results-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quiz-result-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.quiz-result-card:first-child {
  border-left: 4px solid var(--bg-nav);
}

.result-score-ring {
  background: #f0f5fa;
  border: 2px solid var(--bg-nav);
  color: var(--bg-nav);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.result-score-val {
  font-size: 1.15rem;
}

.result-score-lbl {
  font-size: 0.55rem;
  text-transform: uppercase;
}

.result-details h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.result-details h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-details p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

/* Course specs detail styling inside explorer */
.course-specs-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
  margin: 0.6rem 0;
}

.course-specs-table td {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--border-color);
}

.course-specs-table td:first-child {
  color: var(--text-muted);
}

.course-specs-table td:last-child {
  font-weight: 600;
  text-align: right;
}

.course-explorer-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  border-top: 2px solid var(--bg-nav);
}

.course-explorer-card h3 {
  font-size: 1rem;
}

.course-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

.btn-details-toggle {
  width: 100%;
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.45rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
}

.courses-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

/* PWA Header/Banner layout */
.pwa-banner {
  background: var(--bg-info);
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem auto 0 auto;
  max-width: var(--max-content-width);
  width: calc(100% - 3rem);
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.banner-badge {
  background: var(--bg-nav);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 2px;
}

.pwa-banner-content p {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-info);
}

.pwa-banner-actions {
  display: flex;
  gap: 0.5rem;
}

.banner-btn-primary {
  background: var(--bg-nav);
  color: white;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
}

.banner-btn-secondary {
  background: transparent;
  color: var(--secondary);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 2px;
  cursor: pointer;
}

.pwa-install-btn {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-fast);
}

.pwa-install-btn:hover {
  background: rgba(255,255,255,0.08);
}

/* ==========================================================================
   OFFICIAL FOOTER
   ========================================================================== */
.portal-official-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 2.5rem 0;
  border-top: 4px solid var(--border-focus); /* Blue line indicator at footer */
  font-size: 0.75rem;
  text-align: center;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-links-row a {
  color: #94a3b8;
  margin: 0 0.4rem;
  font-weight: 500;
}

.footer-links-row a:hover {
  color: white;
}

.footer-address {
  line-height: 1.5;
  color: #e2e8f0;
  font-weight: 500;
}

.footer-disclaimer {
  color: #94a3b8;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 0.8rem;
}

.footer-technical {
  color: #64748b;
  font-size: 0.7rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Keyframes */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE LAYOUT OVERRIDES
   ========================================================================== */
@media (max-width: 1024px) {
  .split-view-layout {
    grid-template-columns: 1fr;
  }
  .filter-panel {
    position: static;
  }
  .dual-column-layout {
    grid-template-columns: 1fr;
  }
  .layout-column-side {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .header-brand-box {
    flex-direction: column;
  }
  
  .header-meta-box {
    align-items: center;
    text-align: center;
  }
  
  .portal-nav-bar {
    position: static;
  }
  
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .mobile-menu-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  
  .nav-links-wrapper {
    display: none;
    flex-direction: column;
  }
  
  .nav-links-wrapper.mobile-show {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  
  .nav-link.active {
    border-left-color: var(--border-focus);
  }
  
  .candidate-state-tag {
    display: none; /* Hide state tag on mobile headers to save space */
  }
  
  .portal-body-wrapper {
    padding: 1.25rem 1rem;
  }
  
  .pwa-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    width: calc(100% - 2rem);
  }
  
  .pwa-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .preference-item {
    grid-template-columns: 40px 1fr 60px;
    padding: 0.75rem 1rem;
  }
  
  .pref-controls {
    display: none; /* Hide move up/down controls on mobile screens */
  }
}

/* ==========================================================================
   PRINT LAYOUT STYLES
   ========================================================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  
  .govt-header,
  .portal-nav-bar,
  .announcements-ticker-bar,
  .pwa-banner,
  .preference-actions-row,
  .btn-pref-ctrl,
  .portal-official-footer {
    display: none !important;
  }
  
  .portal-body-wrapper {
    padding: 0 !important;
  }
  
  .preference-list-container {
    border: none !important;
    box-shadow: none !important;
  }
  
  .preference-item {
    border-bottom: 2px solid black !important;
    padding: 12px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
  }
  
  .pref-rank {
    color: black !important;
  }
}
