/* Client portal. Navy and white; the accent follows the client's brand (GDV blue, LCB gold). */
:root {
  --navy-950: #061226; --navy-900: #0A1B36; --navy-800: #102A52; --navy-700: #17376B;
  --acc: #2F6BFF; --acc-ink: #1D4FB5; --acc-soft: #EAF1FF;
  --canvas: #EEF2F8; --card: #fff; --ink: #0B1B33; --ink-2: #3D4E6A; --muted: #66768F; --line: #E1E8F3;
  --good: #0E8F4F; --good-bg: #E5F6EC; --warn: #9A6400; --warn-bg: #FFF4DB; --bad: #B42318; --bad-bg: #FDECEA;
  --r: 16px; --shadow: 0 16px 34px -26px rgba(10,27,54,.55);
  --head: 'Plus Jakarta Sans', system-ui, sans-serif; --body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}
:root[data-brand="lcb"] { --acc: #C9962B; --acc-ink: #8A6414; --acc-soft: #FBF3E1; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--body); }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.25; letter-spacing: -.01em; }
a { color: var(--acc-ink); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc) 55%, transparent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 11px 18px; font-weight: 600; font-size: 14.5px;
  background: linear-gradient(180deg, #1B4A8F, #12305A); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 12px 20px -14px rgba(10,27,54,.9); text-decoration: none; transition: transform .2s var(--ease), filter .2s; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(10,27,54,.06); }
.btn.acc { background: var(--acc); color: #fff; }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #F3C9C4; box-shadow: none; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--acc-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
label.f { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
input[type=text], input[type=password], input[type=email], textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #FBFCFF; border: 1px solid #CBD6E8; border-radius: 11px; padding: 11px 13px; }
input:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.msg { margin: 0; font-size: 14px; min-height: 1px; }
.msg.err { color: var(--bad); } .msg.ok { color: var(--good); }
.hint { font-size: 13px; color: var(--muted); margin: 0; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.rules li::before { content: '○ '; } .rules li.ok { color: var(--good); } .rules li.ok::before { content: '✓ '; }

/* ---------- sign-in screens ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(700px 400px at 85% -10%, rgba(80,140,255,.35), transparent 70%), linear-gradient(180deg, #0A1B36 0%, #0F2A52 55%, var(--canvas) 55%); }
.auth__box { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 30px 26px; box-shadow: 0 30px 60px -30px rgba(6,18,38,.7); display: grid; gap: 18px; }
.auth__brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.auth__brand i { font-size: 20px; color: var(--acc); }
.auth h1 { font-size: 24px; }
.auth p.sub { margin: -10px 0 0; color: var(--muted); }
.auth form { display: grid; gap: 14px; }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 30; background: linear-gradient(180deg, #0A1B36, #0F2A52); color: #fff; box-shadow: 0 10px 30px -20px rgba(6,18,38,.9); }
.top__in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.top__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top__brand b { font-family: var(--head); font-size: 16px; white-space: nowrap; }
.top__brand small { display: block; color: #9FB3D3; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; font-size: 19px; flex: none; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; color: #C3D2EA; padding: 9px 13px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.tabs button i { font-size: 18px; }
.tabs button:hover { background: rgba(255,255,255,.08); color: #fff; }
.tabs button.on { background: #fff; color: var(--navy-900); }
.tabs button.on i { color: var(--acc); }
.top__out { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; flex: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; display: grid; gap: 18px; }
.ptitle { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.ptitle h2 { font-size: 24px; }
.ptitle p { margin: 4px 0 0; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 16.5px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card__head > .btn, .ptitle > .btn { white-space: nowrap; }
.card__head .sub { margin: 2px 0 0; }
.grid { display: grid; gap: 18px; align-items: stretch; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.empty { color: var(--muted); font-size: 14px; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; background: var(--acc-soft); color: var(--acc-ink); white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.gray { background: #EEF2F8; color: var(--ink-2); }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 26px; color: #fff;
  background: radial-gradient(460px 240px at 95% -30%, color-mix(in srgb, var(--acc) 60%, transparent), transparent 70%), linear-gradient(135deg, #0A1B36 0%, #17376B 100%);
  box-shadow: 0 24px 44px -30px rgba(6,18,38,.9); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.hero h2 { font-size: 26px; color: #fff; }
.hero p { margin: 6px 0 0; color: #C9D8F2; }
.hero__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero__tags span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.hero__ring { display: grid; place-items: center; text-align: center; }
.hero__ring small { color: #C9D8F2; font-size: 12.5px; }

/* KPI tiles */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi i.ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-ink); font-size: 19px; margin-bottom: 6px; }
.kpi small { color: var(--ink-2); font-weight: 600; font-size: 13.5px; }
.kpi b { font-family: var(--head); font-size: 26px; line-height: 1.15; }
.kpi em { font-style: normal; color: var(--muted); font-size: 13px; margin-top: auto; }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: #E3EAF5; }
.chart .ax { fill: #66768F; font-size: 11px; font-family: var(--body); }
.chart .bar { fill: var(--acc); transition: opacity .2s; }
.chart .bar:hover { opacity: .8; }
.chart .val { fill: var(--ink-2); font-size: 11px; font-weight: 600; font-family: var(--body); }
.ring circle { fill: none; stroke-width: 10; }
.ring .tr { stroke: rgba(255,255,255,.18); }
.card .ring .tr { stroke: #E6ECF5; }
.ring .fg { stroke: var(--acc); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.ring text { font-family: var(--head); font-weight: 800; font-size: 22px; fill: currentColor; }
.tip { position: fixed; z-index: 80; pointer-events: none; background: var(--navy-900); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); opacity: 0; transition: opacity .12s; }
.tip.on { opacity: 1; }

/* heat map */
.heat { overflow-x: auto; padding-bottom: 4px; }
.heat__grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 15px); gap: 4px; width: max-content; }
.heat__grid span { width: 15px; height: 15px; border-radius: 4px; background: #E9EEF6; }
.heat__grid span[data-l="1"] { background: color-mix(in srgb, var(--acc) 28%, #fff); }
.heat__grid span[data-l="2"] { background: color-mix(in srgb, var(--acc) 52%, #fff); }
.heat__grid span[data-l="3"] { background: color-mix(in srgb, var(--acc) 76%, #fff); }
.heat__grid span[data-l="4"] { background: var(--acc); }
.heat__grid span.pad { background: transparent; }
.heat__months { display: grid; grid-auto-flow: column; grid-auto-columns: 19px; font-size: 11px; color: var(--muted); margin-bottom: 4px; width: max-content; }
.heat__legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 10px; justify-content: flex-end; }
.heat__legend span { width: 12px; height: 12px; border-radius: 3px; }

/* progress board */
.bar-track { height: 12px; border-radius: 99px; background: #E6ECF5; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--navy-700), var(--acc)); transition: width 1s var(--ease); }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: #E6ECF5; border-radius: 16px; padding: 12px; display: grid; gap: 10px; }
.col h4 { display: flex; justify-content: space-between; align-items: center; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); padding: 2px 4px; }
.col h4 em { font-style: normal; background: #fff; border-radius: 99px; padding: 1px 9px; font-size: 12px; }
.task { background: #fff; border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); display: grid; gap: 6px; }
.task b { font-weight: 600; font-size: 14.5px; }
.task small { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 5px; }
.task.done b { color: var(--muted); text-decoration: line-through; }
.list { display: grid; gap: 10px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li > i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-ink); font-size: 17px; flex: none; }
.li > div { min-width: 0; flex: 1; }
.li b { display: block; font-weight: 600; }
.li small { color: var(--muted); font-size: 13px; }

/* services and plans */
.svc { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.svc__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.svc p { margin: 0; color: var(--ink-2); font-size: 14px; }
.svc .price { font-family: var(--head); font-size: 22px; font-weight: 800; margin-top: auto; }
.svc .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan { display: flex; flex-direction: column; gap: 10px; height: 100%; position: relative; }
.plan.cur { border: 2px solid var(--acc); }
.plan .flag { position: absolute; top: -12px; left: 18px; background: var(--acc); color: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; }
.plan .price { font-family: var(--head); font-size: 30px; font-weight: 800; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 600; }
.plan p { margin: 0; color: var(--ink-2); font-size: 14px; }
.plan .btn { margin-top: auto; }

/* billing */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch b { display: block; font-size: 15.5px; }
.toggle { position: relative; width: 54px; height: 30px; flex: none; border-radius: 99px; border: 0; background: #C9D4E6; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.toggle[aria-checked="true"] { background: var(--good); }
.toggle[aria-checked="true"]::after { transform: translateX(24px); }
.ccard { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; flex-wrap: wrap; }
.ccard__logo { width: 52px; height: 36px; border-radius: 8px; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; flex: none; }
.ccard__info { flex: 1; min-width: 140px; }
.ccard__info b { display: block; }
.ccard__info small { color: var(--muted); }
.ccard__acts { display: flex; gap: 8px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
.tscroll { overflow-x: auto; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--acc-soft); color: var(--ink-2); font-size: 14px; }
.note i { color: var(--acc-ink); font-size: 18px; margin-top: 1px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* modal and toast */
.scrim { position: fixed; inset: 0; z-index: 90; background: rgba(6,18,38,.55); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 460px; background: #fff; border-radius: 20px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.modal__acts { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; z-index: 95; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); max-width: calc(100% - 32px); }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #D3DDEC; border-top-color: var(--navy-700); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.in { animation: up .45s var(--ease) both; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-7-5 { grid-template-columns: minmax(0, 1fr); }
  .tabs button span { display: none; }
  .tabs button { padding: 9px 11px; }
}
@media (max-width: 720px) {
  body { font-size: 15.5px; padding-bottom: 76px; }
  .top__in { padding: 10px 16px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -20px rgba(6,18,38,.6);
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabs button { flex-direction: column; gap: 2px; padding: 6px 2px; color: var(--muted); font-size: 11px; border-radius: 10px; }
  .tabs button span { display: block; }
  .tabs button i { font-size: 21px; }
  .tabs button:hover { background: none; color: var(--ink); }
  .tabs button.on { background: var(--acc-soft); color: var(--acc-ink); }
  .top__out { margin-left: auto; }
  .wrap { padding: 16px 16px 40px; gap: 14px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .hero h2 { font-size: 22px; }
  .hero__ring { justify-content: start; grid-auto-flow: column; gap: 12px; align-items: center; text-align: left; }
  .hero__ring svg { width: 76px; height: 76px; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .card__head > .btn { width: 100%; }
  .kpi b { font-size: 23px; }
  .toast { bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
