:root {
  color-scheme: light;
  --ink: #18253a;
  --muted: #4e5d71;
  --quiet: #667589;
  --canvas: #f4f6fa;
  --paper: #fff;
  --line: #dce3ec;
  --input-line: #a6b2c2;
  --rail: #152237;
  --rail-ink: #c8d3e3;
  --blue: #184dc4;
  --blue-dark: #123d9d;
  --blue-soft: #eef3ff;
  --accent-light: #96b6ff;
  --danger: #a12732;
  --danger-soft: #fff1f2;
  --success: #176246;
  --success-soft: #eaf7f1;
  --warning: #79531e;
  --warning-soft: #f8f0df;
  --radius: 8px;
  --rail-width: 226px;
  --topbar: 67px;
  font: 15px/1.55 Geist, "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, h3, p, ul, dl { margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1:focus, main:focus { outline-offset: 6px; }
::selection { background: #d9e5ff; color: var(--ink); }

.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; z-index: 20; top: 12px; left: 12px; transform: translateY(-180%); padding: 8px 14px; background: var(--paper); border-radius: 5px; }
.skip:focus { transform: none; }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: var(--topbar); padding: 0 28px; background: var(--paper); border-bottom: 1px solid var(--line); gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; font-size: 17px; font-weight: 720; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; color: white; background: var(--blue); border-radius: 7px; }
.brand-mark svg { width: 19px; height: 19px; }
.topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-account { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; padding: 0 4px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 650; }
.top-account:hover { color: var(--blue); }
#account-name { max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-badge { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; font-weight: 730; }
.logout { border-left: 1px solid var(--line) !important; border-radius: 0 !important; }
.logout .icon { width: 17px; height: 17px; }
.button.menu-toggle { display: none; }

