/* מרכז הבחינות — אותה שפה של קמפוס המאמנים (זכוכית, Rubik), בעולם צבע מנטה: קרקע מנטה עמוקה והדגשות מנטה.
   30.10 חי: "הצבע צריך להיות מנטה אני רואה שזה נייבי" — הקרקע הנייבי הוחלפה.
   חריגה מאושרת: חי, 30.10.2026 — "צבע מותג... ילך אולי לפי הצבע מנטה" — היקף: הפלטפורמה הזו בלבד. */
@font-face { font-family: "Rubik"; src: url("/Rubik-var.ttf") format("truetype"); font-weight: 300 900; font-display: swap; }
:root {
  --navy: #2B3459;
  --mint: #5EE0BE;
  --mint-bright: #7BEBCD;
  --mint-deep: #2FB592;
  --mint-soft: rgba(94, 224, 190, .14);
  --red: #F08A8A;
  --red-soft: rgba(240, 138, 138, .14);
  --off-white: #FAFBF9;
  --body-light: #E2F3EC;
  --muted-light: #A3C7BB;
  --ground: #04221C;
  --ground-2: #073129;
  --surface: rgba(190, 255, 235, .06);
  --surface-2: rgba(190, 255, 235, .1);
  --hairline: rgba(190, 255, 235, .14);
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 14px;
  --radius-lg: 22px;
  color-scheme: dark;
}
* , *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Rubik", Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--off-white);
  background: var(--ground);
  background-image: radial-gradient(1100px 560px at 85% -10%, rgba(94, 224, 190, .22), transparent 60%),
                    radial-gradient(900px 520px at 0% 35%, rgba(47, 181, 146, .16), transparent 60%), linear-gradient(180deg, var(--ground-2), var(--ground));
  background-attachment: fixed;
}
main { flex: 1; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 20px; font-weight: 700; }
a { color: inherit; }
.link { color: var(--mint-bright); text-decoration: none; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted-light); }
.small { font-size: 13px; }
.eyebrow { color: var(--mint); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.lead { color: var(--body-light); margin-top: 8px; max-width: 62ch; }
.glass { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

.top { padding: 18px var(--gutter); display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand span { color: var(--mint); font-weight: 700; border-inline-start: 1px solid var(--hairline); padding-inline-start: 14px; }
.foot { padding: 28px var(--gutter); color: var(--muted-light); font-size: 13px; }

.btn {
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 999px; padding: 12px 26px;
  background: var(--mint); color: #062A22; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--mint-bright); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn:focus-visible, .choice:focus-visible, .dot:focus-visible, .chip:focus-visible { outline: 2px solid var(--mint-bright); outline-offset: 3px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--off-white); border: 1px solid rgba(255, 255, 255, .22); }
.btn-ghost:hover { background: var(--surface-2); }
.toast { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius); background: var(--mint-soft); border: 1px solid rgba(94, 224, 190, .4); color: var(--body-light); }

/* כניסה */
.auth { min-height: 70vh; display: grid; place-items: center; padding: 24px var(--gutter); }
.auth-card { width: min(460px, 100%); padding: clamp(24px, 5vw, 40px); }
.stack { display: grid; gap: 14px; margin-top: 22px; }
label { display: grid; gap: 6px; font-size: 14px; color: var(--body-light); }
input { font: inherit; color: var(--off-white); background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; padding: 12px 14px; }
input:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }

/* דף הבית */
.wrap { padding: 12px var(--gutter) 40px; max-width: 1100px; }
.hello { margin: 10px 0 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { padding: 22px; display: grid; gap: 10px; align-content: start; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.row-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row form { margin: 0; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.pill.ok { background: var(--mint-soft); color: var(--mint-bright); }
.pill.no { background: var(--red-soft); color: var(--red); }
.rules { margin-top: 18px; padding: 16px 22px; }
.rules summary { cursor: pointer; font-weight: 700; }
.rules ul { margin: 10px 0 0; padding-inline-start: 20px; color: var(--body-light); display: grid; gap: 6px; }
.out { margin-top: 26px; }

/* מסך הבוחן */
.exam { padding: 6px var(--gutter) 40px; max-width: 860px; margin-inline: auto; }
.exam-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.exam-count { color: var(--body-light); font-size: 14px; }
.timer { font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 800; color: var(--mint-bright); }
.timer.is-low { color: var(--red); }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); margin: 14px 0 18px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint-deep), var(--mint-bright)); transition: width .3s; }
.qcard { padding: clamp(20px, 4vw, 34px); min-height: 300px; }
.qtext { font-size: clamp(18px, 2.4vw, 22px); line-height: 1.55; font-weight: 600; }
.choices { display: grid; gap: 10px; margin-top: 20px; }
.choice {
  font: inherit; color: var(--off-white); text-align: start; cursor: pointer; display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .035); border: 1px solid var(--hairline); transition: border-color .15s, background .15s;
}
.choice:hover { border-color: rgba(94, 224, 190, .5); }
.choice.is-picked { background: var(--mint-soft); border-color: var(--mint); }
.key { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--surface-2); }
.is-picked .key { background: var(--mint); color: #062A22; }
.exam-nav .btn { white-space: nowrap; }
.exam-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dot { font: inherit; font-size: 12px; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 1px solid var(--hairline); background: transparent; color: var(--muted-light); }
.dot.is-done { background: var(--mint-soft); color: var(--mint-bright); border-color: rgba(94, 224, 190, .4); }
.dot.is-cur { border-color: var(--mint); color: var(--off-white); }
.finish { text-align: center; margin-top: 22px; }
.btn-finish { padding: 12px 34px; }
.modal { position: fixed; inset: 0; background: rgba(2, 20, 16, .78); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal[hidden] { display: none; }
.modal-card { width: min(440px, 100%); padding: 28px; text-align: center; display: grid; gap: 12px; background: #0A3A30; }
.big { font-size: 56px; font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums; }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* תוצאות */
.score { padding: 28px; text-align: center; display: grid; gap: 6px; margin: 10px 0 22px; }
.score.ok { border-color: rgba(94, 224, 190, .5); }
.score.no { border-color: rgba(240, 138, 138, .45); }
.score-num { font-size: 64px; font-weight: 800; line-height: 1; }
.score.ok .score-num { color: var(--mint-bright); }
.score.no .score-num { color: var(--red); }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.res-q { padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--hairline); }
.res-head { font-weight: 600; }
.opts { margin: 12px 0 0; padding-inline-start: 22px; display: grid; gap: 6px; color: var(--body-light); }
.opts li { padding: 6px 10px; border-radius: 10px; }
.opts li.right { background: var(--mint-soft); color: var(--off-white); }
.opts li.wrong { background: var(--red-soft); }
.tag { font-size: 12px; font-weight: 700; margin-inline-start: 8px; color: var(--mint-bright); }
.wrong .tag { color: var(--red); }

/* ניהול */
.is-admin .wrap { max-width: 1300px; }
.admin-cycle { padding: 22px; margin-bottom: 18px; display: grid; gap: 12px; }
.wins { display: flex; flex-wrap: wrap; gap: 8px; }
.win { margin: 0; }
.chip { font: inherit; font-size: 13px; cursor: pointer; border-radius: 999px; padding: 6px 14px; background: transparent; color: var(--muted-light); border: 1px solid var(--hairline); }
.chip.on { background: var(--mint-soft); color: var(--mint-bright); border-color: var(--mint); font-weight: 700; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: start; padding: 10px 8px; border-top: 1px solid var(--hairline); vertical-align: top; }
th { color: var(--muted-light); font-weight: 600; }
.cell { display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 8px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.cell.ok { background: var(--mint-soft); }
.cell.no { background: var(--red-soft); }
.cell a { text-decoration: none; }
.inline { display: inline; margin: 0; }
.x { font: inherit; background: none; border: 0; color: var(--muted-light); cursor: pointer; padding: 0 2px; }
.x:hover { color: var(--off-white); }

@media (max-width: 640px) {
  .exam-nav { flex-wrap: wrap; }
  .dots { order: -1; width: 100%; }
  .exam-nav .btn { flex: 1; }
  .timer { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 30.10: לוח מועדים ומייל לסטודנטים */
.pill.off { background: var(--surface-2); color: var(--muted-light); }
.sched { border-top: 1px solid var(--hairline); padding-top: 10px; }
.sched summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.sched-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--hairline); }
.sched-name { min-width: 130px; font-weight: 600; }
.sched-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.sched-form label { font-size: 12px; }
.sched-form input { padding: 6px 10px; font-size: 14px; }
.mail-all { margin: 4px 0; }
.mail-one { text-decoration: none; color: var(--mint); margin-inline-start: 6px; }
.mail-form { padding: 22px; max-width: 720px; }
textarea { font: inherit; color: var(--off-white); background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; padding: 12px 14px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px var(--mint-soft); }
input[type=datetime-local] { color-scheme: dark; }
