/* Getzel website. Warm paper background, deep navy brand, gold accent. Light and dark. */
:root {
  --bg: #f5f2ec;
  --card: #ffffff;
  --ink: #1c2230;
  --muted: #687084;
  --line: #e6e1d7;
  --soft: #f0ece4;
  --brand: #1f3a61;
  --brand-ink: #ffffff;
  --brand-soft: #e7edf6;
  --gold: #b9872a;
  --gold-soft: #f6ecd6;
  --good: #2f7a57;
  --good-soft: #e3f2ea;
  --warn: #9a6a12;
  --warn-soft: #fbf0d9;
  --bad: #b03f36;
  --bad-soft: #f9e5e2;
  --shadow: 0 1px 2px rgba(28, 34, 48, 0.05), 0 4px 16px rgba(28, 34, 48, 0.06);
  --radius: 14px;
  --font: "Inter", "Noto Sans Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151c;
    --card: #1a1f29;
    --ink: #e9ecf2;
    --muted: #9aa2b4;
    --line: #2a303d;
    --soft: #212733;
    --brand: #8fb3ea;
    --brand-ink: #10141b;
    --brand-soft: #1f2a3c;
    --gold: #e0b35a;
    --gold-soft: #33291a;
    --good: #6cc59a;
    --good-soft: #1b2d24;
    --warn: #e5b45a;
    --warn-soft: #30281a;
    --bad: #ef8a80;
    --bad-soft: #351f1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 18px;
}
.brand-name { font-weight: 750; font-size: 18px; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: -2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink); font-weight: 500; text-decoration: none;
}
.nav a svg { width: 19px; height: 19px; color: var(--muted); flex: none; }
.nav a:hover { background: var(--soft); }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.nav a.active svg { color: var(--brand); }
.nav .count { margin-left: auto; background: var(--gold); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.nav-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 18px 12px 6px; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sidebar-foot button { margin-top: 6px; }

.main { min-width: 0; padding: 32px 40px 80px; }
.page { max-width: 980px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }

.topbar { display: none; }
.tabbar { display: none; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px 20px; }
.card + .card, .grid + .card, .card + .grid { margin-top: 16px; }

.stat { padding: 18px 20px; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { font-size: 13px; color: var(--muted); }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-weight: 700;
}

/* badges and chips */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.field + .field { margin-top: 16px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }

.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 550; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.seg button:disabled { opacity: 0.45; cursor: not-allowed; }
.plan-tag { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold); background: var(--gold-soft); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.locked { opacity: 0.55; }
.locked-note { font-size: 13px; color: var(--gold); font-weight: 600; margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px;
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--brand); color: var(--brand-ink); transition: filter 0.15s, transform 0.05s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--brand); padding: 8px 10px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--line); }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--soft); color: var(--bad); }

/* ---------- settings ---------- */
.setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; padding: 16px 20px; border-top: 1px solid var(--line); align-items: start; }
.setting:first-child { border-top: 0; }
.setting .what { font-weight: 600; }
.setting .why { font-size: 13px; color: var(--muted); margin-top: 2px; }
.saved { font-size: 12px; color: var(--good); font-weight: 600; margin-top: 4px; height: 16px; }

/* ---------- Tell Getzel chat ---------- */
.chat { display: flex; flex-direction: column; }
.chat-log { max-height: 340px; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.bubble.getzel { align-self: flex-start; background: var(--soft); border-bottom-left-radius: 4px; }
.bubble.thinking { color: var(--muted); font-style: italic; }
.chat-input { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.chat-input textarea { min-height: 46px; height: 46px; }
.chat-input .btn { flex: none; width: 46px; padding: 0; }
.chat-input .btn svg { width: 19px; height: 19px; }
.chat-hint { padding: 0 20px 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- messages ---------- */
.transcript { margin-top: 10px; padding: 12px 14px; background: var(--soft); border-radius: 10px; font-size: 14px; display: grid; gap: 6px; }
.transcript .who { font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
audio { width: 100%; margin-top: 10px; height: 38px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; padding: 34px 30px; }
.login-card .brand { padding: 0 0 22px; justify-content: center; }
.code-input { text-align: center; font-size: 28px; letter-spacing: 0.4em; font-weight: 700; padding: 14px; }
.big-code { font-size: 40px; font-weight: 800; letter-spacing: 0.25em; text-align: center; padding: 18px; background: var(--gold-soft); color: var(--gold); border-radius: 12px; }

/* steps */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: flex; gap: 14px; }
.steps li::before { content: counter(step); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13.5px; background: var(--soft); padding: 2px 7px; border-radius: 6px; word-break: break-all; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 650; padding: 10px 20px; border-bottom: 1px solid var(--line); }
td { padding: 12px 20px; border-top: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-weight: 550; box-shadow: var(--shadow); transition: all 0.2s; z-index: 50; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); color: #fff; }

/* dialog */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); }
dialog::backdrop { background: rgba(15, 20, 30, 0.45); }
.dialog-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.dialog-body { padding: 20px 22px; }
.dialog-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.yi { direction: rtl; text-align: right; font-family: "Noto Sans Hebrew", var(--font); }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; }
  .topbar .brand { padding: 0; }
  .main { padding: 20px 16px 96px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stats .stat { padding: 12px 12px; }
  .stats .stat .label { font-size: 12px; }
  .stats .stat .value { font-size: 22px; }
  .setting { grid-template-columns: 1fr; gap: 8px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 550; color: var(--muted); padding: 4px 0; text-decoration: none; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--brand); }
  h1 { font-size: 22px; }
  th, td { padding-left: 14px; padding-right: 14px; }
  .list > li, .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
}
