:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 100%;
  color: #17273c;
  background: #f3f5f7;
  --ink: #17273c;
  --muted: #526379;
  --border: #d3dae2;
  --accent: #204e8c;
  --navy: #172d48;
  --radius: 18px;
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh }
button, input, select { font: inherit }
a { color: #235088; text-underline-offset: .2em }
button, select { cursor: pointer }
button, .button {
  background: var(--navy); color: #fff; border: 1px solid var(--navy);
  min-height: 44px; padding: .68rem 1.05rem; border-radius: 9px;
  font-weight: 650; font-size: .94rem; line-height: 1.3;
}
button:hover, .button:hover { background: #294766 }
button:disabled, button:disabled:hover { cursor: wait; opacity: .6 }
button.secondary, a.secondary { color: var(--ink); background: #fff; border-color: #bdc9d6 }
button.secondary:hover, a.secondary:hover { background: #edf1f6 }
button.quiet { color: var(--accent); background: transparent; border-color: transparent; padding-inline: .5rem }
button.quiet:hover { background: #e7edf4 }
button.small { font-size: .86rem; padding: .47rem .76rem; min-height: 38px }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #4779c5; outline-offset: 3px }
.skip { position: absolute; z-index: 20; left: 12px; top: -90px; padding: .8rem 1.1rem; background: white; border-radius: 5px }
.skip:focus { top: 8px }
#content:focus { outline: none }
h1, h2, h3, p { margin: 0 }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.14 }
h1 { font-size: clamp(2.1rem, 3.8vw, 3.15rem); font-weight: 650 }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.85rem); font-weight: 650 }
h3 { font-size: 1.15rem; font-weight: 650 }
p { line-height: 1.55 }
.brand { display: inline-flex; align-items: baseline; font-size: 1.85rem; letter-spacing: -.095em; font-weight: 740; line-height: 1; color: var(--navy) }
.brand span { color: #568a8d; margin-left: .025em }
.loading { min-height: 75vh; display: grid; align-content: center; justify-items: center; gap: 1rem }
.loading p, .muted, .hint, .caption { color: var(--muted) }
.hint { font-size: .91rem }
.caption { font-size: .8rem; letter-spacing: .01em }
.auth { min-height: 100vh; min-height: 100dvh; padding: 1.5rem; display: grid; place-items: center; background: #fff }
.auth-form { width: min(100%, 22rem) }
.employee-notice { margin-top: 1rem; text-align: center }
.mode { display: inline-flex; font-size: .81rem; font-weight: 620; line-height: 1.25; color: #385660; border: 1px solid #c9d9db; background: #eef4f3; border-radius: 20px; padding: .34rem .68rem; white-space: nowrap }
form { display: grid; gap: 1.05rem }
label, legend { display: grid; gap: .45rem; line-height: 1.35; font-size: .94rem; font-weight: 620 }
input, select { min-width: 0; width: 100%; min-height: 46px; color: var(--ink); background: #fff; border: 1px solid #acbac9; border-radius: 8px; padding: .7rem .8rem; font-weight: 400 }
input:focus, select:focus { border-color: #537cac }
input::placeholder { color: #6a788b }
select { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, #526379 50%),linear-gradient(135deg,#526379 50%,transparent 50%); background-position: calc(100% - 1rem) 53%,calc(100% - .72rem) 53%; background-size: .29rem .29rem; background-repeat: no-repeat }
.form-error { color: #942921; font-size: .92rem; white-space: normal }
.form-error:empty { display: none }
.top { background: #fff; border-bottom: 1px solid var(--border) }
.bar, .workspace { width: min(100% - 3rem, 1112px); margin-inline: auto }
.bar { min-height: 75px; display: flex; align-items: center; gap: 1.2rem; justify-content: space-between }
.identity, .brand-group { display: flex; align-items: center; gap: 1rem; min-width: 0 }
.identity .email { overflow-wrap: anywhere; font-size: .91rem; color: var(--muted) }
.workspace { padding: clamp(2rem,5vw,4rem) 0 5rem }
.page-title, .section-head, .row, .action-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem }
.page-title { margin-bottom: 1.65rem; align-items: flex-end }
.page-title p { margin-bottom: .45rem; color: var(--muted); font-size: .95rem }
.client-bar {
  display: grid; grid-template-columns: auto minmax(max-content,1fr) auto minmax(0,auto);
  grid-template-areas: "brand nav balances identity"; gap: clamp(1rem, 3vw, 2.5rem); min-height: 76px;
}
.client-bar .brand-group { grid-area: brand }
.client-bar .account-nav { grid-area: nav }
.client-bar .identity { grid-area: identity; justify-self: end; padding-left: 1.25rem; border-left: 1px solid var(--border) }
.client-bar .email { max-width: 16rem }
.account-balances { grid-area: balances; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.25rem; margin: 0 }
.account-balances dt { color: var(--muted); font-size: .875rem; line-height: 1.4 }
.account-balances dd { margin: .15rem 0 0; font-size: 1.125rem; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
section.block { margin-top: 2.15rem }
.section-head { margin-bottom: .85rem }
.section-head h2 { margin: 0 }
.client-workspace { padding-top: clamp(1.5rem, 3vw, 2.5rem); --radius: 12px }
.client-workspace h1 { font-size: clamp(1.75rem, 3vw, 2.2rem) }
.client-workspace h2 { font-size: clamp(1.35rem, 2vw, 1.65rem) }
.cards-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1.25rem }
.cards-toolbar h1 { margin-right: auto }
.cards-tools, .card-filter { display: flex; align-items: center; gap: .5rem }
.card-filter { color: var(--muted); font-weight: 500 }
.card-filter select { width: auto; min-height: 44px; padding-block: .5rem }
.cards-section > .block { margin: 0 0 1.25rem }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden }
.empty { padding: clamp(1.4rem,3vw,2rem); color: var(--muted) }
.empty strong { display: block; color: var(--ink); margin-bottom: .25rem; font-size: 1.04rem }
.card-row, .card-columns {
  display: grid; grid-template-columns: minmax(0,1fr) 7.5rem 7rem minmax(35rem,2.7fr);
  gap: 1rem; align-items: center; padding-inline: 1.25rem;
}
.card-columns { padding-block: .65rem; background: #f7f9fa; color: var(--muted); border-bottom: 1px solid var(--border); font-size: .875rem; font-weight: 550 }
.card-row { padding-block: 1.05rem }
.card-balance .caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }
.card-row + .card-row { border-top: 1px solid var(--border) }
.card-row h3 { overflow-wrap: anywhere; margin-bottom: .2rem }
.card-row h3 a { text-decoration: none; color: var(--ink) }
.card-row h3 a:hover, .card-row h3 a:focus-visible { text-decoration: underline; color: var(--accent) }
.card-row .status { justify-self: start }
.card-row .amount { font-size: 1.15rem; font-variant-numeric: tabular-nums }
.card-brand { display: flex; align-items: center; gap: .75rem; min-width: 0 }
.card-icon { flex: 0 0 46px; height: 31px; border-radius: 5px; background: repeating-radial-gradient(ellipse at 120% -175%, transparent 0 3px,#88a6bb99 4px,transparent 5px),#385c83 }
.card-icon.single { background-color: #608582 }
.status { flex: 0 0 auto; font-size: .8rem; font-weight: 620; padding: .26rem .55rem; background: #e8ecf1; color: #48576a; border-radius: 20px }
.status.active { color: #236043; background: #e1f1e7 }
.amount { font-size: 1.65rem; font-weight: 650; letter-spacing: -.045em; overflow-wrap: anywhere }
.card-actions { display: flex; flex-wrap: wrap; gap: .4rem }
.card-row .card-actions { display: grid; grid-template-columns: 1.32fr .84fr 1.18fr 1.04fr; gap: .35rem }
.card-row .card-actions button { padding: .45rem .35rem; line-height: 1.25; white-space: nowrap }
.card-row [data-action="details"] { color: var(--navy); background: #eaf0f6; border-color: #eaf0f6 }
.card-row [data-action="details"]:hover { background: #dae5ef }
.card-row [data-action="freeze"], .card-row [data-action="unfreeze"] { grid-column: 4 }
.account-card .card-actions { padding-top: .9rem; border-top: 1px solid #e3e8ed }
.line { padding: 1rem 1.25rem; gap: 1rem; display: flex; align-items: center; justify-content: space-between; min-width: 0 }
.line + .line { border-top: 1px solid #e3e8ed }
.line > div { min-width: 0; overflow-wrap: anywhere }
.line .title { font-weight: 620 }
.line .data { margin-top: .2rem; font-size: .86rem; color: var(--muted) }
.line .right { text-align: right }
.line .positive { color: #256548 }
.operator-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr) }
.tool { text-align: left; background: #fff; color: var(--ink); padding: 1.3rem 1.4rem; border: 1px solid var(--border); border-radius: var(--radius) }
.tool:hover { background: #edf4f6; border-color: #aebfcd }
.tool strong { display: block; font-size: 1.16rem; margin-bottom: .35rem; letter-spacing: -.02em }
.tool span { color: var(--muted); font-size: .9rem; font-weight: 400 }
.pending { border-color: #cdbf9a; background: #fffcf5 }
dialog { width: min(95vw, 460px); max-height: 90dvh; overflow-y: auto; margin: auto; border-radius: var(--radius); border: 1px solid var(--border); color: var(--ink); background: #fff; padding: clamp(1.2rem,3.8vw,2rem) }
dialog::backdrop { background: #0e2138a6 }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; margin-bottom: 1.2rem }
.dialog-head h2 { margin-top: .25rem }
.close { min-height: 36px; width: 36px; flex: 0 0 36px; padding: 0; font-size: 1.55rem; line-height: 1; background: #edf1f5; color: var(--ink); border: 0 }
.close:hover { background: #dee6ec }
.review { background: #eff3f6; padding: .85rem 1rem; border-radius: 9px; display: grid; gap: .3rem; font-size: .91rem; line-height: 1.45 }
.review strong { font-weight: 650 }
.review .row { align-items: baseline }
.client-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem }
#notice:not(:empty) { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 8; width: max-content; max-width: calc(100% - 2rem); background: #152840; border-radius: .8rem; color: white; padding: .85rem 1.15rem; box-shadow: 0 .5rem 2rem #172d4826; font-size: .95rem }
@media(max-width: 66rem) {
  .card-columns { display: none }
  .card-row { grid-template-columns: minmax(0,1fr) 8rem minmax(8rem,auto); row-gap: .85rem }
  .card-balance .caption { position: static; width: auto; height: auto; overflow: visible; clip-path: none }
  .card-balance { text-align: right }
  .card-row .card-actions { grid-column: 1 / -1; width: min(100%,34rem) }
  .card-row .card-actions button { white-space: normal }
}
@media(max-width: 760px) {
  .bar, .workspace { width: min(100% - 2rem,1112px) }
  .bar:not(:has(.account-nav)) .identity .email { display: none }
  .bar { min-height: 65px; gap: .5rem }
  .brand-group { gap: .6rem }
  .client-line, .client-line .right { flex-wrap: wrap; text-align: left }
  .client-row-actions { justify-content: flex-start }
  .cards-toolbar { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .85rem }
  .card-filter { grid-column: 1 / -1; grid-row: 2 }
  .cards-tools { grid-column: 2; grid-row: 1 }
}
@media(max-width: 480px) {
  .operator-grid { grid-template-columns: 1fr }
  .page-title { align-items: flex-start }
  .line { padding: .85rem; gap: .5rem }
  .card-row { grid-template-columns: minmax(0,1fr) minmax(0,auto); gap: .55rem; padding: 1rem }
  .card-row .status { grid-column: 1 }
  .card-balance { grid-column: 2; grid-row: 1 / 3; max-width: 8rem }
  .card-row .card-icon { display: none }
  .cards-toolbar { grid-template-columns: 1fr }
  .cards-tools { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: minmax(0,1fr) auto }
  .card-filter { grid-row: 3 }
  .card-row .card-actions { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr }
  .card-row [data-action="freeze"], .card-row [data-action="unfreeze"] { grid-column: auto }
  .mode { font-size: .75rem; padding-inline: .5rem }
  .identity button { padding-inline: .3rem }
}
@media(prefers-reduced-motion:no-preference) { dialog[open] { animation: enter .15s ease-out } @keyframes enter { from { transform: translateY(5px); opacity: .6 } } }
.card-support { margin-top: .7rem; color: var(--muted); font-size: .94rem }
.close-consent[hidden] { display: none; }
.close-consent input { width: auto; min-height: 0; margin-right: .4rem; }
.pool { display: flex; flex-wrap: wrap; gap: 1.4rem 3.5rem; border-radius: var(--radius); background: #e9f1f3; padding: 1.4rem; margin-bottom: 1.2rem; }
.pool p { margin: 0 0 .4rem; }
.pool strong { font-size: 1.45rem; }
.account-nav, .page-actions, .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.2rem }
.account-nav a { padding-block: .5rem; font-weight: 550; text-decoration: none }
.account-nav a:hover, .account-nav [aria-current="page"] { text-decoration: underline }
.back-to-cards { display: inline-block; margin-bottom: 1rem }
.page-title h1 { overflow-wrap: anywhere }
.page-actions { justify-content: flex-end; gap: .5rem }
.account-card { display: grid; gap: 1.1rem; padding: 1.3rem }
.account-card > .row { justify-content: flex-start }
.transaction-scroll { overflow-x: auto }
.transactions { border-collapse: collapse; width: 100%; font-size: .94rem }
.transactions th, .transactions td { text-align: left; vertical-align: top; padding: .8rem 1rem; border-bottom: 1px solid var(--border) }
.transactions th { color: var(--muted); font-size: .86rem; background: #f7f9fa }
.transactions tbody tr:last-child td { border-bottom: 0 }
.transactions time, .transactions td.numeric { white-space: nowrap; font-variant-numeric: tabular-nums }
.transactions .numeric { text-align: right }
.transactions td:not(.numeric) { overflow-wrap: anywhere; min-width: 7rem }
.transactions td:nth-child(2) { min-width: 12rem }
.pagination { justify-content: center; margin-top: 1.2rem }
.history-warning { margin-bottom: 1rem; color: #80591f }
.card-details { margin: 0 }
.card-details dt { font-size: .9rem; color: var(--muted) }
.card-details dd { margin: .25rem 0 1rem; font-size: 1.25rem; font-variant-numeric: tabular-nums }
@media(max-width: 960px) {
  .client-bar {
    grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand identity" "nav balances";
    gap: .75rem 1rem; padding-block: .875rem;
  }
  .client-bar .identity { border: 0; padding: 0 }
}
@media(max-width: 760px) {
  .page-title:has(.page-actions) { flex-wrap: wrap; gap: .9rem }
}
@media(max-width: 580px) {
  .client-bar { grid-template-columns: minmax(0,1fr) minmax(0,auto); grid-template-areas: "brand identity" "balances balances" "nav nav"; gap: .75rem }
  .client-bar .identity { gap: .5rem; max-width: min(60vw,16rem) }
  .account-balances { border-block: 1px solid var(--border); padding-block: .75rem }
}
