/* =========================================================
   ALFA3 V9 — Bilad Al-Rafidain University Visual Identity
   ========================================================= */
:root{
  --a3-bg:#06101d;
  --a3-bg-soft:#091828;
  --a3-surface:#0d1d2e;
  --a3-surface-2:#12263a;
  --a3-surface-3:#173047;
  --a3-card:rgba(12,29,46,.88);
  --a3-text:#f7fbff;
  --a3-muted:#9db0c5;
  --a3-line:rgba(175,216,239,.12);
  --a3-primary:#087bdf;
  --a3-primary-2:#09c4cf;
  --a3-cyan:#20d3d7;
  --a3-blue:#0a55b7;
  --a3-success:#20b77a;
  --a3-warning:#e5a93d;
  --a3-danger:#db5365;
  --a3-shadow:0 24px 70px rgba(0,16,32,.32);
  --a3-radius:22px;
  --a3-font:"Alexandria","Segoe UI",Tahoma,Arial,sans-serif;
}
html[data-theme="light"]{
  --a3-bg:#f3f8fc;
  --a3-bg-soft:#eaf3f9;
  --a3-surface:#ffffff;
  --a3-surface-2:#f2f7fb;
  --a3-surface-3:#e4eff7;
  --a3-card:rgba(255,255,255,.94);
  --a3-text:#0a2033;
  --a3-muted:#667d91;
  --a3-line:rgba(17,59,87,.10);
  --a3-shadow:0 18px 55px rgba(21,66,96,.10);
}
*{box-sizing:border-box}
html,body,button,input,select,textarea{font-family:var(--a3-font)!important}
html{background:var(--a3-bg);scroll-behavior:smooth}
body{
  margin:0!important;
  background:
    radial-gradient(circle at 88% -12%,rgba(9,196,207,.14),transparent 31%),
    radial-gradient(circle at 4% 103%,rgba(8,123,223,.15),transparent 29%),
    var(--a3-bg)!important;
  color:var(--a3-text)!important;
  min-height:100vh;
  letter-spacing:0;
}
.shell{min-height:100vh;background:transparent!important}
a{transition:color .18s ease,background-color .18s ease,border-color .18s ease,transform .18s ease}

/* Header */
.a3-header,.top.v7-top,.public-live-shell>.top{
  min-height:78px!important;
  padding:0 clamp(16px,4vw,64px)!important;
  position:sticky!important;
  top:0;
  z-index:80;
  border-bottom:1px solid var(--a3-line)!important;
  background:color-mix(in srgb,var(--a3-bg) 83%,transparent)!important;
  backdrop-filter:blur(22px) saturate(145%);
  box-shadow:0 10px 35px rgba(0,16,32,.08);
}
.a3-header-inner{width:min(1460px,100%);margin:auto;display:flex;align-items:center;gap:20px;min-height:78px}
.a3-brand{
  display:inline-flex!important;
  align-items:center;
  gap:11px;
  min-width:max-content;
  text-decoration:none!important;
  color:var(--a3-text)!important;
}
.a3-brand-logo{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 8px 18px rgba(0,138,210,.18))}
.a3-brand-copy{display:grid;line-height:1.12;gap:3px}
.a3-brand-name{font-weight:800;font-size:20px;letter-spacing:-.04em}
.a3-brand-name b{font-weight:800;color:var(--a3-primary-2)}
.a3-brand-university{font-size:10.5px;font-weight:600;color:var(--a3-muted);white-space:nowrap}
.nav{display:flex!important;align-items:center;gap:4px;margin-inline:8px auto}
.nav a{
  color:var(--a3-muted)!important;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  padding:9px 12px!important;
  border-radius:12px!important;
  border:1px solid transparent;
}
.nav a:hover,.nav a.is-active{color:var(--a3-text)!important;background:var(--a3-surface-2)!important;border-color:var(--a3-line)}
.top-actions{margin-inline-start:auto;display:flex;align-items:center;gap:8px!important}
.icon-toggle{border-radius:12px!important;background:var(--a3-surface-2)!important;color:var(--a3-text)!important;border:1px solid var(--a3-line)!important}
.user-chip{
  display:inline-flex!important;align-items:center;gap:7px;
  padding:8px 11px;border-radius:13px;
  background:var(--a3-surface-2);border:1px solid var(--a3-line);
  color:var(--a3-text)!important;font-size:11px!important;font-weight:600
}
.user-chip:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--a3-success);box-shadow:0 0 0 4px rgba(32,183,122,.10)}

