:root {
  --navy: #12294E;
  --navy-dark: #0B1C36;
  --orange: #E07B26;
  --orange-dark: #BC6218;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1c2530;
  --text-muted: #5b6572;
  --radius: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}


/* ---------- Signup account type (P4) ---------- */
.account-type-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.account-type-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.class-actions {
  white-space: nowrap;
}

/* Roster seat groups (sql/018: departments are per-class seats) */
.roster-group-title {
  margin: 22px 0 8px;
  font-size: 16px;
  color: var(--navy);
}

.roster-group-count {
  font-size: 13px;
  font-weight: 500;
  color: #5a6a84;
}

.move-seat-select {
  max-width: 220px;
  margin-right: 6px;
}
.class-actions .btn-secondary {
  margin-right: 6px;
}

/* ---------- Brand lockup (bIQ Rings, mark of record 2026-10-22) ----------
   Lockups are specified by mark height. The small variant is mandatory at
   rendered widths of 26px and below; the full mark never renders below 27px. */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-lockup img {
  display: block;
}
.brand-wordmark {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.brand-wordmark .wm-iq {
  color: var(--orange);
}
.brand-wordmark.on-navy {
  color: #FBFAF7;
}
.lockup-header .brand-wordmark {
  font-size: 21px;
}
.lockup-hero {
  gap: 14px;
  margin-bottom: 22px;
}
.lockup-hero .brand-wordmark {
  font-size: 34px;
}
.lockup-stacked {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.lockup-stacked .brand-wordmark {
  font-size: 30px;
}
.app-footer,
.landing-footer {
  text-align: center;
  padding: 22px 16px 30px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 4px 24px rgba(18, 41, 78, 0.08);
  border-top: 6px solid var(--navy);
}

.login-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.login-subtitle {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 14px;
}

.text-input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #d7dbe0;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
}

.text-input:focus {
  border-color: var(--navy);
}

.error-banner {
  margin-top: 16px;
  background: #fdecea;
  color: #a3341f;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.btn-primary {
  margin-top: 22px;
  background: var(--orange);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--navy);
  color: white;
}

.btn-secondary:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.text-link-btn {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.text-link-btn:hover {
  color: var(--orange-dark);
}

/* ---------- App shell ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--navy);
  color: white;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.signout-link {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.signout-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.app-main {
  flex: 1;
  padding: 32px 28px 48px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.welcome-heading {
  font-size: 24px;
  margin: 0 0 20px;
  color: var(--navy);
}

.role-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
  margin-bottom: 24px;
}

.role-card-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.role-badge {
  background: var(--orange);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.placeholder-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.nav-link {
  background: var(--surface);
  border: 1px solid #e1e4e8;
  color: var(--navy);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  border-color: var(--navy);
}

.nav-link-active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.nav-link-active:hover {
  border-color: var(--navy);
}

.success-banner {
  margin-top: 16px;
  background: #e8f5e9;
  color: #1e6b2f;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.budget-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.budget-toolbar .field-label {
  margin-top: 0;
}

.budget-year-select {
  width: auto;
  min-width: 110px;
}

.budget-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
}

.budget-dept-row th {
  text-align: left;
  background: var(--bg);
  color: var(--navy);
  padding: 10px 16px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.budget-cell-account {
  padding: 10px 16px;
  border-top: 1px solid #eef0f2;
}

.budget-account-type {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: capitalize;
}

.budget-account-code {
  display: inline-block;
  min-width: 42px;
  color: var(--text-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

.budget-cell-amount {
  padding: 10px 16px;
  border-top: 1px solid #eef0f2;
  width: 160px;
}

.budget-input {
  width: 100%;
}

.budget-cell-readonly {
  text-align: right;
  color: var(--text);
  background: #fafbfc;
}

.budget-cell-historical {
  color: var(--text-muted);
  background: #f2f4f6;
  font-size: 13px;
}

.budget-actuals-note {
  font-size: 13px;
  padding: 12px 16px;
  margin: 0 0 16px;
}

.budget-dept-fixed {
  background: var(--navy);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.budget-col-header-row th {
  text-align: left;
  background: var(--bg);
  color: var(--text-muted);
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-top: 1px solid #eef0f2;
}

.budget-col-header-row th:not(:first-child) {
  width: 160px;
}

.budget-subtotal-row td {
  padding: 8px 16px;
  border-top: 1px solid #e1e4e8;
  font-weight: 700;
  color: var(--navy);
  background: #f7f9fb;
  text-align: right;
}

.budget-subtotal-row td:first-child {
  text-align: left;
}

.budget-subtotal-strong td {
  background: #eef2f6;
}

.budget-gross-margin-row td {
  background: var(--navy);
  color: white;
  border-top: 2px solid var(--orange);
}

/* ---------- Reports ---------- */
.reports-table td,
.reports-table th {
  text-align: right;
}

.reports-table td:first-child,
.reports-table th:first-child {
  text-align: left;
}

.reports-trend-table td,
.reports-trend-table th {
  text-align: right;
}

.reports-trend-table td:first-child,
.reports-trend-table th:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
}

