:root {
  --green: #008c50;
  --green-deep: #005f38;
  --green-soft: #e9f6ef;
  --red: #ed1c24;
  --ink: #111a16;
  --muted: #65736c;
  --line: #dce6e1;
  --white: #fff;
  --bg: #f3f8f5;
  --shadow: 0 20px 55px rgba(13, 62, 43, .10);
}

* { box-sizing: border-box; }
html { font-family: Inter, "Segoe UI", Tahoma, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; }
body { margin: 0; min-height: 100vh; background: linear-gradient(135deg, #f7faf8 0%, #eef6f2 100%); }
a { color: var(--green-deep); text-decoration: none; }
button, input, select, textarea { font: inherit; }

.topbar {
  height: 104px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(0,95,56,.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px clamp(24px, 5vw, 72px);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 28px rgba(18, 50, 37, .05);
  backdrop-filter: blur(14px);
}

.topbar > a:first-child {
  height: 86px;
  display: flex;
  align-items: center;
}

.logo {
  width: auto;
  height: 82px;
  max-width: 190px;
  object-fit: contain;
  display: block;
}

.nav { display: flex; gap: 8px; align-items: center; }
.nav a {
  padding: 11px 17px;
  border-radius: 11px;
  color: var(--ink);
  font-weight: 700;
  transition: background .2s, color .2s;
}
.nav a:hover { color: var(--green-deep); background: var(--green-soft); }

.shell { width: min(1220px, calc(100% - 48px)); margin: 44px auto 80px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 24px; align-items: stretch; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: clamp(26px, 4vw, 44px); }

.hero-main {
  min-height: 490px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 72%, #00a860 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 6vw, 74px);
}
.hero-main::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border: 70px solid rgba(255,255,255,.07);
  border-radius: 50%;
  right: -150px;
  top: -170px;
}
.hero-main::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  right: 52px;
  bottom: -88px;
}
.hero-main > * { position: relative; z-index: 1; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 800; opacity: .78; }
.hero h1, .page-title { font-size: clamp(2.7rem, 5vw, 4.8rem); line-height: 1.03; max-width: 750px; margin: .28em 0 .32em; letter-spacing: -.045em; }
.hero p { font-size: 1.08rem; line-height: 1.75; max-width: 650px; margin: 0; color: rgba(255,255,255,.88); }

.quick { display: flex; flex-direction: column; gap: 12px; justify-content: center; padding: 30px; }
.quick h2 { font-size: 1.65rem; margin: 8px 0 15px; }
.quick a {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  font-weight: 750;
  color: var(--ink);
  background: #fff;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.quick a:hover { border-color: rgba(0,140,80,.45); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,95,56,.09); }
.quick b { color: var(--red); white-space: nowrap; }

.form-head { max-width: 780px; margin: 0 0 28px; }
.form-head h1 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.12; letter-spacing: -.035em; margin: .25em 0 .2em; }
.form-head p, .muted { color: var(--muted); line-height: 1.65; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .92rem; }
.req { color: var(--red); }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cad9d1;
  border-radius: 11px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,140,80,.11); }
textarea { min-height: 112px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fbfdfc; }
.check input { width: auto; min-height: 0; accent-color: var(--green); }
.section { grid-column: 1/-1; border-top: 1px solid var(--line); padding-top: 26px; margin-top: 8px; }
.section:first-of-type { border-top: 0; padding-top: 0; }
.section h2 { margin: 0 0 5px; font-size: 1.3rem; }

