/* האזור האישי — brand palette per vault/knowledge/brand/brand-style-guide.md
   Night #241A3F · Piano black #0F0A08 · Wine #B1225F · Gold #F0AD52 · Cream #F6D9A8
   Visual language: sunrise over mountains, stars, gold hairlines, corner frames.
   Rules honored: ✦ only as separator/frame ornament; list bullets = thin gold
   lines; no pastel fills on dark; Bellefair has one weight (hierarchy by size). */
:root {
  --night: #241A3F;
  --piano: #0F0A08;
  --indigo: #4E5086;
  --wine: #B1225F;
  --magenta: #BA3085;
  --gold: #F0AD52;
  --cream: #F6D9A8;
  --text: #EFE7F2;
  --text-dim: rgba(239, 231, 242, .7);
  --panel: rgba(20, 13, 38, .55);
  --panel-deep: rgba(20, 13, 38, .78);
  --gold-line: linear-gradient(90deg, transparent, rgba(240, 173, 82, .85), transparent);
  --gold-grad: linear-gradient(180deg, #F6D9A8 0%, #F0AD52 55%, #E0824B 100%);
  --ring-grad: conic-gradient(from 200deg, #B1225F, #E0824B, #F0AD52, #B1225F);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Assistant', Arial, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: radial-gradient(120% 90% at 50% 0%, #35264F 0%, var(--night) 45%, #120C1E 78%, var(--piano) 100%) fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.7;
}

/* faint stars, pure CSS — no external assets */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(246, 217, 168, .8), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(1.4px 1.4px at 62% 34%, rgba(246, 217, 168, .6), transparent 60%),
    radial-gradient(1px 1px at 30% 52%, rgba(255, 255, 255, .4), transparent 60%),
    radial-gradient(1.3px 1.3px at 88% 46%, rgba(246, 217, 168, .5), transparent 60%),
    radial-gradient(1px 1px at 44% 8%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1.1px 1.1px at 8% 72%, rgba(246, 217, 168, .45), transparent 60%),
    radial-gradient(1px 1px at 94% 78%, rgba(255, 255, 255, .35), transparent 60%);
}

/* the sunrise-over-mountains horizon, pinned to the bottom of the viewport */
.horizon {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 0;
  width: 100%; height: clamp(120px, 22vh, 260px);
  pointer-events: none; opacity: .8;
}

header, main, footer { position: relative; z-index: 1; }

/* ---- header ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 48px);
  border-bottom: 1px solid rgba(240, 173, 82, .18);
  background: rgba(15, 10, 8, .25);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-logo { height: 32px; width: auto; display: block; border-radius: 50%; }
.brand-name { font-family: 'Bellefair', serif; font-size: 22px; color: var(--cream); letter-spacing: .06em; }
.header-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; flex-wrap: wrap; }
.hello { color: var(--text-dim); }
.link-quiet { color: var(--gold); text-decoration: none; padding: 8px 2px; }
.link-quiet:hover { text-decoration: underline; }

/* ---- layout ---- */
.wrap {
  flex: 1;
  width: min(960px, 100% - 32px);
  margin-inline: auto;
  padding: clamp(28px, 6vw, 56px) 0 clamp(120px, 20vh, 220px); /* keep clear of the horizon */
}

.display {
  font-family: 'Bellefair', serif;
  font-weight: 400; /* Bellefair has a single weight — hierarchy by size/color only */
  color: var(--cream);
  letter-spacing: .02em;
}
.title-gold {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.page-title { font-size: clamp(36px, 6.5vw, 56px); text-align: center; }
.eyebrow {
  text-align: center; color: var(--gold); font-size: 14px; font-weight: 600;
  letter-spacing: .22em; margin-bottom: 10px;
}
.sub { color: var(--text-dim); text-align: center; margin-top: 10px; font-size: 17px; }

/* ✦ is reserved for separators/frames only (brand rule) */
.ornament {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 22px auto 36px;
}
.hairline-side { height: 1px; width: min(150px, 28vw); background: var(--gold-line); }
.spark { color: var(--gold); font-size: 11px; line-height: 1; }

.hairline {
  display: block; height: 1px; width: min(360px, 70%);
  margin: 22px auto 34px; background: var(--gold-line);
}

.crumbs { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }
.crumbs a { color: var(--gold); text-decoration: none; padding: 6px 0; display: inline-block; }
.crumbs a:hover { text-decoration: underline; }

/* ---- buttons ---- */
.btn {
  display: inline-block;
  font-family: 'Assistant', sans-serif; font-weight: 600; font-size: 17px;
  color: #fff; background: linear-gradient(135deg, var(--wine), var(--magenta));
  border: none; border-radius: 10px; padding: 13px 34px; min-height: 48px;
  cursor: pointer; text-decoration: none; text-align: center;
  box-shadow: 0 6px 24px rgba(177, 34, 95, .35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(186, 48, 133, .45); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(240, 173, 82, .55); box-shadow: none;
}
.btn-ghost:hover { background: rgba(240, 173, 82, .08); box-shadow: none; }
.btn-link {
  background: none; border: none; cursor: pointer;
  font-family: 'Assistant', sans-serif; font-size: 15px;
  color: var(--gold); text-decoration: underline; padding: 10px 4px;
}
.btn-link:hover { color: var(--cream); }

:is(a, button, input):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}

/* ---- auth card with gold corner frames ---- */
.auth-card {
  position: relative;
  width: min(480px, 100%);
  margin: 4vh auto 0;
  background: var(--panel-deep);
  border: 1px solid rgba(240, 173, 82, .22);
  border-radius: 4px;
  padding: clamp(30px, 5vw, 48px);
  text-align: center;
}
.auth-card::before, .auth-card::after {
  content: ''; position: absolute; width: 34px; height: 34px; pointer-events: none;
  border-color: var(--gold); border-style: solid;
}
.auth-card::before { top: -5px; right: -5px; border-width: 2px 2px 0 0; border-start-end-radius: 3px; }
.auth-card::after { bottom: -5px; left: -5px; border-width: 0 0 2px 2px; border-end-start-radius: 3px; }
.emblem { width: 36px; height: 36px; margin: 0 auto 12px; display: block; }
.auth-card .display { font-size: clamp(34px, 6vw, 46px); }
.auth-card .sub { margin-bottom: 26px; }
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: right; }
.login-form label { font-size: 15px; color: var(--text-dim); }
.login-form input {
  font-family: 'Assistant', sans-serif; font-size: 17px;
  padding: 12px 14px; min-height: 48px; border-radius: 10px;
  border: 1px solid rgba(240, 173, 82, .3);
  background: rgba(15, 10, 8, .45); color: var(--text);
  transition: border-color .18s ease;
}
.login-form input:hover { border-color: rgba(240, 173, 82, .5); }
.login-form input:focus { outline: 2px solid rgba(240, 173, 82, .55); border-color: transparent; }
.login-form .btn { margin-top: 8px; }
.demo-form {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px dashed rgba(240, 173, 82, .25);
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.demo-form form { width: 100%; }
.demo-form .btn-ghost { width: 100%; }
.demo-label { font-size: 13px; color: var(--text-dim); }
.skip-line { margin-top: 16px; font-size: 15px; }
.form-links { margin-top: 16px; font-size: 15px; }
.dot-sep { color: var(--text-dim); margin-inline: 8px; }

/* ---- Google sign-in ---- */
.alt-auth { margin-top: 8px; }
.ornament-tight { margin: 14px auto; }
.alt-label { color: var(--text-dim); font-size: 14px; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Assistant', sans-serif; font-weight: 600; font-size: 16px;
  color: var(--text); background: rgba(15, 10, 8, .45);
  border: 1px solid rgba(239, 231, 242, .25); border-radius: 10px;
  padding: 11px 26px; min-height: 48px; text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease;
}
.btn-google:hover { border-color: rgba(239, 231, 242, .5); background: rgba(15, 10, 8, .65); }
.btn-google svg { width: 18px; height: 18px; flex: none; }

.notice {
  background: rgba(240, 173, 82, .07);
  border: 1px solid rgba(240, 173, 82, .3);
  border-radius: 10px; padding: 14px 18px; font-size: 16px; margin-bottom: 14px;
}
.notice-ok { border-color: rgba(240, 173, 82, .5); color: var(--cream); }
.notice-error { border-color: rgba(186, 48, 133, .6); color: #F3C6DE; }

/* ---- course library ---- */
.course-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.course-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--panel);
  border: 1px solid rgba(240, 173, 82, .22);
  border-radius: 16px; padding: 30px 26px 26px;
  text-decoration: none; color: var(--text);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.course-card:hover {
  border-color: rgba(240, 173, 82, .6); transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(15, 10, 8, .5);
}
/* the logo's ring, echoed as a soft halo in the card corner */
.card-ring {
  position: absolute; top: -46px; left: -46px; width: 130px; height: 130px;
  border-radius: 50%; background: var(--ring-grad);
  filter: blur(2px); opacity: .16; pointer-events: none;
  transition: opacity .18s ease;
}
.course-card:hover .card-ring { opacity: .3; }
.card-icon { width: 24px; height: 24px; margin-bottom: 6px; }
.lock-icon { width: 15px; height: 15px; vertical-align: -3px; margin-inline-end: 4px; }
.card-kicker { font-size: 13px; font-weight: 600; color: var(--gold); letter-spacing: .08em; }
.card-title { font-family: 'Bellefair', serif; font-weight: 400; font-size: 32px; color: var(--cream); }
.card-sub { color: var(--text-dim); font-size: 15px; }
.card-cta {
  margin-top: 14px; color: var(--gold); font-weight: 600; font-size: 15px;
  transition: transform .18s ease; /* RTL: forward = left */
}
.course-card:hover .card-cta { transform: translateX(-4px); }

/* locked course: same card, dimmed content; still opens the episode list */
.card-locked .card-icon, .card-locked .card-title, .card-locked .card-sub { opacity: .55; }
.kicker-locked { display: inline-flex; align-items: center; }

.notice-members { text-align: center; margin-bottom: 22px; }
.ep-meta .lock-icon { vertical-align: -2px; }

.player-locked { flex-direction: column; gap: 10px; }
.player-locked .lock-icon { width: 26px; height: 26px; margin: 0; }
.btn-locked { cursor: default; opacity: .75; }
.btn-locked:hover { background: transparent; }
.btn-locked .lock-icon { vertical-align: -2px; }

/* ---- episode list (bullet = thin gold line, per brand rules) ---- */
.episode-list { display: flex; flex-direction: column; gap: 12px; }
.episode-row {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 16px;
  background: var(--panel);
  border: 1px solid rgba(240, 173, 82, .16);
  border-radius: 12px; padding: 14px 18px; min-height: 56px;
  text-decoration: none; color: var(--text);
  transition: border-color .18s ease, background-color .18s ease;
}
.episode-row:hover { border-color: rgba(240, 173, 82, .5); background: var(--panel-deep); }
.ep-num {
  font-family: 'Bellefair', serif; font-size: 20px; color: var(--gold);
  text-align: center; border-left: 1px solid rgba(240, 173, 82, .25); padding-left: 14px;
}
.ep-title { font-size: 17px; }
.ep-meta { font-size: 14px; color: var(--gold); font-weight: 600; white-space: nowrap; }

/* ---- player ---- */
.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: rgba(15, 10, 8, .6);
  border: 1px solid rgba(240, 173, 82, .25);
  border-radius: 14px; overflow: hidden;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 17px; }
.episode-actions { margin-top: 22px; text-align: center; }

/* ---- footer ---- */
.site-footer { padding: 26px 16px 30px; text-align: center; color: var(--text-dim); font-size: 14px; }
.site-footer .hairline { margin-bottom: 18px; }
.site-footer strong { color: var(--gold); }

@media (max-width: 560px) {
  .brand-logo { height: 36px; }
  .episode-row { grid-template-columns: 42px 1fr auto; padding: 12px 14px; }
  .ep-num { font-size: 22px; }
  .horizon { opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ================= מרחב ניהול המשתמשות (/admin) =================
   Same night palette and gold hairlines as the member pages — a wider wrap,
   one row per woman, both programs and both channels visible at a glance. */
.wrap-wide { width: min(1220px, 100% - 28px); }

/* ---- summary strip ---- */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin: 0 0 26px;
}
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--panel); border: 1px solid rgba(240, 173, 82, .16);
  border-radius: 12px; padding: 14px 10px; text-align: center;
}
.stat-num { font-family: 'Bellefair', serif; font-size: 30px; color: var(--gold); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-dim); }

