/* DefinedChoice broker portal — LAYOUT LAW */
:root {
  --navy: #0B3A5B;
  --gold: #F5C518;
  --sky: #E8F4FC;
  --white: #ffffff;
  --text: #1a2a3a;
  --muted: #5a6a7a;
  --border: #c8d6e4;
  --danger: #b33a3a;
  --success: #2a7a4a;
  --sidebar-w: 220px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text); background: var(--sky); line-height: 1.45; min-height: 100%;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(160deg, var(--navy) 0%, #0a4a75 45%, var(--sky) 100%);
}
.login-card {
  background: var(--white); border-radius: 12px; padding: 2rem 2.25rem;
  width: 100%; max-width: 420px; box-shadow: 0 12px 40px rgba(11, 58, 91, 0.25);
}
.login-card.wide { max-width: 480px; }
.login-card .brand-mark {
  display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.25rem;
  text-decoration: none; color: inherit;
}
.login-card .brand-mark .logo-chip {
  width: 40px; height: 40px; border-radius: 8px; background: var(--navy);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
}
.login-card h1 { margin: 0; font-size: 1.35rem; color: var(--navy); }
.master-line {
  font-size: 0.92rem; color: var(--muted); margin: 0.75rem 0 1.25rem;
  padding: 0.65rem 0.75rem; background: var(--sky);
  border-left: 4px solid var(--gold); border-radius: 0 6px 6px 0;
}
.login-error {
  display: none !important;
  background: #fde8e8; color: var(--danger); padding: 0.6rem 0.75rem;
  border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem;
}
.login-error.is-visible {
  display: block !important;
}
.panel-new-agency {
  border: 2px solid var(--gold);
  background: #fffef5;
}
.panel-new-agency h2 { color: var(--navy); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.filter-chips .btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.login-ok {
  background: #e8f6ee; color: var(--success); padding: 0.6rem 0.75rem;
  border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem;
}

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--navy); color: var(--white);
  display: flex; flex-direction: column; flex-shrink: 0; padding: 1.25rem 0;
}
.side-brand {
  padding: 0 1.1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 0.75rem;
}
.side-brand strong { display: block; color: var(--gold); font-size: 1.05rem; }
.side-brand span { font-size: 0.75rem; color: rgba(255,255,255,0.7); }
.sidebar nav {
  display: flex; flex-direction: column; gap: 0.15rem; padding: 0 0.6rem; flex: 1;
}
.sidebar nav a {
  color: rgba(255,255,255,0.88); padding: 0.55rem 0.75rem; border-radius: 6px;
  font-size: 0.92rem; text-decoration: none;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(245, 197, 24, 0.18); color: var(--gold); text-decoration: none;
}
.main {
  flex: 1; padding: 32px; overflow-x: auto; background: var(--sky);
}
.main-inner { max-width: 1100px; }
.main h1 { margin: 0 0 0.35rem; color: var(--navy); font-size: 24px; }
.main .page-sub { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.95rem; }

.panel {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(11, 58, 91, 0.06);
}
.panel h2 { margin: 0 0 0.85rem; font-size: 1.1rem; color: var(--navy); }
.panel .panel-primary { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; margin-bottom: 16px;
}
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; box-shadow: 0 2px 8px rgba(11, 58, 91, 0.06);
}
.card .label {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); margin-bottom: 0.35rem;
}
.card .value { font-size: 1.45rem; font-weight: 700; color: var(--navy); }
.card .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

