/* The owner's phone app (owner 11.11.2026): the "לילה" look he chose. One dark theme on purpose: night blue of the reels,
   paper-tone text, gold numbers. No inline styles anywhere: the page's CSP is style-src 'self'. */
:root {
  --bg: #0f1a30; --card: #17243f; --line: #1e2c4c; --bar: #0c1528;
  --ink: #eee8da; --mut: #8f9bb6; --gold: #e3b04b; --gold-soft: #f3d38a;
  --red: #e0574c; --amb: #e0a12b; --gry: #6f7c99;
  --pad: 16px;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Rubik, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; }
main {
  display: flex; flex-direction: column; gap: 22px;
  padding: calc(22px + env(safe-area-inset-top)) var(--pad) calc(96px + env(safe-area-inset-bottom));
}
main > section { display: flex; flex-direction: column; gap: 8px; }

.top { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.date { margin: 0; color: var(--mut); font-size: 13px; letter-spacing: .03em; }
h1 { margin: 0; font-family: "Frank Ruhl Libre", Rubik, serif; font-weight: 900; font-size: 30px; line-height: 1.15; }

.sec { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; color: var(--mut); }
.sec h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.sec .n { font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- "מחכה לך" ---------- */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.row {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  background: var(--card); color: inherit; border: 0; border-radius: 14px; padding: 12px 14px;
  font: inherit; text-align: start; cursor: pointer;
}
.row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gry); }
.row.urgent .dot { background: var(--red); }
.row.approve .dot, .row.late .dot, .row.today .dot { background: var(--amb); }
.row .txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row strong { font-weight: 500; font-size: 15.5px; }
.row small { color: var(--mut); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.open small { white-space: normal; overflow: visible; }
.row .chev { color: var(--mut); opacity: .6; font-size: 18px; transition: transform .15s ease; }
.row.open .chev { transform: rotate(-90deg); }
.row.plain { cursor: default; }
.row.plain .chev { visibility: hidden; }
.empty { margin: 0; background: var(--card); border-radius: 14px; padding: 16px 14px; color: var(--mut); font-size: 14.5px; }

/* ---------- today ---------- */
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.num { background: var(--card); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 1px; }
.num b { color: var(--gold-soft); font-weight: 500; font-size: 28px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.num span { color: var(--mut); font-size: 13px; }
.steps { list-style: none; margin: 0; padding: 4px 14px; background: var(--card); border-radius: 14px; }
.steps:empty { display: none; }
.steps li { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps b { font-weight: 500; font-variant-numeric: tabular-nums; }

.stamp { margin: 0; text-align: center; color: var(--gry); font-size: 12.5px; }

/* ---------- the bar at the bottom ---------- */
.tabs {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 3;
  max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--bar); border-top: 1px solid var(--line);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; padding: 4px 0; min-height: 48px;
  color: #7684a2; font: inherit; font-size: 11.5px; text-decoration: none; cursor: pointer;
}
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab.on { color: var(--gold); }
.tab.soon { opacity: .55; }

.toast {
  position: fixed; inset-inline: 0; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 4;
  width: max-content; max-width: calc(100% - 32px); margin: 0 auto;
  background: var(--ink); color: var(--bg); border-radius: 99px; padding: 8px 16px; font-size: 14px;
}

/* ---------- login ---------- */
.login { max-width: 420px; margin: 0 auto; padding: calc(64px + env(safe-area-inset-top)) 22px 40px; display: flex; flex-direction: column; gap: 14px; }
.login p { margin: 0; color: var(--mut); font-size: 15px; line-height: 1.6; }
.login form { display: flex; flex-direction: column; gap: 8px; }
.login label { color: var(--mut); font-size: 13px; }
.login input {
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font: inherit; font-size: 16px;
}
.login button {
  margin-top: 6px; background: var(--gold); color: #1a1408; border: 0; border-radius: 12px;
  padding: 13px 14px; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) { .row .chev { transition: none; } }
