/* הדפים של החשבון: הרשמה, כניסה וממשק ניהול. אותם צבעים וגופנים כמו באפליקציה */
:root {
  color-scheme: light;
  --font: "IBM Plex Sans Hebrew", system-ui, -apple-system, "Segoe UI", sans-serif;
  --num: "Space Grotesk", "IBM Plex Sans Hebrew", system-ui, sans-serif;
  --page: #f2f0ea; --glow-1: rgba(184, 232, 90, .38); --glow-2: rgba(151, 110, 222, .16);
  --surface-1: #ffffff; --surface-2: #f5f4f0; --surface-3: #ebe9e3;
  --glass: rgba(255, 255, 255, .82); --glass-border: rgba(14, 17, 22, .07);
  --text-primary: #0e1116; --text-secondary: #545966; --text-muted: #696d74;
  --border: rgba(14, 17, 22, .12); --line: #ebe9e3;
  --shadow: 0 1px 1px rgba(14, 17, 22, .03), 0 18px 40px -22px rgba(14, 17, 22, .28);
  --accent: #c6f36b; --accent-ink: #11160a; --accent-text: #4a7a06; --accent-wash: rgba(150, 205, 50, .18);
  --accent-glow: 0 8px 24px -8px rgba(140, 200, 40, .55);
  --good: #0b7a5a; --bad: #c2411b; --warn-ink: #6d4e00; --warn-bg: rgba(217, 154, 0, .14);
  --ink: #0b0e13; --ink-text: #f4f6f8; --ink-sub: #a3a9b5;
  --trial-ink: #5b3fa8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #07080c; --glow-1: rgba(198, 243, 107, .09); --glow-2: rgba(151, 110, 222, .17);
    --surface-1: #111318; --surface-2: #181b22; --surface-3: #21252e;
    --glass: rgba(20, 23, 30, .78); --glass-border: rgba(255, 255, 255, .07);
    --text-primary: #f3f5f7; --text-secondary: #a9aeb9; --text-muted: #8a8f99;
    --border: rgba(255, 255, 255, .13); --line: rgba(255, 255, 255, .07);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 24px 48px -28px rgba(0, 0, 0, .8);
    --accent-text: #c6f36b; --accent-wash: rgba(198, 243, 107, .12); --accent-glow: 0 8px 28px -8px rgba(198, 243, 107, .45);
    --good: #3fcf9a; --bad: #ff7a66; --warn-ink: #f6d68e; --warn-bg: rgba(245, 185, 58, .12);
    --ink: #0d1016; --trial-ink: #c9b6ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #07080c; --glow-1: rgba(198, 243, 107, .09); --glow-2: rgba(151, 110, 222, .17);
  --surface-1: #111318; --surface-2: #181b22; --surface-3: #21252e;
  --glass: rgba(20, 23, 30, .78); --glass-border: rgba(255, 255, 255, .07);
  --text-primary: #f3f5f7; --text-secondary: #a9aeb9; --text-muted: #8a8f99;
  --border: rgba(255, 255, 255, .13); --line: rgba(255, 255, 255, .07);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 24px 48px -28px rgba(0, 0, 0, .8);
  --accent-text: #c6f36b; --accent-wash: rgba(198, 243, 107, .12); --accent-glow: 0 8px 28px -8px rgba(198, 243, 107, .45);
  --good: #3fcf9a; --bad: #ff7a66; --warn-ink: #f6d68e; --warn-bg: rgba(245, 185, 58, .12);
  --ink: #0d1016; --trial-ink: #c9b6ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--page); color: var(--text-primary); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(800px 520px at 90% -10%, var(--glow-1), transparent 62%), radial-gradient(700px 480px at 6% -8%, var(--glow-2), transparent 60%); }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent-text); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ===== שלד הדף ===== */
.auth { max-width: 460px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; margin-bottom: 22px; }
.brand .logo { width: 40px; height: 40px; border-radius: 13px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 21px var(--num); box-shadow: var(--accent-glow); }
.brand b { font-size: 18px; }
/* the wordmark: value, with the lime dot */
.mark { font: 300 30px/1 var(--font); letter-spacing: -.05em; direction: ltr; unicode-bidi: isolate; display: inline-flex; align-items: baseline; color: var(--text-primary); }
.mark i { width: .22em; height: .22em; border-radius: 50%; background: var(--accent); margin-inline-start: .08em; translate: 0 -.02em; }
.brand .mark + b { font-size: 15px; color: var(--text-secondary); margin-inline-start: 4px; align-self: center; }
.panel { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 26px; padding: 26px 22px; box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
h1:focus { outline: none; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.01em; }
.lead { color: var(--text-secondary); margin: 0 0 20px; }
.below { text-align: center; color: var(--text-secondary); margin: 18px 0 0; }
.legal { text-align: center; color: var(--text-muted); font-size: 13px; margin: 22px 0 0; }
.legal a { color: inherit; }
.testbar { background: var(--warn-bg); color: var(--warn-ink); border-radius: 14px; padding: 9px 13px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.5; }

/* ===== שלבים ===== */
.steps { display: flex; gap: 6px; margin: 0 0 18px; }
.steps i { flex: 1; height: 5px; border-radius: 5px; background: var(--surface-3); }
.steps i.on { background: var(--accent); }
.step-n { color: var(--text-muted); font-size: 13.5px; margin: 0 0 4px; }

/* ===== שדות ===== */
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.field small { display: block; color: var(--text-muted); font-size: 13px; margin-top: 5px; line-height: 1.45; }
.input { width: 100%; min-height: 52px; padding: 12px 15px; border-radius: 15px; border: 1.5px solid var(--border); background: var(--surface-1); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-wash); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input.ltr { direction: ltr; text-align: right; }
.input.code { font: 600 22px var(--num); letter-spacing: .3em; text-align: center; direction: ltr; }
.pw { position: relative; }
.pw .input { padding-inline-end: 64px; }
.pw button { position: absolute; inset-inline-end: 6px; top: 6px; bottom: 6px; border: 0; background: none; color: var(--accent-text); font-size: 13.5px; font-weight: 600; padding: 0 10px; cursor: pointer; border-radius: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 14.5px; color: var(--text-secondary); cursor: pointer; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent-text); }
.meter { display: flex; gap: 4px; margin-top: 7px; }
.meter i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); }
.meter[data-s="1"] i:nth-child(-n+1) { background: var(--bad); }
.meter[data-s="2"] i:nth-child(-n+2) { background: #d99a00; }
.meter[data-s="3"] i:nth-child(-n+3) { background: var(--good); }
.meter[data-s="4"] i { background: var(--good); }
.msg { border-radius: 14px; padding: 10px 14px; font-size: 14.5px; margin: 0 0 14px; line-height: 1.5; }
.msg.bad { background: rgba(194, 65, 27, .1); color: var(--bad); }
.msg.ok { background: var(--accent-wash); color: var(--accent-text); }

/* ===== כפתורים ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 20px; border-radius: 16px; border: 1.5px solid var(--border);
  background: var(--surface-1); font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text-primary); transition: background .15s, transform .1s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.985); }
.btn.block { display: flex; width: 100%; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: var(--accent-glow); }
.btn.primary:hover { filter: brightness(1.03); }
.btn.dark { background: var(--text-primary); color: var(--page); border-color: transparent; }
.btn.quiet { background: none; border-color: transparent; color: var(--accent-text); min-height: 44px; }
.btn.danger { color: var(--bad); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn svg { width: 20px; height: 20px; flex: none; }
.socials { display: grid; gap: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 13.5px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -4px 0 14px; }
.linkbtn { border: 0; background: none; padding: 6px 0; color: var(--accent-text); font-size: 14.5px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ===== קוד שחזור ===== */
.rcode span { display: block; white-space: nowrap; }
.rcode { font: 600 21px/1.5 var(--num); letter-spacing: .06em; direction: ltr; text-align: center; background: var(--surface-2); border: 1.5px dashed var(--border); border-radius: 18px; padding: 16px 12px; word-spacing: .25em; user-select: all; }
.btns { display: flex; gap: 10px; margin: 12px 0 18px; }
.btns .btn { flex: 1; min-height: 46px; font-size: 15px; }

/* ===== מנוי ===== */
.plan { background: var(--ink); color: var(--ink-text); border-radius: 22px; padding: 22px; margin: 0 0 18px; position: relative; overflow: hidden; }
.plan::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 260px; height: 260px; background: radial-gradient(circle, rgba(198, 243, 107, .28), transparent 65%); pointer-events: none; }
.plan .price { font: 700 46px/1 var(--num); letter-spacing: -.02em; }
.plan .price small { font: 500 16px var(--font); color: var(--ink-sub); margin-inline-start: 4px; white-space: nowrap; }
.plan ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.plan li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(198, 243, 107, .18); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; margin-top: 1px; }
.fine { color: var(--text-muted); font-size: 13.5px; text-align: center; margin: 12px 0 0; line-height: 1.5; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 4px auto 14px; box-shadow: var(--accent-glow); }
.done-ic svg { width: 30px; height: 30px; }
.center { text-align: center; }