table.data { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.data th, table.data td {
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
table.data th {
  background: var(--sky); color: var(--navy); font-weight: 600;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em;
}
table.data tr:hover td { background: #f7fbfe; }

.btn {
  display: inline-block; border: none; border-radius: 6px; padding: 0.55rem 1.1rem;
  font-size: 0.92rem; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.3;
}
.btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-outline { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.btn:disabled, .btn.disabled {
  cursor: not-allowed; filter: grayscale(0.4); background: #d0d8e0; color: #6a7580; border-color: #d0d8e0;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }

.banner-illustrative {
  background: #fff8e0; border: 1px solid #e8d48a; color: #5a4a10;
  padding: 0.65rem 0.9rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem;
}
.footer-note {
  margin-top: 1.5rem; font-size: 0.8rem; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 0.75rem;
}
.account-note {
  background: var(--sky); border: 1px solid var(--border); color: var(--navy);
  padding: 0.65rem 0.85rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem;
}
.form-group { margin-bottom: 0.95rem; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 0.3rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.95rem; background: var(--white); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 2px solid rgba(245, 197, 24, 0.55); border-color: var(--gold);
}
.form-group .hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.logo-preview {
  width: 72px; height: 72px; object-fit: contain; border: 1px solid var(--border);
  border-radius: 8px; background: var(--sky); margin-top: 0.5rem;
}
.tag {
  display: inline-block; font-size: 0.72rem; padding: 0.15rem 0.45rem;
  border-radius: 4px; background: var(--sky); color: var(--navy); font-weight: 600;
}
.tag-gold { background: var(--gold); color: var(--navy); }
.tag-sample { background: #f0e6ff; color: #5a3a8a; }
.delta-pos { color: var(--success); font-weight: 600; }
.delta-neg { color: var(--danger); font-weight: 600; }
.checklist label {
  display: flex; align-items: flex-start; gap: 0.5rem; font-weight: 400; margin-bottom: 0.5rem;
}
.start-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.start-list li a {
  display: block; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--sky); color: var(--navy); font-weight: 600; text-decoration: none;
}
.start-list li a:hover { border-color: var(--gold); background: #fff8e0; }
.start-list .step-num { color: var(--muted); font-weight: 700; margin-right: 8px; }
.proposal-header {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 3px solid var(--navy);
}
.proposal-header .agency-block { display: flex; align-items: center; gap: 0.75rem; }
.proposal-header .agency-logo {
  width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: var(--sky);
}
.plan-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.plan-card h3 { margin: 0 0 0.5rem; color: var(--navy); }
.next-row { margin-top: 8px; }

/* Mobile chrome — hidden on desktop (zero layout effect) */
.mobile-topbar { display: none; }
.nav-overlay { display: none; }
.table-scroll { display: contents; }

@media (max-width: 760px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1002;
    background: var(--navy);
    color: var(--white);
    min-height: 52px;
    padding: 0.5rem 0.75rem;
    padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
    padding-left: calc(0.75rem + env(safe-area-inset-left, 0px));
    padding-right: calc(0.75rem + env(safe-area-inset-right, 0px));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  }
  .mobile-topbar .menu-toggle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .mobile-topbar .menu-toggle:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }
  .mobile-topbar .menu-toggle svg { display: block; }
  .mobile-topbar .topbar-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--gold);
    letter-spacing: 0.01em;
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(11, 58, 91, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .shell.nav-open .nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .shell {
    flex-direction: column;
    min-height: 100dvh;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 85vw);
    z-index: 1001;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
  }
  .shell.nav-open .sidebar {
    transform: translateX(0);
  }
  .ops-shell .sidebar nav {
    flex-wrap: wrap;
  }
  .ops-shell .sidebar nav a {
    flex: 1 1 auto;
  }
  .sidebar nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.7rem 0.85rem;
  }

  .main {
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    overflow-x: hidden;
    width: 100%;
  }
  .main h1 { font-size: 1.35rem; }

  .table-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0;
  }
  .table-scroll table.data {
    min-width: 520px;
  }

  .cards,
  .plan-cards {
    grid-template-columns: 1fr;
  }

  .btn-row {
    flex-direction: column;
  }
  .btn-row .btn,
  .panel-primary .btn,
  .main .btn:not(.menu-toggle) {
    width: 100%;
    text-align: center;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .start-list li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    min-height: 44px;
    font-size: 16px; /* avoid iOS zoom */
  }
  .proposal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  body.nav-locked {
    overflow: hidden;
    touch-action: none;
  }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .login-wrap {
    padding: 1.25rem 1rem;
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
  .login-card {
    padding: 1.5rem 1.25rem;
  }
}

/* Reports / book / print helpers */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.table-scroll table.data.sticky-first th:first-child,
.table-scroll table.data.sticky-first td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--white);
}
.table-scroll table.data.sticky-first thead th:first-child {
  background: var(--sky); z-index: 2;
}
#bookSearch {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--border);
  border-radius: 6px; font-size: 16px; background: var(--white); color: var(--text);
  min-height: 44px;
}
#bookSearch:focus {
  outline: 2px solid rgba(245, 197, 24, 0.55); border-color: var(--gold);
}
.print-footer {
  margin-top: 1.5rem; font-size: 0.8rem; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 0.75rem;
}

/* Ensure ≤760px matches mobile drawer (drawer already at 768) */
@media (max-width: 760px) {
  .main { padding: 16px; overflow-x: hidden; }
  .cards, .plan-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .btn-row .btn,
  .panel-primary .btn,
  .main .btn:not(.menu-toggle) {
    width: 100%; text-align: center; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box;
  }
  .form-group input,
  .form-group select,
  .form-group textarea,
  #bookSearch {
    font-size: 16px;
    min-height: 44px;
  }
  .table-scroll {
    display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
}

@media print {
  .sidebar, .no-print, .mobile-topbar, .nav-overlay { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; background: white; overflow: visible; }
  body { background: white; }
  .table-scroll { display: contents; overflow: visible; }
  .print-footer { display: block !important; border-top: 1px solid #ccc; margin-top: 1.5rem; padding-top: 0.75rem; }
  .table-scroll table.data.sticky-first th:first-child,
  .table-scroll table.data.sticky-first td:first-child {
    position: static;
  }
}


/* Reports filterable book */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}
.report-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.report-totals .tot-item .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.report-totals .tot-item .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}
.results-empty {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}
table.data tr.row-selected td {
  background: #fff8e0;
}
table.data tr.row-selected:hover td {
  background: #fff3c4;
}
.detail-h3 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  color: var(--navy);
}

@media (max-width: 760px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .filter-grid, #panelFilters { display: none !important; }
}


