/* Cipron Bank. The flat cipron.cz look: white, near-black text, one blue, bordered cards. No gradients, shadows or tints. */
:root {
  --background: #ffffff;
  --foreground: #0b1220;
  --muted: #f4f6f8;
  --muted-foreground: #5b6472;
  --border: #e3e7ec;
  --border-strong: #c9d0d9;
  --primary: #1f4fff;
  --primary-foreground: #ffffff;
  --positive: #0a7a3d;
  --negative: #b42318;
  --radius: 12px;
  --radius-lg: 20px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--background); color: var(--foreground); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 1, "cv11" 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 4px; font-weight: 650; letter-spacing: -0.015em; }
h2 { font-size: 16px; margin: 0 0 14px; font-weight: 650; letter-spacing: -0.005em; }
h3 { font-size: 12px; margin: 0 0 10px; font-weight: 650; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; }
p { margin: 0 0 12px; }
ul { margin: 0; padding-left: 18px; }
li + li { margin-top: 6px; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 1px 5px; }
.muted { color: var(--muted-foreground); }
.error, .negative { color: var(--negative); }
.positive { color: var(--positive); }
.mono { font-family: var(--mono); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.right { text-align: right; }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.icon { flex: none; }

/* Shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--border); padding: 18px 14px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; background: var(--background); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 650; font-size: 15px; color: var(--foreground); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.side .group { margin: 16px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-foreground); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--radius); color: var(--foreground); font-weight: 500; }
.nav:hover { background: var(--muted); text-decoration: none; }
.nav[aria-current="page"] { background: var(--muted); border: 1px solid var(--border); padding: 7px 9px; font-weight: 600; }
.nav .badge { margin-left: auto; min-width: 20px; padding: 0 6px; border: 1px solid var(--primary); color: var(--primary); border-radius: 999px; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.side .spacer { flex: 1; min-height: 12px; }
.me { border-top: 1px solid var(--border); padding: 12px 6px 2px; margin-top: 8px; display: flex; gap: 10px; align-items: center; }
.me .who { min-width: 0; }
.me strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: var(--muted-foreground); }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 650; font-size: 12px; flex: none; background: var(--background); }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 36px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--background); z-index: 5; }
.topbar .search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 12px; color: var(--muted-foreground); background: var(--background); cursor: text; font: inherit; text-align: left; width: 100%; }
.topbar .search:hover { border-color: var(--border-strong); }
.topbar kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: var(--muted-foreground); }
.topbar .menu { display: none; }
.main { padding: 28px 36px 72px; max-width: 1240px; width: 100%; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--muted-foreground); font-size: 13px; margin-bottom: 8px; }
.crumbs a { color: var(--muted-foreground); }

/* Cards and layout */
.card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; background: var(--background); margin-bottom: 16px; }
.card > :last-child { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 480px; margin: 12vh auto 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.grid { margin-bottom: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.split > .card { margin-bottom: 0; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: 8px; }
.row.gap-lg { gap: 36px; }
.pad-head { padding: 20px 22px 0; }
.pad { padding: 0 22px 22px; }
.w-sm { max-width: 220px; }
.w-md { max-width: 360px; }
.w-auto { width: auto; }
.stack > * + * { margin-top: 14px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted-foreground); }
.kv dd { margin: 0; word-break: break-word; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { color: var(--muted-foreground); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted-foreground); font-size: 13px; }
a.card-link { color: inherit; display: block; }
a.card-link:hover { text-decoration: none; border-color: var(--primary); }
.card.hover:hover { border-color: var(--primary); }

/* Accounts */
.account-card { cursor: pointer; display: flex; flex-direction: column; gap: 8px; }
.account-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.account-card .name { font-weight: 650; font-size: 15px; }
.account-card .big { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.account-card .foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.spark { width: 120px; height: 32px; flex: none; }
.spark .line, .chart .line { stroke: var(--primary); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart { width: 100%; height: 140px; display: block; }
.chart .area { fill: var(--primary); opacity: 0.07; }
.chart .dot { fill: var(--primary); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted-foreground); font-size: 12px; margin-top: 6px; gap: 8px; }

/* Forms */
label { display: block; font-weight: 550; margin-bottom: 5px; }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12.5px; color: var(--muted-foreground); margin-top: 5px; }
input, select, textarea { width: 100%; font: inherit; color: inherit; background: var(--background); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px 12px; min-height: 42px; }
textarea { min-height: 84px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input::placeholder { color: #98a1ae; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
input[readonly] { background: var(--muted); }
.cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.inline { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 0; }
.input-ok { border-color: var(--positive); }
.input-bad { border-color: var(--negative); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; margin: 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track { width: 38px; height: 22px; border: 1px solid var(--border-strong); border-radius: 999px; position: relative; flex: none; background: var(--background); }
.toggle .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--border-strong); }
.toggle input:checked + .track { border-color: var(--primary); }
.toggle input:checked + .track::after { background: var(--primary); left: 18px; }
.toggle input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Buttons */
.button, button { font: inherit; font-weight: 600; border-radius: var(--radius); padding: 0 16px; min-height: 40px; border: 1px solid var(--border-strong); background: var(--background); color: var(--foreground); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.button:hover, button:hover { border-color: var(--foreground); text-decoration: none; }
.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.primary:hover { border-color: var(--foreground); }
.danger { color: var(--negative); border-color: var(--negative); }
.danger:hover { border-color: var(--negative); background: var(--background); }
button:disabled, .button[disabled] { opacity: 0.5; cursor: not-allowed; border-color: var(--border-strong); }
.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.wide-button { width: 100%; }
.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; border: 0; }
.icon-button { border: 0; background: none; min-height: 34px; width: 34px; padding: 0; border-radius: 50%; }
.icon-button:hover { background: var(--muted); border: 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted-foreground); margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* Tables */
.table-wrap { overflow-x: auto; }
.card.flush th:first-child, .card.flush td:first-child { padding-left: 22px; }
.card.flush th:last-child, .card.flush td:last-child { padding-right: 22px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--muted); }
th.num { text-align: right; }
.empty { padding: 36px 14px; text-align: center; color: var(--muted-foreground); }
.sub { color: var(--muted-foreground); font-size: 12.5px; }

/* Lists */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.list li:last-child { border-bottom: 0; }
.list .what { min-width: 0; }
.list .what > div { overflow: hidden; text-overflow: ellipsis; }

/* Chips, tabs, banners */
.chip { display: inline-block; border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 20px; }
.chip.ok { color: var(--positive); border-color: var(--positive); }
.chip.bad { color: var(--negative); border-color: var(--negative); }
.chip.wait { color: var(--primary); border-color: var(--primary); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 18px 0; flex-wrap: wrap; }
.tab { padding: 10px 14px; font-weight: 600; color: var(--muted-foreground); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; background: none; border-radius: 0; min-height: 0; }
.tab:hover { color: var(--foreground); border-bottom-color: var(--border-strong); }
.tab.active { color: var(--foreground); border-bottom-color: var(--primary); }
.tab .count { margin-left: 6px; color: var(--primary); }
.segments { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 3px; gap: 2px; flex-wrap: wrap; }
.segments button { border: 0; min-height: 32px; border-radius: 9px; padding: 0 14px; color: var(--muted-foreground); }
.segments button:hover { color: var(--foreground); }
.segments button.active { background: var(--foreground); color: var(--background); }
.banner { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.warn { border-color: var(--foreground); }
.banner.bad { border-color: var(--negative); color: var(--negative); }
.banner.ok { border-color: var(--positive); color: var(--positive); }
.banner.note { border-style: dashed; }

/* Steps */
.steps { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-weight: 600; }
.step .n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.step.active { color: var(--foreground); }
.step.active .n { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.step.done .n { background: var(--foreground); border-color: var(--foreground); color: var(--background); }
.step + .step::before { content: ""; width: 24px; border-top: 1px solid var(--border-strong); margin-right: 8px; }

/* Cards (payment cards) */
.pcard { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 22px; min-height: 178px; background: var(--background); }
.pcard.blocked { border-style: dashed; color: var(--muted-foreground); }
.pcard .top { display: flex; justify-content: space-between; align-items: center; }
.pcard .pan { font-family: var(--mono); font-size: 18px; letter-spacing: 0.06em; }
.pcard .bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pcard .chipmark { width: 34px; height: 26px; border: 1px solid var(--border-strong); border-radius: 6px; }

/* Modal, toast, palette */
.overlay { position: fixed; inset: 0; background: rgba(11, 18, 32, 0.5); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; overflow-y: auto; z-index: 30; }
.modal { background: var(--background); border-radius: var(--radius-lg); border: 1px solid var(--border-strong); width: 100%; max-width: 580px; padding: 24px; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: calc(100vw - 40px); }
.toast { background: var(--foreground); color: var(--background); border-radius: var(--radius); padding: 11px 16px; max-width: 400px; font-weight: 500; cursor: pointer; }
.toast.bad { background: var(--negative); }
.palette { max-width: 560px; padding: 0; overflow: hidden; }
.palette input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; min-height: 52px; padding: 0 18px; font-size: 16px; }
.palette input:focus-visible { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li { margin: 0; }
.palette li a, .palette li button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--foreground); border: 0; justify-content: flex-start; font-weight: 500; }
.palette li a:hover, .palette li.sel a, .palette li.sel button { background: var(--muted); text-decoration: none; }

/* Misc */
.skeleton { padding: 8px 0; }
.skeleton .bar { height: 14px; background: var(--muted); border-radius: 7px; margin: 12px 0; width: 70%; }
.skeleton .bar.wide { width: 100%; }
.skeleton .bar.short { width: 40%; }
.secret { font-family: var(--mono); font-size: 17px; letter-spacing: 0.1em; word-break: break-all; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--muted); }
.qr { width: 220px; height: 220px; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px; background: #fff; }
.code-box { font-size: 22px; letter-spacing: 0.35em; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--mono); }
pre.snippet { background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; overflow-x: auto; margin: 0 0 12px; font-size: 12.5px; font-family: var(--mono); }
.people { display: grid; gap: 8px; margin-top: 16px; }
.person { width: 100%; justify-content: space-between; text-align: left; padding: 12px 14px; min-height: 52px; }
.person span { color: var(--muted-foreground); font-weight: 500; font-size: 12px; }
body.plain { display: flex; justify-content: center; align-items: flex-start; }
.proof { margin-top: 8px; }
.meter { height: 8px; border-radius: 4px; background: var(--muted); border: 1px solid var(--border); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: none; }
  .side.open { transform: none; border-right: 1px solid var(--border-strong); }
  .topbar { padding: 10px 16px; }
  .topbar .menu { display: inline-flex; }
  .main { padding: 20px 16px 64px; }
  .split { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .grid.two { grid-template-columns: 1fr; }
  th, td { padding: 10px 8px; }
  .modal { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.spacer-sm { height: 14px; }
.pad-top { margin-top: 14px; }

.positive-alert { color: var(--primary); }
