/* Tidewell Business Online (simulated system). One stylesheet, no build step, no web font: the system's own faces. */

:root {
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", "P052", Georgia, "DejaVu Serif", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Noto Sans Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --navy: #0c2533;
  --navy-2: #143546;
  --navy-line: #24495c;
  --on-navy: #e8eef1;
  --on-navy-2: #9fb6c2;
  --sand: #e9d9ae;

  --bg: #f3f1ec;
  --surface: #ffffff;
  --surface-2: #f8f6f1;
  --hover: #f5f2ea;
  --border: #e1ddd3;
  --border-2: #ece9e1;
  --border-strong: #c9c3b6;
  --text: #17242d;
  --text-2: #364650;
  --text-3: #66747c;
  --text-4: #97a2a8;

  --teal: #0f6e66;
  --teal-hover: #0b5d56;
  --teal-soft: #e7f2f0;
  --teal-text: #0c5f58;
  --focus: 0 0 0 3px rgba(15, 110, 102, .22);

  --credit: #0d6b3c;
  --debit: #17242d;

  /* status tones */
  --ok-bg: #e8f4ec;   --ok-fg: #1d6b3a;   --ok-bd: #b9dcc5;
  --warn-bg: #fdf4e1; --warn-fg: #8a5a00; --warn-bd: #ecd39a;
  --bad-bg: #fbecea;  --bad-fg: #a1281c;  --bad-bd: #eebdb6;
  --info-bg: #e9f1f8; --info-fg: #1f5584; --info-bd: #bcd3e8;
  --wait-bg: #f1edf8; --wait-fg: #563a8f; --wait-bd: #d5cbea;
  --off-bg: #f0eeea;  --off-fg: #5b666c;  --off-bd: #dcd8cf;

  --r: 4px;
  --r-lg: 6px;
  --shadow: 0 1px 2px rgba(23, 36, 45, .06);
  --page: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--sans);
       -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--teal-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; color: var(--text); }