.reports-chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
  max-width: 720px;
}

.role-message {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--text);
  line-height: 1.5;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
}

/* ---------- Scenarios ---------- */
.scenario-section-title {
  font-size: 15px;
  color: var(--navy);
  margin: 28px 0 12px;
}

.scenario-form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
}

.scenario-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scenario-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e1e4e8;
}

.scenario-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.scenario-checkbox-label input {
  width: auto;
}

.scenario-form-buttons {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
}

.scenario-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-card-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.scenario-owner {
  font-size: 12px;
  color: var(--text-muted);
}

.scenario-dept-label {
  margin: 2px 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.scenario-driver-summary {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.table-scroll {
  overflow-x: auto;
}

.scenario-projection-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.scenario-projection-table th,
.scenario-projection-table td {
  padding: 6px 10px;
  text-align: right;
  white-space: nowrap;
  border-top: 1px solid #eef0f2;
}

.scenario-projection-table th:first-child,
.scenario-projection-table td:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
}

.scenario-net-row td {
  font-weight: 700;
  color: var(--navy);
}

.scenario-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ---------- Landing page ---------- */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.landing-wordmark {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.2px;
}

.landing-header-signin {
  background: transparent;
  border: 1px solid var(--navy);
  color: var(--navy);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.landing-header-signin:hover {
  background: var(--navy);
  color: white;
}

.landing-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 28px 40px;
  text-align: center;
}

.landing-headline {
  margin: 0 0 16px;
  font-size: 34px;
  line-height: 1.2;
  color: var(--navy);
  font-weight: 800;
}

.landing-subheadline {
  margin: 0 auto;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

.landing-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.landing-cta-group .btn-primary {
  margin-top: 0;
  padding: 13px 26px;
  font-size: 15px;
}

.landing-signup-btn {
  margin: 0;
}

.landing-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 28px 48px;
}

.landing-section-title {
  text-align: center;
  font-size: 22px;
  color: var(--navy);
  margin: 0 0 24px;
}

.landing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.landing-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 22px;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
  border-top: 4px solid var(--orange);
}

.landing-card h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 16px;
}

.landing-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.landing-preview-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: 0 4px 20px rgba(18, 41, 78, 0.08);
  max-width: 560px;
  margin: 0 auto;
}

.landing-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.landing-preview-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
}

.landing-preview-chip {
  background: var(--orange);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.landing-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 140px;
  gap: 12px;
}

.landing-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.landing-bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 100px;
}

.landing-bar {
  width: 18px;
  border-radius: 4px 4px 0 0;
}

.landing-bar-budget {
  background: var(--navy);
}

.landing-bar-actual {
  background: var(--orange);
}

.landing-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.landing-bar-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.landing-legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

.landing-legend-budget {
  background: var(--navy);
}

.landing-legend-actual {
  background: var(--orange);
}

.landing-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.landing-column {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(18, 41, 78, 0.06);
}

.landing-column h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 16px;
}

.landing-column p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.landing-closing {
  background: var(--navy);
  color: white;
  text-align: center;
  padding: 48px 28px;
}

.landing-closing h2 {
  margin: 0 0 8px;
  font-size: 22px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.landing-closing .landing-signup-btn {
  color: white;
}

.landing-closing .landing-signup-btn:hover {
  color: var(--orange);
}

@media (max-width: 520px) {
  .landing-headline {
    font-size: 26px;
  }
}

/* ---------- Role homes (P5 / D7) ---------- */
.home-freshness {
  color: #5a6a84;
  font-size: 13px;
  margin: 4px 0 18px;
}
.home-heroes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.kpi-card {
  background: #ffffff;
  border: 1px solid rgba(18, 41, 78, 0.14);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(18, 41, 78, 0.08);
}
.kpi-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5a6a84;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: #12294e;
  line-height: 1.15;
}
.kpi-meta {
  font-size: 12.5px;
  color: #5a6a84;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.home-action-btn {
  width: auto;
}

/* ---------- Landing proof line (P5 / D9) ---------- */
.landing-proof {
  margin-top: 18px;
  font-size: 14.5px;
  color: #33456b;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