@media (max-width: 380px) { .panel { padding: 22px 16px; border-radius: 22px; } h1 { font-size: 23px; } .rcode { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== ממשק ניהול ===== */
.adm { max-width: 1180px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 40px; }
.adm-top { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.adm-top .brand { margin: 0; }
.grow { flex: 1; }
.tag { background: var(--warn-bg); color: var(--warn-ink); border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 600; }
.btn.sm { min-height: 40px; padding: 7px 15px; font-size: 14px; border-radius: 999px; }
.adm h2 { font-size: 17px; margin: 0 0 14px; }
.adm .panel { padding: 20px; border-radius: 22px; margin-bottom: 14px; }
.adm #gate { max-width: 440px; margin: 10vh auto 0; }
.muted { color: var(--text-muted); font-weight: 500; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi.hero { background: var(--ink); color: var(--ink-text); border-color: transparent; }
.kpi.hero small { color: var(--ink-sub); }
.kpi.warn b { color: var(--bad); }
.kpi span { display: block; font-size: 13.5px; color: var(--text-secondary); }
.kpi.hero span { color: var(--ink-sub); }
.kpi b { display: block; font: 700 30px/1.15 var(--num); letter-spacing: -.02em; margin: 6px 0 2px; }
.kpi small { display: block; font-size: 13px; color: var(--text-muted); }
.adm-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 22px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bars .b i { display: block; width: 100%; max-width: 56px; border-radius: 10px 10px 4px 4px; background: var(--accent); min-height: 4px; position: relative; }
.bars .b.now i { background: repeating-linear-gradient(135deg, var(--accent) 0 8px, rgba(198, 243, 107, .55) 8px 14px); }
.bars .b em { font: 600 14px var(--num); font-style: normal; }
.bars .b small { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.todo-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: right; cursor: pointer; border-radius: 0; }
.todo-row:last-child { border-bottom: 0; }
.todo-row b { font: 700 22px var(--num); min-width: 36px; }
.todo-row span { flex: 1; font-size: 14.5px; color: var(--text-secondary); }
.todo-row:hover span { color: var(--text-primary); }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ph h2 { margin: 0; }
.ubar { display: grid; gap: 10px; margin-bottom: 8px; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; border: 1px solid var(--border); background: var(--surface-1); border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer; min-height: 40px; }
.seg button[aria-pressed="true"] { background: var(--text-primary); color: var(--page); border-color: transparent; }
.seg button em { font-style: normal; opacity: .65; margin-inline-start: 4px; }
.users { list-style: none; margin: 0; padding: 0; }
.urow { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: right; cursor: pointer; }
.urow:hover { background: var(--surface-2); }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.urow .who { min-width: 0; }
.urow .who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urow .who small { display: block; color: var(--text-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.urow .st { display: grid; justify-items: end; gap: 3px; }
.urow .st small { color: var(--text-muted); font-size: 12.5px; white-space: nowrap; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.active { background: var(--accent-wash); color: var(--accent-text); }
.pill.past_due { background: rgba(194, 65, 27, .12); color: var(--bad); }
.pill.ending { background: var(--warn-bg); color: var(--warn-ink); }
.pill.canceled, .pill.none, .pill.trial_over { background: var(--surface-3); color: var(--text-secondary); }
.pill.trialing { background: rgba(151, 110, 222, .16); color: var(--trial-ink); }
.more { display: flex; justify-content: center; padding-top: 12px; }
.empty { color: var(--text-muted); text-align: center; padding: 24px 0; }
.lock { color: var(--text-muted); font-size: 13.5px; margin: 14px 0 0; }
dialog.sheet { border: 0; padding: 22px; border-radius: 24px; width: min(480px, calc(100% - 24px)); background: var(--surface-1); color: var(--text-primary); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); }
dialog.sheet::backdrop { background: rgba(8, 10, 14, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-x { position: absolute; inset-inline-end: 14px; top: 14px; margin: 0; }
.sheet h2 { font-size: 20px; margin: 0 0 14px; padding-inline-end: 48px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; font-size: 15px; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts dd.ltr { direction: ltr; text-align: right; }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kpis .kpi.hero { grid-column: span 3; } .adm-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .kpis .kpi.hero { grid-column: span 2; }
  .kpi { padding: 14px; border-radius: 18px; } .kpi b { font-size: 25px; }
  .bars { height: 160px; gap: 6px; }
  .adm .panel { padding: 16px; }
  dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}

/* every sign-in and sign-up screen fits one screen, without scrolling: tighter as the height shrinks */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 761px) { .auth { max-width: 440px; } }
.auth .brand { justify-content: center; }
.auth .lead { text-wrap: balance; }
@media (max-height: 800px) {
  .auth { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .auth .brand { margin-bottom: 10px; }
  .auth .mark { font-size: 26px; }
  .auth .panel { padding: 18px 20px; border-radius: 22px; }
  .auth h1 { font-size: 23px; margin-bottom: 3px; }
  .auth .lead { font-size: 14.5px; line-height: 1.45; margin-bottom: 12px; }
  .auth .or { margin: 10px 0; }
  .auth .socials { gap: 8px; }
  .auth .field { margin-bottom: 9px; }
  .auth .field > span { font-size: 13.5px; margin-bottom: 3px; }
  .auth .field small { font-size: 12px; line-height: 1.35; margin-top: 3px; }
  .auth .input { min-height: 44px; padding: 8px 14px; border-radius: 13px; }
  .auth .btn { min-height: 44px; padding: 8px 16px; border-radius: 14px; }
  .auth .btns .btn { min-height: 42px; }
  .auth .check { margin: 2px 0 10px; font-size: 13.5px; line-height: 1.4; }
  .auth .below { font-size: 14px; margin-top: 10px; }
  .auth .legal { font-size: 12px; margin-top: 10px; }
  .auth .testbar { font-size: 12.5px; padding: 6px 11px; margin-bottom: 8px; }
  .auth .steps { margin-bottom: 10px; }
  .auth .step-n { font-size: 12.5px; margin-bottom: 1px; }
  .auth .rcode { font-size: 18px; padding: 10px; margin-bottom: 10px; }
  .auth .done-ic { width: 48px; height: 48px; margin: 0 auto 8px; }
  .auth .done-ic svg { width: 24px; height: 24px; }
  .auth .plan { padding: 14px 16px; margin-bottom: 10px; }
  .auth .plan .price { font-size: 34px; }
  .auth .plan ul { margin-top: 8px; gap: 4px; }
  .auth .plan li { font-size: 13.5px; }
}
@media (max-height: 660px) {
  .auth .rcode { font-size: 16px; padding: 6px; margin-bottom: 6px; line-height: 1.35; }
  .auth .btns { margin: 6px 0 8px; }
  .auth { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .auth .brand { margin-bottom: 6px; }
  .auth .mark { font-size: 22px; }
  .auth .panel { padding: 12px 16px; border-radius: 18px; }
  .auth h1 { font-size: 20px; margin-bottom: 1px; }
  .auth .lead { font-size: 13.5px; margin-bottom: 8px; }
  .auth .or { margin: 6px 0; font-size: 12.5px; }
  .auth .field { margin-bottom: 6px; }
  .auth .field > span { font-size: 13px; margin-bottom: 2px; }
  .auth .input { min-height: 40px; padding: 6px 13px; }
  .auth .btn { min-height: 40px; padding: 6px 14px; }
  .auth .btns .btn { min-height: 38px; }
  .auth .check { margin: 0 0 8px; font-size: 13px; }
  .auth .below { font-size: 13.5px; margin-top: 6px; }
  .auth .legal { margin-top: 6px; }
  .auth .testbar { margin-bottom: 6px; padding: 4px 10px; }
  .auth .steps { margin-bottom: 6px; }
  .auth .msg { padding: 6px 10px; margin-bottom: 6px; font-size: 13px; }
}
.auth .btns { gap: 6px; }
.auth .btns .btn { padding-inline: 6px; white-space: nowrap; font-size: 13.5px; min-width: 0; }