p { margin: 0 0 12px; }
svg.i { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75;
        stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.credit { color: var(--credit); }

/* ---- header: the bank's band, then the navigation ------------------------------------------------------------- */

.band { background: var(--navy); color: var(--on-navy); border-bottom: 3px solid var(--teal); }
.band-in { max-width: var(--page); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 16px; }
.mark { display: flex; align-items: center; gap: 11px; color: var(--on-navy); flex: none; }
.mark:hover { text-decoration: none; }
.mark svg { width: 34px; height: 34px; flex: none; }
.mark .word { font: 600 22px/1 var(--serif); letter-spacing: .01em; }
.mark .sub { display: block; font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
             color: var(--on-navy-2); margin-top: 4px; }
.sim { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 3px; flex: none;
       border: 1px solid var(--sand); color: var(--sand); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; }
.sim svg { width: 13px; height: 13px; stroke-width: 2; }
.band .right { margin-left: auto; display: flex; align-items: center; gap: 18px; min-width: 0; }
.client { text-align: right; line-height: 1.25; min-width: 0; }
.client .co { font-weight: 600; font-size: 13px; white-space: nowrap; }
.client .who { font-size: 12px; color: var(--on-navy-2); white-space: nowrap; }
.band button.out { background: transparent; color: var(--on-navy); border-color: var(--navy-line); box-shadow: none; height: 32px; }
.band button.out:hover { background: var(--navy-2); color: #fff; }

.navbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.navbar-in { max-width: var(--page); margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.navbar a { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; color: var(--text-2);
            font-weight: 600; font-size: 13.5px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.navbar a svg { color: var(--text-4); }
.navbar a:hover { color: var(--text); text-decoration: none; background: var(--hover); }
.navbar a.on { color: var(--teal-text); border-bottom-color: var(--teal); }
.navbar a.on svg { color: var(--teal); }
.navbar .badge { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
                 background: var(--teal); color: #fff; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.navbar .end { margin-left: auto; }

main { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: 26px 24px 32px; }
.foot { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-3); font-size: 12px; }
.foot-in { max-width: var(--page); margin: 0 auto; padding: 14px 24px; display: flex; gap: 6px 18px; flex-wrap: wrap; }
.foot b { color: var(--text-2); letter-spacing: .08em; font-weight: 700; }
.foot .t { margin-left: auto; white-space: nowrap; }

/* ---- page head -------------------------------------------------------------------------------------------------- */

.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { font: 600 28px/1.2 var(--serif); letter-spacing: -.005em; }
.head .sub { color: var(--text-3); margin-top: 4px; }
.head .actions { margin-left: auto; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.back svg { width: 15px; height: 15px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h2.section { font: 600 18px/1.3 var(--serif); margin: 6px 0 12px; }

/* ---- panels ----------------------------------------------------------------------------------------------------- */

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow);
         margin-bottom: 20px; min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 48px; padding: 10px 18px;
              border-bottom: 1px solid var(--border); }
.panel-head h2 { font: 600 16px/1.3 var(--serif); }
.panel-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 18px; }
.panel-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border);
              background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.panel-foot .end { margin-left: auto; display: flex; gap: 8px; }
.grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.grid > * { min-width: 0; }

/* balances */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figures > div { padding: 16px 18px; border-right: 1px solid var(--border-2); }
.figures > div:last-child { border-right: 0; }
.figures .k { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.figures .v { font: 600 26px/1.25 var(--serif); font-variant-numeric: lining-nums tabular-nums; margin-top: 4px; white-space: nowrap; }
.figures .h { font-size: 12.5px; color: var(--text-3); }

.acct { display: flex; flex-direction: column; line-height: 1.35; }
.acct .n { font-weight: 650; color: var(--text); }
.acct .h { font-size: 12.5px; color: var(--text-3); }
.acct .no { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.big { font: 600 15.5px/1.3 var(--serif); font-variant-numeric: lining-nums tabular-nums; }

/* ---- tables ----------------------------------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3);
        background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #fcfbf8; }
.t th:first-child, .t td:first-child { padding-left: 18px; }
.t th:last-child, .t td:last-child { padding-right: 18px; }
.t th.num { text-align: right; }
.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border); }
.t .wrap { white-space: normal; min-width: 160px; }
.t td.sub, .t .sub { color: var(--text-3); font-size: 12.5px; }
.two { display: flex; flex-direction: column; line-height: 1.35; }
.two small { color: var(--text-3); font-size: 12px; }
.ref { font-weight: 650; white-space: nowrap; }
.empty { text-align: center; color: var(--text-3); padding: 30px 18px !important; }
.empty b { display: block; color: var(--text-2); margin-bottom: 2px; }

/* audit values */
.kv { font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--text-2); }
.kv span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.kv .k { display: inline; color: var(--text-3); }

/* ---- status chips ----------------------------------------------------------------------------------------------- */

.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px; border: 1px solid;
         font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.chip.uploaded { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd); }
.chip.pending_approval { background: var(--wait-bg); color: var(--wait-fg); border-color: var(--wait-bd); }
.chip.released { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd); }
.chip.settled { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); }
.chip.rejected { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-bd); }
.chip.deleted, .chip.pending { background: var(--off-bg); color: var(--off-fg); border-color: var(--off-bd); }
.type { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--text-2);
        background: var(--off-bg); border-radius: 3px; padding: 1px 6px; }

/* ---- facts ------------------------------------------------------------------------------------------------------ */

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 22px; margin: 0; }
.facts > div { min-width: 0; }
.facts dt { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }

/* ---- buttons and forms ------------------------------------------------------------------------------------------ */

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font: 600 13.5px/1 var(--sans); box-shadow: var(--shadow); cursor: pointer; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn.primary, button.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover, button.primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: #fff; }
.btn.danger, button.danger { color: var(--bad-fg); border-color: var(--bad-bd); }
.btn.danger:hover, button.danger:hover { background: var(--bad-bg); }
.btn.sm, button.sm { height: 30px; padding: 0 11px; font-size: 13px; }
form.inline { display: inline; }

input, select, textarea { font: 400 14px/1.4 var(--sans); color: var(--text); background: var(--surface);
                          border: 1px solid var(--border-strong); border-radius: var(--r); }
