/* KJT Dashboard. Tokens from plan 7.3. Archivo is self-hosted (OFL). */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 800; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ground: #EDF1F4; --sheet: #FFFFFF; --ink: #17212E; --secondary: #4A5868;
  --rule: #D3DAE1; --rule-soft: #E2E7EC; --input: #C5CED8;
  --myrep: #1F5FBF; --myrep-ink: #174A96; --myrep-tint: #E1EAF7;
  --ln: #D9641A; --ln-ink: #A8480C; --ln-tint: #FBE6D6;
  --warn-bg: #FBE6D6; --warn: #8F3D0A; --ok-bg: #E3EEE7; --ok: #1F6B43;
  --radius: 6px; --tap: 44px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.45 'Archivo', system-ui, sans-serif; }
a { color: var(--myrep-ink); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 .8em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--secondary); }
.num { font-variant-numeric: tabular-nums; }
.big { font-stretch: 75%; font-weight: 800; font-size: 34px; line-height: 1; }

/* top bar */
.topbar { background: var(--sheet); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 10; }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; color: var(--secondary); text-decoration: none; border-radius: var(--radius); }
.nav a:hover { background: var(--ground); color: var(--ink); }
.nav a.is-on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -3px 0 var(--ink); border-radius: 0; }
.user-box { display: flex; align-items: center; gap: 8px; margin: 0; }
@media (max-width: 720px) {
  .topbar-in { gap: 4px; padding-top: 6px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
  .user-box { margin-left: auto; }
  .user-name { display: none; }
}

main.wrap { padding-top: 20px; padding-bottom: 48px; }
.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* forms */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: 13px; color: var(--secondary); font-weight: 500; }
input, select, textarea { font: inherit; color: inherit; min-height: var(--tap); padding: 8px 10px; border: 1px solid var(--input); border-radius: var(--radius); background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--myrep); outline-offset: 1px; }
input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; }
.check { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px;
  border-radius: var(--radius); border: 1px solid var(--input); background: var(--sheet); color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ground); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a3645; }
.btn-danger { color: var(--warn); border-color: #E3B79A; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-sm { min-height: 36px; padding: 0 10px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

.note { padding: 10px 12px; border-radius: var(--radius); background: var(--ground); }
.note-warn, .form-error { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: var(--radius); }
.note-ok { background: var(--ok-bg); color: var(--ok); }

/* tables */
.table-wrap { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 14px; }
.t th, .t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.t th { font-weight: 600; color: var(--secondary); font-size: 13px; background: #F7F9FA; }
.t td.n, .t th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* client tags */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-myrep { background: var(--myrep-tint); color: var(--myrep-ink); }
.tag-ln { background: var(--ln-tint); color: var(--ln-ink); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--ground); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.client-head { border-top: 4px solid var(--myrep); }
.client-head.ln { border-top-color: var(--ln); }

/* step counters */
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0; }
.step-box { border: 1px solid var(--rule-soft); border-radius: var(--radius); padding: 8px; }
.step-box .lbl { font-size: 12px; color: var(--secondary); }
.step-box .hp { font-size: 12px; color: var(--secondary); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; }
.login-brand { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 16px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius);
  display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); z-index: 50; }
.toast button { color: #fff; border-color: #56606d; background: transparent; }

/* import */
.drop { border: 2px dashed var(--input); border-radius: var(--radius); padding: 20px; text-align: center; }
.diff { font-size: 12px; color: var(--secondary); }

/* password show/hide */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 52px; }
.pw-eye { position: absolute; right: 0; top: 0; bottom: 0; width: 48px; border: 0; background: transparent; cursor: pointer; color: var(--secondary); display: grid; place-items: center; border-radius: 0 var(--radius) var(--radius) 0; }
.pw-eye:hover { color: var(--ink); background: var(--ground); }
.pw-eye[aria-pressed=true] { color: var(--myrep-ink); }
.pw-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.cred { font: 600 18px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .02em; padding: 10px 12px; background: var(--ground); border-radius: var(--radius); word-break: break-all; }

/* logo */
.brand img { height: 34px; width: auto; display: block; }
.login-logo { display: block; width: min(240px, 72%); height: auto; margin: 4px auto 18px; }
