@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Regular.otf) format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Medium.otf) format('opentype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Bold.otf) format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Satoshi; src: url(fonts/Satoshi-Black.otf) format('opentype'); font-weight: 900; font-display: swap; }

:root {
  --black: #2d2926; --black-90: #413c39; --black-70: #6b6560;
  --off: #f2f2eb; --off-dim: #e8e7de; --brown: #8e7361; --brown-30: #ddd2c9;
  --yellow: #e5ea39; --grey: #dad5d2; --card: #fff;
  --ok: #4f7a3a; --warn: #a8641b; --bad: #a13d2d;
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px; --pill: 999px;
  --shadow: 0 1px 2px rgba(45,41,38,.06), 0 1px 3px rgba(45,41,38,.08);
  --ease: cubic-bezier(.22,1,.36,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--off); color: var(--black); font: 400 15px/1.5 Satoshi, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px 80px; }
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.top .logo { height: 22px; }
.top .spacer { flex: 1; }
.top .who { font-size: 13px; color: var(--brown); text-align: right; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--grey); flex: none; display: grid; place-items: center; font-weight: 900; font-size: 13px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

h1, h2, h3 { font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(28px, 6vw, 44px); }
h2 { font-size: 22px; }
h3 { font-size: 16px; letter-spacing: -0.015em; }
.over { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brown); font-weight: 700; }
.muted { color: var(--brown); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 8px 0 24px; padding-bottom: 2px; scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: var(--pill); font-weight: 700; white-space: nowrap; cursor: pointer; color: var(--black-70); }
.tabs button.on { background: var(--black); color: var(--off); }
.tabs .badge { background: var(--yellow); color: var(--black); border-radius: var(--pill); padding: 0 7px; font-size: 12px; margin-left: 6px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.card { background: var(--card); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.ink { background: var(--black); color: var(--off); }
.card.ink .muted, .card.ink .over { color: var(--brown-30); }
.card.quarter { border-top-left-radius: 64px; }
.stat .v { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; margin-top: 6px; }
.stat .v.xl { font-size: clamp(36px, 8vw, 52px); }
.stat .s { font-size: 13px; margin-top: 4px; }
.section { margin-top: 32px; }
.section > .head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

.btn { border: 0; border-radius: var(--pill); padding: 12px 20px; font-weight: 700; cursor: pointer; background: var(--black); color: var(--off); transition: background .2s var(--ease); display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--black-90); }
.btn.accent { background: var(--yellow); color: var(--black); }
.btn.accent:hover { box-shadow: 0 6px 20px rgba(229,234,57,.35); }
.btn.ghost { background: transparent; color: var(--black); box-shadow: inset 0 0 0 1.5px var(--black); }
.btn.ghost:hover { background: var(--off-dim); }
.card.ink .btn.ghost { color: var(--off); box-shadow: inset 0 0 0 1.5px var(--off); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-weight: 700; }

label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-size: 12px; font-weight: 700; color: var(--black-70); margin-bottom: 6px; }
input, select, textarea { width: 100%; border: 1.5px solid var(--grey); background: #fff; border-radius: var(--r-md); padding: 11px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--black); outline: none; }
input[disabled] { background: var(--off-dim); color: var(--black-70); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--black); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--brown); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--grey); white-space: nowrap; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--off-dim); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--off); }
.table .r { text-align: right; }
.scroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.pill { display: inline-block; padding: 2px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 700; background: var(--off-dim); white-space: nowrap; }
.pill.ok { background: #e3ecd9; color: var(--ok); }
.pill.warn { background: #f6e7d2; color: var(--warn); }
.pill.bad { background: #f3dcd6; color: var(--bad); }
.pill.y { background: var(--yellow); }
.pill.ink { background: var(--black); color: var(--off); }

.bar { height: 8px; background: var(--off-dim); border-radius: var(--pill); overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--black); border-radius: var(--pill); }
.card.ink .bar { background: var(--black-90); }
.card.ink .bar > i { background: var(--yellow); }

.coupon { font-size: 28px; font-weight: 900; letter-spacing: .04em; }
.list > div { padding: 12px 0; border-bottom: 1px solid var(--off-dim); display: flex; gap: 12px; justify-content: space-between; align-items: start; }
.list > div:last-child { border-bottom: 0; }
.items { font-size: 13px; color: var(--black-70); }
.empty { text-align: center; padding: 32px 16px; color: var(--brown); }

.login { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.login .side { background: var(--black); color: var(--off); padding: 32px 24px; display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; position: relative; overflow: hidden; }
.login .side .sym { position: absolute; right: -40px; bottom: -30px; width: 260px; color: var(--yellow); opacity: .95; }
.login .side h1 { font-size: clamp(34px, 7vw, 60px); max-width: 520px; position: relative; }
.login .form { padding: 40px 24px; max-width: 440px; width: 100%; margin: 0 auto; align-self: center; }
@media (min-width: 860px) { .login { grid-template-columns: 1.1fr 1fr; } .login .side { padding: 48px; } }

.banner { background: var(--yellow); border-radius: var(--r-md); padding: 12px 16px; font-weight: 500; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.ink { background: var(--black); color: var(--off); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--black); color: var(--off); padding: 12px 20px; border-radius: var(--pill); font-weight: 700; z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(45,41,38,.2); }
.toast.bad { background: var(--bad); }

.modal-bg { position: fixed; inset: 0; background: rgba(45,41,38,.5); z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--off); border-radius: var(--r-lg); padding: 24px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { margin-bottom: 8px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }

.insights li { margin-bottom: 8px; }
.insights li::marker { content: '→  '; font-weight: 900; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none; } .stat .v { font-size: 24px; } }
.loading { padding: 64px 0; text-align: center; color: var(--brown); }
.back { margin-bottom: 16px; }
.code-input { font-size: 28px; letter-spacing: .4em; text-align: center; font-weight: 900; }