/* Broker desk (Home) — 2-col desktop, stack ≤760 */
.desk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
  align-items: start;
}
.desk-col { min-width: 0; }
.action-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--sky);
}
.action-row .action-label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  flex: 1;
  min-width: 0;
}
.action-row .btn { flex-shrink: 0; }
.book-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.book-stat {
  background: var(--sky);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.book-stat .value {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
}
.book-stat .label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.2rem;
}
.book-stat-savings .value { color: var(--success); }
.book-hint { margin: 0.75rem 0 0; color: var(--muted); font-size: 0.85rem; }
.compare-sub { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.9rem; }
.thin-compare { display: flex; flex-direction: column; gap: 10px; }
.compare-row { min-width: 0; }
.compare-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: var(--navy);
}
.compare-track {
  height: 10px;
  background: #d8e6f2;
  border-radius: 999px;
  overflow: hidden;
}
.compare-bar { height: 100%; border-radius: 999px; }
.compare-bar-current { background: var(--navy); }
.compare-bar-allow { background: var(--gold); }
.reminder-banner {
  background: #fff8e0;
  border: 1px solid #e8d48a;
  color: #5a4a10;
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.client-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.client-chip {
  border: 1.5px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.client-chip:hover { background: var(--sky); }
.client-chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.note-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-list li {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--sky);
  font-size: 0.92rem;
  color: var(--text);
}
.note-list li.empty {
  color: var(--muted);
  background: transparent;
  border-style: dashed;
}
.note-list .note-when {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.panel-primary-wrap .panel-primary { margin-top: 0; }

@media (max-width: 760px) {
  .desk-grid {
    grid-template-columns: 1fr;
  }
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .action-row .btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .book-stats {
    grid-template-columns: 1fr;
  }
  .client-strip {
    flex-direction: column;
  }
  .client-chip {
    width: 100%;
    text-align: center;
  }
}

/* Stage / agency / mobile polish ≤760 */
.logo-preview { max-width: 100%; }
@media (max-width: 760px) {
  .logo-preview { width: 100%; height: auto; max-height: 160px; }
  .agency-logo { width: 100%; max-width: 120px; height: auto; }
  .proposal-header .agency-block { width: 100%; }
  .reminder-banner, .banner-illustrative, .account-note, .master-line { width: 100%; box-sizing: border-box; }
  #lostReasonGroup { width: 100%; }
}

/* Account / proposal mobile — logo upload full width ≤760 */
@media (max-width: 760px) {
  #accountForm input[type="file"] { width: 100%; box-sizing: border-box; }
  .proposal-header { flex-direction: column; align-items: flex-start; width: 100%; }
  .main-inner { overflow-x: hidden; max-width: 100%; }
}

/* Broker desk — wizard + page search */
.page-search {
  margin-bottom: 1rem;
}
.page-search input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 16px;
  background: var(--white);
  color: var(--text);
  min-height: 44px;
}
.page-search input:focus {
  outline: 2px solid rgba(245, 197, 24, 0.55);
  border-color: var(--gold);
}
.wizard-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.wiz-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}
.wiz-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
.wiz-dot.done {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.wiz-bar {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--border);
}
.desk-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.desk-links li a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--sky);
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.desk-links li a:hover {
  border-color: var(--gold);
  background: #fff8e0;
}
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.guide-toc a {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--sky);
  border: 1px solid var(--border);
  text-decoration: none;
}
.guide-toc a:hover { border-color: var(--gold); }

@media (max-width: 760px) {
  .wizard-progress { gap: 0.25rem; }
  .wiz-bar { width: 10px; }
  .desk-links li a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* —— Company ops console (mobile nav wraps) —— */
@media (max-width: 760px) {
  .ops-shell {
    flex-direction: column;
  }
  .ops-shell .sidebar {
    position: static;
    transform: none !important;
    width: 100%;
    height: auto;
    box-shadow: none;
    padding: 0.85rem 0.75rem;
    flex-direction: column;
  }
  .ops-shell .side-brand {
    padding: 0 0.35rem 0.65rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .ops-shell .sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0;
    flex: none;
  }
  .ops-shell .sidebar nav a {
    flex: 1 1 auto;
    min-width: calc(50% - 0.35rem);
    text-align: center;
    justify-content: center;
    min-height: 44px;
  }
  .ops-shell .main {
    padding: 16px;
  }
  .ops-shell .panel .table-scroll {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ops-shell .btn-row .btn,
  .ops-shell .panel .btn {
    width: 100%;
  }
}

/* Class allowance table inputs */
#classAllowTable input[type="number"] {
  width: 100%;
  min-width: 4.5rem;
  max-width: 7rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.95rem;
}

.inline-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #5a6a7a;
  margin: 0.15rem 0.25rem 0.15rem 0;
}
.inline-edit input[type="number"],
.inline-edit input[type="date"] {
  width: auto;
  min-width: 5rem;
  max-width: 9rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.85rem;
}

.print-only-block { display: none; }
@media print {
  .print-only-block { display: block !important; }
  .sidebar, .no-print, .mobile-topbar, .nav-overlay { display: none !important; }
  .shell { display: block; }
  .main { margin: 0; padding: 0; }
}

