/* =====================================================================
   Active Aries — v2: the client-file platform.
   Laid out like the Santam broker portal Elmien works in (horizontal top
   bar, left sub-navigation, panels with a top rule, an action band on the
   client file) — in Active Aries' own blue, on the tokens in app.css.
   ===================================================================== */

.shell2 { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.shell2 .topbar {
  height: 66px; padding: 0 22px; gap: 18px; background: var(--card);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(16, 41, 62, .03);
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
}
.tb-brand { display: flex; align-items: center; gap: 9px; text-decoration: none !important; flex-shrink: 0; }
.tb-brand img { width: 34px; height: 34px; }
.tb-brand .wordmark { font-size: 16px; }
.tb-burger { display: none; border: 1px solid var(--line); background: var(--card); border-radius: 9px; width: 38px; height: 38px; place-items: center; cursor: pointer; color: var(--slate); }
.tn { display: flex; align-items: stretch; gap: 2px; height: 100%; }
.tn-item {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; height: 100%;
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: none; border: 0; cursor: pointer;
  text-decoration: none !important; white-space: nowrap; transition: background .14s, color .14s; font-family: var(--font);
}
.tn-item svg { width: 16px; height: 16px; }
.tn-item:hover { background: var(--line-soft); color: var(--ink); }
.tn-item.active { background: var(--brand-soft); color: var(--brand-dark); }
.tn-item.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.tn-icon { width: 58px; justify-content: center; padding: 0; }
.tn-icon svg { width: 21px; height: 21px; }
.tn-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1;
}
.tn-badge.warn { background: var(--warn); }
.tn-badge.err { background: var(--err); }
.tn-item > .tn-badge { position: absolute; top: 10px; right: 2px; }
.tn-more-wrap { position: relative; display: flex; }
.more-menu {
  display: none; position: absolute; top: calc(100% + 1px); left: 0; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 14px; min-width: 640px;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px;
}
.more-menu.open { display: grid; }
.mm-head { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 4px 8px 6px; }
.mm-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none !important; }
.mm-item svg { width: 16px; height: 16px; color: var(--brand-deep); flex-shrink: 0; }
.mm-item:hover { background: var(--brand-soft); color: var(--brand-dark); }
.mm-badge { margin-left: auto; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-search {
  display: flex; align-items: center; gap: 8px; height: 38px; min-width: 230px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--muted);
  font-size: 13px; cursor: pointer; transition: border-color .15s, box-shadow .15s; font-family: var(--font);
}
.tb-search:hover { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tb-search kbd { margin-left: auto; font-family: var(--font); font-size: 10px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 1.5px 5px; color: var(--faint); }
.tb-user { display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; padding: 4px 4px 4px 10px; border-radius: 999px; font-family: var(--font); }
.tb-user:hover { background: var(--line-soft); }
.tb-user-text { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.tb-user-text b { font-size: 13px; color: var(--ink); }
.tb-user-text small { font-size: 11px; color: var(--muted); }
.content2 { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 22px 24px 50px; }
.foot2 { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; padding: 16px 20px 22px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--card); }
.demo-strip { display: flex; align-items: center; gap: 12px; padding: 8px 24px; background: var(--warn-soft); color: #8A5104; font-size: 12.5px; border-bottom: 1px solid #F5E2C0; }
.demo-strip > span { flex: 1; }

/* page heading used by every v2 screen */
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 24px; letter-spacing: -.02em; }
.page-head .ph-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.page-head .ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- section layout with a left sub-navigation ---------- */
.with-subnav { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.subnav { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; position: sticky; top: 84px; }
.subnav-title { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 14px 16px 6px; }
.sn-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13.5px; font-weight: 600; font-family: var(--font);
  color: var(--ink-2); text-decoration: none !important; border: 0; border-left: 3px solid transparent; cursor: pointer;
  border-top: 1px solid var(--line-soft); background: none; width: 100%; text-align: left;
}
.sn-item:first-of-type { border-top: 0; }
.sn-item > svg:first-child { width: 14px; height: 14px; color: var(--faint); transition: transform .15s; }
.sn-item:hover { background: var(--line-soft); }
.sn-item.active { background: #EAF1F6; color: var(--brand-ink); border-left-color: var(--brand); }
.sn-item.active > svg:first-child { color: var(--brand); transform: translateX(2px); }
.sn-count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--slate); background: var(--line-soft); padding: 1px 7px; border-radius: 999px; }
.sn-item.active .sn-count { background: #fff; }
.sn-count.ok { background: var(--ok-soft); color: var(--ok); }
.sn-count.err { background: var(--err-soft); color: var(--err); }
.sn-count.warn { background: var(--warn-soft); color: #A96204; }

/* panel = card with the brand rule on top (the Santam panel, in Active Aries blue) */
.panel { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 4px 4px var(--r-md) var(--r-md); box-shadow: var(--shadow-xs); }
.panel + .panel { margin-top: 16px; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-h h2, .panel-h h3 { font-size: 15.5px; font-family: var(--display); font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.panel-h .ph-sub { font-size: 12px; color: var(--muted); }
.panel-h .ph-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.panel-b { padding: 16px 18px; }
.panel.navy { border-top-color: var(--brand-ink); }

/* search bar: search-type select + term + button */
.searchbar { display: grid; grid-template-columns: 250px minmax(0, 1fr) 130px; gap: 10px; }
.searchbar .btn, .searchbar .input { height: 40px; }

/* A–Z register */
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.az button {
  min-width: 34px; height: 34px; border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; font-family: var(--display);
}
.az button:hover { border-color: var(--brand); color: var(--brand-dark); }
.az button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.az button:disabled { opacity: .35; cursor: default; }
.az-letter { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--brand); padding: 14px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ---------- the client file ---------- */
.file-head { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 4px 4px var(--r-md) var(--r-md); }
.fh-top { display: flex; align-items: center; gap: 16px; padding: 16px 20px; flex-wrap: wrap; }
.fh-avatar { width: 50px; height: 50px; border-radius: 50%; background: #E9EFF4; color: #8DA0B2; display: grid; place-items: center; flex-shrink: 0; }
.fh-avatar svg { width: 26px; height: 26px; }
.fh-name { font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--ink); line-height: 1.15; }
.fh-sub { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fh-stats { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.fh-stat { text-align: center; min-width: 74px; }
.fh-stat .v { font-family: var(--display); font-size: 21px; font-weight: 700; color: var(--brand-ink); line-height: 1.1; }
.fh-stat .v.bad { color: var(--err); }
.fh-stat .v.good { color: var(--ok); }
.fh-stat .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
.fh-period { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fh-period select { font-size: 11.5px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.fh-app { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--slate); }
.fh-app .chk { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.fh-app .chk.off { background: var(--line-soft); color: var(--faint); }
.fh-toggle { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand-ink); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.fh-toggle svg { transition: transform .2s; }
.fh-toggle.up svg { transform: rotate(180deg); }
.fh-agency { padding: 9px 20px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--slate); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.fh-agency b { color: var(--ink-2); font-weight: 600; }
.fh-details { padding: 14px 20px 18px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.fh-dl { display: grid; grid-template-columns: 150px 14px 1fr; gap: 8px 0; font-size: 13px; align-content: start; margin: 0; }
.fh-dl dt { color: var(--slate); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.fh-dl dt svg { width: 14px; height: 14px; color: var(--brand); }
.fh-dl .colon { color: var(--faint); }
.fh-dl dd { margin: 0; color: var(--ink); word-break: break-word; }
.policy-switch { display: inline-flex; align-items: center; gap: 6px; }
.policy-switch select { border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; font-size: 12.5px; background: #fff; color: var(--ink-2); max-width: 340px; }

/* the action band: Santam's yellow bar, in Active Aries blue */
.action-band {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 14px; padding: 6px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand)); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.ab-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: 9px;
  background: transparent; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: var(--font);
}
.ab-btn svg { width: 18px; height: 18px; }
.ab-btn:hover { background: rgba(255, 255, 255, .16); }
.ab-btn:disabled { opacity: .5; cursor: not-allowed; }
.ab-more { margin-left: auto; position: relative; }
.ab-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px;
}
.ab-menu.open { display: block; }
.ab-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; text-align: left; font-family: var(--font); }
.ab-menu button svg { width: 15px; height: 15px; color: var(--brand-deep); }
.ab-menu button:hover { background: var(--brand-soft); }
.file-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 18px; }

/* cover: the policy total and one card per section */
.cover-total { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cover-total h3 { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--ink); }
.cover-total .cd { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.cover-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cover-card {
  display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; transition: box-shadow .15s, border-color .15s; text-align: left; width: 100%;
  border-left: 4px solid transparent; font: inherit; color: inherit;
}
.cover-card:hover { box-shadow: var(--shadow-md); border-left-color: var(--brand); }
.cover-card .cc-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; flex-shrink: 0; }
.cover-card .cc-ic svg { width: 22px; height: 22px; }
.cover-card .cc-t { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--ink); }
.cover-card .cc-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cover-card > svg:last-child { margin-left: auto; color: var(--faint); }
.cover-extras { display: grid; grid-template-columns: auto 1fr; gap: 6px 22px; font-size: 13px; padding: 14px 18px; align-content: start; margin: 0; }
.cover-extras dt { color: var(--slate); font-weight: 600; }
.cover-extras dd { margin: 0; font-variant-numeric: tabular-nums; }

/* claims: open in green, closed in red — Elmien's own rule */
.claim-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; border-left: 5px solid var(--faint); margin-bottom: 8px; }
.claim-row.open { border-left-color: var(--ok); }
.claim-row.closed { border-left-color: var(--err); }
.claim-row:hover { box-shadow: var(--shadow-sm); }
.claim-state { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.claim-state.open { background: var(--ok-soft); color: var(--ok); }
.claim-state.closed { background: var(--err-soft); color: var(--err); }

/* quick links: tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px;
  min-height: 104px; padding: 14px; border-radius: var(--r-md); border: 0; cursor: pointer; text-align: left;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%); color: #fff;
  box-shadow: var(--shadow-sm); transition: transform .14s, box-shadow .14s; text-decoration: none !important; font: inherit;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-brand); }
.tile svg { width: 26px; height: 26px; }
.tile .t-label { font-size: 13px; font-weight: 600; line-height: 1.25; }
.tile.navy { background: linear-gradient(160deg, var(--navy-700), var(--brand-ink)); }

/* notice board: where Santam shows adverts, Active Aries shows its own news */
.notice-board { position: relative; overflow: hidden; border-radius: var(--r-lg); min-height: 210px; background: linear-gradient(120deg, var(--brand-ink), var(--navy-700) 55%, var(--brand-deep)); color: #fff; }
.nb-slide { position: absolute; inset: 0; padding: 30px 46px; display: flex; flex-direction: column; justify-content: center; gap: 12px; opacity: 0; transition: opacity .5s; pointer-events: none; }
.nb-slide.on { opacity: 1; position: relative; pointer-events: auto; }
.nb-pill { align-self: flex-start; border: 1.5px solid rgba(255, 255, 255, .7); border-radius: 999px; padding: 6px 16px; font-family: var(--display); font-size: 19px; font-weight: 600; }
.nb-body { align-self: flex-start; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; max-width: 640px; }
.nb-link { align-self: flex-start; background: #fff; color: var(--brand-ink); border: 0; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.nb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #fff; opacity: .8; cursor: pointer; font-size: 26px; padding: 6px; z-index: 2; }
.nb-nav.prev { left: 6px; } .nb-nav.next { right: 6px; }
.nb-dots { position: absolute; bottom: 12px; left: 46px; display: flex; gap: 6px; }
.nb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.nb-dots i.on { background: #fff; }
.nb-slide.tone-warn { background: linear-gradient(120deg, #6B3E00, #A96204); }
.nb-slide.tone-ok { background: linear-gradient(120deg, #0B5A3E, var(--ok)); }
.nb-slide.tone-brand { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); }
.nb-slide.tone-navy { background: linear-gradient(120deg, var(--brand-ink), var(--navy-700)); }

/* recently viewed / created columns */
.recent-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.recent-item { display: flex; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover .ri-t { color: var(--brand-deep); }
.ri-t { font-size: 13px; font-weight: 600; color: var(--ink); }
.ri-s { font-size: 11.5px; color: var(--muted); }

/* reporting accordions */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); overflow: hidden; margin-bottom: 12px; }
.acc-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; background: #F3F6F9; border: 0; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; font-family: var(--display); text-align: left; }
.acc-h svg { margin-left: auto; transition: transform .2s; }
.acc.open .acc-h { border-bottom: 3px solid var(--brand); }
.acc.open .acc-h svg { transform: rotate(180deg); }
.acc-b { display: none; padding: 14px 18px; }
.acc.open .acc-b { display: block; }
.report-entry { border: 1px solid var(--line-soft); border-radius: var(--r-sm); margin-bottom: 12px; overflow: hidden; }
.re-title { background: var(--brand-ink); color: #fff; padding: 9px 14px; font-size: 13.5px; font-weight: 600; }
.re-body { padding: 10px 14px 12px; font-size: 12.5px; color: var(--slate); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* MFA */
.mfa-steps { padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.mfa-qr { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); width: max-content; margin: 0 auto; }
.mfa-manual { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.mfa-manual summary { cursor: pointer; color: var(--brand-deep); font-weight: 600; }
.mfa-code-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px; background: var(--bg); border: 1px dashed var(--line); border-radius: var(--r-md); }
.mfa-code-grid span { font-size: 14px; text-align: center; letter-spacing: .06em; }
.otp-input { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 22px; letter-spacing: .25em; text-align: center; }

@media (max-width: 1180px) {
  .tb-search span, .tb-search kbd { display: none; }
  .tb-search { min-width: 0; }
  .recent-cols { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .tb-burger { display: grid; }
  .tn { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; height: auto; background: var(--card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 8px; }
  .topbar.open .tn { display: flex; }
  .tn-item { height: 46px; border-radius: 8px; }
  .tn-icon { width: auto; justify-content: flex-start; padding: 0 14px; }
  .more-menu { position: static; min-width: 0; grid-template-columns: 1fr 1fr; box-shadow: none; border: 0; padding: 4px 0; }
  .tb-user-text { display: none; }
  /* minmax(0, …): a wide table scrolls inside its panel instead of widening the page */
  .with-subnav, .file-body { grid-template-columns: minmax(0, 1fr); }
  .subnav { position: static; display: flex; overflow-x: auto; }
  .subnav-title { display: none; }
  .sn-item { border-top: 0; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; width: auto; }
  .sn-item.active { border-left: 0; border-bottom-color: var(--brand); }
  .fh-details { grid-template-columns: 1fr; gap: 12px; }
  .cover-grid { grid-template-columns: 1fr; }
  .searchbar { grid-template-columns: 1fr; }
  .content2 { padding: 16px 14px 40px; }
}
@media (max-width: 400px) {
  .tb-brand .wordmark { display: none; }
  .shell2 .topbar { gap: 8px; }
  .tb-right { gap: 6px; }
}