.layout { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar { display: flex; position: sticky; top: 0; flex-direction: column; justify-content: space-between; align-self: start; width: 100%; min-height: calc(100vh - var(--topbar)); padding: 26px 13px 18px; background: var(--rail); color: var(--rail-ink); }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 9px 13px; color: inherit; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 550; --icon-fill: var(--rail); }
.sidebar nav a:hover { background: #202f48; --icon-fill: #202f48; }
.sidebar nav a[aria-current] { color: white; font-weight: 680; background: #263957; --icon-fill: #263957; }
.sidebar nav a[aria-current]::before { content: ""; position: absolute; left: 0; height: 21px; width: 3px; background: var(--accent-light); border-radius: 0 3px 3px 0; }
.sidebar nav a[aria-current] .icon { color: #b7cbff; }
.sidebar a:focus-visible { outline-color: var(--accent-light); }
.sidebar-foot { display: flex; align-items: center; gap: 9px; margin: 27px 6px 0; padding: 19px 8px 2px; border-top: 1px solid #30405a; font-size: 12px; }
.private-dot { display: inline-block; width: 7px; height: 7px; border: 1px solid #a7b8d1; border-radius: 50%; }

.content { width: 100%; max-width: 1376px; justify-self: center; min-width: 0; padding: clamp(25px, 4vw, 58px) clamp(20px, 4.25vw, 65px) 54px; }
.content > .notice { margin-bottom: 16px; }
.boot { padding: 24px; color: var(--muted); }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 0 0 25px; }
.page-header > div { min-width: 0; }
.page-header h1, .entry-main h1 { margin: 0; font-size: clamp(32px, 4.15vw, 49px); line-height: 1.08; letter-spacing: -.052em; font-weight: 650; overflow-wrap: anywhere; }
#process-title { font-variant-numeric: tabular-nums; font-size: clamp(25px, 3.2vw, 42px); }
.date-label { margin-bottom: 5px; color: var(--muted); font-size: 13px; font-weight: 570; }
.date-label::first-letter { text-transform: capitalize; }
.description { color: var(--muted); line-height: 1.55; }
.page-header .description { margin-top: 8px; max-width: 64ch; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 640; line-height: 1.35; text-align: center; text-decoration: none; white-space: normal; }
.button .icon { width: 17px; height: 17px; }
.button.primary { color: white; background: var(--blue); border-color: var(--blue); }
.button.primary:not(:disabled):hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.secondary { background: var(--paper); border-color: var(--input-line); }
.button.secondary:not(:disabled):hover, .button.quiet:not(:disabled):hover { color: var(--blue-dark); background: var(--blue-soft); }
.button.danger { color: var(--danger); border-color: #c6a0a5; background: var(--paper); }
.button.danger:not(:disabled):hover { background: var(--danger-soft); }
.text-link, .back-link { display: inline-flex; align-items: center; min-height: 44px; gap: 4px; color: var(--blue-dark); font-size: 13px; font-weight: 630; text-decoration: none; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.text-link .icon, .back-link .icon { width: 15px; height: 15px; }
.back-link { margin: -7px 0 9px; gap: 7px; }

.dashboard-grid, .detail-grid, .settings-grid, .composer { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.dashboard-grid { align-items: stretch; }
.dashboard-grid > .panel { display: flex; flex-direction: column; }
.dashboard-grid .panel-content { flex: 1; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 21px 16px; border-bottom: 1px solid var(--line); }
.panel-header h2 { font-size: 16px; font-weight: 700; letter-spacing: -.024em; }
.panel-icon { color: var(--quiet); }
.panel-content { min-width: 0; padding: 17px 21px 20px; overflow-wrap: anywhere; }
.panel-content > .description + .button { margin-top: 14px; }
.panel-footer { border-top: 1px solid var(--line); padding: 1px 21px; }
.panel-filter { justify-content: start; }
.panel-filter .field { width: min(100%, 390px); }
.empty { display: flex; align-items: flex-start; gap: 13px; padding: 9px 0; }
.empty-symbol { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border: 1px solid #e0e8f8; border-radius: 6px; background: #f3f6fc; color: #405c85; }
.empty-symbol .icon { width: 19px; height: 19px; }
.empty strong { font-size: 14px; font-weight: 690; }
.empty .description { margin-top: 3px; font-size: 13px; }
.agenda-panel .empty { min-height: 100px; align-items: center; }
.muted, .hint { color: var(--muted); font-size: 13px; line-height: 1.5; }

.items { list-style: none; padding: 0; }
.items > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 10px 0; color: inherit; text-decoration: none; }
a.row:hover .row-title { color: var(--blue-dark); text-decoration: underline; }
.row-text { min-width: 0; }
.row-title { display: block; color: var(--ink); font-size: 14px; font-weight: 690; line-height: 1.45; }
.row-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.source-id { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.source-id code { font-size: .92em; }
.row-action { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; margin-left: auto; }
.row-action > .icon { width: 15px; height: 15px; color: var(--quiet); }
.row-action .button { font-size: 13px; }
.numeric { font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 3px 8px; border-radius: 4px; background: #edf1f6; color: #37475c; font-size: 12px; font-weight: 640; line-height: 1.4; }
.pill.good { background: var(--success-soft); color: var(--success); }
.pill.busy { background: var(--blue-soft); color: var(--blue-dark); }
.pill.warn { background: var(--warning-soft); color: var(--warning); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.collector-details { display: grid; align-items: start; justify-items: start; gap: 8px; }
.collector-details .description { font-size: 13px; }
.key-values { display: grid; grid-template-columns: minmax(90px, min(32%, 160px)) minmax(0, 1fr); gap: 7px 10px; }
.key-values dt { color: var(--muted); font-size: 13px; }
.key-values dd { min-width: 0; margin: 0; font-weight: 590; }
.detail-stack { display: grid; min-width: 0; gap: 16px; }
.plain-text { max-width: 84ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.plain-text h3 { margin-bottom: 5px; font-size: 15px; }
.plain-text + .plain-text { margin-top: 17px; }
.pending-list { padding-inline-start: 22px; }
.download-actions { display: grid; gap: 9px; margin-top: 18px; }
.inline-link { display: inline-flex; align-items: center; min-height: 44px; }
.narrow { max-width: 740px; }

.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; color: var(--ink); font-size: 14px; font-weight: 630; }
.field .hint { font-weight: 400; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--input-line); border-radius: 5px; color: var(--ink); background: var(--paper); font-size: max(16px, 1em); font-weight: 400; }
input[type="file"] { max-width: 100%; padding: 4px; background: #f9fafc; }
input[type="file"]::file-selector-button { margin-right: 9px; padding: 7px 9px; border: 0; border-radius: 4px; color: var(--blue-dark); background: var(--blue-soft); font: inherit; cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: 0 0 auto; }
textarea { resize: vertical; }
::placeholder { color: var(--quiet); opacity: 1; }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { padding: 0; margin-bottom: 6px; font-weight: 690; }
.fee-fields { display: grid; gap: 12px; padding: 13px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 6px; }
.fee-fields legend { padding: 0 4px; }
.fee-prefill { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.fee-prefill .button { font-size: 13px; }
.material-option { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 0; }
.material-option + .material-option { border-top: 1px solid var(--line); }
.source-count { padding: 7px 9px; color: var(--blue-dark); background: var(--blue-soft); border-radius: 4px; font-weight: 650; }
.source-search { margin-bottom: 9px; }
.picker-list { max-height: 320px; overflow: auto; scrollbar-gutter: stable; }
.source-group { margin-top: 9px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; }
.source-group h3 { font-size: 13px; }
.job-pages { display: flex; align-items: start; flex-direction: column; gap: 10px; padding-block: 13px; }
.form-submit { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 18px; padding-top: 5px; }
.form-submit .hint { flex: 1 1 185px; }
.composer-submit { grid-column: 1 / -1; }
.composer-submit .form-submit { padding: 0; }
.notice { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 6px; background: #f0f4fc; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.notice.error { border-color: #ebc0c4; background: var(--danger-soft); color: var(--danger); }
.notice.success { border-color: #b9decd; background: var(--success-soft); color: var(--success); }
.process-origin { margin-bottom: 16px; }

.provider + .provider { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.provider > .row { padding: 0; }
.provider h3 { font-size: 16px; }
.provider .hint { margin-top: 5px; }
.provider .actions { margin-top: 10px; }
.connection-flow { display: grid; gap: 9px; padding: 12px; margin-top: 10px; background: #f6f8fc; border: 1px solid var(--line); border-radius: 6px; }
.connection-flow .actions { margin: 0; }
.connection-flow code { display: inline-block; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 720; letter-spacing: .045em; }
.flow-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.flow-form .field { flex: 1 1 195px; }
.settings-connections { grid-row: span 3; }
.settings-professional { grid-column: 1 / -1; }
.profile-banking { padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; }
.profile-banking summary { min-height: 44px; align-content: center; font-weight: 640; cursor: pointer; }
.profile-banking[open] { padding-bottom: 12px; }
.profile-fees { padding-top: 4px; }
.profile-fees .hint { margin-bottom: 9px; }
.fee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }

.entry { display: grid; grid-template-columns: minmax(300px, 42fr) minmax(420px, 58fr); min-height: 100vh; background: var(--paper); }
.entry-aside { display: flex; flex-direction: column; align-items: start; justify-content: space-between; min-width: 0; gap: 38px; padding: 35px clamp(29px, 5.7vw, 94px); background: var(--rail); color: white; }
.entry-aside .brand-mark { background: #4f78d7; color: white; }
.entry-aside-text { max-width: 385px; }
.technical-line { display: block; width: 46px; height: 3px; margin-bottom: 26px; background: var(--accent-light); }
.entry-aside-text p { margin-bottom: 19px; font-size: clamp(34px, 5.25vw, 74px); font-weight: 570; line-height: 1.02; letter-spacing: -.057em; }
.entry-aside-text > span:last-child { display: block; color: var(--rail-ink); font-size: 16px; }
.entry-footnote { width: 100%; padding-top: 17px; border-top: 1px solid #43516a; color: var(--rail-ink); font-size: 13px; }
.entry-main { display: flex; align-items: center; justify-content: center; padding: clamp(26px, 7vw, 95px); }
.entry-inner { width: min(100%, 404px); }
.entry-main h1 { font-size: clamp(31px, 4vw, 43px); }
.entry-main .description { margin: 9px 0 27px; }
.entry-main .notice { margin-bottom: 17px; }
.entry-submit { margin-top: 3px; }
.entry-back > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.entry-back { margin-top: 14px; }
.password-wrap { display: flex; align-items: center; gap: 5px; }
.password-toggle { flex: 0 0 auto; min-width: 82px; padding-inline: 8px; color: var(--blue-dark); font-size: 12px; }

@media (max-width: 1090px) {
  :root { --rail-width: 197px; }
  .content { padding-inline: 28px; }
  .page-header { align-items: start; }
  .composer, .detail-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
}

@media (max-width: 840px) {
  .detail-grid, .composer { grid-template-columns: minmax(0, 1fr); }
  .settings-grid, .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dashboard-grid .agenda-panel { grid-column: 1 / -1; }
  .settings-connections { grid-row: auto; grid-column: 1 / -1; }
  .page-header .actions { justify-content: flex-end; }
}

@media (max-width: 670px) {
  .topbar { min-height: 61px; padding: 0 13px 0 16px; }
  .topbar-right { gap: 3px; }
  .top-account { justify-content: center; min-width: 44px; padding-inline: 5px; }
  #account-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .logout { padding-inline: 8px; }
  .logout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .topbar .button { min-width: 44px; }
  .button.menu-toggle { display: inline-flex; padding-inline: 8px; }
  .menu-toggle .icon { width: 21px; height: 21px; }
  .layout { display: block; min-height: calc(100vh - 61px); }
  .sidebar { display: none; position: static; min-height: 0; padding: 10px 13px; }
  .sidebar.is-open { display: block; }
  .sidebar-foot { display: none; }
  .content { padding: 23px 15px 34px; }
  .page-header { flex-wrap: wrap; align-items: start; margin-bottom: 18px; }
  .page-header .actions { justify-content: start; }
  .dashboard-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-header, .panel-content, .panel-footer { padding-inline: 16px; }
  .panel-header { padding-block: 13px; }
  .panel-content { padding-block: 14px; }
  .entry { display: block; }
  .entry-aside { padding: 11px 20px; }
  .entry-aside-text, .entry-footnote { display: none; }
  .entry-main { padding: 47px 20px; }
}

@media (max-width: 405px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .row-action .numeric { white-space: normal; }
  .row-action .button { padding-inline: 8px; }
}