/* Layout and typography */
.wrap,.v7-wrap{width:min(1380px,92%)!important;margin:auto!important;padding:30px 0 42px!important}
.page-head{margin-bottom:22px!important;align-items:center!important}
.page-head h1,.public-title h1{font-weight:800!important;letter-spacing:-.055em!important;color:var(--a3-text)!important;line-height:1.2}
.page-head h1{font-size:clamp(28px,4vw,46px)!important;margin:7px 0 6px!important}
.eyebrow{
  display:inline-flex;align-items:center;gap:7px;
  color:var(--a3-primary-2)!important;
  font-size:10px!important;font-weight:800!important;letter-spacing:.13em!important
}
.eyebrow:before{content:"";width:18px;height:2px;border-radius:99px;background:linear-gradient(90deg,var(--a3-primary),var(--a3-primary-2))}
.muted,.device-help,.stage-empty p{color:var(--a3-muted)!important;line-height:1.8}

/* Cards */
.card,.student-stage-card,.participant-card,.mod-stats>div,.v75-stat{
  background:linear-gradient(180deg,color-mix(in srgb,var(--a3-card) 94%,white 0%),var(--a3-card))!important;
  border:1px solid var(--a3-line)!important;
  border-radius:var(--a3-radius)!important;
  box-shadow:var(--a3-shadow)!important;
}
.card{padding:22px!important}
.card h3{font-size:16px;font-weight:750;color:var(--a3-text);margin:0 0 12px!important}
.event-card{position:relative;overflow:hidden;min-height:215px}
.event-card:after{content:"";position:absolute;width:135px;height:135px;border-radius:50%;left:-75px;bottom:-85px;background:radial-gradient(circle,rgba(9,196,207,.14),transparent 70%);pointer-events:none}
.stats-grid{gap:14px!important}
.stat{position:relative;overflow:hidden}
.stat:before{content:"";position:absolute;inset-inline-start:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,var(--a3-primary-2),var(--a3-primary))}
.stat span{color:var(--a3-muted)!important;font-size:12px;font-weight:600}
.stat strong{color:var(--a3-text)!important;font-size:38px!important;font-weight:800!important;letter-spacing:-.04em}