/* ---- filter bar ---- */
.admin-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin: 22px 0 14px;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font-size: 14px; color: var(--text-dim); text-decoration: none;
  border: 1px solid rgba(240, 173, 82, .22); border-radius: 999px;
  padding: 7px 16px; min-height: 36px; display: inline-flex; align-items: center;
}
.tab:hover { border-color: rgba(240, 173, 82, .55); color: var(--text); }
.tab-on { background: rgba(240, 173, 82, .12); color: var(--cream); border-color: rgba(240, 173, 82, .6); }
.search { display: flex; gap: 8px; }

/* ---- shared small controls ---- */
.mini-input {
  font-family: 'Assistant', sans-serif; font-size: 15px; color: var(--text);
  background: rgba(15, 10, 8, .5); border: 1px solid rgba(240, 173, 82, .28);
  border-radius: 8px; padding: 8px 10px; min-height: 38px; max-width: 100%;
}
.mini-input.wide { min-width: 220px; }
input[type="search"] {
  font-family: 'Assistant', sans-serif; font-size: 15px; color: var(--text);
  background: rgba(15, 10, 8, .5); border: 1px solid rgba(240, 173, 82, .28);
  border-radius: 8px; padding: 8px 12px; min-height: 38px;
}
.btn-mini {
  font-family: 'Assistant', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--gold); background: transparent;
  border: 1px solid rgba(240, 173, 82, .5); border-radius: 8px;
  padding: 8px 14px; min-height: 38px; cursor: pointer; white-space: nowrap;
}
.btn-mini:hover { background: rgba(240, 173, 82, .1); }
.btn-mini.btn-primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--wine), var(--magenta));
}
.btn-mini.btn-danger { color: #F3C6DE; border-color: rgba(186, 48, 133, .55); }
.btn-mini.btn-danger:hover { background: rgba(186, 48, 133, .14); }

/* ---- add-a-member panel ---- */
.add-panel {
  background: var(--panel); border: 1px solid rgba(240, 173, 82, .18);
  border-radius: 12px; padding: 4px 18px; margin-bottom: 8px;
}
.add-panel > summary {
  cursor: pointer; list-style: none; padding: 12px 0;
  color: var(--gold); font-weight: 600; font-size: 16px;
}
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel > summary::before { content: '+ '; }
.add-panel[open] > summary::before { content: '– '; }
.add-form {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: flex-end;
  padding: 6px 0 18px;
}

/* ---- the table ---- */
.m-table { display: flex; flex-direction: column; gap: 10px; }
.m-row {
  background: var(--panel); border: 1px solid rgba(240, 173, 82, .16);
  border-radius: 12px; padding: 12px 16px;
}
.m-main {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: minmax(190px, 1.5fr) 96px 1.1fr 1.2fr 1.1fr 1.1fr;
}
.m-head {
  background: transparent; border: none; padding-bottom: 0;
  color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .04em;
}
.m-head .m-main { align-items: end; }
.m-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-name { font-size: 16px; color: var(--cream); }
.m-mail { font-size: 13px; color: var(--text-dim); word-break: break-all; }
.m-cell { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.cell-sub { font-size: 12.5px; color: var(--text-dim); }
.cell-none { color: var(--text-dim); font-size: 14px; }
.m-note {
  margin-top: 8px; font-size: 13.5px; color: var(--text-dim);
  border-inline-start: 2px solid rgba(240, 173, 82, .4); padding-inline-start: 10px;
}

.pill {
  display: inline-block; font-size: 13px; border-radius: 999px;
  padding: 3px 11px; border: 1px solid transparent; width: fit-content;
}
.pill-open { color: var(--cream); border-color: rgba(240, 173, 82, .45); background: rgba(240, 173, 82, .08); }
.pill-soon { color: #FFD9A8; border-color: rgba(224, 130, 75, .7); background: rgba(224, 130, 75, .14); }
.pill-expired { color: #F3C6DE; border-color: rgba(186, 48, 133, .6); background: rgba(186, 48, 133, .14); }
.chip {
  display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px;
  padding: 3px 12px; width: fit-content;
}
.ch-blocked { color: #F3C6DE; background: rgba(186, 48, 133, .18); border: 1px solid rgba(186, 48, 133, .5); }
.ch-regular { color: var(--cream); background: rgba(78, 80, 134, .28); border: 1px solid rgba(120, 122, 180, .5); }

/* ---- per-row management panel ---- */
.m-edit > summary {
  cursor: pointer; list-style: none; margin-top: 10px;
  font-size: 14px; color: var(--gold); padding: 6px 0;
}
.m-edit > summary::-webkit-details-marker { display: none; }
.m-edit > summary::before { content: '⌄ '; }
.m-edit[open] > summary::before { content: '⌃ '; }
.m-panel {
  display: flex; flex-direction: column; gap: 14px;
  border-top: 1px solid rgba(240, 173, 82, .18); padding-top: 14px; margin-top: 4px;
}
.ctl-group { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.ctl-title {
  flex: 0 0 100%; font-size: 13px; font-weight: 600;
  color: var(--gold); letter-spacing: .04em;
}
.ctl-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.ctl-wide { flex: 1 1 100%; }
.ctl-label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px; color: var(--text-dim);
}
.ctl-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); }
.ctl-label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 8px; }

.magic {
  display: inline-block; direction: ltr; text-align: left; word-break: break-all;
  font-size: 12.5px; color: var(--cream); background: rgba(15, 10, 8, .55);
  border: 1px solid rgba(240, 173, 82, .3); border-radius: 8px; padding: 8px 10px; margin-top: 6px;
}
.admin-foot { margin-top: 26px; font-size: 13.5px; color: var(--text-dim); text-align: center; }

@media (max-width: 900px) {
  .m-head { display: none; }
  .m-main { grid-template-columns: 1fr 1fr; }
  .m-who { grid-column: 1 / -1; }
}

.link-admin { color: var(--gold); font-weight: 600; }

.ctl-hint { font-size: 12.5px; color: var(--text-dim); align-self: center; }