.btn { appearance: none; border: 0; border-radius: 11px; padding: 13px 20px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 9px 20px rgba(0,140,80,.18); }
.btn-primary:hover { background: var(--green-deep); }
.btn-secondary { background: var(--green-soft); color: var(--green-deep); }
.btn-danger { background: var(--red); color: #fff; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; border: 1px solid; }
.alert-success { background: #e9f8f0; color: #075c35; border-color: #bce7cf; }
.alert-error { background: #fff0f1; color: #9d1823; border-color: #f2c1c5; }
.success { text-align: center; padding: 58px 26px; }
.code { font-size: clamp(2.3rem,8vw,5rem); font-weight: 900; letter-spacing: .08em; color: var(--green); margin: .2em 0; }

.admin-layout { display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 26px; }
.sidebar { background: #10291f; color: #fff; border-radius: 18px; padding: 22px; height: max-content; position: sticky; top: 128px; }
.sidebar a { display: block; color: #d9eee4; padding: 11px 12px; border-radius: 9px; margin: 4px 0; }
.sidebar a:hover { background: #1c4735; color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
.stat strong { font-size: 1.8rem; display: block; margin-top: 8px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(13,62,43,.05); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #54665d; background: #f5f9f7; }
tr:hover td { background: #f9fcfa; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; background: #e8f5ee; color: #087342; font-size: .78rem; font-weight: 800; }
.badge.red { background: #fdecee; color: #ad1e29; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { width: auto; min-width: 150px; }
.login { width: min(460px, calc(100% - 32px)); margin: 7vh auto; }
.timer { position: sticky; top: 116px; background: #132820; color: #fff; border-radius: 12px; padding: 12px 16px; text-align: center; font-weight: 900; z-index: 5; }
.question { padding: 20px 0; border-bottom: 1px solid var(--line); }
.question h3 { font-size: 1.05rem; line-height: 1.55; }
.rtl { direction: rtl; }
.rtl th, .rtl td { text-align: right; }

@media (max-width: 900px) {
  .topbar { height: 92px; padding-inline: 20px; }
  .topbar > a:first-child { height: 74px; }
  .logo { height: 70px; max-width: 160px; }
  .shell { width: min(100% - 28px, 1220px); margin-top: 28px; }
  .hero, .admin-layout { grid-template-columns: 1fr; }
  .hero-main { min-height: 390px; }
  .quick { padding: 24px; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .field.full, .section { grid-column: auto; }
}

@media (max-width: 520px) {
  .topbar { height: 82px; padding: 6px 14px; }
  .topbar > a:first-child { height: 68px; }
  .logo { height: 64px; max-width: 135px; }
  .nav a { padding: 9px 11px; font-size: .88rem; }
  .nav .hide-mobile { display: none; }
  .shell { width: min(100% - 20px, 1220px); margin: 18px auto 48px; }
  .card { padding: 22px; border-radius: 17px; }
  .hero { gap: 14px; }
  .hero-main { min-height: 365px; padding: 34px 26px; }
  .hero h1 { font-size: clamp(2.25rem, 12vw, 3.2rem); }
  .hero p { font-size: 1rem; }
  .quick { padding: 20px; }
  .quick a { min-height: 58px; padding: 14px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

.document-uploads {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbf9;
}
.document-uploads > .muted { margin: 0 0 14px; }
.upload-row {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.upload-row[hidden] { display: none; }
.upload-row input[type="file"] { padding: 8px; background: #fff; }
.phone-field { display: grid; grid-template-columns: minmax(155px,.45fr) 1fr; gap: 10px; }
.phone-field select, .phone-field input { min-width: 0; }
.field small.muted { font-size: .8rem; margin-top: 2px; }
.document-list { display: grid; gap: 10px; }
.document-link { display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfc; }
.document-link span { color: var(--muted); font-size: .88rem; }
@media (max-width: 620px) {.upload-row { grid-template-columns: 1fr; gap: 7px; }}
@media (max-width: 520px) {.phone-field { grid-template-columns: 1fr; }}

/* Open Day operations workspace */
.sidebar a.active { background: #fff; color: var(--green-deep); font-weight: 850; }
.stat-text { font-size: 1.05rem !important; line-height: 1.25; }
.section-card { margin-top: 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.detail-grid .card { padding: 26px; }
.info-row { display: grid; grid-template-columns: minmax(150px,.45fr) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); font-size: .88rem; }
.info-row strong { overflow-wrap: anywhere; }
.stats-compact { margin: 14px 0 18px; }
.form-inset { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.comment-list { display: grid; gap: 12px; }
.comment { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fbfdfc; }
.comment header { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.comment p { margin-bottom: 8px; line-height: 1.65; }
.answers { margin-top: 15px; display: grid; gap: 10px; }
.answer-row { padding: 14px; border-radius: 12px; border: 1px solid var(--line); display: grid; gap: 7px; }
.answer-correct { background: #eef9f3; border-color: #bee6cf; }
.answer-wrong { background: #fff4f4; border-color: #f0c7ca; }
details summary { cursor: pointer; font-weight: 800; color: var(--green-deep); }
.candidate-grid { display: grid; gap: 14px; margin-top: 18px; }
.candidate-card { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.candidate-card h3 { margin: 10px 0 5px; }
.candidate-card p { margin: 4px 0; }

.queue-call-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; padding: 22px; margin-bottom: 20px; }
.queue-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.queue-columns > .card { padding: 24px; }
.queue-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 13px 0; }
.queue-row:first-of-type { border-top: 0; }
.queue-row > div { margin-inline-end: auto; display: grid; gap: 2px; }
.queue-row strong { font-size: 1.2rem; color: var(--green-deep); }
.queue-row span,.queue-row small { color: var(--muted); }
.queue-row form { margin: 0; }

.qr-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.qr-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.qr-card img { width: min(300px,100%); aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.qr-card code { width: 100%; margin-top: 14px; padding: 12px; border-radius: 10px; background: #f4f8f6; overflow-wrap: anywhere; direction: ltr; text-align: left; }

/* TV token display */
.tv-body {
  background:
    radial-gradient(circle at 13% 12%, rgba(0,140,80,.24), transparent 31%),
    radial-gradient(circle at 92% 82%, rgba(237,28,36,.12), transparent 27%),
    #071d16;
  color: #fff;
  overflow-x: hidden;
}
.tv-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: radial-gradient(rgba(255,255,255,.2) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(135deg,#000,transparent 68%);
}
.tv-shell { width: 100%; min-height: 100vh; padding: 0; }
.tv-board {
  width: min(1920px,100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(22px,2.3vw,44px) clamp(24px,3.4vw,68px) 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(22px,2.1vw,38px);
  position: relative;
  z-index: 1;
}
.tv-brand {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: clamp(20px,2vw,36px);
  padding-bottom: clamp(18px,1.6vw,28px);
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.tv-brand-logo-wrap {
  width: clamp(96px,8.8vw,138px);
  height: clamp(78px,7.5vw,112px);
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  overflow: hidden;
}
.tv-brand img { width: 90%; height: 90%; object-fit: contain; display: block; }
.tv-brand-copy { min-width: 0; }
.tv-event-name { color: #74e8ad; opacity: 1; font-size: clamp(.7rem,.78vw,.88rem); }
.tv-brand h1 {
  margin: 5px 0 6px;
  color: #fff;
  font-size: clamp(2rem,3.3vw,4.1rem);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 900;
}
.tv-brand p { margin: 0; color: rgba(255,255,255,.68); font-size: clamp(.9rem,1.08vw,1.25rem); }
.tv-brand-actions { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 9px 16px; }
.tv-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.86);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.tv-live span { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(237,28,36,.14); }
.tv-clock { color: #fff; font-size: clamp(1.35rem,2vw,2.2rem); font-weight: 900; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tv-lang {
  grid-column: 1/-1;
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 8px 15px;
  font-weight: 850;
  font-size: .82rem;
  transition: background .2s,border-color .2s;
}
.tv-lang:hover { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.38); }

.tv-stage { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(320px,.72fr); gap: clamp(20px,2vw,34px); min-height: 0; }
.tv-now-panel,
.tv-next-panel { border-radius: clamp(24px,2vw,36px); min-height: 0; overflow: hidden; }
.tv-now-panel {
  padding: clamp(28px,3vw,54px);
  position: relative;
  background: linear-gradient(145deg,#06643d 0%,#008c50 58%,#00a860 100%);
  box-shadow: 0 32px 70px rgba(0,0,0,.25);
}
.tv-now-panel::before {
  content: "";
  position: absolute;
  width: min(42vw,650px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: clamp(50px,6vw,100px) solid rgba(255,255,255,.05);
  right: -18%;
  bottom: -48%;
}
.tv-now-panel::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--red);
}
.rtl .tv-now-panel::after { left: auto; right: 0; }
.tv-section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; position: relative; z-index: 1; }
.tv-kicker { display: block; color: #9ef4c8; font-size: clamp(.78rem,1vw,1rem); font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.tv-section-heading h2 { margin: 7px 0 0; color: rgba(255,255,255,.78); font-size: clamp(1rem,1.35vw,1.45rem); font-weight: 650; }
.tv-pulse { display: flex; gap: 5px; align-items: end; height: 30px; opacity: .8; }
.tv-pulse i { width: 5px; border-radius: 5px; background: #fff; animation: tv-bars 1.1s ease-in-out infinite alternate; }
.tv-pulse i:nth-child(1){height:12px}.tv-pulse i:nth-child(2){height:28px;animation-delay:.2s}.tv-pulse i:nth-child(3){height:19px;animation-delay:.4s}
@keyframes tv-bars { to { transform: scaleY(.48); opacity: .42; } }

.tv-current-stack { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: clamp(28px,4vh,54px); }
.tv-call { border: 1px solid rgba(255,255,255,.16); border-radius: 22px; background: rgba(3,45,28,.25); padding: 18px; min-width: 0; }
.tv-call.primary {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-areas: "meta station" "token station";
  align-items: center;
  min-height: clamp(250px,32vh,400px);
  padding: clamp(28px,4vw,68px);
  border-radius: clamp(24px,2.4vw,40px);
  border: 1px solid rgba(255,255,255,.26);
  background: linear-gradient(115deg,rgba(255,255,255,.16),rgba(255,255,255,.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12),0 18px 50px rgba(0,0,0,.14);
  backdrop-filter: blur(8px);
}
.tv-call-meta { grid-area: meta; align-self: end; color: rgba(255,255,255,.63); font-weight: 900; font-size: clamp(.74rem,.95vw,1rem); letter-spacing: .14em; }
.tv-call strong { display: block; font-size: clamp(2.1rem,3.1vw,4rem); line-height: 1; letter-spacing: .04em; color: #fff; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tv-call.primary strong { grid-area: token; align-self: start; font-size: clamp(5rem,10vw,11rem); font-weight: 950; letter-spacing: .03em; text-shadow: 0 8px 28px rgba(0,0,0,.16); }
.tv-station { grid-area: station; align-self: stretch; min-width: clamp(230px,20vw,360px); padding: clamp(20px,2vw,34px); display: flex; flex-direction: column; justify-content: center; border-left: 1px solid rgba(255,255,255,.18); }
.rtl .tv-station { border-left: 0; border-right: 1px solid rgba(255,255,255,.18); }
.tv-station span { color: rgba(255,255,255,.58); font-size: clamp(.7rem,.82vw,.9rem); font-weight: 900; letter-spacing: .12em; }
.tv-station b { margin-top: 10px; color: #fff; font-size: clamp(1.6rem,2.7vw,3.5rem); line-height: 1.06; }
.tv-call.secondary .tv-call-meta { margin-bottom: 8px; }
.tv-call.secondary .tv-station { min-width: 0; padding: 0; border: 0; margin-top: 14px; }
.tv-call.secondary .tv-station span { font-size: .65rem; }
.tv-call.secondary .tv-station b { margin-top: 4px; font-size: clamp(.95rem,1.1vw,1.2rem); }

.tv-next-panel { background: #fff; color: var(--ink); padding: clamp(26px,2.4vw,44px); box-shadow: 0 32px 70px rgba(0,0,0,.2); }
.tv-next-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.tv-next-head .tv-kicker { color: var(--green-deep); }
.tv-count { min-width: 42px; height: 42px; padding: 0 10px; display: grid; place-items: center; border-radius: 13px; background: var(--green-soft); color: var(--green-deep); font-weight: 950; }
.tv-token-list { display: grid; gap: 11px; margin-top: 18px; }
.tv-next-token { min-height: clamp(58px,7vh,86px); display: grid; grid-template-columns: 45px minmax(0,1fr); align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #e3ebe7; border-radius: 16px; background: #f8fbf9; }
.tv-next-token > span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 900; }
.tv-next-token strong { color: #113427; font-size: clamp(1.25rem,1.75vw,2rem); letter-spacing: .035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tv-next-token:first-child { border-color: rgba(0,140,80,.3); background: var(--green-soft); }
.tv-next-token:first-child > span { background: var(--green); border-color: var(--green); color: #fff; }
.tv-empty { display: grid; place-items: center; align-content: center; text-align: center; }
.tv-empty-large { min-height: clamp(330px,50vh,560px); position: relative; z-index: 1; color: #fff; }
.tv-empty-mark { width: clamp(80px,7vw,120px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 28px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); font-size: clamp(1.5rem,2vw,2.2rem); font-weight: 950; letter-spacing: -.05em; }
.tv-empty-large h3 { margin: 22px 0 7px; font-size: clamp(1.5rem,2.3vw,2.8rem); }
.tv-empty-large p { margin: 0; color: rgba(255,255,255,.68); font-size: clamp(.95rem,1.2vw,1.25rem); }
.tv-empty-side { min-height: 360px; color: var(--muted); gap: 14px; }
.tv-empty-dot { width: 54px; height: 54px; border-radius: 50%; background: var(--green-soft); box-shadow: inset 0 0 0 15px #fff,0 0 0 1px var(--line); }

.tv-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: rgba(255,255,255,.58); font-size: clamp(.72rem,.84vw,.9rem); }
.tv-footer > div { display: flex; align-items: center; gap: 12px; }
.tv-footer strong { color: #fff; letter-spacing: .12em; font-size: .8rem; }
.tv-footer span { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.18); }
.rtl .tv-footer span { padding-left: 0; padding-right: 12px; border-left: 0; border-right: 1px solid rgba(255,255,255,.18); }
.tv-footer p { margin: 0; }

.rtl .filters,.rtl .actions,.rtl .nav { direction: rtl; }
.rtl input[type="email"],.rtl input[type="tel"],.rtl code { direction: ltr; text-align: left; }
.rtl .sidebar { text-align: right; }
.rtl .tv-call span { text-align: start; }

@media (max-width: 980px) {
  .detail-grid,.queue-columns,.tv-grid,.qr-grid { grid-template-columns: 1fr; }
  .queue-call-form { grid-template-columns: 1fr 1fr; }
  .queue-call-form .btn { grid-column: 1/-1; }
  .tv-now,.tv-next { min-height: auto; }
}
@media (max-width: 620px) {
  .candidate-card { align-items: stretch; flex-direction: column; }
  .queue-call-form { grid-template-columns: 1fr; }
  .queue-call-form .btn { grid-column: auto; }
  .queue-row { flex-wrap: wrap; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
}


/* TV responsive refinements */
@media (max-width: 1100px) {
  .tv-stage { grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr); }
  .tv-call.primary { grid-template-columns: 1fr; grid-template-areas: "meta" "token" "station"; }
  .tv-station,.rtl .tv-station { border: 0; border-top: 1px solid rgba(255,255,255,.18); margin-top: 18px; padding: 18px 0 0; min-width: 0; }
}
@media (max-width: 820px) {
  .tv-body { overflow: auto; }
  .tv-board { min-height: 100vh; padding: 20px; }
  .tv-brand { grid-template-columns: auto minmax(0,1fr); }
  .tv-brand-actions { grid-column: 1/-1; display: flex; justify-content: space-between; width: 100%; }
  .tv-lang { grid-column: auto; }
  .tv-stage { grid-template-columns: 1fr; }
  .tv-current-stack { grid-template-columns: 1fr; }
  .tv-call.primary { grid-column: auto; min-height: 260px; }
  .tv-call.primary strong { font-size: clamp(4rem,18vw,8rem); }
  .tv-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .tv-brand-logo-wrap { width: 84px; height: 72px; border-radius: 16px; }
  .tv-brand h1 { font-size: 1.65rem; }
  .tv-brand p { font-size: .82rem; }
  .tv-live { display: none; }
  .tv-now-panel,.tv-next-panel { border-radius: 22px; padding: 22px; }
  .tv-section-heading h2 { display: none; }
  .tv-call.primary { padding: 24px; }
  .tv-next-token { grid-template-columns: 38px minmax(0,1fr); }
  .tv-footer > div { flex-wrap: wrap; }
}


/* Professional multilingual controls and assessment review */
html[lang="ar"], html[lang="ur"] { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }
html[lang="hi"] { font-family: "Noto Sans Devanagari", "Segoe UI", Arial, sans-serif; }
.language-control { margin: 0; }
.language-control label { display: grid; grid-template-columns: auto minmax(125px,1fr); align-items: center; gap: 9px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.language-control label > span { white-space: nowrap; }
.language-control select { min-height: 40px; padding: 8px 34px 8px 11px; border-radius: 10px; background-color: #fff; font-weight: 800; color: var(--green-deep); }
.header-language { display: flex; align-items: center; }
.header-language .language-control label > span { display: none; }
.header-language .language-control select { min-width: 132px; border-color: #d7e4dd; background: #f8fbf9; }
.language-banner {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 22px;
  margin: 0 0 26px; padding: 20px 22px; border: 1px solid rgba(0,140,80,.20); border-radius: 18px;
  background: linear-gradient(115deg,#f4fbf7 0%,#fff 62%); box-shadow: 0 10px 30px rgba(0,95,56,.06);
  position: relative; overflow: hidden;
}
.language-banner::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:linear-gradient(var(--green),var(--red)); }
.rtl .language-banner::before { left:auto; right:0; }
.language-banner strong { display:block; margin:4px 0 2px; font-size:1.08rem; }
.language-banner p { margin:0; color:var(--muted); font-size:.88rem; }
.language-banner .language-control select { min-width: 180px; border-color: rgba(0,140,80,.28); box-shadow: 0 0 0 3px rgba(0,140,80,.06); }
.language-field { padding: 18px; border-radius: 15px; border: 1px solid rgba(0,140,80,.18); background: linear-gradient(120deg,var(--green-soft),#fff); }
.language-field label { color: var(--green-deep); }
.language-field select { border-color: rgba(0,140,80,.35); font-weight: 800; }

.assessment-review { overflow: hidden; }
.assessment-review-head { display:flex; align-items:flex-end; justify-content:space-between; gap:22px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.assessment-review-head h2 { margin:.2em 0 .1em; }
.assessment-view-language label { display:grid; gap:7px; color:var(--muted); font-weight:800; font-size:.82rem; }
.assessment-view-language select { min-width:190px; font-weight:800; color:var(--green-deep); background:#f8fbf9; }
.answers-pro { gap:14px; }
.answer-card { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:16px; align-items:start; padding:18px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.answer-number { width:40px; height:40px; display:grid; place-items:center; border-radius:12px; background:#eef6f2; color:var(--green-deep); font-weight:900; }
.answer-content h3 { margin:3px 0 14px; font-size:1rem; line-height:1.55; }
.answer-comparison { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.answer-comparison > div { padding:12px; border-radius:11px; background:#f8fbf9; border:1px solid #e6eee9; }
.answer-comparison span { display:block; color:var(--muted); font-size:.74rem; font-weight:800; margin-bottom:5px; text-transform:uppercase; letter-spacing:.04em; }
.answer-comparison strong { line-height:1.45; }
.answer-rationale { margin:12px 0 0; padding-top:11px; border-top:1px dashed var(--line); color:var(--muted); font-size:.86rem; }
.answer-status { padding:6px 9px; border-radius:999px; font-size:.72rem; font-weight:900; white-space:nowrap; }
.answer-correct .answer-status { background:#e6f7ee; color:#087342; }
.answer-wrong .answer-status { background:#fdecee; color:#ad1e29; }
.answer-pending .answer-status { background:#f1f3f2; color:#5f6b65; }
.bank-matrix table { min-width: 1080px; }
.bank-count { display:inline-grid; place-items:center; min-width:58px; padding:7px 8px; border-radius:11px; font-weight:950; }
.bank-count small { display:block; margin-top:2px; font-size:.54rem; letter-spacing:.06em; }
.bank-count.ready { background:#e8f6ee; color:#087342; }
.bank-count.missing { background:#fdecee; color:#ad1e29; }

@media (max-width: 760px) {
  .language-banner { grid-template-columns:1fr; gap:14px; }
  .language-banner .language-control select { width:100%; }
  .header-language .language-control select { min-width:108px; max-width:130px; }
  .assessment-review-head { align-items:stretch; flex-direction:column; }
  .assessment-view-language select { width:100%; }
  .answer-card { grid-template-columns:38px minmax(0,1fr); }
  .answer-status { grid-column:2; justify-self:start; }
  .answer-comparison { grid-template-columns:1fr; }
}


/* V5 assessment completion + TV voice */
.assessment-progress{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.assessment-progress span{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;border-radius:999px;background:#f2f6f4;border:1px solid var(--line);color:var(--muted);font-size:.78rem;font-weight:850}.assessment-progress strong{color:var(--green-deep)}.assessment-progress.complete span{background:#e9f7ef;color:#087342;border-color:#caead8}.question{transition:border-color .2s,box-shadow .2s,transform .2s}.question-missing{border-color:rgba(237,28,36,.6)!important;box-shadow:0 0 0 4px rgba(237,28,36,.10)!important;transform:translateY(-2px)}
.tv-voice-button{min-height:42px;padding:9px 13px;border:1px solid rgba(255,255,255,.22);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:.72rem;font-weight:900;letter-spacing:.05em;cursor:pointer;transition:.2s}.tv-voice-button:hover{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.4)}.voice-enabled .tv-voice-button{background:#fff;color:var(--green-deep);border-color:#fff}.tv-voice-symbol{font-size:1rem;line-height:1}.tv-language-select .language-control label>span{display:none}.tv-language-select .language-control select{min-width:130px;background:rgba(255,255,255,.09);color:#fff;border-color:rgba(255,255,255,.2);font-size:.72rem}.tv-language-select .language-control select option{color:#17372b;background:#fff}.tv-voice-hint{display:flex;align-items:center;justify-content:center;gap:10px;margin:-2px 0;color:rgba(255,255,255,.52);font-size:clamp(.7rem,.82vw,.88rem)}.voice-enabled .tv-voice-hint{color:#8ceabb}.tv-brand-actions{grid-template-columns:auto auto auto auto}.tv-call.primary{animation:tv-call-in .32s ease both}@keyframes tv-call-in{from{opacity:.45;transform:scale(.985)}to{opacity:1;transform:scale(1)}}
@media(max-width:1100px){.tv-brand-actions{grid-template-columns:auto auto}.tv-voice-button,.tv-language-select{justify-self:end}}@media(max-width:820px){.tv-brand-actions{flex-wrap:wrap}.tv-voice-button{order:3}.tv-language-select{order:4}.tv-voice-hint{text-align:center;padding:0 12px}}

/* V6: native-language subject lock */
.language-field.is-language-locked select{background:linear-gradient(180deg,#f7fbf9,#eef7f2);border-color:#0b7a4b;box-shadow:0 0 0 3px rgba(11,122,75,.08);cursor:not-allowed;font-weight:700}
.language-field.is-language-locked [data-language-lock-note]{display:block;color:#075c39;font-weight:700;margin-top:8px}
.assessment-review-head .assessment-view-language label{font-weight:700}
.locked-language-badge{display:inline-flex;align-items:center;min-height:42px;padding:0 14px;border:1px solid rgba(0,95,56,.16);border-radius:12px;background:#f4faf7;color:#075c39;font-weight:800}

/* V7: a language subject locks the complete candidate interface to its own language. */
.language-subject-interface-locked .language-banner{
  border-color:rgba(0,140,80,.38);
  background:linear-gradient(120deg,#eaf8f1,#fff);
  box-shadow:0 12px 32px rgba(0,95,56,.08);
}
.language-subject-interface-locked .language-control select,
.language-field.is-language-locked select{
  opacity:1;
  color:var(--green-deep);
  -webkit-text-fill-color:var(--green-deep);
  cursor:not-allowed;
}
.language-control.is-language-subject-locked label span::after{
  content:"  🔒";
}
.language-field.is-language-locked{
  border-color:rgba(0,140,80,.42);
  background:linear-gradient(120deg,#eaf8f1,#fff);
  box-shadow:0 10px 28px rgba(0,95,56,.06);
}


/* Assessment completion / waiting screen */
.assessment-complete {
  width: min(920px,100%);
  margin: 18px auto 0;
  padding: clamp(34px,5vw,64px) clamp(24px,5vw,58px);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(0,140,80,.10), transparent 34%),
    linear-gradient(180deg,#fff 0%,#fbfefc 100%);
}
.assessment-complete::before { content:""; position:absolute; inset:0 0 auto; height:5px; background:linear-gradient(90deg,var(--green) 0 78%,var(--red) 78%); }
.completion-check { width:72px; height:72px; margin:0 auto 20px; border-radius:50%; display:grid; place-items:center; background:var(--green); color:#fff; font-size:2.2rem; font-weight:950; box-shadow:0 14px 32px rgba(0,140,80,.22); }
.assessment-complete h1 { margin:10px auto 12px; max-width:760px; font-size:clamp(2rem,4vw,3.35rem); letter-spacing:-.035em; }
.completion-lead { margin:0 auto 24px; max-width:700px; font-size:clamp(1.05rem,1.6vw,1.3rem); line-height:1.65; color:#43574d; }
.completion-token-card { width:min(520px,100%); margin:0 auto 22px; padding:18px 22px 13px; border:1px solid #cfe7da; border-radius:20px; background:#f2fbf6; box-shadow:inset 0 0 0 1px rgba(255,255,255,.7); }
.completion-token-card > span { display:block; color:#4c6558; font-size:.78rem; text-transform:uppercase; letter-spacing:.13em; font-weight:900; }
.completion-token-card .code { margin:.05em 0 0; font-size:clamp(3rem,8vw,5.6rem); line-height:1.05; }
.completion-instruction { width:min(700px,100%); margin:0 auto 18px; padding:17px 19px; display:flex; align-items:center; gap:14px; text-align:start; border:1px solid #e3e9e6; border-radius:16px; background:#fff; box-shadow:0 10px 28px rgba(13,62,43,.05); }
.completion-instruction-icon { flex:0 0 42px; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:#10291f; color:#fff; font-size:1.25rem; font-weight:900; }
.completion-instruction p { margin:0; line-height:1.55; font-weight:750; color:#243d31; }
.completion-wait { margin:12px auto 0; font-weight:700; }
.rtl .completion-instruction { text-align:right; }

/* V10 question manager */
.question-table{min-width:1180px}.question-cell{min-width:340px;max-width:560px}.question-cell>strong{display:block;white-space:normal;line-height:1.45}.question-cell details{margin-top:8px}.question-cell summary{cursor:pointer;color:var(--green);font-weight:700}.question-options{display:grid;gap:6px;margin-top:8px}.question-options span{display:block;padding:7px 9px;border:1px solid #e4e8e6;border-radius:8px;background:#fafcfb;white-space:normal}.question-options .correct-answer{border-color:#91caae;background:#eff9f3;font-weight:800}.question-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.question-actions form{margin:0}.btn-small{padding:7px 10px;font-size:.84rem}.btn-danger{background:#a91d2a;color:#fff;border-color:#a91d2a}.btn-danger:hover{filter:brightness(.95)}.question-filters{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(140px,1fr)) auto auto}.bank-count{display:flex;text-decoration:none}
@media(max-width:900px){.question-filters{grid-template-columns:1fr}.question-cell{min-width:280px}}

/* V11: live session workflow */
.candidate-live-status{display:grid;gap:18px;max-width:980px;margin:0 auto}.status-identity{display:flex;justify-content:space-between;gap:24px;align-items:center}.status-subjects{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center}.status-subjects span{width:100%;font-size:.82rem;color:var(--muted,#667085);text-align:end}.status-subjects strong,.subject-pill,.subject-strip span{display:inline-flex;padding:8px 12px;border-radius:999px;background:#eef8f2;border:1px solid #cde9d7;font-size:.88rem}.status-message{text-align:center;padding:34px}.status-message h2{font-size:clamp(1.6rem,4vw,2.5rem);margin:8px 0 12px}.status-called{border:2px solid #1b8f4b}.status-called h2 strong{display:inline-block;padding:5px 12px;border-radius:10px;background:#eef8f2}.status-complete{border:1px solid #b9ddc6}.status-selected{border:2px solid #168746;background:linear-gradient(180deg,#f2fff7,#e4f7eb)}.selected-green .status-identity,.selected-green .status-message{box-shadow:0 0 0 2px rgba(22,135,70,.08)}.status-pulse{width:16px;height:16px;border-radius:50%;background:#1b8f4b;margin:0 auto 16px;box-shadow:0 0 0 8px rgba(27,143,75,.12)}.subject-strip{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:18px}.assessment-subject-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:20px}.assessment-subject-card{border:1px solid #dfe7e2;border-radius:16px;padding:18px;display:grid;gap:10px;text-align:start;background:#fff}.assessment-subject-card.done{background:#f2fbf5;border-color:#b8dec5}.assessment-subject-card span{font-size:.85rem;color:var(--muted,#667085)}.status-lookup{max-width:720px;margin:0 auto}.session-management{min-width:0}.session-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;margin-bottom:20px}.active-session-card{border-top:4px solid #1b8f4b}.session-card-head,.session-call-toolbar{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-wrap:wrap}.session-candidate-list{display:grid;gap:8px;margin-top:16px}.session-candidate-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #edf0ee}.session-candidate-row small{display:block;margin-top:3px;color:var(--muted,#667085)}.hall-select{display:flex;gap:8px;align-items:center;font-weight:700}.hall-select select{min-width:130px}.hall-fixed{display:inline-flex;align-items:center;padding:10px 16px;border-radius:12px;background:#eef8f2;font-weight:800}.selected-sales-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.selected-sales-card{border:1px solid #b9ddc6;background:#f3fff7;border-radius:16px;padding:16px;display:flex;justify-content:space-between;gap:12px;align-items:center}.badge.green{background:#e5f8eb;color:#116c39}.assessment-attempt-tabs{display:flex;flex-wrap:wrap;gap:10px}.btn-small{padding:7px 10px;font-size:.82rem}
@media(max-width:720px){.status-identity{align-items:flex-start;flex-direction:column}.status-subjects{justify-content:flex-start}.status-subjects span{text-align:start}.session-call-toolbar,.session-card-head{align-items:stretch;flex-direction:column}.session-call-toolbar .btn,.session-card-head .btn{width:100%}}
.workflow-override{display:flex;justify-content:space-between;gap:18px;align-items:center;border-left:4px solid #d59b18}.candidate-selected-body{background:linear-gradient(180deg,#dff5e7 0%,#f6fff9 100%) !important}.candidate-selected-body .topbar{background:rgba(240,255,245,.96)}
@media(max-width:720px){.workflow-override{align-items:stretch;flex-direction:column}}