/* Buttons */
.btn,.media-btn,.student-media-btn,.student-sound-btn,.public-sound-btn,.public-retry-btn,.mod-btn,.permission-btn,.tiny,.wake-btn{
  min-height:42px;
  border-radius:13px!important;
  font-weight:700!important;
  letter-spacing:-.01em;
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease,border-color .16s ease!important
}
.btn{
  background:linear-gradient(135deg,var(--a3-primary),#0866c6)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.06)!important;
  box-shadow:0 10px 24px rgba(8,123,223,.18)
}
.btn:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.05)}
.btn.alt,.media-btn,.student-media-btn,.student-sound-btn,.public-sound-btn,.public-retry-btn,.mod-btn,.permission-btn,.tiny,.wake-btn{
  background:var(--a3-surface-2)!important;color:var(--a3-text)!important;border:1px solid var(--a3-line)!important;box-shadow:none!important
}
.btn.alt:hover,.media-btn:hover,.student-media-btn:hover,.mod-btn:hover,.permission-btn:hover{border-color:rgba(32,211,215,.32)!important}
.media-btn.is-on,.student-media-btn.is-on,.permission-btn.is-on,.v75-perm.is-on,.mod-btn.primary{
  background:linear-gradient(135deg,rgba(8,123,223,.22),rgba(9,196,207,.18))!important;
  color:#dffeff!important;border-color:rgba(32,211,215,.30)!important
}
.danger-btn{background:linear-gradient(135deg,#d7475c,#b82d42)!important;color:#fff!important}
.text-link{color:var(--a3-primary-2)!important;font-weight:700}

/* Forms */
.field label{color:var(--a3-muted)!important;font-size:12px!important;font-weight:650!important;margin-bottom:8px!important}
.field input,.field select,textarea,.copy-row input,.chat-form input,.device-field select{
  min-height:46px;
  background:var(--a3-surface-2)!important;
  color:var(--a3-text)!important;
  border:1px solid var(--a3-line)!important;
  border-radius:13px!important;
  padding:12px 14px!important;
  outline:none;
  box-shadow:inset 0 0 0 1px transparent;
}
textarea{min-height:110px}
.field input:focus,.field select:focus,textarea:focus,.chat-form input:focus,.device-field select:focus{
  border-color:rgba(32,211,215,.48)!important;
  box-shadow:0 0 0 4px rgba(9,196,207,.08)!important
}
.check{color:var(--a3-muted)!important;font-size:13px}

/* Tables */
.table-card{padding:0!important;overflow:hidden!important}
.table-card>.section-head{padding:20px 22px 15px}
.table-wrap{overflow:auto}
table{border-collapse:separate!important;border-spacing:0!important;min-width:720px!important}
th{font-size:11px!important;text-transform:none;color:var(--a3-muted)!important;background:var(--a3-surface-2);font-weight:700!important}
th,td{padding:13px 15px!important;border-bottom:1px solid var(--a3-line)!important}
td{color:var(--a3-text);font-size:12.5px!important}
tbody tr:hover td{background:rgba(9,196,207,.035)}

/* Badges / status */
.badge,.status,.public-pill,.student-connection,.mod-live-state{
  border:1px solid var(--a3-line)!important;
  background:var(--a3-surface-2)!important;
  color:var(--a3-muted)!important;
  border-radius:999px!important;font-weight:700!important
}
.status-live,.student-connection[data-state="live"],.public-live-status[data-state="live"]{background:rgba(32,183,122,.12)!important;color:#69e7ad!important;border-color:rgba(32,183,122,.20)!important}
.status-scheduled,.public-live-status[data-state="connecting"]{background:rgba(229,169,61,.12)!important;color:#f1c66e!important;border-color:rgba(229,169,61,.20)!important}
.status-cancelled,.notice.danger{background:rgba(219,83,101,.12)!important;color:#ffb7c1!important;border-color:rgba(219,83,101,.23)!important}
.status-ended,.status-draft{background:var(--a3-surface-2)!important;color:var(--a3-muted)!important}
.notice,.error{background:rgba(32,183,122,.10)!important;border:1px solid rgba(32,183,122,.20)!important;color:#c8f7e2!important;border-radius:14px!important}

/* Mini stats / list / chat */
.mini-stats div,.list-item,.message,.mini-chat,.v75-person,.v75-hand{
  background:var(--a3-surface-2)!important;border:1px solid var(--a3-line)!important
}
.mini-stats div{border-radius:14px!important}
.mini-stats b{color:var(--a3-text)!important}
.message b{color:var(--a3-primary-2)!important}
.avatar,.v75-avatar{background:linear-gradient(135deg,rgba(8,123,223,.28),rgba(9,196,207,.18))!important;color:#dffeff!important}
.hand-badge{background:rgba(229,169,61,.12)!important;color:#f6d28e!important;border:1px solid rgba(229,169,61,.18)}

/* Teacher studio / RTC */
.v7-stage,.pro-stage,.stage,.student-stage,.public-live-stage,.rtc-viewer-stage{
  border-color:rgba(89,190,228,.15)!important;
  background:#020914!important;
  box-shadow:0 26px 80px rgba(0,8,18,.35)!important
}
.v7-stage,.pro-stage{border-radius:26px!important}
.stage-topbar,.stage-bottom .media-buttons,.device-state,.audio-meter{
  background:rgba(3,14,26,.72)!important;
  border:1px solid rgba(150,222,245,.13)!important;
  backdrop-filter:blur(18px) saturate(130%);
}
.stage-empty .camera-mark,.student-play,.public-play-mark{
  background:linear-gradient(135deg,rgba(8,123,223,.18),rgba(9,196,207,.15))!important;
  color:var(--a3-primary-2)!important;
  border:1px solid rgba(32,211,215,.18)!important
}
.rtc-peer{border-color:rgba(96,202,236,.12)!important;background:#020914!important}
.rtc-peer-name{background:rgba(3,14,26,.76)!important;color:#eafaff!important;border:1px solid rgba(255,255,255,.06)}
.audio-unlock{background:linear-gradient(135deg,var(--a3-primary),var(--a3-primary-2))!important;color:#fff!important}
.v75-live-dot[data-live="1"]{background:var(--a3-success)!important;box-shadow:0 0 0 5px rgba(32,183,122,.12)!important}
.v75-sidebar{scrollbar-width:thin;scrollbar-color:var(--a3-surface-3) transparent}

/* Student / moderator */
.student-room-head,.page-head{gap:16px}
.student-stage-card{padding:10px!important}
.student-side{gap:14px!important}
.mod-live-state{border-radius:14px!important}
.mod-stats{gap:12px!important}
.mod-stats>div{box-shadow:none!important}
.participants-grid{gap:14px!important}
.permission-row,.mod-actions{gap:8px!important}

/* Public watch */
.public-live-shell{background:transparent!important;color:var(--a3-text)!important}
.public-meta-strip{margin-top:0!important}
.public-live-stage{border-radius:26px!important;padding:10px!important;background:var(--a3-card)!important}
.public-live-stage-inner{border-radius:19px;overflow:hidden;background:#020914!important}
.public-live-toolbar{padding:4px 3px 0}
.public-pill{font-size:11px!important;padding:7px 10px!important}

/* Footer */
.footer{margin-top:20px;padding:30px 0 12px!important;border-top:1px solid var(--a3-line);color:var(--a3-muted)!important;font-size:10.5px!important}
.footer strong{color:var(--a3-text);font-weight:700}

/* Landing */
.a3-landing{min-height:100vh;overflow:hidden}
.a3-public-header{position:relative;z-index:10;width:min(1450px,92%);margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 0}
.a3-public-header .a3-brand-logo{width:54px;height:54px}
.a3-hero{width:min(1450px,92%);margin:auto;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(430px,.95fr);gap:60px;align-items:center;padding:70px 0 92px;min-height:calc(100vh - 92px)}
.a3-hero-copy{max-width:760px}
.a3-kicker{display:inline-flex;align-items:center;gap:9px;padding:8px 13px;border:1px solid rgba(32,211,215,.18);border-radius:999px;background:rgba(9,196,207,.07);color:#8feff1;font-size:11px;font-weight:700}
.a3-kicker:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--a3-primary-2);box-shadow:0 0 0 5px rgba(9,196,207,.10)}
.a3-hero h1{font-size:clamp(44px,6vw,80px);line-height:1.11;letter-spacing:-.065em;margin:20px 0 20px;font-weight:800;color:var(--a3-text)}
.a3-hero h1 em{font-style:normal;background:linear-gradient(110deg,#53dce3,#258ee6 60%,#0b66c9);-webkit-background-clip:text;background-clip:text;color:transparent}
.a3-hero .lead{font-size:16px!important;line-height:2!important;color:var(--a3-muted)!important;max-width:700px;margin:0}
.a3-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:28px}
.a3-hero-actions .btn{padding:12px 22px!important;min-height:48px}
.a3-hero-note{font-size:11px;color:var(--a3-muted);margin-top:15px}
.a3-visual{position:relative;min-height:520px;display:grid;place-items:center}
.a3-glow{position:absolute;width:440px;height:440px;border-radius:50%;background:radial-gradient(circle,rgba(9,196,207,.18),rgba(8,123,223,.08) 50%,transparent 70%);filter:blur(8px)}
.a3-logo-stage{position:relative;width:min(475px,90%);aspect-ratio:1;border:1px solid var(--a3-line);border-radius:42px;background:linear-gradient(145deg,rgba(12,31,49,.88),rgba(4,17,30,.68));display:grid;place-items:center;box-shadow:0 50px 120px rgba(0,10,24,.34);overflow:hidden}
.a3-logo-stage:before{content:"";position:absolute;inset:-1px;background:linear-gradient(135deg,rgba(32,211,215,.10),transparent 36%,rgba(8,123,223,.12));pointer-events:none}
.a3-logo-stage img{position:relative;z-index:2;width:78%;height:78%;object-fit:contain;filter:drop-shadow(0 24px 40px rgba(0,70,140,.24))}
.a3-float{position:absolute;z-index:3;padding:11px 14px;border:1px solid var(--a3-line);border-radius:15px;background:rgba(8,25,42,.78);backdrop-filter:blur(16px);font-size:11px;font-weight:650;color:#d9efff;box-shadow:0 18px 55px rgba(0,10,24,.24)}
.a3-float.f1{top:65px;right:-5px}.a3-float.f2{bottom:70px;left:-10px}.a3-float strong{color:#72e8ec}
.a3-feature-row{width:min(1450px,92%);margin:-45px auto 60px;display:grid;grid-template-columns:repeat(3,1fr);gap:14px;position:relative;z-index:5}
.a3-feature{padding:20px;border:1px solid var(--a3-line);border-radius:20px;background:var(--a3-card);box-shadow:var(--a3-shadow)}
.a3-feature b{display:block;font-size:14px;margin:10px 0 6px}.a3-feature p{margin:0;color:var(--a3-muted);font-size:11.5px;line-height:1.8}
.a3-feature-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,rgba(8,123,223,.16),rgba(9,196,207,.13));color:var(--a3-primary-2);font-weight:800;border:1px solid rgba(32,211,215,.12)}

/* Login */
.a3-login-page{min-height:100vh;display:grid;grid-template-columns:minmax(420px,.92fr) minmax(460px,1.08fr);background:var(--a3-bg)}
.a3-login-brand{position:relative;overflow:hidden;padding:clamp(34px,5vw,72px);display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(150deg,#071729 0%,#09223a 55%,#073a55 100%)}
.a3-login-brand:before{content:"";position:absolute;width:560px;height:560px;border-radius:50%;right:-210px;top:-180px;background:radial-gradient(circle,rgba(31,211,216,.20),transparent 64%)}
.a3-login-brand:after{content:"";position:absolute;width:500px;height:500px;border-radius:50%;left:-250px;bottom:-270px;background:radial-gradient(circle,rgba(8,123,223,.22),transparent 65%)}
.a3-login-brand>*{position:relative;z-index:2}
.a3-login-mark{display:flex;align-items:center;gap:13px}.a3-login-mark img{width:64px;height:64px;object-fit:contain}.a3-login-mark .a3-brand-name{font-size:24px}.a3-login-copy{max-width:640px}.a3-login-copy h1{font-size:clamp(34px,4.5vw,62px);line-height:1.2;letter-spacing:-.055em;margin:0 0 20px;font-weight:800}.a3-login-copy h1 span{color:#64e4e8}.a3-login-copy p{color:#b8ccdc;line-height:2;font-size:14px;margin:0}.a3-login-points{display:flex;gap:8px;flex-wrap:wrap;margin-top:25px}.a3-login-points span{font-size:10.5px;padding:8px 10px;border-radius:999px;border:1px solid rgba(146,225,238,.14);background:rgba(255,255,255,.04);color:#cce8f2}.a3-login-brand-footer{font-size:10px;color:#7998ad}
.a3-login-form-side{padding:34px;display:grid;place-items:center;background:radial-gradient(circle at 90% 8%,rgba(9,196,207,.08),transparent 25%),var(--a3-bg)}
.a3-login-box{width:min(470px,100%)}
.a3-login-box .a3-mini-logo{display:none}.a3-login-box h2{font-size:30px;letter-spacing:-.045em;margin:10px 0 8px;font-weight:800}.a3-login-box>p{margin:0 0 26px;color:var(--a3-muted);font-size:12.5px;line-height:1.8}
.a3-login-form{padding:24px;border:1px solid var(--a3-line);border-radius:24px;background:var(--a3-card);box-shadow:var(--a3-shadow)}
.a3-password-wrap{position:relative}.a3-password-wrap input{padding-inline-end:48px!important}.a3-password-toggle{position:absolute;inset-inline-end:7px;top:50%;transform:translateY(-50%);width:36px;height:34px;border:0;border-radius:10px;background:transparent;color:var(--a3-muted);cursor:pointer}.a3-password-toggle:hover{background:var(--a3-surface-3);color:var(--a3-text)}
.a3-login-help{display:flex;justify-content:space-between;gap:10px;margin-top:13px;color:var(--a3-muted);font-size:10px}

@media(max-width:1050px){
  .a3-hero{grid-template-columns:1fr;gap:26px;padding-top:40px}.a3-visual{min-height:410px}.a3-logo-stage{width:min(420px,86%)}
  .a3-feature-row{margin-top:-20px}
  .a3-login-page{grid-template-columns:1fr}.a3-login-brand{display:none}.a3-login-form-side{min-height:100vh;padding:24px}.a3-login-box .a3-mini-logo{display:flex;justify-content:center;margin-bottom:24px}.a3-login-box .a3-mini-logo img{width:105px;height:105px;object-fit:contain}
}
@media(max-width:850px){
  .a3-header-inner{flex-wrap:wrap;padding:9px 0}.a3-header,.top.v7-top{min-height:auto!important}
  .nav{order:3;width:100%;overflow:auto;margin:0!important;padding-bottom:7px;display:flex!important}.nav a{white-space:nowrap}
  .user-chip{display:none!important}.a3-brand-university{display:none}
  .a3-feature-row{grid-template-columns:1fr}.a3-hero{min-height:auto}.a3-float{display:none}
}
@media(max-width:640px){
  .wrap,.v7-wrap{width:min(94%,1380px)!important;padding-top:20px!important}.card{padding:17px!important}.page-head{align-items:flex-start!important;flex-direction:column!important}
  .a3-brand-logo{width:42px;height:42px}.a3-brand-name{font-size:18px}.top-actions .btn.small{padding:8px 10px!important;min-height:36px}.icon-toggle{height:36px!important}
  .a3-public-header{padding:12px 0}.a3-public-header .a3-brand-logo{width:46px;height:46px}.a3-hero{padding:32px 0 60px}.a3-hero h1{font-size:clamp(38px,12vw,56px)}.a3-visual{min-height:320px}.a3-logo-stage{border-radius:30px}.a3-feature-row{margin-top:-10px}
  .a3-login-form-side{padding:18px}.a3-login-form{padding:19px}.a3-login-box h2{font-size:26px}
  .public-live-shell>.top{padding:8px 4%!important;min-height:68px!important}.public-live-shell>.top .public-meta-strip .public-pill:last-child{display:none}
}
