:root {
  --navy: #1c3f73;
  --navy-dark: #142f57;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1a1f29;
  --muted: #5b6575;
  --border: #dde2ea;
  --ok: #1f7a4d;
  --warn: #a15c00;
  --danger: #b3261e;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.topbar {
  background: var(--navy); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; gap: 12px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo {
  background: #fff; color: var(--navy); border-radius: 6px;
  font-weight: 800; padding: 2px 7px; font-size: .9rem;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.who { font-size: .9rem; opacity: .9; }
.topbar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }

main { max-width: 1180px; margin: 24px auto; padding: 0 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.narrow { max-width: 420px; margin: 40px auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > .card { margin-bottom: 0; }
.grid2 { margin-bottom: 16px; }

.staff-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.sidebar { position: sticky; top: 16px; }
.client-list { max-height: 60vh; overflow-y: auto; margin-top: 8px; }
.client-item {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; text-align: left; background: none; border: 0; border-radius: 8px;
  padding: 8px 10px; cursor: pointer; font: inherit; color: inherit;
}
.client-item:hover { background: var(--bg); }
.client-item.active { background: #e4ecf8; }
.client-item .sub { font-size: .8rem; color: var(--muted); display: block; }

label { display: block; margin: 0 0 12px; font-weight: 500; font-size: .92rem; }
input[type=email], input[type=password], input[type=tel], input[type=search],
input:not([type]), input[inputmode] {
  display: block; width: 100%; margin-top: 4px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit;
}
input[type=file] { display: block; margin-top: 6px; max-width: 100%; }
input:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; }
label.check input { margin-top: 4px; }

.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--border); }
.btn-danger { background: #fff; color: var(--danger); border-color: #e7c2bf; }
.btn-sm { padding: 5px 11px; font-size: .85rem; }
.full { width: 100%; }
.link { background: none; border: 0; color: var(--navy); cursor: pointer; padding: 8px 0; font: inherit; text-decoration: underline; }

.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.gap { gap: 8px; }
.wrap { flex-wrap: wrap; }

.list .item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.list .item:last-child { border-bottom: 0; }
.list .item .meta { font-size: .8rem; color: var(--muted); }
.list .empty { color: var(--muted); font-style: italic; padding: 6px 0; }
.list .actions { display: flex; gap: 6px; flex-shrink: 0; }
.name-cell { min-width: 0; overflow-wrap: anywhere; }

.badge {
  display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px;
  padding: 2px 9px; background: #e8ebf0; color: var(--muted); margin-top: 6px;
}
.badge.ok { background: #e2f3ea; color: var(--ok); }
.badge.warn { background: #fdf0dc; color: var(--warn); }
.badge.danger { background: #fbe5e3; color: var(--danger); }
.count { background: var(--danger); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 7px; font-weight: 700; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 26px; text-align: center; cursor: pointer; color: var(--muted); font-weight: 400;
}
.dropzone.drag, .dropzone:hover { border-color: var(--navy); background: #f0f4fb; }
.dropzone input { display: none; }
progress { width: 140px; }

.notice { background: #eef3fb; border-radius: 8px; padding: 10px 12px; font-size: .85rem; margin-top: 14px; }

dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, 92vw); }
dialog.wide { width: min(680px, 94vw); }
dialog::backdrop { background: rgba(10, 20, 40, .45); }
#sign-pad {
  width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; margin-bottom: 8px;
}

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1a1f29; color: #fff; padding: 10px 18px; border-radius: 8px;
  max-width: 90vw; z-index: 1000; box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.toast.error { background: var(--danger); }

@media (max-width: 820px) {
  .grid2, .staff-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .list .item { flex-direction: column; align-items: flex-start; }
}

/* ================= v2 look ================= */
:root { --navy-2: #2a5aa0; --amber: #c27803; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.06); }
body { background: linear-gradient(180deg, #eef2f8 0, #f6f8fb 320px); }

.topbar { background: #fff; color: var(--text); border-bottom: 1px solid var(--border); padding: 12px 24px; position: sticky; top: 0; z-index: 50; }
.logo { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; padding: 0; font-size: .95rem; letter-spacing: .5px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.topbar .btn-ghost { color: var(--navy); border-color: var(--border); background: #fff; }
.who { color: var(--muted); opacity: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #e4ecf8; color: var(--navy); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }

.card { border-radius: 14px; box-shadow: var(--shadow); border-color: #e6eaf0; padding: 22px 24px; }

/* hero */
.hero {
  background: radial-gradient(120% 140% at 100% 0, #3a6fbd 0, transparent 55%), linear-gradient(135deg, #143566, #1c3f73 60%, #234d8a);
  color: #fff; border-radius: 18px; padding: 28px 30px; margin-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: 0 10px 30px rgba(20, 53, 102, .25);
}
.hero h1 { font-size: 1.9rem; margin: 2px 0 6px; letter-spacing: -.3px; }
.hero-kicker { margin: 0; text-transform: uppercase; letter-spacing: 1.2px; font-size: .75rem; opacity: .75; font-weight: 600; }
.hero-sub { margin: 0; opacity: .85; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 18px; min-width: 112px; display: flex; flex-direction: column; backdrop-filter: blur(4px); }
.stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: .8rem; opacity: .85; }
.stat-warn.has { background: #fbbf24; color: #3b2a00; border-color: #fbbf24; }

/* card headers with icons */
.card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head p { margin: 2px 0 0; }
.card-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.card-icon svg, .drop-icon svg, .trust svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-icon.amber { background: #fef3c7; color: var(--amber); }
.card-icon.blue { background: #e0ecff; color: var(--navy-2); }
.card-icon.green { background: #dcf5e7; color: var(--ok); }
.card-icon.purple { background: #ede7fb; color: #6d4bc4; }
.card-action.has { border-left: 4px solid #f59e0b; }

/* list rows */
.list .item { padding: 12px 10px; margin: 0 -10px; border-radius: 10px; border-bottom: 1px solid #eef1f5; transition: background .15s; }
.list .item:hover { background: #f6f8fc; }
.file-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ficon { width: 38px; height: 44px; border-radius: 7px; flex-shrink: 0; display: grid; place-items: end center; padding-bottom: 6px; font-size: .62rem; font-weight: 800; letter-spacing: .4px; color: #fff; position: relative; clip-path: polygon(0 0, 72% 0, 100% 22%, 100% 100%, 0 100%); }
.ficon.pdf { background: #d93f3f; } .ficon.img { background: #7c4dcc; } .ficon.xls { background: #1f8a52; }
.ficon.doc { background: #2b6cd4; } .ficon.zip { background: #6b7280; } .ficon.other { background: #94a3b8; }
.file-name { font-weight: 600; }
.list .empty { font-style: normal; text-align: center; padding: 18px 0 8px; }
.caught-up { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--ok); font-weight: 600; padding: 12px 0 4px; }
.caught-up .dot { width: 26px; height: 26px; border-radius: 50%; background: #dcf5e7; display: grid; place-items: center; }

/* upload */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px; border-radius: 14px; background: #f8faff; border: 2px dashed #c8d5ea; margin-bottom: 16px; transition: all .15s; }
.dropzone:hover, .dropzone.drag { background: #eef4ff; border-color: var(--navy-2); }
.drop-icon { width: 54px; height: 54px; border-radius: 50%; background: #e0ecff; color: var(--navy-2); display: grid; place-items: center; }
.drop-icon svg { width: 26px; height: 26px; }
.drop-title { color: var(--text); font-size: 1rem; }
.drop-title strong { color: var(--navy-2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chips span { background: #fff; border: 1px solid #dbe3ef; border-radius: 999px; padding: 2px 10px; font-size: .75rem; color: var(--muted); font-weight: 600; }
.drop-foot { font-size: .8rem; color: var(--muted); }
progress { accent-color: var(--navy-2); }

.btn { border-radius: 9px; transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #24508f, var(--navy)); }
.btn-ghost:hover { border-color: #b9c7dc; background: #f6f8fc; }

.trust { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); font-size: .82rem; text-align: center; margin: 8px 0 24px; }
.trust svg { flex-shrink: 0; color: var(--ok); }

@media (max-width: 820px) {
  .hero { padding: 22px; }
  .hero h1 { font-size: 1.5rem; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 10px 12px; }
  .who { display: none; }
  .topbar { padding: 10px 16px; }
  .list .item { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .list .actions { margin-left: 50px; }
}

/* sign-up / Google / approval */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border: 1px solid #c9ced6; font-weight: 600; }
.btn-google:hover { background: #f6f8fc; }
.g-logo { width: 18px; height: 18px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.pending-icon { font-size: 2.4rem; margin-bottom: 6px; }
.pending-box { background: #fff8e6; border: 1px solid #f6d98a; border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; }
.pending-box h3 { font-size: .9rem; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.pending-item { padding: 8px 0; border-top: 1px solid #f3e3b5; }
.pending-item:first-child { border-top: 0; }
.pending-item strong { display: block; }
.pending-item .sub { display: block; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.pending-item .row { margin-top: 6px; }

/* ================= AGCPA INC brand ================= */
:root { --navy: #182372; --navy-dark: #10195a; --navy-2: #2b3a9e; --gold: #bc9c23; --gold-soft: #f6efd6; }
.topbar { border-bottom: 3px solid var(--gold); }
.logo-img { height: 38px; width: auto; display: block; }
.brand-text strong { color: var(--navy); letter-spacing: .3px; }
.login-logo { display: block; width: 120px; height: auto; margin: 0 auto 14px; }
.login-logo.small { width: 90px; }
#view-login h1, #view-signup h1 { text-align: center; }
#view-login > p.muted, #view-signup > p.muted { text-align: center; }
.btn-primary { background: linear-gradient(180deg, #24318a, var(--navy)); }
.btn-primary:hover { background: var(--navy-dark); }
.hero { background: radial-gradient(120% 140% at 100% 0, #2f3fa8 0, transparent 55%), linear-gradient(135deg, #10195a, #182372 60%, #222f8c); box-shadow: 0 10px 30px rgba(24, 35, 114, .25); }
.hero::after { content: ""; display: block; }
.hero-kicker { color: #e6cf7a; opacity: 1; }
.stat-warn.has { background: var(--gold); border-color: var(--gold); color: #fff; }
.card-action.has { border-left-color: var(--gold); }
.card-icon.amber { background: var(--gold-soft); color: #9a7d12; }
.drop-title strong, .card-icon.blue { color: var(--navy-2); }
.avatar { background: var(--gold-soft); color: var(--navy); }
.link { color: var(--navy); }
input:focus { outline-color: var(--navy); }

/* account type */
fieldset.choice { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.choice legend { font-weight: 500; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { margin: 0; font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 10px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; background: #fff; transition: all .15s; }
.seg input:checked + span { border-color: var(--navy); background: #eef0fa; color: var(--navy); box-shadow: 0 0 0 1px var(--navy) inset; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
select { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
.sc-details { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eef0fa; color: var(--navy); }
.tag.biz { background: var(--gold-soft); color: #7a620c; }
.tag.joint { background: #e6f4ec; color: var(--ok); }
.hero-account { margin: -2px 0 8px; font-weight: 600; color: #e6cf7a; }
.client-item .tagline { display: block; margin-top: 2px; }

/* signers */
.sign-pad { width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1px solid var(--border); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; margin-bottom: 8px; }
.signer { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 4px; margin-bottom: 14px; }
.signer-title { margin: 0 0 10px; font-size: 1rem; color: var(--navy); }
#dlg-sign { max-height: 92vh; overflow-y: auto; }

.sc-spouse { margin-top: 8px; font-size: .85rem; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* checklist */
.grow { flex: 1; min-width: 0; }
.year-select, #scl-year, #scl-kind { width: auto; display: inline-block; margin: 0; padding: 6px 10px; }
.progress { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; margin: 4px 0 12px; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #d9bc4c); transition: width .3s; }
.checklist .cl-item { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid #eef1f5; align-items: flex-start; }
.checklist .cl-item:last-child { border-bottom: 0; }
.cl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #c8d0dc; flex-shrink: 0; display: grid; place-items: center; font-size: .8rem; font-weight: 800; margin-top: 1px; }
.cl-item.submitted .cl-dot { border-color: var(--navy-2); background: #e8ebfa; color: var(--navy); }
.cl-item.accepted .cl-dot { border-color: var(--ok); background: var(--ok); color: #fff; }
.cl-item.na .cl-dot { border-color: #c8d0dc; background: #f1f3f6; color: var(--muted); }
.cl-item.na .cl-title { color: var(--muted); text-decoration: line-through; }
.cl-body { flex: 1; min-width: 0; }
.cl-title { font-weight: 600; }
.cl-help, .cl-meta { font-size: .82rem; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.cl-answer { background: #f6f8fc; border-radius: 8px; padding: 6px 10px; margin-top: 6px; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cl-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cl-item textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; min-height: 54px; resize: vertical; }
.cl-badge { margin-left: 6px; vertical-align: 1px; }
.cl-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cl-add input { flex: 1; min-width: 200px; margin: 0; }

.cl-section { font-size: .78rem; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--navy); background: #f3f5fb; border-radius: 8px; padding: 7px 10px; margin: 14px 0 2px; }
.cl-section .cnt { float: right; color: var(--muted); font-weight: 700; letter-spacing: 0; text-transform: none; }
.cl-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 10px 0 16px; }
.cl-sections label { margin: 0; font-weight: 500; display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
.cl-sections small { color: var(--muted); margin-left: auto; }
@media (max-width: 640px) { .cl-sections { grid-template-columns: 1fr; } }

.acct-switch { width: auto; max-width: 300px; margin: 0; padding: 7px 30px 7px 12px; border: 1.5px solid var(--gold); border-radius: 999px; font-weight: 600; color: var(--navy); background-color: var(--gold-soft); }
@media (max-width: 820px) { .acct-switch { max-width: 170px; font-size: .8rem; } }

.sc-logins { margin-top: 8px; font-size: .85rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sc-logins .login-chip { background: #f3f5fb; border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 10px; display: inline-flex; gap: 4px; align-items: center; color: var(--text); }
.sc-logins .login-chip button { border: 0; background: none; color: var(--danger); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 4px; }

.svc { display: flex; gap: 18px; flex-wrap: wrap; }
.svc label.check { margin: 0; font-weight: 600; font-size: .92rem; }
.tag.audit { background: #fde8e8; color: #9b1c1c; }

/* invoices */
.inv-amt { font-weight: 700; white-space: nowrap; }
.badge.overdue { background: #fde8e8; color: #9b1c1c; }
.badge.void { background: #eef0f3; color: var(--muted); }
.inv-new { margin-top: 12px; }
.inv-new > summary { list-style: none; display: inline-block; }
.inv-new > summary::-webkit-details-marker { display: none; }
.inv-new[open] > summary { margin-bottom: 12px; }
.inv-line { display: grid; grid-template-columns: 1.4fr 2fr 120px 32px; gap: 8px; align-items: end; margin-bottom: 8px; }
.inv-line label { margin: 0; font-size: .8rem; }
.inv-line select, .inv-line input { margin-top: 2px; }
.inv-line .x { border: 0; background: none; color: var(--danger); font-size: 1.3rem; cursor: pointer; padding-bottom: 6px; }
.inv-meta { margin: 12px 0 8px; }
.qbo-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 12px 0; background: #f8faf6; }
.qbo-title { font-weight: 700; font-size: .85rem; color: #2ca01c; margin-bottom: 2px; }
.qbo-box .row { margin-top: 6px; }
@media (max-width: 820px) { .inv-line { grid-template-columns: 1fr; } }
input[type=number], input[type=date] {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff;
}
.inv-line { grid-template-columns: 1.4fr 2fr 130px 28px; }
.inv-line .x { align-self: end; }

/* client picker (searchable dropdown) */
.client-picker { position: relative; margin-top: 8px; }
.client-picker input { margin-top: 0; padding-left: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6575' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px 50%; }
.client-dropdown { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 30px rgba(16,24,40,.14); max-height: 360px; overflow-y: auto; padding: 4px; }
.client-dropdown .client-item.hl { background: #eef0fa; }
.client-dropdown .empty, .client-dropdown .more { padding: 10px; color: var(--muted); font-size: .85rem; }
.client-count { margin: 8px 2px 0; }
.client-count button { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; }

/* ================= Client portal layout (sidebar + pages) ================= */
body.client-mode main { max-width: none; margin: 0; padding: 0; }
body.client-mode { background: #f3f5f9; }
.tagline { margin-left: 22px; padding-left: 22px; border-left: 1px solid var(--border); color: var(--navy); font-weight: 600; font-size: .95rem; }
.bell { position: relative; background: none; border: 0; cursor: pointer; color: var(--navy); padding: 6px; display: grid; place-items: center; }
.bell svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bell-count { position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 800; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; }

.cp-shell { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 66px); }
.cp-nav { background: linear-gradient(180deg, #13205f, #0e1848); color: #fff; padding: 22px 0; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto; }
.cp-links { display: flex; flex-direction: column; }
.cp-link { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; color: #e8ecf8; font: inherit; font-size: .98rem; padding: 13px 24px; cursor: pointer; text-align: left; border-left: 4px solid transparent; }
.cp-link svg, .cp-contact svg, .cp-sec-head svg, .cp-band svg, .cp-ql svg, .cp-tile-ic svg, .cp-um-icon svg, .cp-um-drop svg, .cp-footer svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cp-link svg { width: 22px; height: 22px; flex-shrink: 0; }
.cp-link:hover { background: rgba(255,255,255,.06); }
.cp-link.active { background: linear-gradient(90deg, rgba(188,156,35,.95), rgba(188,156,35,.55)); border-left-color: #e6cf7a; color: #fff; font-weight: 600; }
.cp-badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 6px; }
.cp-contact { border-top: 1px solid rgba(255,255,255,.15); margin: 0 22px; padding-top: 18px; display: flex; flex-direction: column; gap: 12px; font-size: .9rem; }
.cp-contact a, .cp-contact span { color: #e8ecf8; text-decoration: none; display: flex; gap: 10px; align-items: center; }
.cp-contact svg { width: 18px; height: 18px; flex-shrink: 0; }
.cp-motto { margin: auto 22px 6px; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 1.25rem; line-height: 1.35; color: #f3eedc; position: relative; padding-bottom: 14px; }
.cp-motto::after { content: ""; position: absolute; left: 0; bottom: 0; width: 150px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: rotate(-4deg); }

.cp-main { min-width: 0; display: flex; flex-direction: column; }
.cp-hero { position: relative; overflow: hidden; color: #fff; padding: 34px 40px 30px; min-height: 170px; display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(14,24,72,.97) 0%, rgba(20,34,98,.92) 48%, rgba(32,60,140,.55) 100%), url("hero.jpg") right center / cover no-repeat, linear-gradient(135deg, #10195a, #24318a); }
.cp-hero > div { position: relative; z-index: 1; max-width: 60%; }
.cp-hero h1 { font-size: 2.3rem; margin: 2px 0 6px; letter-spacing: -.4px; }
.cp-hero .hero-sub { font-size: 1.1rem; opacity: .92; margin: 0; }
.cp-hero .hero-sub::after { content: ""; display: block; width: 80px; height: 3px; background: var(--gold); margin-top: 14px; border-radius: 2px; }
.cp-hero-art { position: absolute; right: 0; bottom: 0; height: 100%; width: 58%; }
body.has-hero-photo .cp-hero-art { display: none; }

.cp-page { padding: 22px 28px 8px; }
.cp-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.cp-tile { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #e6eaf0; border-radius: 12px; padding: 16px; box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: transform .1s, box-shadow .15s; }
.cp-tile:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16,24,40,.1); }
.cp-tile-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff; }
.cp-tile-ic svg { width: 26px; height: 26px; }
.cp-tile-ic.navy { background: var(--navy); }
.cp-tile-ic.gold { background: var(--gold); }
.cp-tile-num { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--text); }
.cp-tile-label { display: block; color: var(--muted); font-size: .88rem; margin-top: 4px; line-height: 1.25; }
.cp-tile-sub { display: block; font-size: .75rem; }
.cp-tile.has .cp-tile-num { color: var(--danger); }

.cp-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.cp-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cp-col > .card { margin: 0; }
.cp-upload-mini { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; align-items: center; }
.cp-um-left { text-align: center; border-right: 1px solid var(--border); padding-right: 20px; }
.cp-um-left h2 { color: var(--navy); font-size: 1.3rem; margin: 6px 0; }
.cp-um-icon { color: var(--navy); display: inline-block; }
.cp-um-icon svg { width: 64px; height: 64px; stroke-width: 1.6; }
.cp-um-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #b9c6dc; border-radius: 10px; padding: 18px; cursor: pointer; margin: 0; font-weight: 400; color: var(--navy); }
.cp-um-drop.drag, .cp-um-drop:hover { background: #f1f4fb; border-color: var(--navy); }
.cp-um-drop svg { width: 34px; height: 34px; }
.cp-um-drop input { display: none; }
.cp-um-drop .btn { margin-top: 4px; }
.cp-um-foot { font-size: .75rem; color: var(--muted); margin-top: 6px; }

.cp-band { display: flex; justify-content: space-between; align-items: center; background: var(--navy); color: #fff; margin: -22px -24px 14px; padding: 14px 22px; border-radius: 14px 14px 0 0; }
.cp-band h2 { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 1.12rem; }
.cp-band svg { width: 22px; height: 22px; }
.cp-band-link { background: none; border: 0; color: #fff; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.cp-band-link svg { width: 16px; height: 16px; }
.cp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 8px; flex-wrap: wrap; }
.cp-tabs button { background: none; border: 0; font: inherit; padding: 8px 16px; cursor: pointer; color: var(--text); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.cp-tabs button.on { border-bottom-color: var(--gold); color: var(--gold); font-weight: 700; }
.cp-table-wrap { overflow-x: auto; }
.cp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cp-table th { text-align: left; font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cp-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.cp-table td.desc { overflow-wrap: anywhere; }
.cp-table tr:last-child td { border-bottom: 0; }
.cp-table .empty-row td { color: var(--muted); text-align: center; padding: 18px; }
.cp-table .act { background: none; border: 0; color: var(--navy-2); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 0; white-space: nowrap; }
.cp-table .act svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.pill.done { background: #e2f3ea; color: var(--ok); border-color: #a9dcbf; }
.pill.recv { background: #e6f0ff; color: #2357b5; border-color: #b6cdf3; }
.pill.review { background: #fdf3dc; color: #946200; border-color: #ecd294; }
.pill.signed { background: #e2f3ea; color: var(--ok); border-color: #a9dcbf; }
.pill.avail { background: #eef0fa; color: var(--navy); border-color: #c9cff0; }

.cp-quick, .cp-msgs-mini { padding-bottom: 8px; }
.cp-ql { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; border-bottom: 1px solid #eef1f5; padding: 11px 2px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.cp-ql:last-child { border-bottom: 0; }
.cp-ql:hover { color: var(--navy-2); }
.cp-ql svg { width: 20px; height: 20px; color: var(--navy); flex-shrink: 0; }
.cp-ql svg:last-child { margin-left: auto; width: 16px; height: 16px; }
.mm { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #eef1f5; cursor: pointer; }
.mm:last-child { border-bottom: 0; }
.mm .dot { width: 9px; height: 9px; border-radius: 50%; background: #c8d0dc; margin-top: 6px; }
.mm.unread .dot { background: var(--gold); }
.mm .top { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; }
.mm .top strong { color: var(--text); }
.mm .top span { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.mm .subj { font-weight: 600; font-size: .85rem; margin-top: 2px; }
.mm .prev { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-empty { color: var(--muted); font-size: .88rem; padding: 12px 2px; }

/* message thread */
.msg-thread { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; padding: 4px 2px 12px; }
.msg { max-width: 78%; border-radius: 14px; padding: 10px 14px; background: #f1f4fa; border: 1px solid #e3e8f2; align-self: flex-start; }
.msg.mine { align-self: flex-end; background: #eaf0ff; border-color: #cdd9f5; }
.msg .who { font-size: .76rem; color: var(--muted); margin-bottom: 3px; }
.msg .subj { font-weight: 700; margin-bottom: 2px; }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .93rem; }
.msg-compose { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.msg-compose input, .msg-compose textarea { margin: 0; width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; resize: vertical; }
.msg-empty { color: var(--muted); text-align: center; padding: 20px 0; }

.cp-profile { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 4px 0 16px; }
.cp-profile dt { color: var(--muted); font-size: .88rem; }
.cp-profile dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.cp-footer { margin-top: auto; display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 28px; background: #e9edf5; color: var(--muted); font-size: .85rem; }
.cp-secure { display: flex; gap: 8px; align-items: center; color: var(--navy); font-weight: 600; }
.cp-secure svg { width: 22px; height: 22px; }
.sec-list { padding-left: 20px; line-height: 1.6; }
#view-client .card { margin-bottom: 18px; }

@media (max-width: 1200px) {
  .cp-tiles { grid-template-columns: repeat(3, 1fr); }
  .cp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .tagline { display: none; }
  .cp-shell { grid-template-columns: 1fr; }
  .cp-nav { position: static; height: auto; padding: 8px 0; }
  .cp-links { flex-direction: row; overflow-x: auto; }
  .cp-link { flex-direction: column; gap: 4px; padding: 8px 12px; font-size: .74rem; border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; width: auto; }
  .cp-link.active { border-bottom-color: #e6cf7a; }
  .cp-badge { position: absolute; margin: 0 0 0 18px; }
  .cp-link { position: relative; }
  .cp-contact, .cp-motto { display: none; }
  .cp-hero { padding: 24px 18px; }
  .cp-hero > div { max-width: 100%; }
  .cp-hero h1 { font-size: 1.6rem; }
  .cp-hero-art { opacity: .35; width: 100%; }
  .cp-page { padding: 16px 12px 4px; }
  .cp-tiles { grid-template-columns: 1fr 1fr; }
  .cp-upload-mini { grid-template-columns: 1fr; }
  .cp-um-left { border-right: 0; padding-right: 0; }
  .cp-profile { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
}
/* layout fixes */
.cp-shell { grid-template-columns: 262px minmax(0, 1fr); }
.cp-nav { position: relative; top: 0; height: auto; overflow: visible; }
.cp-links { position: sticky; top: 66px; z-index: 2; background: #13205f; padding: 10px 0; }
.cp-link span:not(.cp-badge) { white-space: nowrap; }
.cp-grid { grid-template-columns: minmax(0, 1fr) 300px; }
.cp-side, .cp-col { min-width: 0; }
.mm > div { min-width: 0; }
.mm .top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1200px) { .cp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .cp-shell { grid-template-columns: minmax(0, 1fr); } .cp-links { position: static; } }
@media (max-width: 900px) { .cp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-tile { padding: 12px; gap: 10px; } .cp-tile-ic { width: 44px; height: 44px; } }

/* ---- staff portal: client page sizing ---- */
#view-staff .staff-layout { grid-template-columns: 260px minmax(0, 1fr); }
#view-staff .staff-layout > * { min-width: 0; }
#view-staff .file-name, #view-staff .name-cell { overflow-wrap: anywhere; }
@media (max-width: 1500px) { #view-staff .staff-detail .grid2:not(.inv-meta) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { #view-staff .staff-layout { grid-template-columns: minmax(0, 1fr); } }
#s-activity .meta { white-space: nowrap; }

/* ---- timesheets ---- */
.ts-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ts-tab { border: 1px solid var(--border); background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ts-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.ts-tab .count { background: #c62828; color: #fff; }
.ts-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; align-items: end; }
.ts-form label { margin: 0; }
.ts-form .ts-notes { grid-column: span 2; }
.ts-form .ts-bill { align-self: center; margin-top: 18px; }
.ts-entry { background: #f7f8fc; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin: 14px 0; }
.ts-entry.editing { border-color: #bc9c23; background: #fffbef; }
.ts-running { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; background: linear-gradient(90deg, #182372, #24318f); color: #fff; border-radius: 12px; padding: 16px 20px; }
.ts-running .muted { color: #cfd5f3; }
.ts-running label { color: #fff; }
.ts-clock { font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.ts-weekbar h2 { margin: 0; font-size: 1.1rem; }
.ts-weekbar .pill { margin-top: 3px; }
.ts-totals { display: flex; gap: 10px; flex-wrap: wrap; }
.ts-totals > div { background: #f2f4fb; border-radius: 10px; padding: 8px 14px; min-width: 104px; }
.ts-totals b { display: block; font-size: 1.25rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.ts-totals span { font-size: .78rem; color: var(--muted); }
.ts-rep-totals { margin-top: 14px; }
.ts-returned { background: #fdf3dc; border: 1px solid #ecd294; color: #6d4b00; border-radius: 10px; padding: 10px 14px; margin-top: 12px; font-size: .9rem; }
.ts-day { margin-top: 10px; }
.ts-day-head { display: flex; justify-content: space-between; font-weight: 700; color: var(--navy); background: #eef0fa; border-radius: 8px; padding: 7px 12px; font-size: .9rem; }
.ts-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 2fr) 70px 96px 104px; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #eef1f5; align-items: center; font-size: .9rem; }
.ts-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.ts-row .notes { color: var(--muted); overflow-wrap: anywhere; }
.ts-row .acts { display: flex; gap: 6px; justify-content: flex-end; }
.ts-submit { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.ts-submit p { margin: 0; max-width: 520px; }
.ts-table td.num, .ts-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ts-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.ts-detail { background: #f7f8fc; border-radius: 8px; padding: 6px 10px; margin: 6px 0 4px; }
.ts-detail .ts-row { grid-template-columns: 90px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.6fr) 60px 80px; font-size: .84rem; }
.inv-time { border: 1px dashed #c9cff0; background: #f7f8fc; border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.inv-time .item { gap: 10px; }
.inv-time .item label.check { flex: 1; min-width: 0; }
.rate-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.rate-row input { width: 110px; }
@media (max-width: 760px) {
  .ts-form .ts-notes { grid-column: auto; }
  .ts-running { grid-template-columns: minmax(0, 1fr); }
  .ts-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ts-row .notes, .ts-row .task { grid-column: 1 / -1; }
  .ts-detail .ts-row { grid-template-columns: minmax(0, 1fr) auto; }
}
.ts-running .btn-primary { background: #bc9c23; border-color: #bc9c23; color: #10195a; }
#view-staff .ts-rep-grid { grid-template-columns: minmax(0, 1fr); }
.ts-table td.desc { min-width: 160px; }
/* ---- utilization ---- */
.util-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.util-tile { background: #f2f4fb; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.util-tile b { font-size: 1.6rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.util-tile span { font-weight: 600; font-size: .85rem; }
.util-tile small { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.util-tile.good b { color: #1f7a4d; }
.util-tile.low b { color: #a15c00; }
.util-tile.rank { background: linear-gradient(135deg, #182372, #2b3a9e); color: #fff; }
.util-tile.rank b, .util-tile.rank small { color: #fff; }
.util-tile.rank small { opacity: .8; }
.util-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.util-day { text-align: center; font-size: .8rem; }
.util-bar { height: 90px; background: #eef0fa; border-radius: 8px; position: relative; overflow: hidden; margin-bottom: 6px; }
.util-bar i { position: absolute; left: 0; right: 0; bottom: 0; background: #182372; border-radius: 8px 8px 0 0; }
.util-bar i.nb { background: #c9cff0; }
.util-bar .tgt { position: absolute; left: 0; right: 0; border-top: 2px dashed #bc9c23; }
.util-day b { display: block; font-size: .95rem; color: var(--navy); }
.util-day.today .util-bar { outline: 2px solid #bc9c23; }
.util-h3 { margin: 18px 0 6px; font-size: 1rem; }
.ts-table tr.me td { background: #fffbef; font-weight: 700; }
.util-pct { display: inline-block; min-width: 48px; }
.util-meter { display: inline-block; vertical-align: middle; width: 90px; height: 8px; background: #eef0fa; border-radius: 99px; margin-left: 6px; overflow: hidden; }
.util-meter i { display: block; height: 100%; background: #182372; }
body.no-money .money-only { display: none !important; }
@media (max-width: 760px) { .util-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .util-days { gap: 6px; } }
.rate-row label.mini { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); font-weight: 600; margin: 0; }
.rate-row input { width: 90px; }
/* ---- work tracker ---- */
.wk-pipe { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.wk-stage { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; font: inherit; }
.wk-stage b { display: block; font-size: 1.35rem; color: var(--navy); }
.wk-stage span { font-size: .76rem; color: var(--muted); line-height: 1.2; display: block; }
.wk-stage.active { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(24,35,114,.15); }
.wk-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 8px; }
.wk-filters label { margin: 0; min-width: 180px; }
.wk-table td { vertical-align: middle; }
.wk-table tr.overdue td.due { color: #b3261e; font-weight: 700; }
.wk-table tr.soon td.due { color: #a15c00; font-weight: 700; }
.wk-table select { min-width: 190px; padding: 6px 8px; }
.pri { color: #b3261e; font-weight: 700; font-size: .72rem; margin-left: 6px; white-space: nowrap; }
.js { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.js-not_started { background: #eef0f4; color: #4b5563; }
.js-waiting_client { background: #fdf3dc; color: #946200; }
.js-in_progress { background: #e6f0ff; color: #2357b5; }
.js-ready_review { background: #efe7ff; color: #5b3cc4; }
.js-review_notes { background: #fde8e6; color: #b3261e; }
.js-waiting_signature { background: #f6efd6; color: #7a6412; }
.js-complete { background: #e2f3ea; color: #1f7a4d; }
.jv-steps { display: flex; gap: 4px; margin: 10px 0 16px; }
.jv-steps span { flex: 1; height: 8px; border-radius: 99px; background: #e5e8f0; }
.jv-steps span.on { background: #182372; }
.jv-steps span.done { background: #1f7a4d; }
.sc-team { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.sc-team .chip { background: #eef0fa; color: var(--navy); border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 600; }
.sc-team-edit { background: #f7f8fc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; }
.sc-team-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-bottom: 10px; }
@media (max-width: 900px) { .wk-pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .wk-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---- templates ---- */
dialog.xwide { width: min(1100px, 96vw); }
.tp-edit { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.tp-body textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.45; min-height: 420px; }
.tp-help { background: #f7f8fc; border: 1px solid var(--border); border-radius: 10px; padding: 12px; max-height: 520px; overflow: auto; }
.tp-help h3 { margin: 4px 0 6px; font-size: .95rem; color: var(--navy); }
.tp-help label { font-size: .8rem; margin: 4px 0; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tp-chip { border: 1px solid #c9cff0; background: #fff; color: var(--navy); border-radius: 999px; padding: 2px 8px; font-size: .75rem; cursor: pointer; font: inherit; font-size: .75rem; }
.tp-both { align-self: end; margin-bottom: 10px; }
.tpl-group h3 { margin: 16px 0 6px; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.pk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin: 6px 0 12px; }
.pk-list label.check { background: #f7f8fc; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 0; }
.sd-doc { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.sd-doc h3 { margin: 0 0 8px; font-size: 1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sd-doc .grid2 label { margin: 0; }
.sd-doc .auto { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.notice.small { font-size: .85rem; }
.center { text-align: center; }
@media (max-width: 860px) { .tp-edit { grid-template-columns: minmax(0, 1fr); } }
.tp-body { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.tp-body textarea { width: 100%; }
dialog.xwide { max-height: 92vh; overflow-y: auto; }
.cp-office { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.cp-office b { font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: #e3cf7f; }
.cp-office span { display: flex; gap: 8px; align-items: flex-start; line-height: 1.35; }
.sc-docpw { margin: 6px 0; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .warn-text { color: #a15c00; font-weight: 600; }
/* ---- review notes ---- */
.jv-review { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 4px; }
.jv-sum { font-size: .8rem; color: var(--muted); font-weight: 600; }
.jv-review select { padding: 6px 8px; }
.jv-points { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.pt { border: 1px solid var(--border); border-left: 4px solid #b3261e; border-radius: 10px; padding: 10px 12px; background: #fff; }
.pt.pt-cleared { border-left-color: #bc9c23; }
.pt.pt-closed { border-left-color: #1f7a4d; background: #f8fbf9; }
.pt-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.pt-n { font-weight: 800; color: var(--navy); }
.pt-lvl { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #e6f0ff; color: #2357b5; }
.pt-lvl.partner { background: #f6efd6; color: #7a6412; }
.pt-ref { font-size: .78rem; background: #eef0f4; border-radius: 6px; padding: 1px 6px; color: #374151; }
.pt-b { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.pt-b.open { background: #fde8e6; color: #b3261e; }
.pt-b.cleared { background: #fdf3dc; color: #946200; }
.pt-b.closed { background: #e2f3ea; color: #1f7a4d; }
.pt-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pt-text { white-space: pre-wrap; }
.pt-resp { background: #f7f8fc; border-radius: 8px; padding: 6px 10px; margin-top: 6px; white-space: pre-wrap; }
.pt-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: flex-end; }
.pt-clear { display: flex; gap: 6px; align-items: flex-end; flex: 1; min-width: 260px; }
.pt-clear textarea { flex: 1; }
.jv-addpt { background: #f7f8fc; border: 1px dashed #c9cff0; border-radius: 10px; padding: 10px 12px; }
.ok-text { color: #1f7a4d !important; }
.js-partner_review { background: #f6efd6; color: #7a6412; }
#dlg-jobv { width: min(860px, 96vw); max-height: 92vh; overflow-y: auto; }
.wk-pipe { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.jv-review textarea, .pt textarea { font: inherit; font-size: .9rem; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.jv-addpt label { display: flex; flex-direction: column; gap: 4px; }
.jv-review select#jv-pt-filter { width: auto; }
.jv-review > .row h3 { margin: 10px 0 4px; }
/* ---- @mentions ---- */
.mention-wrap { position: relative; }
.mention-pop { position: absolute; left: 8px; bottom: calc(100% - 4px); z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.15); min-width: 240px; padding: 4px; }
.mention-opt { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer; font: inherit; text-align: left; }
.mention-opt span { font-size: .75rem; color: var(--muted); }
.mention-opt.hl, .mention-opt:hover { background: #eef0fa; }
.mention-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; }
.mention-chip { border: 1px solid #c9cff0; background: #f7f8fc; color: var(--navy); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: baseline; }
.mention-chip small { color: var(--muted); font-weight: 500; }
.mention { background: #e6f0ff; color: #2357b5; border-radius: 4px; padding: 0 3px; font-weight: 600; }
.mention.me { background: #fdf3dc; color: #7a4f00; }
.msg.mine .mention { background: rgba(255,255,255,.2); color: inherit; }
/* ---- import ---- */
.imp-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.imp-steps li { line-height: 1.45; }
.imp-steps li .btn { margin-top: 6px; display: inline-flex; }
.ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
.ic-grid label { margin: 0; font-size: .85rem; }
.ic-grid select { padding: 6px 8px; }
#ic-preview td, #id-table td { font-size: .85rem; }
#id-table select { min-width: 220px; padding: 5px 8px; }
.imp-bar { height: 10px; background: #eef0fa; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.imp-bar i { display: block; height: 100%; width: 0; background: #182372; transition: width .2s; }
.imp-skip { color: #a15c00; }
/* ---- CRM ---- */
.crm-kpis, .c3-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.crm-kpi, .c3-kpi { background: #f2f4fb; border-radius: 12px; padding: 10px 14px; border: 1px solid transparent; text-align: left; font: inherit; cursor: default; }
button.crm-kpi { cursor: pointer; }
button.crm-kpi:hover { border-color: #c9cff0; }
.crm-kpi b, .c3-kpi b { display: block; font-size: 1.35rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.crm-kpi span, .c3-kpi span { font-size: .78rem; color: var(--muted); }
.crm-table th { cursor: pointer; user-select: none; }
.crm-table th.sorted::after { content: ' \25BE'; color: var(--muted); }
.crm-table th.sorted.asc::after { content: ' \25B4'; }
.crm-table tbody tr { cursor: pointer; }
.crm-table tbody tr:hover td { background: #f7f8fc; }
.crm-table td { font-size: .86rem; vertical-align: top; }
.crm-name b { display: block; color: var(--navy); }
.crm-name span { color: var(--muted); font-size: .78rem; }
.crm-pill { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.crm-pill.active { background: #e2f3ea; color: #1f7a4d; } .crm-pill.invited { background: #fdf3dc; color: #946200; }
.crm-pill.offline { background: #eef0f4; color: #4b5563; } .crm-pill.disabled { background: #fde8e6; color: #b3261e; }
.crm-red { color: #b3261e; font-weight: 700; }
.c3-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.c3-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.c3-box h3 { margin: 0 0 8px; font-size: .95rem; color: var(--navy); }
.c3-wide { grid-column: 1 / -1; }
.c3-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: .88rem; }
.c3-dl dt { color: var(--muted); } .c3-dl dd { margin: 0; overflow-wrap: anywhere; }
.c3-line { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; padding: 3px 0; }
.c3-line b { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .c3-grid { grid-template-columns: minmax(0, 1fr); } }
.c3-chip { display: inline-block; background: #eef0fa; color: var(--navy); border-radius: 999px; padding: 3px 10px; font-size: .82rem; font-weight: 600; margin: 0 6px 6px 0; }
.crm-name .count { margin-left: 6px; vertical-align: middle; }
/* ---- firm finance ---- */
.fin-top { margin-bottom: 4px; }
.fin-inline { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; }
.fin-inline select, .fin-inline input { padding: 6px 8px; width: auto; }
.fin-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.fin-kpi { background: #f2f4fb; border-radius: 12px; padding: 12px 14px; }
.fin-kpi b { display: block; font-size: 1.4rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.fin-kpi span { font-size: .8rem; color: var(--muted); display: block; }
.fin-kpi small { font-size: .78rem; font-weight: 700; }
.up { color: #1f7a4d; } .down { color: #b3261e; } .flat { color: var(--muted); }
.fin-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: #374151; }
.fin-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.fin-legend i.line { height: 0; border-top: 2px dashed #5b6575; border-radius: 0; vertical-align: 3px; }
.fin-chart { position: relative; }
.fin-chart svg { width: 100%; height: auto; display: block; }
.fin-chart .tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(16,24,40,.12); padding: 8px 10px; font-size: .8rem; min-width: 170px; }
.fin-chart .tip div { display: flex; justify-content: space-between; gap: 12px; }
.ts-table td.bad { color: #b3261e; font-weight: 700; }
.ts-table td.good { color: #1f7a4d; }
.fin-gridtbl input { width: 92px; padding: 5px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.fin-gridtbl input.yt { width: 110px; background: #f7f8fc; }
.fin-gridtbl td, .fin-gridtbl th { padding: 4px 6px; white-space: nowrap; }
.fin-gridtbl tr.sec td { background: #eef0fa; font-weight: 700; color: var(--navy); }
.fin-gridtbl tr.tot td { font-weight: 700; border-top: 2px solid var(--border); }
.fin-ar .c3-line { font-size: .9rem; }
@media (max-width: 760px) { .fin-top { flex-direction: column; align-items: flex-start; } }
#view-staff .fin-grid2 { grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); }
#view-staff .fin-grid2 > .card { min-width: 0; }
.fin-pane, .fin-pane .card { min-width: 0; }
@media (max-width: 1300px) { #view-staff .fin-grid2 { grid-template-columns: minmax(0, 1fr); } }
/* ---- team chat ---- */
.chat.card { display: grid; grid-template-columns: 260px minmax(0, 1fr); padding: 0; overflow: hidden; height: calc(100vh - 150px); min-height: 520px; }
.chat-side { border-right: 1px solid var(--border); background: #f7f8fc; padding: 12px 8px; overflow-y: auto; display: flex; flex-direction: column; }
.chat-search input { width: 100%; padding: 7px 10px; border-radius: 8px; }
.chat-sec { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 14px 6px 4px; }
.chat-add { border: 0; background: none; font-size: 1.2rem; color: var(--navy); cursor: pointer; line-height: 1; padding: 0 4px; }
.chat-list { display: flex; flex-direction: column; gap: 1px; }
.chat-item { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .9rem; text-align: left; color: #1f2937; width: 100%; }
.chat-item:hover { background: #eef0fa; }
.chat-item.active { background: #182372; color: #fff; }
.chat-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.unread .nm { font-weight: 800; }
.chat-item .dot { width: 8px; height: 8px; border-radius: 50%; background: #c62828; flex: none; }
.chat-item .at { background: #c62828; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; padding: 0 6px; }
.chat-item .av, .chat-av { width: 26px; height: 26px; border-radius: 50%; background: #e3cf7f; color: #10195a; display: grid; place-items: center; font-size: .7rem; font-weight: 800; flex: none; }
.chat-item .hash { width: 26px; text-align: center; font-weight: 800; color: var(--muted); }
.chat-item.active .hash { color: #e3cf7f; }
.chat-notify { margin-top: auto; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-title b { color: var(--navy); font-size: 1.05rem; }
.chat-back { display: none; border: 0; background: none; font-size: 1.6rem; color: var(--navy); cursor: pointer; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.chat-empty { margin: auto; color: var(--muted); text-align: center; max-width: 340px; }
.chat-day { text-align: center; font-size: .75rem; color: var(--muted); margin: 12px 0 6px; font-weight: 700; }
.chat-m { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 4px 6px; border-radius: 8px; }
.chat-m:hover { background: #f7f8fc; }
.chat-m.cont { padding-top: 0; }
.chat-m.cont .chat-av { visibility: hidden; height: 0; }
.chat-m .hd { font-size: .8rem; color: var(--muted); }
.chat-m .hd b { color: #111827; font-size: .9rem; margin-right: 6px; }
.chat-m .tx { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; }
.chat-m .tx a { color: #2357b5; }
.chat-m.me-mention { background: #fffbef; }
.chat-m .deleted { color: var(--muted); font-style: italic; }
.chat-m .tools { display: none; gap: 4px; }
.chat-m:hover .tools { display: inline-flex; }
.chat-m .tools button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .78rem; padding: 0 4px; }
.chat-reacts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.chat-reacts button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 0 8px; font: inherit; font-size: .78rem; cursor: pointer; }
.chat-reacts button.mine { border-color: #182372; background: #eef0fa; }
.chat-att { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; margin-top: 4px; background: #fff; cursor: pointer; font: inherit; font-size: .85rem; }
.chat-compose { border-top: 1px solid var(--border); padding: 10px 16px; position: relative; }
.chat-box { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--border); border-radius: 12px; padding: 6px 8px; background: #fff; }
.chat-box textarea { flex: 1; border: 0; resize: none; font: inherit; max-height: 160px; padding: 6px 4px; outline: none; }
.chat-attach { cursor: pointer; font-size: 1.15rem; padding: 4px; margin: 0; }
.chat-hint { margin-top: 4px; }
.chat-file { font-size: .82rem; margin-bottom: 6px; }
.chat-compose .mention-pop { bottom: 100%; left: 16px; }
@media (max-width: 760px) {
  .chat.card { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 170px); }
  .chat.card.open .chat-side { display: none; }
  .chat.card:not(.open) .chat-main { display: none; }
  .chat-back { display: block; }
}
.chat-attach input { display: none !important; } .chat-box textarea { text-align: left; min-height: 34px; }
/* ---- meetings ---- */
.bk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.bk-day { border: 1px solid var(--border); border-radius: 10px; padding: 8px 6px; min-height: 120px; display: flex; flex-direction: column; gap: 4px; }
.bk-day h4 { margin: 0 0 4px; font-size: .8rem; text-align: center; color: var(--navy); }
.bk-day .none { font-size: .75rem; color: var(--muted); text-align: center; margin-top: 10px; }
.bk-slot { border: 1px solid #c9cff0; background: #f7f8fc; color: var(--navy); border-radius: 8px; padding: 5px 4px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.bk-slot:hover { background: #eef0fa; }
.bk-slot.sel { background: #182372; color: #fff; border-color: #182372; }
.bk-day .scroll { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.bk-picked { font-weight: 700; color: var(--navy); }
.mt-pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .74rem; font-weight: 700; }
.mt-pill.pending { background: #fdf3dc; color: #946200; } .mt-pill.approved { background: #e2f3ea; color: #1f7a4d; }
.mt-pill.declined, .mt-pill.cancelled { background: #eef0f4; color: #4b5563; }
.mt-item .when { font-weight: 700; color: var(--navy); }
.mt-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mt-actions input { width: 220px; padding: 5px 8px; }
.mt-day { margin-top: 12px; }
.mt-day h3 { font-size: .9rem; color: var(--navy); margin: 0 0 4px; }
.av-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.av-day { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.av-day label.check { margin: 0 0 6px; font-weight: 700; }
.av-day .rng { display: flex; gap: 6px; align-items: center; }
.av-day input[type=time] { padding: 4px 6px; width: 105px; }
.av-opts label { margin: 0; }
.av-chip { background: #eef0fa; border-radius: 999px; padding: 2px 8px; font-size: .78rem; }
@media (max-width: 860px) { .bk-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#form-book label { display: flex; flex-direction: column; gap: 4px; } #form-book textarea, #form-chatroom textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; } #av-types { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.jv-meet { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fffbef; border: 1px solid #ecd294; border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.wk-table td.desc { min-width: 150px; }
.team-resend { margin-left: 10px; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.guide-toc a { padding: 6px 12px; border: 1px solid var(--line, #e2e6ee); border-radius: 999px; text-decoration: none; font-size: .88rem; }
.guide-list { padding-left: 1.3rem; line-height: 1.6; }
.guide-list li { margin: 4px 0; }
.guide-code { background: #0f1830; color: #e8ecf5; padding: 12px 14px; border-radius: 8px; overflow-x: auto; font-size: .82rem; white-space: pre; }
[data-spage="guide"] h3 { margin: 18px 0 6px; font-size: 1rem; }
[data-spage="guide"] .card { margin-bottom: 16px; }
.team-remove { color: #b42318; }
dialog label > textarea { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; min-height: 70px; resize: vertical; }

/* ---- Light theme (client + staff) ---- */
.cp-nav { background: #fff; color: var(--text); border-right: 1px solid #e6eaf0; }
.cp-link { color: #2f3a52; }
.cp-link:hover { background: #f4f6fb; }
.cp-link.active { background: var(--gold-soft); border-left-color: var(--gold); color: var(--navy); }
.cp-links { background: #fff; }
.cp-contact { border-top-color: #e6eaf0; }
.cp-contact a, .cp-contact span { color: #3b4453; }
.cp-contact b, .cp-contact .cp-office, .cp-contact strong { color: var(--gold); }
.cp-motto { color: var(--navy); }
.cp-hero { color: var(--navy); background: linear-gradient(90deg, #f7f4ea 0%, #f3f5fb 55%, #e9eef9 100%); border-bottom: 1px solid #e6eaf0; }
.cp-hero .hero-sub { color: #3b4453; opacity: 1; }
.cp-hero-art { opacity: .55; }
.cp-band { background: #fff; color: var(--navy); border-bottom: 1px solid #e6eaf0; }
.cp-band-link { color: var(--navy-2); }
.cp-tile-ic.navy { background: #e9ecfa; color: var(--navy); }
.cp-tile-ic.gold { background: var(--gold-soft); color: #8a6f12; }
{ background: #f6f7fa; }
.cp-hero .hero-kicker, .cp-hero .hero-account { color: #8a6f12; }
.cp-hero .hero-sub::after { background: var(--gold); }

/* ---- Insights (staff dashboard) ---- */
.ins-head { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 6px; }
.ins-title { font-size: 1.6rem; margin: 0; color: var(--text); }
.ins-h { font-size: 1.02rem; font-weight: 600; margin: 16px 0 10px; color: var(--text); }
.ins-row { display: grid; gap: 12px; }
.ins-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ins-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 16px 14px; min-height: 96px; }
.ins-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--text); }
.ins-label { color: #3b4453; font-size: .88rem; line-height: 1.25; }
.ins-tag { position: absolute; top: 12px; right: 12px; font-size: .7rem; color: var(--muted); border: 1px solid #e6eaf0; border-radius: 6px; padding: 1px 6px; }
.ins-sub { font-size: .76rem; color: var(--muted); }
.ins-card.has .ins-num { color: var(--danger); }
#ins-soon:not(:empty) { color: inherit; }
@media (max-width: 1200px) { .ins-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ins-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ins-row + .cp-grid { margin-top: 24px; }

/* ---- Client readability ---- */
html { font-size: 16px; }
html[data-ts="2"] { font-size: 18px; }
html[data-ts="3"] { font-size: 20px; }
body { font-size: .95rem; }
#view-client { --muted: #3f4856; color: #1a1f29; }
#view-client .cp-link { font-size: 1.02rem; }
#view-client .cp-tile-label { font-size: .95rem; color: #2f3747; }
#view-client .cp-tile-num { font-size: 2rem; }
#view-client .muted, #view-client .meta, #view-client .small { color: #3f4856; }
#view-client .cp-table, #view-client table { font-size: .98rem; }
#view-client .cp-hero h1 { font-size: 2.2rem; }
#view-client .cp-hero .hero-sub { font-size: 1.12rem; color: #2f3747; }
#view-client .btn { font-size: 1rem; min-height: 42px; }
#view-client a, #view-client .link { text-underline-offset: 3px; }
#view-client :focus-visible { outline: 3px solid #bc9c23; outline-offset: 2px; }

.next-steps { margin-bottom: 18px; border-left: 4px solid var(--gold); }
.ns-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ns-head h2 { margin: 0; font-size: 1.3rem; color: var(--navy); }
.text-size { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: #3f4856; }
.text-size button { border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 4px 10px; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; min-width: 40px; }
.text-size button[data-ts="2"] { font-size: 1.05rem; } .text-size button[data-ts="3"] { font-size: 1.2rem; }
.text-size button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.ns-list { list-style: none; margin: 0; padding: 0; }
.ns-item { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.ns-item:first-child { border-top: 0; }
.ns-num { width: 34px; height: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--navy); font-weight: 800; display: grid; place-items: center; flex-shrink: 0; font-size: 1.05rem; }
.ns-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ns-body b { font-size: 1.08rem; color: #1a1f29; }
.ns-body span { color: #3f4856; }
.ns-done { padding: 10px 0; font-size: 1.05rem; color: #1e6b3f; }
@media (max-width: 640px) { .ns-item { flex-wrap: wrap; } .ns-item .btn { width: 100%; } }
#view-client .cp-link { padding-right: 16px; gap: 12px; }
.cp-link > span:not(.cp-badge) { flex: 1; min-width: 0; line-height: 1.25; }
.cp-badge { flex-shrink: 0; }
/* Layout scales with the chosen text size */
@media (min-width: 901px) { .cp-shell { grid-template-columns: 15.75rem minmax(0, 1fr); } }
.cp-tiles { grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.cp-grid { grid-template-columns: minmax(0, 1fr) 19rem; }
@media (max-width: 1100px) { .cp-grid { grid-template-columns: 1fr; } }

/* ---- Tax organizer ---- */
.dlg-wide { width: min(900px, 96vw); }
.org-form { display: flex; flex-direction: column; gap: 6px; }
.org-sec h3 { font-size: 1.12rem; color: var(--navy); margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--gold-soft); }
.org-sec:first-child h3 { margin-top: 4px; }
.org-item { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.org-q { font-weight: 600; font-size: 1.02rem; color: #1a1f29; }
.org-help { color: #3f4856; font-size: .9rem; }
.org-last { display: inline-block; background: var(--gold-soft); color: #5a4b12; border-radius: 8px; padding: 4px 10px; font-size: .9rem; width: fit-content; }
.org-ynrow { display: flex; gap: 10px; }
.org-yn { min-width: 90px; padding: 10px 18px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; }
.org-yn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.org-item input[type="text"], .org-item input[type="date"], .org-item select, .org-item textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; }
.org-money { display: flex; align-items: center; gap: 6px; max-width: 260px; } .org-money span { font-weight: 700; color: #3f4856; }
.org-rows { display: flex; flex-direction: column; gap: 10px; }
.org-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: #fff; }
.org-row.prior { background: #fbfaf4; border-color: #e8dfb8; flex-direction: column; align-items: stretch; }
.org-row.gone { opacity: .6; }
.org-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; flex: 1; width: 100%; }
.org-cell { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; color: #3f4856; margin: 0; }
.org-prior { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.org-tag { font-size: .75rem; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #8a6f12; margin-right: 4px; }
.org-chip { border: 1.5px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--navy); cursor: pointer; }
.org-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.org-x { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: #8a93a3; cursor: pointer; padding: 6px; }
.org-none { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.org-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.org-files { color: #1e6b3f; font-size: .88rem; }
.org-ans { font-size: .98rem; } .org-ans.muted { color: var(--muted); }
.org-head h2 { margin: 0 0 6px; color: var(--navy); }
.org-progress { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.org-done { color: #1e6b3f; font-weight: 600; }
.org-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.org-foot p { margin: 0; }
.org-li { flex-wrap: wrap; gap: 10px; }
.org-pick { display: flex; gap: 12px; align-items: center; }
#org-client > .card { margin-bottom: 16px; }
#org-pdf, #orgai-upload, .org-tools input[type="file"] { display: none !important; }
#org-card .row select { width: auto; margin: 0; }
#org-card label.btn { margin: 0; display: inline-flex; align-items: center; }
.org-pick { justify-content: flex-start !important; }
.org-pick .name-cell { flex: 1; text-align: left; }
.org-staffnote { font-size: .8rem; color: #8a6f12; }
.cp-link > span:not(.cp-badge) { white-space: normal; overflow-wrap: anywhere; }

/* ================= AGCPA enterprise theme (Midnight Navy / Royal Blue / Champagne Gold) ================= */
:root { --navy: #101B35; --navy-dark: #0B1428; --navy-2: #2864DC; --gold: #C8A45D; --gold-soft: #F6EFDF; --bg: #F4F6FA; --text: #17243B; --muted: #64748B; --border: #E4E8F0; --shadow: 0 1px 2px rgba(16,27,53,.04), 0 2px 8px rgba(16,27,53,.05); }
body { background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
.topbar { background: #fff; border-bottom: 1px solid var(--border); box-shadow: none; }
.btn-primary { background: #2864DC; border-color: #2864DC; color: #fff; }
.btn-primary:hover { background: #1F55C4; }
.link, .cp-band-link { color: #2864DC; }
.card { border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
/* navy sidebar */
.cp-nav { background: #101B35; color: #C9D2E3; border-right: 0; }
.cp-links { background: transparent; }
.cp-link { color: #C9D2E3; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; margin-right: 10px; }
.cp-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.cp-link.active { background: rgba(40,100,220,.22); border-left-color: #C8A45D; color: #fff; font-weight: 600; }
.cp-contact { border-top-color: rgba(255,255,255,.1); }
.cp-contact a, .cp-contact span { color: #C9D2E3; }
.cp-contact b, .cp-contact strong, .cp-contact .cp-office { color: #C8A45D; }
.cp-motto { color: #E7D9B8; }
.cp-badge { background: #C2413B; }
/* staff dashboard: the overview replaces the welcome banner */
#s-hero { display: none !important; }
.ex-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 2px 0 16px; }
.ex-head h1 { margin: 0; font-size: 1.45rem; letter-spacing: -.2px; color: var(--text); }
.ex-head p { margin: 4px 0 0; color: var(--muted); }
.ex-actions { display: flex; gap: 8px; }
.ex-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.ex-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px; margin: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; background: #fff; }
.ex-kpi:hover { border-color: #C9D6F2; }
.ex-kl { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }
.ex-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ex-kv { font-size: 1.75rem; font-weight: 700; letter-spacing: -.4px; line-height: 1.15; }
.ex-kd { font-size: .78rem; color: var(--muted); }
.ex-kd.up { color: #1F8A55; } .ex-kd.dn, td.dn { color: #C2413B; font-weight: 600; }
.ex-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.ex-card { margin: 0; padding: 16px 18px; }
.ex-ch { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.ex-ch h3 { margin: 0; font-size: 1rem; color: var(--text); }
.ex-ch p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.ex-legend { display: flex; gap: 14px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.ex-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ex-chart svg { display: block; }
.ex-chart text { font-family: inherit; }
.ex-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; text-align: center; padding: 36px 16px; color: var(--muted); background: #FAFBFD; border: 1px dashed var(--border); border-radius: 10px; }
.ex-empty b { color: var(--text); }
.ex-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ex-table th { text-align: left; font-size: .7rem; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #FAFBFD; }
.ex-table td { padding: 9px 10px; border-bottom: 1px solid #EEF1F6; }
.ex-table .r { text-align: right; }
.ex-barcell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.ex-barcell span { font-weight: 600; min-width: 18px; }
.ex-bar { flex: 1; height: 8px; background: #EEF1F6; border-radius: 4px; overflow: hidden; }
.ex-bar i { display: block; height: 100%; border-radius: 4px; }
.ex-muted { color: var(--muted); font-size: .78rem; }
.ex-feed { display: flex; flex-direction: column; }
.ex-it { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #EEF1F6; font-size: .9rem; }
.ex-it:last-child { border-bottom: 0; }
.ex-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: .8rem; }
.ex-ic.blue { background: #EAF0FC; color: #1E4FB4; } .ex-ic.gold { background: #F7F0E1; color: #7A5E22; } .ex-ic.good { background: #E6F4EC; color: #1F6E46; }
.ex-ic.crit { background: #FBEAE9; color: #A1322D; } .ex-ic.gray { background: #EEF1F6; color: #475569; }
.ex-tip { position: fixed; z-index: 1000; background: #101B35; color: #fff; font-size: .8rem; line-height: 1.45; padding: 7px 10px; border-radius: 8px; pointer-events: none; box-shadow: 0 6px 18px rgba(16,27,53,.25); }
.ex-tip b { color: #E7D9B8; }
@media (max-width: 1100px) { .ex-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ex-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ex-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .ex-kv { font-size: 1.4rem; } }
.ex-tablewrap { overflow-x: auto; }
.ex-ch { flex-wrap: wrap; }
@media (max-width: 900px) {
  .cp-nav { min-width: 0; max-width: 100vw; }
  .cp-links { max-width: 100vw; }
  .cp-link { margin-right: 0; border-radius: 0; border-left: 0; border-bottom: 3px solid transparent; }
  .cp-link.active { border-bottom-color: #C8A45D; }
  .cp-link > span:not(.cp-badge) { white-space: nowrap; }
}
@media (max-width: 1100px) { .ex-grid { grid-template-columns: minmax(0, 1fr); } }

/* ================= Sign-in page (split layout with animated waves) ================= */
body.login-mode .topbar { display: none; }
body.login-mode main { max-width: none; margin: 0; padding: 0; }
body.login-mode { background: #EEF3FA; }
.login-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; margin: 0; }
.ls-left { position: relative; overflow: hidden; color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(120,180,255,.45), transparent 60%), linear-gradient(165deg, #3A7BE0 0%, #1E4FA8 42%, #13306B 72%, #101B35 100%); }
.ls-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.ls-mark { width: 54px; height: 54px; border-radius: 12px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.ls-mark img { width: 42px; height: 42px; object-fit: contain; }
.ls-brand b { display: block; font-size: 1.55rem; letter-spacing: .6px; }
.ls-brand span { font-size: .72rem; letter-spacing: 1.6px; text-transform: uppercase; color: #D6E4FB; }
.ls-copy { margin: auto 0; position: relative; z-index: 2; max-width: 520px; padding: 40px 0 120px; }
.ls-copy h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 600; letter-spacing: -.8px; margin: 0 0 14px; color: #fff; }
.ls-copy p { font-size: 1.15rem; line-height: 1.5; color: #E3ECFB; margin: 0 0 26px; }
.ls-feat { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.ls-feat li { display: flex; align-items: center; gap: 9px; font-size: 1rem; color: #fff; }
.ls-feat svg { width: 22px; height: 22px; fill: none; stroke: #BFE3FF; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(140,200,255,.7)); }
.ls-offices { position: relative; z-index: 2; display: flex; gap: 22px; flex-wrap: wrap; font-size: .85rem; color: #D6E4FB; }
.ls-offices b { color: #E7D9B8; margin-right: 6px; font-weight: 600; }
/* ocean waves: three layers drifting at different speeds */
.ls-waves { position: absolute; left: 0; bottom: 0; width: 200%; height: 46%; z-index: 1; }
.ls-waves path { fill: #fff; }
.ls-w1 { opacity: .10; animation: ls-drift 26s linear infinite; }
.ls-w2 { opacity: .08; animation: ls-drift 18s linear infinite reverse; }
.ls-w3 { opacity: .12; animation: ls-drift 34s linear infinite; }
.ls-waves g { transform-box: view-box; }
@keyframes ls-drift { from { transform: translateX(0); } to { transform: translateX(-1440px); } }
@media (prefers-reduced-motion: reduce) { .ls-waves g { animation: none; } }
.ls-right { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 24px; gap: 22px;
  background: linear-gradient(180deg, #F4F8FD, #EAF1FA); }
.ls-card { width: 100%; max-width: 430px; background: #fff; border-radius: 20px; padding: 32px 34px 26px; box-shadow: 0 1px 2px rgba(16,27,53,.05), 0 20px 50px rgba(16,27,53,.10); }
.ls-mobile-logo { display: none; height: 54px; margin: 0 auto 14px; }
.ls-tabs { display: flex; gap: 4px; background: #EEF2F8; padding: 4px; border-radius: 999px; width: fit-content; margin: 0 auto 22px; }
.ls-tabs button { border: 0; background: none; padding: 8px 26px; border-radius: 999px; font: inherit; font-weight: 600; color: #64748B; cursor: pointer; }
.ls-tabs button.on { background: #fff; color: #101B35; box-shadow: 0 1px 3px rgba(16,27,53,.12); }
.ls-card h2 { margin: 0; font-size: 1.35rem; color: #17243B; text-align: center; }
.ls-sub { margin: 6px 0 18px; text-align: center; color: #64748B; font-size: .92rem; }
#form-login label { display: block; font-weight: 600; font-size: .9rem; color: #17243B; margin-bottom: 14px; }
#form-login input[type="email"], #form-login input[type="password"], #form-login input[type="text"] { width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid #D5DCE7; border-radius: 10px; font: inherit; font-weight: 400; background: #fff; }
#form-login input:focus { outline: 2px solid #2864DC; outline-offset: 0; border-color: #2864DC; }
.ls-pw { position: relative; display: block; }
.ls-pw input { padding-right: 46px !important; }
.ls-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 3px; border: 0; background: none; padding: 8px; cursor: pointer; color: #64748B; border-radius: 8px; }
.ls-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ls-eye.on { color: #2864DC; }
.ls-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -2px 0 16px; flex-wrap: wrap; }
#form-login .ls-check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; color: #334155; }
.ls-check input { width: 16px; height: 16px; margin: 0; accent-color: #2864DC; }
.ls-row .link { padding: 0; color: #2864DC; text-decoration: none; font-weight: 500; }
.ls-submit { padding: 13px; font-size: 1rem; border-radius: 10px; background: #2864DC; }
.ls-card .divider { margin: 18px 0; }
.ls-card .btn-google { border-radius: 10px; padding: 11px; }
.ls-new { text-align: center; margin: 16px 0 0; color: #475569; }
.ls-new .link { padding: 0; color: #2864DC; font-weight: 600; text-decoration: none; }
.ls-sec { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; font-size: .8rem; color: #64748B; }
.ls-sec svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.ls-foot { display: flex; gap: 22px; font-size: .88rem; }
.ls-foot a { color: #475569; text-decoration: none; }
.ls-foot a:hover { color: #2864DC; }
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; }
  .ls-left { padding: 26px 22px 70px; min-height: 0; }
  .ls-copy { padding: 22px 0 10px; } .ls-copy h1 { font-size: 2rem; } .ls-copy p { font-size: 1rem; margin-bottom: 16px; }
  .ls-offices { display: none; } .ls-waves { height: 60%; }
  .ls-right { padding: 0 16px 24px; margin-top: -48px; position: relative; z-index: 3; background: transparent; }
  .ls-card { padding: 24px 20px; }
}
.ls-copy, .ls-copy h1, .ls-copy p { text-align: left; }
.ls-waves path { fill: #A9CFFF; }
.ls-w1 { opacity: .16; } .ls-w2 { opacity: .12; } .ls-w3 { opacity: .20; }
#view-login .ls-copy h1 { text-align: left; }
.ls-w1 { opacity: .11; } .ls-w2 { opacity: .08; } .ls-w3 { opacity: .14; }
@media (max-width: 900px) { #view-login .ls-copy h1 { font-size: 1.9rem; } .ls-brand span { letter-spacing: 1px; } }

/* ================= Ocean-blue theme everywhere (matches the sign-in page) ================= */
:root { --ocean: linear-gradient(165deg, #3A7BE0 0%, #1E4FA8 42%, #13306B 72%, #101B35 100%); }
body { background: linear-gradient(180deg, #F4F8FD 0%, #EAF1FA 100%) fixed; }
/* sidebar: same blue-to-navy as the sign-in panel */
.cp-nav { background: linear-gradient(180deg, #2F6CD4 0%, #1D4A9E 34%, #14336F 64%, #101B35 100%); }
.cp-link { color: #E3ECFB; }
.cp-link:hover { background: rgba(255,255,255,.09); }
.cp-link.active { background: rgba(255,255,255,.16); border-left-color: #E7D9B8; color: #fff; }
.cp-contact { border-top-color: rgba(255,255,255,.18); }
.cp-contact a, .cp-contact span { color: #E3ECFB; }
.cp-contact b, .cp-contact strong, .cp-contact .cp-office { color: #E7D9B8; }
/* cards: softer, rounder, like the sign-in card */
.card { border-radius: 16px; border-color: #E2E9F3; box-shadow: 0 1px 2px rgba(16,27,53,.04), 0 10px 30px rgba(16,27,53,.06); }
dialog { border-radius: 18px; }
input:focus, select:focus, textarea:focus { outline-color: #2864DC; }
.btn { border-radius: 10px; }
/* waves used inside banners */
.theme-waves { position: absolute; left: 0; bottom: 0; width: 200%; height: 70%; z-index: 0; pointer-events: none; }
.theme-waves path { fill: #A9CFFF; }
/* client welcome banner: ocean blue with waves instead of the building drawing */
.cp-hero { background: var(--ocean) !important; color: #fff; border-bottom: 0; position: relative; overflow: hidden; }
.cp-hero-art { display: none !important; }
.cp-hero > div { position: relative; z-index: 1; max-width: 100%; }
.cp-hero h1, #view-client .cp-hero h1 { color: #fff; }
.cp-hero .hero-kicker { color: #E7D9B8 !important; }
.cp-hero .hero-account { color: #D6E4FB !important; }
.cp-hero .hero-sub, #view-client .cp-hero .hero-sub { color: #E3ECFB; }
.cp-hero .hero-sub::after { background: #E7D9B8; }
/* staff dashboard header: same banner */
.ex-head { position: relative; overflow: hidden; background: var(--ocean); color: #fff; border-radius: 16px; padding: 26px 28px 30px; margin-bottom: 18px; align-items: center; }
.ex-head > div { position: relative; z-index: 1; }
.ex-head h1 { color: #fff; font-size: 1.6rem; }
.ex-head p { color: #D6E4FB; }
.ex-head .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.ex-head .btn-ghost:hover { background: rgba(255,255,255,.22); }
.ex-head .btn-primary { background: #fff; color: #1E4FA8; border-color: #fff; }
/* sign-up, verification and code screens: ocean background with waves */
.auth-waves { display: none; }
body.auth-mode { background: var(--ocean) fixed; min-height: 100vh; }
body.auth-mode .auth-waves { display: block; position: fixed; left: 0; bottom: 0; width: 200%; height: 38vh; z-index: 0; pointer-events: none; }
body.auth-mode .auth-waves path { fill: #A9CFFF; }
body.auth-mode main { position: relative; z-index: 1; }
body.auth-mode .view.card { border-radius: 20px; border: 0; box-shadow: 0 20px 50px rgba(5,15,40,.30); }
body.auth-mode .topbar { background: rgba(255,255,255,.96); }
@media (max-width: 900px) { .ex-head { padding: 20px 18px 24px; } }

/* ================= Sign-in page v2 (matches the reference design) ================= */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ls-left { padding: 52px 64px; background: linear-gradient(180deg, #74B6EE 0%, #4F95DC 22%, #2C6CBE 48%, #154C8E 72%, #0C2E5C 100%); }
.ls-left .ls-waves, .ls-left .ls-brand, .ls-left .ls-offices { display: none; }
.ls-waves2 { position: absolute; inset: 0; width: 200%; height: 100%; z-index: 0; pointer-events: none; }
.ls-waves2 path { fill: #FFFFFF; }
.lw1 { opacity: .10; animation: ls-drift 40s linear infinite; }
.lw2 { opacity: .07; animation: ls-drift 30s linear infinite reverse; }
.lw3 { opacity: .07; animation: ls-drift 48s linear infinite; }
.lw4 { opacity: .06; animation: ls-drift 36s linear infinite reverse; }
@media (prefers-reduced-motion: reduce) { .ls-waves2 g { animation: none; } }
.ls-wordmark { position: relative; z-index: 2; color: #fff; }
.wm { font-size: 2.5rem; line-height: 1; letter-spacing: 1px; font-weight: 300; }
.wm b { font-weight: 800; letter-spacing: 0; }
.wm small { font-size: 1.55rem; font-weight: 300; margin-left: 10px; letter-spacing: 1px; }
.wm-tag { font-size: .72rem; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 6px; color: #EAF3FF; }
.ls-copy { padding: 30px 0 60px 72px; max-width: 600px; }
#view-login .ls-copy h1 { font-size: clamp(2.6rem, 4.6vw, 4rem); font-weight: 400; letter-spacing: -1px; margin-bottom: 16px; }
.ls-copy p { font-size: 1.3rem; color: #F1F7FF; max-width: 420px; margin-bottom: 32px; }
.ls-feat { gap: 14px 34px; }
.ls-feat li { font-size: 1.15rem; }
.ls-feat svg { width: 26px; height: 26px; stroke: #D9F1FF; filter: drop-shadow(0 0 6px rgba(160,225,255,.95)) drop-shadow(0 0 14px rgba(120,200,255,.6)); }
.ls-right { background: linear-gradient(180deg, #F2F7FC 0%, #E8F0F9 100%); }
.ls-card { max-width: 440px; border-radius: 24px; padding: 36px 36px 26px; box-shadow: 0 2px 4px rgba(16,27,53,.04), 0 24px 60px rgba(16,27,53,.12); }
.ls-tabs { margin-bottom: 26px; background: #EEF2F7; }
.ls-tabs button { padding: 8px 28px; color: #5B6B82; font-weight: 500; }
.ls-tabs button.on { background: #C9D6E6; color: #17243B; box-shadow: none; }
#form-login label { font-weight: 500; font-size: .95rem; }
#form-login input[type="email"], #form-login input[type="password"], #form-login input[type="text"] { border-radius: 10px; border-color: #C9D2DE; padding: 12px 14px; }
#form-login input:focus { outline-color: #14A396; border-color: #14A396; }
.ls-eye .slash { display: block; }
.ls-eye.on .slash { display: none; }
.ls-eye.on { color: #14A396; }
.ls-row .link { color: #1F6FAE; }
.ls-check input { accent-color: #14A396; }
.ls-submit { background: linear-gradient(180deg, #1CB0A2, #129A8D); color: #fff; border: 0; border-radius: 999px; padding: 13px; font-size: 1.05rem; font-weight: 600; box-shadow: 0 6px 16px rgba(18,154,141,.25); }
.ls-submit:hover { background: linear-gradient(180deg, #18A194, #0F8A7E); }
.ls-card .divider { margin: 20px 0 16px; }
.ls-sso { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-sso { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: #17243B; border: 1px solid #C9D2DE; border-radius: 999px; padding: 9px 10px; font-size: .86rem; font-weight: 500; margin: 0; white-space: nowrap; }
.btn-sso:hover { background: #F6F9FC; }
.btn-sso svg { width: 18px; height: 18px; flex-shrink: 0; }
.ls-new { margin-top: 18px; font-size: .92rem; }
.ls-new .link { color: #1F6FAE; }
.ls-sec { margin-top: 18px; }
.ls-foot { margin-top: 26px; gap: 26px; }
.ls-foot a { color: #5B6B82; }
@media (max-width: 1100px) { .ls-copy { padding-left: 0; } }
@media (max-width: 900px) {
  .ls-left { padding: 28px 22px 80px; }
  .wm { font-size: 1.9rem; } .wm small { font-size: 1.2rem; }
  .ls-copy { padding: 18px 0 10px; } #view-login .ls-copy h1 { font-size: 2.2rem; } .ls-copy p { font-size: 1.05rem; margin-bottom: 16px; }
  .ls-feat li { font-size: 1rem; }
  .ls-right { margin-top: -56px; }
}
@media (max-width: 420px) { .ls-sso { grid-template-columns: 1fr; } }
.ls-waves2 path { fill: url(#lwfade); }
.lw1 { opacity: .16; } .lw2 { opacity: .12; } .lw3 { opacity: .10; } .lw4 { opacity: .08; }
.ls-sso { gap: 10px; }
.btn-sso { font-size: .82rem; padding: 9px 8px; gap: 7px; min-width: 0; }
.btn-sso svg { width: 16px; height: 16px; }