input, select { height: 36px; padding: 0 11px; }
textarea { padding: 8px 11px; width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus); }
input[type=file] { height: auto; padding: 10px; width: 100%; background: var(--surface-2); border-style: dashed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.help { font-size: 12.5px; color: var(--text-3); }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.toolbar .field { margin-bottom: 0; }
.toolbar input, .toolbar select { height: 32px; font-size: 13px; }

/* ---- tabs ------------------------------------------------------------------------------------------------------- */

.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px; color: var(--text-3); font-weight: 600;
          font-size: 13px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--navy); }
.tabs .n { font-size: 11.5px; color: var(--text-3); background: var(--off-bg); border-radius: 9px; padding: 0 7px; line-height: 18px;
           font-variant-numeric: tabular-nums; }

/* ---- messages --------------------------------------------------------------------------------------------------- */

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r); border: 1px solid;
         border-left-width: 4px; margin-bottom: 18px; font-weight: 500; }
.alert svg { margin-top: 1px; }
.alert.info { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-bd); border-left-color: var(--info-fg); }
.alert.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-bd); border-left-color: var(--ok-fg); }
.alert.error { background: var(--bad-bg); color: var(--bad-fg); border-color: var(--bad-bd); border-left-color: var(--bad-fg); }
.alert.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bd); border-left-color: var(--warn-fg); }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2);
        border: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.note svg { color: var(--teal); margin-top: 1px; }
.note b { color: var(--text); }
.cutoffs { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.cutoffs li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.cutoffs li:last-child { border-bottom: 0; }

/* ---- sign-in ---------------------------------------------------------------------------------------------------- */

.signin { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: var(--page); width: 100%;
          margin: 0 auto; padding: 48px 24px; gap: 48px; align-items: center; }
.signin .pitch h1 { font: 600 34px/1.2 var(--serif); margin-bottom: 12px; }
.signin .pitch p { color: var(--text-2); font-size: 15px; max-width: 460px; }
.signin .pitch ul { margin: 18px 0 0; padding: 0; list-style: none; color: var(--text-2); }
.signin .pitch li { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.signin .pitch li svg { color: var(--teal); }
.login-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--teal); border-radius: var(--r-lg);
              box-shadow: 0 6px 18px -8px rgba(12, 37, 51, .25); padding: 30px 32px; max-width: 420px; width: 100%; justify-self: end; }
.login-card h2 { font: 600 22px/1.3 var(--serif); margin-bottom: 4px; }
.login-card .sub { color: var(--text-3); margin-bottom: 20px; }
.login-card input { width: 100%; height: 40px; }
.login-card button { width: 100%; height: 42px; margin-top: 6px; }
.login-card .legal { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-2); font-size: 12px; color: var(--text-3); }
.code-input { letter-spacing: .35em; font-size: 20px !important; text-align: center; font-variant-numeric: tabular-nums; }

/* ---- help ------------------------------------------------------------------------------------------------------- */

.prose { max-width: 860px; padding: 24px 30px; line-height: 1.65; color: var(--text-2); }
.prose h2 { font: 600 19px/1.3 var(--serif); color: var(--text); margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--border-2); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose code { font-family: var(--mono); font-size: 12.5px; background: var(--off-bg); border-radius: 3px; padding: 1px 5px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose table { margin: 8px 0 16px; border: 1px solid var(--border); }

.message { max-width: 520px; margin: 40px auto; text-align: center; padding: 32px; }
.message h1 { font: 600 22px/1.3 var(--serif); margin-bottom: 8px; }
.message p { color: var(--text-3); }

@media (max-width: 960px) {
  .grid, .signin { grid-template-columns: minmax(0, 1fr); }
  .login-card { justify-self: stretch; max-width: none; }
  .client .co { display: none; }
}
@media (max-width: 680px) {
  .band-in { height: auto; min-height: 64px; flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .band .right { margin-left: 0; width: 100%; justify-content: space-between; }
  .client { text-align: left; }
  .navbar-in, main, .foot-in { padding-left: 16px; padding-right: 16px; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figures > div { border-right: 0; border-bottom: 1px solid var(--border-2); }
  .head h1 { font-size: 24px; }
  .prose { padding: 18px; }
}
