/* LexElite® Client Portal — design tokens and components.
   Layout: one language at a time; logical properties so Farsi (RTL) mirrors cleanly. */
/* Colors and fonts taken from lexelite.com (Wix theme + logo file) and atlas.lexelite.com, checked Nov 4, 2026. */
:root {
  /* Navy: site band/footer #062135 (Wix color_14), secondary #0A304C (color_18), logo wordmark #00305B */
  --navy-900: #062135; --navy-700: #0A304C; --logo-navy: #00305B;
  /* Gold: site accent #C1A17D (Wix color_19), logo bar #C1A783, button border #C7A881, light gold #D9C29C.
     #7A6340 (LexAtlas heading accent) is the gold used for small text on white, for contrast. */
  --gold-500: #C1A17D; --gold-600: #7A6340; --gold-100: #F3EBDD; --gold-light: #D9C29C;
  --logo-gold: #C1A783; --btn-border: #C7A881; --logo-grey: #515559;
  --paper: #FAFAFA; --surface: #ffffff; --ink: #1B1E2C; --ink-2: #5E6168; --line: #E2DED6;
  --ok: #1f6f4a; --ok-bg: #e5f2ea; --warn: #76592F; --warn-bg: #F3EBDD; --err: #9E3B3B; --err-bg: #F4E4E2;
  --info: #0A304C; --info-bg: #E1E9F0; --focus: #A68A5E;
  --btn-bg: #09304C; --btn-bg-hover: #062135; --btn-ink: #ffffff;
  --head-bg: #ffffff; --head-ink: #062135; --head-line: #E2DED6; --word: #00305B;
  --band: #062135; --band-ink: #E6EAF0; --band-ink-2: #B4BECB; --band-accent: #C1A17D;
  --radius: 10px;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fa: 'Noto Naskh Arabic', Tahoma, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #04172a; --surface: #0A2238; --ink: #EEF1F6; --ink-2: #B4BECB; --line: #1F3A55;
    --navy-700: #B8CAE0; --gold-500: #D9C29C; --gold-600: #D9C29C; --gold-100: #2a2416;
    --ok: #7fd1a6; --ok-bg: #12291f; --warn: #E6D3B3; --warn-bg: #2a2110; --err: #ff9c9c; --err-bg: #2d1414;
    --info: #B8CAE0; --info-bg: #10304c; --focus: #D9C29C;
    --btn-bg: #09304C; --btn-bg-hover: #0A314D; --btn-ink: #ffffff;
    --head-bg: #062135; --head-ink: #ffffff; --head-line: #0A304C; --word: #ffffff; --logo-grey: #B4BECB;
    --band: #052035; --band-ink: #E6EAF0; --band-ink-2: #B4BECB; --band-accent: #D9C29C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #04172a; --surface: #0A2238; --ink: #EEF1F6; --ink-2: #B4BECB; --line: #1F3A55;
  --navy-700: #B8CAE0; --gold-500: #D9C29C; --gold-600: #D9C29C; --gold-100: #2a2416;
  --ok: #7fd1a6; --ok-bg: #12291f; --warn: #E6D3B3; --warn-bg: #2a2110; --err: #ff9c9c; --err-bg: #2d1414;
  --info: #B8CAE0; --info-bg: #10304c; --focus: #D9C29C;
  --btn-bg: #09304C; --btn-bg-hover: #0A314D; --btn-ink: #ffffff;
  --head-bg: #062135; --head-ink: #ffffff; --head-line: #0A304C; --word: #ffffff; --logo-grey: #B4BECB;
  --band: #052035; --band-ink: #E6EAF0; --band-ink-2: #B4BECB; --band-accent: #D9C29C;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
:root[lang="fa"] body { font-family: var(--fa); line-height: 1.9; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; text-wrap: balance; }
:root[lang="fa"] h1, :root[lang="fa"] h2, :root[lang="fa"] h3 { font-family: var(--fa); font-weight: 700; }
h1 { font-size: 1.8rem; line-height: 1.25; } h2 { font-size: 1.28rem; line-height: 1.3; }
p { margin: 0; }
a { color: var(--navy-700); } a:hover { color: var(--gold-600); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: static; width: auto; height: auto; clip: auto; display: block; padding: 8px 16px; background: var(--surface); }
.top .in, footer.band .in, main, .preview-banner {
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header: white like lexelite.com; wordmark set in Playfair Display like the logo, gold divider, product name */
.top { background: var(--head-bg); color: var(--head-ink); border-bottom: 1px solid var(--head-line); }
.top .in { max-width: 1040px; margin: 0 auto; padding-block: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mark { color: var(--word); text-decoration: none; font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: 1.75rem; line-height: 1; }
.mark sup { font-family: var(--sans); font-weight: 400; font-size: 0.42em; color: var(--logo-grey); vertical-align: super; margin-inline-start: 1px; }
.product { color: var(--logo-grey); font-family: var(--sans); font-size: 0.95rem; line-height: 1.3; padding-block: 4px; padding-inline-start: 12px; border-inline-start: 3px solid var(--logo-gold); }
:root[lang="fa"] .product { font-family: var(--fa); font-size: 1rem; }
.spacer { flex: 1; }
.langs { display: flex; gap: 2px; border: 1px solid var(--head-line); border-radius: 999px; padding: 3px; }
.lang { min-height: 36px; padding: 4px 14px; font: 600 0.9rem var(--sans); color: var(--head-ink); background: transparent; border: 0; border-radius: 999px; cursor: pointer; }
.lang[lang="fa"] { font-family: var(--fa); }
.lang[aria-pressed="true"] { background: var(--btn-bg); color: #fff; box-shadow: inset 0 0 0 2px var(--btn-border); }
.top button.link { color: var(--head-ink); }
.rule { height: 0; }
.preview-banner { background: var(--gold-100); color: var(--ink); text-align: center; padding-block: 8px; font-size: 0.92rem; }

main { max-width: 1100px; width: 100%; margin: 0 auto; padding-block: 24px; flex: 1; }
footer.band { background: var(--band); color: var(--band-ink); margin-top: 48px; }
footer.band .in { max-width: 1040px; margin: 0 auto; padding-block: 22px; display: grid; gap: 8px; font-size: 0.93rem; }
footer.band a { color: var(--band-accent); }
footer.band .fine { color: var(--band-ink-2); font-size: 0.85rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 16px; } .grid > * { min-width: 0; }
@media (min-width: 860px) { .grid.two { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.cases { display: grid; gap: 16px; }
@media (min-width: 860px) { .cases { grid-template-columns: 1fr 1fr; } }

/* Buttons and inputs: touch targets 44px+ */
button, .btn { font-weight: 600; font-size: 1rem; font-family: inherit; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); border: 3px solid var(--btn-border); border-radius: 50px; padding-inline: 22px; }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-quiet { background: transparent; border-color: var(--line); color: var(--ink); border-radius: 50px; }
.btn-quiet:hover { border-color: var(--gold-500); }
button.link { background: none; border: none; padding: 10px 2px; color: var(--navy-700); text-decoration: underline; font-weight: 500; }
.back { align-self: flex-start; }
:root[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=email], input[type=password], input[type=text], input[type=date], input[type=tel], input[type=number] {
  width: 100%; min-height: 48px; padding: 10px 12px; font: 1.05rem var(--sans); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; }
input[dir="ltr"] { text-align: left; }
input[aria-invalid="true"] { border-color: var(--err); }
.field-err { color: var(--err); margin-top: 6px; font-size: 0.95rem; }
.otp { letter-spacing: 0.4em; font-size: 1.4rem !important; text-align: center !important; max-width: 220px; }

/* Firm screen: choice lists and the WhatsApp message box */
.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; min-width: 0; }
.choices legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 0; min-height: 44px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.choice input { width: 18px; height: 18px; accent-color: var(--btn-bg); flex: none; }
textarea { width: 100%; font: 0.98rem/1.6 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: vertical; }
textarea[lang="fa"] { font-family: var(--fa); }
.firm input[type=text] { min-height: 48px; }

img.qr { align-self: center; background: #fff; padding: 8px; border-radius: 8px; }
code.key { word-break: break-all; }
input.grow { flex: 1; min-width: 0; }

select { width: 100%; max-width: 420px; min-height: 48px; padding: 10px 12px; font: 1rem var(--sans); color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 8px; }
h1[tabindex="-1"]:focus { outline: none; }

/* Notices */
.note { border-radius: 8px; padding: 12px 14px; border-inline-start: 4px solid; display: grid; gap: 4px; }
.note.info { background: var(--info-bg); border-color: var(--info); }
.note.ok { background: var(--ok-bg); border-color: var(--ok); }
.note.err { background: var(--err-bg); border-color: var(--err); }

/* Next step */
.next { border-inline-start: 4px solid var(--gold-500); padding-inline-start: 16px; display: grid; gap: 6px; }
.card.next { padding-inline-start: 20px; }
.lead { font-size: 1.08rem; }
.eyebrow { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-600); font-weight: 700; }
:root[lang="fa"] .eyebrow { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.stage-line { font-size: 0.93rem; color: var(--ink-2); }
.stage-line strong { color: var(--ink); }
.small { font-size: 0.9rem; color: var(--ink-2); }

/* Stage tracker (vertical; mirrors in RTL) */
.track { list-style: none; margin: 16px 0 0; padding: 0; }
.track li { position: relative; padding-block-end: 18px; padding-inline-start: 42px; }
.track li::before { content: ""; position: absolute; inset-inline-start: 13px; top: 30px; bottom: -2px; width: 2px; background: var(--line); }
.track li:last-child::before { display: none; }
.track .dot { position: absolute; inset-inline-start: 0; top: 2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); background: var(--surface); font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.track li.done .dot { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.track li.done::before { background: var(--btn-bg); }
.track li.now .dot { border-color: var(--gold-500); box-shadow: 0 0 0 4px var(--gold-100); color: var(--gold-600); }
.track .name { font-weight: 600; }
.track li.now .name { font-size: 1.08rem; }
.track .state { font-size: 0.82rem; color: var(--ink-2); }
.track .ex { color: var(--ink-2); font-size: 0.93rem; margin-top: 2px; }

/* Mini tracker on case cards */
.bar { display: flex; gap: 4px; }
.bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.bar i.done { background: var(--btn-bg); } .bar i.now { background: var(--gold-500); }

/* Document checklist */
.check { list-style: none; margin: 8px 0 12px; padding: 0; }
.check > li { padding-block: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.check > li:first-child { border-top: 0; }
.doc-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.doc-head > span:first-child { min-width: 0; }
.pill { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.needed { background: var(--warn-bg); color: var(--warn); }
.pill.uploaded { background: var(--info-bg); color: var(--info); }
.pill.accepted { background: var(--ok-bg); color: var(--ok); }
.pill.correction { background: var(--err-bg); color: var(--err); }
.upload-row input[type=file] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.todo { margin: 0; padding-inline-start: 1.2rem; } .todo li { margin: 6px 0; }

.center { max-width: 460px; margin: 24px auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }


/* ===================== Design B: navy rail (approved Nov 5, 2026) ===================== */
.app { display: flex; min-height: 100vh; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.langs-in { display: contents; }
.rail { width: 264px; flex: none; background: #062135; color: #C9D3DD; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; padding: 26px 14px max(20px, env(safe-area-inset-bottom, 0px)); }
.rail-brand { display: flex; flex-direction: column; gap: 4px; padding: 0 12px 22px; }
.mark.light { color: #FFFFFF; font-family: 'Playfair Display', Georgia, serif; font-weight: 500; font-size: 1.7rem; line-height: 1; }
.mark.light sup { color: #C1A17D; font-family: var(--sans); font-size: 0.42em; vertical-align: super; }
.rail-product { font: 600 0.72rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: #C1A17D; }
:root[lang="fa"] .rail-product { font-family: var(--fa); letter-spacing: 0; font-size: 0.9rem; text-transform: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { width: 100%; justify-content: flex-start; background: transparent; color: #C9D3DD; border: 0; border-inline-start: 3px solid transparent;
  border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 0.95rem; text-align: start; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.nav-item[aria-current="page"] { background: rgba(193, 161, 125, 0.16); color: #FFFFFF; border-inline-start-color: #C1A17D; }
.nav-item svg { flex: none; }
.nav-badge { margin-inline-start: auto; background: #C1A17D; color: #062135; border-radius: 999px; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; }
.case-switch { padding: 0 6px 12px; }
.rail-label { color: #C9D3DD; font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; }
.case-switch select { max-width: 100%; min-height: 44px; background: #0A304C; color: #FFFFFF; border-color: #0A304C; font-size: 0.92rem; }
.rail-foot { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
button.link.light { color: #C9D3DD; }
.menu-btn { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(4, 20, 34, 0.5); z-index: 55; }

body.in .top { background: transparent; border-bottom: 0; }
@media (min-width: 960px) { body.in .top .mark, body.in .top .product { display: none; } }
@media (max-width: 959px) {
  .rail { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(300px, 86vw); height: auto; z-index: 60;
    transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, 0.3); }
  :root[dir="rtl"] .rail { transform: translateX(105%); }
  .rail.open, :root[dir="rtl"] .rail.open { transform: none; }
  body.in .top { background: #062135; }
  body.in .top .mark { color: #FFFFFF; font-size: 1.45rem; }
  body.in .top .mark sup { color: #C1A17D; }
  body.in .top .product { display: none; }
  body.in .menu-btn { display: inline-flex; justify-content: center; width: 44px; padding: 0; color: #FFFFFF; background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 10px; }
  body.in .langs { background: #FFFFFF; }
  body.in .lang { min-height: 34px; padding-inline: 11px; font-size: 0.82rem; }
}

/* Pages and panels */
.page { display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin-top: 4px; }
.step-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.h-small { font-size: 1.06rem; }
.h-row { font-size: 0.98rem; margin: 12px 0 4px; }
.dash { display: grid; gap: 18px; }
.dash .col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (min-width: 900px) { .dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.hero { display: flex; flex-direction: column; gap: 12px; }
.hero-text { font: 500 1.45rem/1.35 var(--serif); color: var(--ink); }
:root[lang="fa"] .hero-text { font: 600 1.25rem/1.9 var(--fa); }
.eyebrow.gold { color: var(--gold-600); }
.btn-gold { background: #C1A17E; color: #062135; border: 0; border-radius: 100px; font-weight: 700; min-height: 44px; padding: 10px 24px;
  box-shadow: 0 3px 4px 1px rgba(6, 33, 53, 0.25); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-gold:hover { color: #062135; background: #C1A783; }
.row-panel { display: flex; align-items: center; gap: 18px; }
.stack-tight { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ring { flex: none; }
.ring-bg { stroke: var(--line); } .ring-fg { stroke: var(--btn-bg); } .ring-tx { fill: var(--ink); font-family: var(--sans); }
:root[data-theme="dark"] .ring-fg { stroke: #C1A17D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ring-fg { stroke: #C1A17D; } }
.warn-text { color: var(--err); font-weight: 600; }
.badge { background: #C1A17D; color: #062135; border-radius: 999px; font-size: 0.78rem; font-weight: 700; padding: 2px 10px; }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--ink-2); vertical-align: middle; }
.row-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.progress-line { display: grid; gap: 8px; }
.pill.received { background: var(--info-bg); color: var(--info); }
.pill.waived { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.done-item { color: var(--ink-2); }
details.panel summary { cursor: pointer; font-weight: 600; min-height: 32px; }

/* Case progress on the overview: a segmented bar, then "Now" and "Next" */
.seg { display: flex; gap: 4px; margin-top: 14px; }
.seg i { flex: 1 1 0; height: 8px; border-radius: 4px; background: var(--line); }
.seg i.done { background: var(--btn-bg); }
.seg i.current { background: var(--gold-500); }
.seg-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--ink-2); }
.prog-now { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 640px) { .prog-now { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.prog-step { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); min-width: 0; }
.prog-step.now { border-color: var(--gold-500); background: var(--gold-100); }
.prog-step strong { font-size: 1.02rem; }

/* What to do now */
.act-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.act-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 12px; border-top: 1px solid var(--line); }
.act-list li:first-child { border-top: 0; }
.act-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); color: var(--navy-700); }
.act-list li.urgent .act-ic { color: var(--err); border-color: var(--err); }
.act-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.act-tx strong { overflow-wrap: anywhere; }
.btn-quiet.sm { border: 1px solid var(--line); color: var(--ink); background: transparent; min-height: 40px; padding: 6px 16px; font-size: 0.92rem; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.minibar { display: flex; gap: 2px; margin-top: 4px; max-width: 160px; }
.minibar i { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--line); }
.minibar i.on { background: var(--btn-bg); }
@media (max-width: 520px) { .act-list li { grid-template-columns: auto minmax(0, 1fr); } .act-list li > :last-child { grid-column: 2; justify-self: start; } }

/* USCIS receipts and the firm contact card */
.rcpt { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.rcpt li { display: flex; flex-direction: column; gap: 2px; }
.rcpt .tag { align-self: flex-start; }
.contact .btn-quiet { display: inline-flex; gap: 8px; align-items: center; }

/* Key dates */
.dates { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.dates li { display: flex; gap: 12px; align-items: flex-start; }
.date-box { flex: none; min-width: 58px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; font-weight: 700; font-size: 0.82rem; }

/* Messages */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; border-radius: 12px; padding: 10px 14px; display: grid; gap: 4px; }
.msg.me { align-self: flex-end; background: var(--info-bg); }
.msg.firm { align-self: flex-start; background: var(--gold-100); }
.msg-meta { font-size: 0.78rem; color: var(--ink-2); font-weight: 600; }
.msg-body { overflow-wrap: anywhere; }

/* Questionnaires */
.form-page .bar { margin-top: -6px; }
.q { display: grid; gap: 4px; }
.qlabel, .q > label { font-weight: 600; margin: 0; }
.orig { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.86rem; color: var(--ink-2); }
.req { color: var(--err); font-size: 0.78rem; font-weight: 600; }
.rowset { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 14px; margin: 0; min-width: 0; }
.rowset legend { font-weight: 700; padding: 0 6px; }
.choices.inline { grid-auto-flow: column; justify-content: start; }
.form-actions { padding-top: 6px; border-top: 1px solid var(--line); }
dl { margin: 0; display: grid; gap: 8px; }
.ans { display: grid; gap: 2px; padding-block: 6px; border-top: 1px solid var(--line); }
.ans dt { font-weight: 600; } .ans dd { margin: 0; overflow-wrap: anywhere; }
.ans.miss dt { color: var(--err); }
@media (min-width: 760px) { .ans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } }
textarea { min-height: 44px; }

/* Firm screens */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; font-size: 0.88rem; color: var(--ink-2); }
.kpi-n { font: 600 1.8rem var(--serif); color: var(--ink); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--ink-2); padding: 10px 12px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: #C1A17D; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.tbl th, .tbl td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
@media (min-width: 860px) { .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
select.mini { max-width: 240px; min-height: 40px; font-size: 0.9rem; padding: 6px 10px; }
.choice.wide { justify-content: space-between; flex-wrap: wrap; }
.inline-label { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 0; }
.answers { margin-top: 12px; }

/* Questionnaire: the official form's context line above a run of questions; single check boxes. */
.q-group { font: 600 .82rem/1.4 var(--sans); letter-spacing: .02em; color: var(--ink-2); margin: 1.1rem 0 .1rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.q-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.choice.check { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; }
.choice.check input { margin-top: .2rem; width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--navy-700); }

/* Questionnaire cards: one printed question, its boxes laid out like the paper form. */
.qcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; margin: 0; background: var(--surface, transparent); }
.qcard + .qcard, .qcard + .q, .q + .qcard { margin-top: 4px; }
.qcard legend { font-weight: 700; padding: 0 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; max-width: 100%; }
.qcard .item-no { font-weight: 500; font-size: 0.75rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 100px; padding: 1px 8px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px 16px; }
.qgrid > .q { grid-column: 1 / -1; min-width: 0; }
.qgrid > .q.short { grid-column: auto; }

/* Footer: one quiet line */
footer.band .in { padding-block: 18px; }
footer.band p { margin: 0; color: var(--band-ink-2); font-size: 0.88rem; }
footer.band .sep { margin-inline: 8px; opacity: 0.6; }

/* Support button at the bottom of the side bar */
.rail-foot { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.rail-foot { padding-inline: 0; }
.rail-foot #signout { align-self: flex-start; padding-inline: 14px; }
.note.warn { background: var(--gold-100); border-color: var(--gold-500); }

/* Home: navy welcome band, figures row, refined panels */
.home .panel { box-shadow: 0 1px 2px rgba(6, 33, 53, 0.04), 0 8px 24px -16px rgba(6, 33, 53, 0.18); }
.home .panel h2 { font-size: 1.15rem; }
.welcome { position: relative; overflow: hidden; border-radius: 16px; color: #E9EEF4; padding: 30px 30px 28px;
  background: radial-gradient(120% 140% at 100% 0%, #123B5C 0%, #0A2A44 45%, #062135 100%);
  display: grid; gap: 22px; box-shadow: 0 14px 34px -20px rgba(6, 33, 53, 0.65); }
.welcome::after { content: ""; position: absolute; inset-inline: 30px; top: 0; height: 3px; background: linear-gradient(90deg, transparent, #C1A17D, transparent); }
@media (min-width: 900px) { .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 32px; padding: 36px; } }
.welcome h1 { color: #FFFFFF; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.welcome-greet { margin: 0 0 6px; color: #C1A17D; font-weight: 600; letter-spacing: 0.04em; }
.welcome-sub { margin: 10px 0 0; color: #B9C6D4; font-size: 0.95rem; }
.welcome-next { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(193, 161, 125, 0.35); border-radius: 12px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px; }
.welcome-next .eyebrow { color: #D9C29C; margin: 0; }
.welcome-next-tx { margin: 0; color: #FFFFFF; font: 500 1.22rem/1.45 var(--serif); }
:root[lang="fa"] .welcome-next-tx { font: 600 1.12rem/1.9 var(--fa); }
.welcome-after { margin: 0; color: #B9C6D4; font-size: 0.9rem; }
.welcome-after strong { color: #E9EEF4; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px;
  min-width: 0; box-shadow: 0 1px 2px rgba(6, 33, 53, 0.04); position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--gold-500); }
.stat-ic { color: var(--gold-600); margin-bottom: 4px; }
.stat-v { font: 600 1.6rem/1.2 var(--serif); color: var(--ink); }
.stat-v small { font-size: 0.6em; color: var(--ink-2); font-family: var(--sans); font-weight: 600; }
:root[lang="fa"] .stat-v { font-family: var(--sans); }
.stat-l { font-size: 0.82rem; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; }
:root[lang="fa"] .stat-l { text-transform: none; letter-spacing: 0; font-size: 0.9rem; }
.stat-s { font-size: 0.85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home .dash { margin-top: 0; }
.team { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.team::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--logo-navy); }
.team .eyebrow { margin: 0; }
.team-btns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.team-btns .btn-quiet { gap: 6px; }

/* Support page */
.support-intro p { margin: 8px 0 0; max-width: 70ch; color: var(--ink-2); }
.support-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sup-card { display: flex; flex-direction: column; gap: 8px; }
.sup-card.primary { position: relative; overflow: hidden; }
.sup-card.primary::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--gold-500); }
.sup-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-600); }
.sup-num { margin: 0; font: 600 1.2rem var(--sans); }
.sup-card p { margin: 0; }

/* Welcome band — option A: like the LexServices cards (navy-to-ink gradient, gold pill, ivory card) */
.welcome.v-cards { background: linear-gradient(180deg, #183350 0%, #13273E 45%, #07101A 100%); }
.welcome.v-cards::after { display: none; }
.welcome.v-cards .welcome-greet { display: inline-block; justify-self: start; background: linear-gradient(180deg, #E8D7B2, #C9AE82); color: #13273E;
  border-radius: 999px; padding: 5px 14px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
:root[lang="fa"] .welcome.v-cards .welcome-greet { letter-spacing: 0; text-transform: none; }
.welcome.v-cards .welcome-next { background: #FFFFFF; border: 0; border-radius: 14px; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.55); }
.welcome.v-cards .welcome-next .eyebrow { color: #A18863; }
.welcome.v-cards .welcome-next-tx { color: #1A2F4A; }
.welcome.v-cards .welcome-after { color: #5A6B7F; }
.welcome.v-cards .welcome-after strong { color: #1A2F4A; }

/* Welcome band — option B: lexelite.com navies (#142E48 section, #0D2033 card) with the gold pill button */
.welcome.v-site { background: #142E48; box-shadow: none; }
.welcome.v-site::after { display: none; }
.welcome.v-site h1 { font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
:root[lang="fa"] .welcome.v-site h1 { text-transform: none; font-family: var(--fa); }
.welcome.v-site .welcome-greet { color: #C1A17E; }
.welcome.v-site .welcome-next { background: #0D2033; border: 0; border-radius: 16px; padding: 26px 28px; }
.welcome.v-site .welcome-next .eyebrow { color: #FFFFFF; letter-spacing: 0.08em; }
.welcome.v-site .welcome-next-tx { font-family: var(--sans); font-weight: 400; color: #FFFFFF; }
.welcome.v-site .welcome-after { color: #C3CEDA; }

/* Welcome band — option 3: lexelite.com section navy, LexServices-card gradient for the next-step card, plain gold greeting */
.welcome.v-mix { background: #142E48; box-shadow: none; }
.welcome.v-mix::after { display: none; }
.welcome.v-mix h1 { font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
:root[lang="fa"] .welcome.v-mix h1 { text-transform: none; font-family: var(--fa); }
.welcome.v-mix .welcome-greet { color: #C1A17E; font-weight: 600; letter-spacing: 0.04em; }
.welcome.v-mix .welcome-next { background: linear-gradient(180deg, #183350 0%, #13273E 45%, #07101A 100%); border: 1px solid rgba(193, 161, 126, 0.25);
  border-radius: 16px; padding: 26px 28px; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6); }
.welcome.v-mix .welcome-next .eyebrow { color: #C1A17E; letter-spacing: 0.08em; }
.welcome.v-mix .welcome-next-tx { color: #FFFFFF; }
.welcome.v-mix .welcome-after { color: #C3CEDA; }
.welcome.v-mix .btn-gold { box-shadow: none; }
.welcome.v-mix .btn-gold { background: linear-gradient(180deg, #E8D7B2, #C9AE82); color: #13273E; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.9rem; padding: 12px 26px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.welcome.v-mix .btn-gold:hover { background: linear-gradient(180deg, #EEDFBF, #D1B78C); color: #13273E; }
:root[lang="fa"] .welcome.v-mix .btn-gold { letter-spacing: 0; text-transform: none; font-size: 1rem; }
/* Option 3, final colours: background = lexelite.com navy #142E48; card = the LexServices-card gradient, ending in the website's darker navy #0D2033 */
.welcome.v-mix { background: #142E48; }
.welcome.v-mix .welcome-next { background: linear-gradient(180deg, #18334F 0%, #13273E 55%, #0D2033 100%); border: 0;
  box-shadow: 0 16px 32px -18px rgba(0, 0, 0, 0.7); }
.welcome.v-mix .btn-gold { background: linear-gradient(180deg, #E5D3AB 0%, #C5AD8C 100%); color: #13273E; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.welcome.v-mix .btn-gold:hover { background: linear-gradient(180deg, #EBDBB6 0%, #CDB695 100%); }
/* Option 3: website section navy #142E48 behind; the website's dark card navy #0D2033 shaded top-to-bottom like the LexServices cards */
.welcome.v-mix .welcome-next { background: radial-gradient(120% 70% at 20% 0%, rgba(32, 66, 104, 0.55) 0%, rgba(32, 66, 104, 0) 70%),
  linear-gradient(180deg, #112840 0%, #0D2033 50%, #07121E 100%); }

/* Footer: no navy band, just the copyright line in gold on the page background */
footer.band { background: transparent; color: inherit; margin-top: 40px; }
footer.band .in { padding-block: 18px 26px; justify-items: center; text-align: center; }
footer.band p { color: #8A6D45; font-size: 0.86rem; letter-spacing: 0.02em; }
:root:not([data-theme="light"]) footer.band p { color: #8A6D45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) footer.band p { color: #D9C29C; } }
:root[data-theme="dark"] footer.band p { color: #D9C29C; }
.agree { align-items: flex-start; font-weight: 400; }
.agree a { font-weight: 600; }
.legal-line { text-align: center; margin: 4px 0 0; }

/* ---------- Client services (Nov 5, 2026): agreement, expiry dates, priority dates, learning centre ---------- */
.btn-gold.sm { white-space: nowrap; flex: none; padding: 8px 14px; font-size: .78rem; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.small.auto { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.check-line { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; cursor: pointer; }
.check-line input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--navy-700); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid2 > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.exp-add { border-top: 1px solid var(--line); padding-top: 12px; }
.exp-add summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--navy-700); min-height: 44px; }
.exp-add form { margin-top: 10px; }
.pd { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.pd:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.pd p { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: 0 0 8px; }
.pd-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pd-rows li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; font-size: .9rem; }
.pd-rows li .small { grid-column: 1; }
.pd-rows li .pill { grid-row: 1 / span 2; grid-column: 2; }
.ag-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.ag-steps > li { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-inline-start: 14px; border-inline-start: 3px solid var(--gold-500); }
.ag-read { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.ag-form { width: 100%; max-width: 640px; }
.ag-form input[name=name] { font-family: var(--serif); font-size: 1.15rem; letter-spacing: .02em; }
.consent { background: var(--gold-100); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.consent p { margin: 0; line-height: 1.55; font-size: .9rem; }
.ag.signed .small bdi { font-family: var(--serif); }
.notice-set { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; }
.notice-set > div { display: grid; gap: 8px; min-width: 0; }
.learn-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.learn-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--surface); min-height: 44px; transition: border-color .15s, box-shadow .15s; }
.learn-card:hover, .learn-card:focus-visible { border-color: var(--gold-500); box-shadow: 0 2px 10px rgba(6, 33, 53, .08); }
.learn-card > span:last-child { display: grid; gap: 2px; min-width: 0; }
.learn-card strong { color: var(--navy-700); }
.learn-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-600); }
.learn-card .src { color: var(--gold-600); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.grid.four { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.grid.four > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
table.vb { border-collapse: collapse; font-size: .85rem; }
table.vb th, table.vb td { border: 1px solid var(--line); padding: 4px 6px; text-align: start; }
table.vb input { width: 120px; min-height: 34px; padding: 4px 6px; font-size: .85rem; }

/* ---------- Firm management (Nov 6, 2026) ---------- */
.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
button.kpi { text-align: start; cursor: pointer; font: inherit; color: var(--ink-2); }
button.kpi:hover, button.kpi:focus-visible { border-color: var(--gold-500); }
.kpi.hot { border-color: var(--err, #B3261E); }
.kpi.hot .kpi-n { color: var(--err, #B3261E); }
.dues { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.dues li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.dues li.late { border-color: var(--err, #B3261E); background: color-mix(in srgb, var(--err, #B3261E) 6%, transparent); }
.due-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--navy-700); min-width: 72px; }
.due-t { min-width: 0; }
.mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mini li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mini li:last-child { border-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin: 0 0 14px; }
.filters label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.filters label.check-line { display: flex; align-items: center; }
.filters input[type=search], .filters select { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.tbl tr.late td:first-child { box-shadow: inset 3px 0 0 var(--err, #B3261E); }
.tbl .flags { display: flex; flex-wrap: wrap; gap: 4px; }
.link.strong { font-weight: 700; }
.check li.done { opacity: .6; }
.check li.late .small { color: var(--err, #B3261E); }
.timerbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 14px;
  border-radius: 10px; background: var(--navy-700); color: #fff; }
.timerbar .btn-quiet { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.timerbar strong { font-variant-numeric: tabular-nums; }
.btn-primary.sm { min-height: 36px; padding: 6px 12px; font-size: .82rem; }
.btn-primary[disabled] { opacity: .5; cursor: not-allowed; }
details.tpl { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
details.tpl summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
details.tpl[open] summary { margin-bottom: 10px; }
.row-acts { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: flex-end; }
@media (max-width: 560px) {
  .dues li { grid-template-columns: 1fr auto; }
  .dues .due-k { grid-column: 1 / -1; min-width: 0; }
}

/* ---------- Clients list and client profile (Nov 7, 2026) ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold-100);
  color: var(--navy-700); font-family: var(--serif); font-weight: 600; flex: none; overflow: hidden; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar.lg { width: 128px; height: 128px; font-size: 2.4rem; border: 2px solid var(--gold-500); }
.client-name { display: inline-flex; align-items: center; gap: 10px; text-align: start; text-decoration: none; color: var(--ink); min-height: 44px; }
.client-name:hover strong, .client-name:focus-visible strong { text-decoration: underline; }
.tbl.clients td { vertical-align: middle; }
.profile { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .profile { grid-template-columns: minmax(0, 1fr); } }
.profile-card { align-items: center; text-align: center; }
.photo-box { display: flex; justify-content: center; padding-top: 6px; }
.actions.center { justify-content: center; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }
.file-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; margin: 8px 0 0; text-align: start; width: 100%; }
.facts dt { color: var(--ink-2); font-size: 0.85rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.push-end { margin-inline-start: auto; }
.facts .link { text-align: start; }

/* ---------- My information (shared client record) and the firm's record view ---------- */
.mi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px 16px; margin-top: 8px; }
.mi-grid .field label { font-size: 0.9rem; }
.mi-grid input, .mi-grid select { width: 100%; }
.mi-grid [aria-invalid="true"] { border-color: var(--err); }
.mi-member { margin-top: 10px; padding: 12px 16px; }
.mi-member summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.roles-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 6px; }
.roles-row label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; margin: 0; }
#rec-f .grid input { width: 100%; }

/* ---------- Paying an invoice (LawPay hosted fields) ---------- */
.note.warn { background: var(--warn-bg); border-color: var(--warn); }
.pay-page { display: grid; gap: 20px; }
.pay-back { justify-self: start; }
/* Navy invoice band, same family as the home welcome band and lexelite.com sections */
.inv-hero { position: relative; overflow: hidden; border-radius: 16px; color: #E9EEF4; padding: 28px 26px;
  background: radial-gradient(120% 140% at 100% 0%, #1A3D60 0%, #142E48 50%, #0D2033 100%);
  display: grid; gap: 20px; box-shadow: 0 14px 34px -20px rgba(6, 33, 53, 0.65); }
.inv-hero::after { content: ""; position: absolute; inset-inline: 26px; top: 0; height: 3px; background: linear-gradient(90deg, transparent, #C1A17D, transparent); }
@media (min-width: 760px) { .inv-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; padding: 34px 36px; } }
.inv-firm { margin: 0 0 6px; color: #C1A17E; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.inv-firm sup { font-size: 0.6em; }
.inv-hero h1 { margin: 0; color: #FFFFFF; font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: 0.01em; }
:root[lang="fa"] .inv-hero h1 { font-family: var(--fa); }
.inv-meta { margin: 8px 0 0; color: #B9C6D4; font-size: 0.95rem; }
.inv-hero-amt { display: grid; gap: 4px; justify-items: start; }
@media (min-width: 760px) { .inv-hero-amt { justify-items: end; text-align: end; } }
.inv-label { color: #B9C6D4; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
:root[lang="fa"] .inv-label, :root[lang="fa"] .inv-firm { letter-spacing: 0; }
.inv-amt { font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 2.9rem); line-height: 1.1; color: #E5D3AB; font-variant-numeric: lining-nums; }
.inv-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(193, 161, 125, 0.4); color: #E9EEF4; font-size: 0.85rem; }
.inv-hero.is-paid .inv-chip { background: linear-gradient(180deg, #E5D3AB, #C5AD8C); color: #13273E; border: 0; font-weight: 600; }
/* Two columns on wide screens: the bill, then the payment form */
.pay-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 980px) { .pay-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }
.pay-grid > .panel { position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(6, 33, 53, 0.04), 0 8px 24px -16px rgba(6, 33, 53, 0.18); }
.pay-grid > .panel::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--gold-500); }
.inv-card { display: grid; gap: 18px; }
.inv-parties { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.inv-parties .eyebrow { margin: 0 0 4px; }
.inv-addr { margin: 0; line-height: 1.55; color: var(--ink-2); font-size: 0.95rem; }
.inv-addr strong { color: var(--ink); }
.inv-lines { width: 100%; border-collapse: collapse; }
.inv-lines th, .inv-lines td { padding: 12px 4px; text-align: start; vertical-align: top; }
.inv-lines thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--line); }
:root[lang="fa"] .inv-lines thead th { letter-spacing: 0; }
.inv-lines tbody td { border-bottom: 1px solid var(--line); font-weight: 500; }
.inv-lines .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-sub { display: block; margin-top: 2px; color: var(--ink-2); font-size: 0.88rem; font-weight: 400; }
.inv-lines tfoot th { font-weight: 500; color: var(--ink-2); }
.inv-total th, .inv-total td { border-top: 2px solid var(--navy-700); padding-top: 14px; }
.inv-total th { color: var(--ink) !important; font-weight: 700 !important; }
.inv-total td { font-family: var(--serif); font-size: 1.35rem; color: var(--navy-700); }
.inv-acct { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--gold-100); color: var(--ink); font-size: 0.92rem; }
.inv-note { margin: 4px 0 0; padding: 12px 14px; border-inline-start: 3px solid var(--gold-600); background: var(--paper, transparent); }
.inv-note p { margin: 0; }
.inv-note .eyebrow { margin-bottom: 4px; }
.inv-kind { margin: 0; color: var(--ink-soft, inherit); }
.inv-acct svg { flex: none; color: var(--gold-600); margin-top: 2px; }
.pay-card h2 { margin: 6px 0 14px; line-height: 1.35; overflow: visible; }
.pm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pm-tile { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface, transparent); min-height: 44px; }
.pm-tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pm-tile:has(input:checked) { border-color: var(--gold-500); box-shadow: 0 0 0 3px var(--gold-100); }
.pm-tile:has(input:focus-visible) { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.pm-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-100); color: var(--gold-600); flex: none; }
.pm-tx { display: grid; gap: 2px; min-width: 0; }
.pm-tx span { color: var(--ink-2); font-size: 0.85rem; }
.hint { color: var(--ink-2); font-weight: 400; font-size: 0.88em; }
.pay-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.hf { height: 46px; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; padding: 0 10px; direction: ltr; overflow: hidden; }
.hf iframe { width: 100%; height: 44px; border: 0; }
.pay-submit { width: 100%; justify-content: center; min-height: 52px; font-size: 1.05rem; }
.pay-secure { display: flex; gap: 6px; align-items: flex-start; justify-content: center; margin: 0; color: var(--ink-2); font-size: 0.85rem; text-align: center; }
.pay-secure svg { flex: none; margin-top: 2px; color: var(--gold-600); }
.bill-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.bill-table th, .bill-table td { text-align: start; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bill-table td.num, .bill-table th.num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.pill.draft { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }
.pill.open { background: var(--warn-bg); color: var(--warn); }
.pill.paid { background: var(--ok-bg); color: var(--ok); }
.pill.void { background: var(--err-bg); color: var(--err); }
/* Pay over time (LawPay Pay Later, Affirm) */
.pl-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--ink-2); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.pl-or::before, .pl-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pl-box { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.pl-head { display: flex; gap: 12px; align-items: flex-start; }
.pl-head h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.1rem; }
:root[lang="fa"] .pl-head h3 { font-family: var(--fa); }
.pl-head p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.pl-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; font-size: 0.95rem; }
.pl-steps .btn-quiet { margin-inline-start: 6px; vertical-align: middle; }
.pl-go { justify-self: stretch; justify-content: center; text-align: center; text-decoration: none; min-height: 46px; display: inline-flex; align-items: center; gap: 8px; }
.pl-box .small { margin: 0; }
.pl-steps bdi { white-space: nowrap; }
a.pl-go { border: 1px solid var(--navy-700); border-radius: 999px; color: var(--navy-700); font-weight: 600; background: transparent; padding: 10px 18px; }
a.pl-go:hover { border-color: var(--gold-500); color: var(--navy-700); }
/* Home: unpaid invoice card */
.inv-due { position: relative; overflow: hidden; border-color: var(--gold-500); background: linear-gradient(180deg, var(--gold-100), transparent 70%); }
.inv-due-head { display: flex; gap: 14px; align-items: flex-start; }
.inv-due-head h2 { margin: 2px 0 6px; }
.inv-due-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }
.inv-due-line .btn-gold { margin-inline-start: auto; }
/* Payment page shown inside the portal */
.pay-embed { display: grid; gap: 12px; }
.pay-embed .btn-quiet { justify-self: start; }
.pay-frame { width: 100%; min-height: 900px; border: 0; display: block; background: transparent; }
html.embed header.top, html.embed footer.band { display: none !important; }
html.embed main#view { padding-top: 0; }

/* Client page and invoice composer (Nov 8, 2026) */
.cp-quick { flex-wrap: wrap; gap: 8px; }
.cp-pane { margin-top: 16px; }
.inv-comp .ic-lines input { width: 100%; }
.inv-comp .ic-lines td.num input { text-align: right; max-width: 9rem; }
.inv-comp .choices .choice { align-items: flex-start; }
#cp-ni, #cp-na, #fc-comp { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }

/* Horizontal on/off switch (client notifications), Nov 8, 2026 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.switch { position: relative; width: 52px; height: 30px; min-width: 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--line); padding: 0; cursor: pointer; transition: background .2s; }
.switch .knob { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.switch.on { background: var(--navy-700); border-color: var(--navy-700); }
.switch.on .knob { inset-inline-start: 26px; }
.switch:disabled { opacity: .55; cursor: default; }
.switch:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.actions.wrap { flex-wrap: wrap; }
.uscis-help { display: inline-block; margin-top: 4px; color: var(--ink); background: rgba(193,161,125,.12); border-inline-start: 3px solid var(--gold-500); padding: 4px 8px; border-radius: 4px; }

/* Firm calendar (Nov 8, 2026) */
.cal-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.cal-title { min-width: 10rem; text-align: center; font-family: var(--serif, inherit); font-size: 1.1rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 12px; color: var(--ink-2); }
.seg button.on { background: var(--navy-700); color: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.cal-hd { font-size: .78rem; font-weight: 600; color: var(--ink-2); padding: 6px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .04em; }
.cal-cell { min-height: 110px; padding: 4px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.out { background: rgba(0,0,0,.025); }
.cal-cell.out .cal-num { color: var(--ink-2); opacity: .6; }
.cal-cell.today .cal-num { background: var(--gold-500); color: #fff; border-radius: 50%; }
.cal-num { align-self: flex-end; background: none; border: 0; width: 28px; height: 28px; min-width: 28px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; cursor: pointer; padding: 0; color: var(--ink); border-radius: 50%; }
.cal-ev { display: block; width: 100%; text-align: start; border: 0; border-inline-start: 3px solid currentColor; border-radius: 3px; padding: 2px 5px; font-size: .74rem; line-height: 1.3; background: rgba(13,58,92,.07); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-ev.done { text-decoration: line-through; opacity: .6; }
.agenda .cal-ev { white-space: normal; font-size: .9rem; padding: 6px 8px; margin-bottom: 4px; }
.ag-day { padding: 8px 0; border-bottom: 1px solid var(--line); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 16px; font-size: .8rem; color: var(--ink-2); }
.cal-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: currentColor; }
.k-consultation { color: #2f7d4f; } .k-meeting { color: #2b6cb0; } .k-phone_call { color: #6b46c1; } .k-court { color: #9b2c2c; }
.k-rfe { color: #c05621; } .k-interview { color: #b7791f; } .k-filing { color: #2c7a7b; } .k-task { color: #4a5568; }
.k-invoice_due { color: #7A6340; } .k-expiry { color: #c53030; } .k-vacation { color: #718096; } .k-other { color: #0A304C; }
@media (max-width: 700px) { .cal-cell { min-height: 64px; } .cal-ev { font-size: 0; padding: 0; height: 6px; border-inline-start-width: 0; background: currentColor; } .cal-hd { font-size: .65rem; padding: 4px 2px; } }
/* Reports */
.rep-range label { display: inline-flex; flex-direction: column; gap: 2px; }
.bill-table.rep td { padding: 4px 8px; }
.bar-cell { width: 55%; }
.bar { display: block; height: 12px; border-radius: 3px; background: var(--navy-700); }
.rem-row { border-top: 1px solid var(--line); padding: 10px 0; display: grid; gap: 6px; }
.rem-opts { font-size: .9rem; color: var(--ink-2); }
.num-sm { width: 4.5rem; display: inline-block; } .num-md { width: 9rem; display: inline-block; }
.rem-opts input.num-sm, .rem-opts input.num-md { width: 5rem; display: inline-block; margin: 0 6px; padding: 6px 8px; min-height: 0; }
.rem-opts input.num-md { width: 9rem; }
