:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f4efe6;
  --ink: #1f2430;
  --muted: #6b6f7b;
  --line: #e7e0d4;
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: #e3f3f1;
  --coin: #f2b01e;
  --coin-ink: #5a3d00;
  --danger: #c2410c;
  --danger-soft: #fdebe1;
  --ok: #15803d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(31, 36, 48, .05), 0 6px 24px rgba(31, 36, 48, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161b; --surface: #1c1f26; --surface-2: #242832; --ink: #ecebe7; --muted: #a0a3ad;
    --line: #2f343f; --brand: #2bb3a6; --brand-ink: #0b1514; --brand-soft: #18322f;
    --coin: #f5bf3d; --coin-ink: #2a1d00; --danger: #fb8a4c; --danger-soft: #3a2218; --ok: #4ade80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --bg: #14161b; --surface: #1c1f26; --surface-2: #242832; --ink: #ecebe7; --muted: #a0a3ad;
  --line: #2f343f; --brand: #2bb3a6; --brand-ink: #0b1514; --brand-soft: #18322f;
  --coin: #f5bf3d; --coin-ink: #2a1d00; --danger: #fb8a4c; --danger-soft: #3a2218; --ok: #4ade80;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.hidden { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.coin-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--coin); color: var(--coin-ink); display: inline-grid; place-items: center; font-size: .8rem; font-weight: 800; box-shadow: inset 0 -2px 0 rgba(0,0,0,.15); }
.lang { width: auto; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: .85rem; cursor: pointer; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--brand); color: var(--brand-ink); transition: filter .15s; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.coin { background: var(--coin); color: var(--coin-ink); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.sm { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.btn.lg { padding: 14px 22px; font-size: 1.05rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.05rem; }
.stat .num { font-size: 1.8rem; font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: var(--danger-soft); color: var(--danger); }
.pill.coin { background: color-mix(in srgb, var(--coin) 25%, transparent); color: var(--ink); }
.alert { padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--ink); margin-bottom: 14px; }
.alert.warn { background: var(--danger-soft); }

/* tables & lists */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.feed-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .who { font-weight: 700; }
.feed-item q { display: block; margin-top: 4px; quotes: "«" "»"; }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--ink); border-bottom-color: var(--brand); }

/* landing */
.hero { padding: 72px 0 56px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 16ch; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 52ch; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.mock .big-coin { width: 64px; height: 64px; font-size: 1.1rem; }
section { padding: 56px 0; }
section.alt { background: var(--surface-2); }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: var(--coin); color: var(--coin-ink); display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }
.price .amount { font-size: 2rem; font-weight: 800; }
.price.featured { border: 2px solid var(--brand); }
footer { padding: 32px 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* employee */
.me-hero { text-align: center; padding: 28px 0 8px; }
.balance { display: inline-flex; align-items: center; gap: 10px; font-size: 1.6rem; font-weight: 800; }
.person-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.person:last-child { border-bottom: 0; }
.person:hover { background: var(--surface-2); }
.person.sel { background: var(--brand-soft); }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }

@media (max-width: 760px) {
  .hero { padding: 40px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
  .card { padding: 16px; }
  .hide-sm { display: none; }
}
