:root{
  --bg:#f4f7fb;
  --bg-soft:#eef3f8;
  --surface:#ffffff;
  --surface-soft:#f8fbfd;
  --surface-muted:#f2f6fa;
  --line:#dbe3ec;
  --line-strong:#c9d4e0;
  --text:#17212b;
  --muted:#5f6f82;
  --primary:#1f5fae;
  --primary-dark:#174983;
  --primary-soft:#eaf3ff;
  --success:#1f8a55;
  --warn:#a66712;
  --danger:#b53b3b;
  --radius:20px;
  --radius-sm:14px;
  --shadow:0 10px 30px rgba(23,33,43,.08);
  --shadow-soft:0 4px 16px rgba(23,33,43,.06);
}

*{box-sizing:border-box}
html,body{direction:rtl}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  min-height:100vh;
  background:linear-gradient(180deg,#f8fbff 0%, var(--bg) 100%);
  color:var(--text);
  font-family:Dana,YekanBakh,Vazirmatn,IRANYekanX,IRANSansX,IRANSans,Shabnam,"Segoe UI",Tahoma,Arial,sans-serif;
  font-size:14px;
  line-height:1.95;
  padding-bottom:86px;
}
a{text-decoration:none;color:inherit}
img,video,iframe{max-width:100%}
button,input,textarea,select{font:inherit}

.container-shell{max-width:1240px;margin:0 auto;padding:18px 14px 28px}
.content-shell{min-height:55vh}

.glass{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow);
}
.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow-soft);
}
.card--solid{background:var(--surface)}
.section-card{padding:22px}

.mini-hero{padding:18px 20px;margin-bottom:14px}
.mini-hero__top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:14px;min-width:0}
.brand-badge{
  width:52px;height:52px;border-radius:18px;display:flex;align-items:center;justify-content:center;
  font-weight:800;font-size:16px;color:#fff;background:linear-gradient(180deg,var(--primary),var(--primary-dark));
  box-shadow:0 12px 22px rgba(31,95,174,.20)
}
.brand-title{display:grid;gap:2px;min-width:0}
.brand-title b{font-size:20px;line-height:1.55;color:#102030;font-weight:800}
.brand-title span{font-size:12px;line-height:1.95;color:var(--muted)}
.mini-user-box{
  min-width:190px;padding:12px 14px;border-radius:18px;background:var(--surface-muted);
  border:1px solid var(--line);text-align:right
}
.mini-user-box__role{font-size:12px;color:var(--muted);font-weight:700}
.mini-user-box__name{margin-top:4px;font-size:15px;color:#112033;font-weight:800;line-height:1.7}

.navbar{padding:10px 12px;margin-bottom:18px}
.navlinks{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start}
.navlinks a{
  display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 14px;
  border-radius:14px;border:1px solid var(--line);background:var(--surface-soft);color:#31465d;
  font-size:13px;font-weight:700;transition:.15s ease
}
.navlinks a:hover{border-color:#b9c8d8;background:#fff;transform:translateY(-1px)}
.navlinks a.active{background:var(--primary-soft);border-color:#cfe0f7;color:var(--primary)}

.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.page-head h1{margin:8px 0 0;font-size:32px;line-height:1.5;font-weight:800;color:#102030}
.page-head p{margin:8px 0 0;max-width:820px;color:var(--muted);line-height:2}
.page-eyebrow{
  display:inline-flex;align-items:center;padding:6px 12px;border-radius:999px;
  background:var(--primary-soft);border:1px solid #d7e5fb;color:var(--primary);font-size:12px;font-weight:800
}

.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.section-title-row h2{margin:0;font-size:20px;line-height:1.6;color:#112033;font-weight:800}
.soft-badge{
  display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;
  background:var(--surface-muted);border:1px solid var(--line);color:#496077;font-size:12px;font-weight:800
}

.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.stat-grid--three{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat-grid--four{grid-template-columns:repeat(4,minmax(0,1fr))}
.stat-card{
  display:flex;flex-direction:column;gap:8px;padding:18px;border-radius:22px;
  background:linear-gradient(180deg,#ffffff,#f8fbff);border:1px solid var(--line);box-shadow:var(--shadow-soft)
}
.stat-card span{font-size:12px;color:var(--muted);font-weight:800}
.stat-card strong{font-size:30px;line-height:1.2;color:#112033;font-weight:800}
.stat-card small{font-size:12px;color:var(--muted);line-height:1.9}

.quick-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.quick-link{
  display:block;padding:16px 18px;border-radius:18px;background:var(--surface-soft);border:1px solid var(--line);
  color:var(--text);transition:.15s ease
}
.quick-link:hover{transform:translateY(-1px);box-shadow:var(--shadow-soft);border-color:#c5d5e6}
.quick-link strong{display:block;font-size:15px;line-height:1.75;font-weight:800;color:#112033}
.quick-link span{display:block;margin-top:4px;font-size:12px;line-height:1.9;color:var(--muted)}

.table-wrap{overflow:auto}
.compact-wrap{max-height:430px}
.table,.table--clean{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}
.table thead th,.table--clean thead th{
  background:#f6f9fc;color:#4f657c;font-size:12px;font-weight:800;padding:14px 12px;text-align:right;white-space:nowrap;
  border-bottom:1px solid var(--line)
}
.table thead th:first-child,.table--clean thead th:first-child{border-top-right-radius:16px}
.table thead th:last-child,.table--clean thead th:last-child{border-top-left-radius:16px}
.table tbody td,.table--clean tbody td{
  padding:14px 12px;border-bottom:1px solid #edf2f6;vertical-align:top;color:var(--text);line-height:1.95;background:#fff
}
.table tbody tr:hover td,.table--clean tbody tr:hover td{background:#fbfdff}
.table--compact thead th,.table--compact tbody td{padding:11px 10px;font-size:13px}
.table-sub{margin-top:4px;font-size:12px;color:var(--muted);line-height:1.8}
.stacked-meta{display:grid;gap:6px;font-size:13px;color:#30465c;line-height:1.85}
.empty-cell{text-align:center!important;color:var(--muted)!important;padding:22px 12px!important}

.info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.data-kv{
  display:flex;flex-direction:column;gap:6px;padding:14px 16px;border-radius:18px;
  background:var(--surface-soft);border:1px solid var(--line);min-width:0
}
.data-kv span{font-size:12px;color:var(--muted);font-weight:800}
.data-kv b{font-size:15px;color:#112033;font-weight:800;line-height:1.95;word-break:break-word}

.detail-block{padding:15px 16px;border-radius:18px;background:var(--surface-soft);border:1px solid var(--line)}
.detail-block__label{font-size:12px;color:var(--muted);font-weight:800;margin-bottom:8px}
.detail-block__body{font-size:14px;color:var(--text);line-height:2.05}

.stack-list,.stack-list-lg,.timeline-list,.submission-items-list{display:grid;gap:12px}
.identity-line,.timeline-item,.submission-item-card{
  padding:15px 16px;border-radius:18px;background:var(--surface-soft);border:1px solid var(--line)
}
.identity-line{display:grid;gap:4px}
.identity-line span,.timeline-item__meta{font-size:12px;color:var(--muted);font-weight:800}
.identity-line strong{font-size:15px;color:#112033;font-weight:800;line-height:1.9}
.identity-line small{font-size:12px;color:#4f6378;line-height:1.9}
.timeline-item__top,.submission-item-card__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.timeline-item__top strong,.submission-item-card__title{font-size:16px;line-height:1.8;color:#112033;font-weight:800}
.timeline-item__top span{font-size:12px;color:var(--muted)}
.timeline-item__body{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px;font-size:13px;line-height:1.95;color:var(--text)}
.timeline-item__body.single{display:block;white-space:pre-wrap}
.submission-item-card__meta{display:flex;flex-wrap:wrap;gap:7px;font-size:12px;color:var(--muted);line-height:1.9}

.empty-state{
  padding:22px;border:1px dashed var(--line-strong);background:var(--surface-soft);border-radius:18px;
  color:var(--muted);text-align:center;line-height:2
}

.action-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.action-row--start{justify-content:flex-start}
.pill,.badge,.status-badge,.status-chip{
  display:inline-flex;align-items:center;justify-content:center;padding:6px 11px;border-radius:999px;
  font-size:12px;font-weight:800;border:1px solid transparent;white-space:nowrap
}
.pill{background:var(--surface-muted);border-color:var(--line);color:#425d7a}
.badge,.status-badge,.status-chip{background:var(--primary-soft);border-color:#d7e5fb;color:var(--primary)}
.badge--ok{background:#eefaf3;border-color:#cfe8da;color:var(--success)}
.badge--warn,.status-badge--amber{background:#fff7eb;border-color:#f3dec1;color:var(--warn)}
.badge--muted{background:#f3f6f9;border-color:#dde5ed;color:#50657c}
.badge--danger{background:#fff0f0;border-color:#f0cece;color:var(--danger)}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 15px;
  border-radius:14px;border:1px solid var(--line-strong);background:#fff;color:#12263a;cursor:pointer;
  transition:.15s ease;font-weight:800
}
.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow-soft)}
.btn--primary{background:linear-gradient(180deg,var(--primary),var(--primary-dark));border-color:transparent;color:#fff}
.btn--ghost{background:#f7fafc;color:#16324a}
.btn--danger{background:#c53b3b;border-color:#c53b3b;color:#fff}

.input,input.input,select.input,textarea.input,textarea,select{
  width:100%;padding:12px 14px;border:1px solid var(--line-strong);border-radius:16px;background:#fff;
  color:var(--text);outline:none;line-height:1.9
}
.input:focus,textarea:focus,select:focus{border-color:#8cb5e2;box-shadow:0 0 0 4px rgba(31,95,174,.10)}
.form-label{display:block;margin-bottom:7px;color:var(--muted);font-size:12px;font-weight:800}
.helper-text{margin-top:10px;color:var(--muted);font-size:12px;line-height:1.9}
.grade-form{display:grid;gap:14px}
.filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:12px}
.filter-field{display:grid;gap:6px}
.filter-actions{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}

.mono,.font-mono{font-family:Consolas,"Courier New",monospace;letter-spacing:.02em}
.ltr-text,.mono{direction:ltr;unicode-bidi:isolate;display:inline-block;text-align:left}
.ltr-block{direction:ltr;unicode-bidi:isolate;display:block;text-align:left}
.text-link{color:var(--primary);font-weight:800}
.text-link:hover{text-decoration:underline}
.full-width,.w-full{width:100%}
.whitespace-pre-wrap{white-space:pre-wrap}

.preview-surface{margin-top:12px;border:1px solid var(--line);background:#fff;border-radius:18px;padding:12px}
.preview-frame{width:100%;min-height:420px;border:0;border-radius:14px;background:#fff}
.preview-image{display:block;max-width:100%;max-height:560px;margin:0 auto;border-radius:14px}
.preview-media,.preview-audio{width:100%}
.preview-text{margin:0;white-space:pre-wrap;font-family:Dana,YekanBakh,Vazirmatn,IRANYekanX,IRANSansX,IRANSans,Shabnam,"Segoe UI",Tahoma,Arial,sans-serif;line-height:2.1;color:var(--text);background:#f8fbff;border-radius:14px;padding:14px}
.preview-note{margin-top:10px;font-size:12px;color:var(--muted)}
.inline-preview summary{list-style:none;cursor:pointer}
.inline-preview summary::-webkit-details-marker{display:none}
.inline-preview[open] summary{margin-bottom:0}

.footer{margin-top:18px;color:#718397;font-size:12px;text-align:center}
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);
  border-top:1px solid var(--line);backdrop-filter:blur(14px)
}
.bottom-nav__item{padding:10px 6px;text-align:center;border-radius:14px;font-size:12px;font-weight:800;color:#5c7186}
.bottom-nav__item.is-active{background:var(--primary-soft);color:var(--primary)}

.auth-shell,.login-shell{max-width:1180px;margin:0 auto;min-height:100vh;display:grid;grid-template-columns:1.1fr .9fr;gap:20px;align-items:center;padding:24px 14px}
.auth-card{padding:28px}
.auth-panel{padding:30px;background:linear-gradient(180deg,#213346,#182635);color:#fff;border:1px solid rgba(255,255,255,.08);border-radius:28px;box-shadow:0 20px 46px rgba(0,0,0,.18)}
.auth-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}
.auth-kpi{padding:16px;border-radius:18px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.10)}
.auth-kpi strong{display:block;color:#fff;font-size:24px;line-height:1.5;margin-top:6px;font-weight:800}
.auth-kpi span{color:rgba(226,232,240,.82);font-size:12px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#c8e2ff;font-size:12px}
.auth-title{font-size:34px;line-height:1.6;margin:16px 0 10px;color:#fff;font-weight:800}
.auth-subtitle{color:rgba(226,232,240,.84);line-height:2;font-size:14px}
.auth-list{margin:18px 0 0;padding:0;list-style:none;display:grid;gap:10px}
.auth-list li{display:flex;align-items:flex-start;gap:10px;color:#e2e8f0;font-size:14px;line-height:2}
.auth-list b{color:#fff}
.bullet{width:26px;height:26px;flex:0 0 26px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:rgba(56,189,248,.16);border:1px solid rgba(56,189,248,.22);color:#bfdbfe}
.form-card,.login-card{background:rgba(255,255,255,.98);color:var(--text);border-radius:26px;border:1px solid rgba(15,23,42,.08);box-shadow:0 24px 60px rgba(0,0,0,.12);padding:28px}
.form-card h1,.login-card h1{margin:0 0 8px;font-size:28px;line-height:1.6;color:var(--text);font-weight:800}
.form-card p,.login-card p{margin:0 0 18px;color:#475569;line-height:2;font-size:14px}
.field{display:grid;gap:8px;margin-bottom:14px}
.field label{font-size:13px;color:#334155;font-weight:800}
.error-box,.error{margin-bottom:14px;padding:12px 14px;border-radius:16px;background:#fff1f2;border:1px solid #fecdd3;color:#be123c;font-size:13px;line-height:1.9}
.auth-actions{display:grid;gap:10px;margin-top:8px}
.submit-btn{width:100%;border:none;border-radius:16px;padding:13px 16px;background:linear-gradient(180deg,var(--primary),var(--primary-dark));color:#fff;font-weight:800;cursor:pointer;box-shadow:0 14px 30px rgba(29,78,216,.18)}
.sub-links{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:12px;font-size:13px;color:#475569}
.sub-links a{color:var(--primary);font-weight:800}
.panel-foot,.login-footer{margin-top:14px;color:#7c8ea1;font-size:12px;line-height:1.9}

@media (min-width:901px){body{padding-bottom:20px}.bottom-nav{display:none}}
@media (max-width:1200px){
  .stat-grid,.stat-grid--four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filter-grid{grid-template-columns:1fr 1fr}
  .filter-actions{grid-column:1/-1}
}
@media (max-width:900px){
  .desktop-nav{display:none}
  .container-shell{padding:14px 12px 24px}
  .auth-shell,.login-shell{grid-template-columns:1fr;padding:18px 12px}
  .auth-title{font-size:28px}
  .auth-kpis{grid-template-columns:1fr}
  .auth-panel{order:2}
}
@media (max-width:800px){
  .page-head h1{font-size:26px}
  .info-grid,.timeline-item__body,.quick-links,.stat-grid,.stat-grid--three,.stat-grid--four{grid-template-columns:1fr}
  .filter-grid{grid-template-columns:1fr}
  .submission-item-card__header,.section-title-row,.page-head,.mini-hero__top{align-items:stretch}
  .brand-title b{font-size:18px}
  .preview-frame{min-height:300px}
  .table,.table--clean{min-width:640px}
}

.options-stack{display:grid;gap:10px}
.option-line{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:#fff;border:1px solid #e2e8f0;color:#0f172a;line-height:1.9}
.option-line--correct{border-color:#16a34a;background:#f0fdf4}.option-line--selected{box-shadow:0 0 0 3px rgba(59,130,246,.15)}
.option-thumb{width:56px;height:56px;object-fit:cover;border-radius:12px;border:1px solid #dbe4f0}
.exam-option-editor{padding:16px}


/* ============================================================
   Sharif Star Premium UI - 2026-04-29
   ============================================================ */

:root{
  --bg:#07111f;
  --bg2:#0b1730;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --surface-muted:#eef2f7;
  --line:#d9e2ee;
  --line-strong:#c1cfdd;
  --text:#111827;
  --muted:#667085;
  --primary:#0b5cff;
  --primary-dark:#083ea9;
  --primary-soft:#eaf1ff;
  --accent:#f7c948;
  --accent-soft:#fff6d7;
  --success:#0f9f6e;
  --warn:#b7791f;
  --danger:#dc2626;
  --radius:24px;
  --radius-sm:16px;
  --shadow:0 24px 70px rgba(3,12,28,.16);
  --shadow-soft:0 12px 34px rgba(15,23,42,.08);
  --shadow-glow:0 18px 60px rgba(11,92,255,.18);
}

html,body{direction:rtl;scroll-behavior:smooth}
body.admin-body,
body.login-body,
body{
  background:
    radial-gradient(circle at 8% 6%,rgba(247,201,72,.18),transparent 28%),
    radial-gradient(circle at 88% 4%,rgba(11,92,255,.22),transparent 30%),
    linear-gradient(135deg,#07111f 0%,#0b1730 42%,#f4f7fb 42%,#eef3fb 100%);
  color:var(--text);
  font-family:Vazirmatn,IRANSansX,IRANSans,"Segoe UI",Tahoma,Arial,sans-serif;
  letter-spacing:-.015em;
}

.bg-orb,.bg-grid{position:fixed;pointer-events:none;z-index:-1}
.bg-orb{width:360px;height:360px;border-radius:999px;filter:blur(38px);opacity:.55}
.bg-orb--one{top:-120px;right:-80px;background:rgba(11,92,255,.38)}
.bg-orb--two{bottom:10%;left:-110px;background:rgba(247,201,72,.28)}
.bg-grid{inset:0;background-image:linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);background-size:34px 34px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.5),transparent 58%)}

.container-shell{max-width:1320px;padding:24px 18px 34px}
.content-shell{animation:fadeUp .34s ease both}
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}

.app-hero{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  border-radius:32px;
  padding:20px;
  margin-bottom:14px;
  color:#fff;
  background:
    linear-gradient(135deg,rgba(11,23,48,.94),rgba(7,17,31,.88)),
    radial-gradient(circle at 18% 20%,rgba(247,201,72,.22),transparent 38%);
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.app-hero:before{
  content:"";
  position:absolute;inset:auto -120px -160px auto;
  width:360px;height:360px;border-radius:999px;background:rgba(247,201,72,.18);filter:blur(14px)
}
.app-hero__main{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.app-hero__stats{position:relative;z-index:1;display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.app-hero__stats span{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.84);font-size:12px;font-weight:800}

.brand{display:flex;align-items:center;gap:15px;color:inherit}
.brand-badge{
  width:64px;height:64px;border-radius:22px;
  background:linear-gradient(160deg,#f8d44f,#b98517 42%,#0b5cff 43%,#063b9a);
  color:#fff;box-shadow:0 18px 46px rgba(11,92,255,.26),inset 0 1px 0 rgba(255,255,255,.34);
  border:1px solid rgba(255,255,255,.22)
}
.brand-badge span{font-weight:950;font-size:21px;letter-spacing:-.05em;text-shadow:0 2px 12px rgba(0,0,0,.28)}
.brand-title b{font-size:22px;color:#fff;font-weight:950;line-height:1.45}
.brand-title span{color:rgba(226,232,240,.8);font-weight:700;font-size:13px}
.mini-user-box{background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.13);color:#fff;backdrop-filter:blur(12px)}
.mini-user-box__role{color:rgba(226,232,240,.78)}
.mini-user-box__name{color:#fff}

.navbar{
  position:sticky;top:12px;z-index:30;
  background:rgba(255,255,255,.88);
  border:1px solid rgba(255,255,255,.72);
  border-radius:24px;
  box-shadow:0 18px 52px rgba(15,23,42,.12);
  backdrop-filter:blur(16px);
}
.navlinks{gap:9px}
.navlinks a{
  min-height:44px;padding:9px 13px;border-radius:16px;border:1px solid transparent;
  background:transparent;color:#334155;font-weight:900;gap:7px;
}
.navlinks a span{filter:saturate(1.1)}
.navlinks a:hover{background:#fff;border-color:#dbe6f3;box-shadow:0 10px 24px rgba(15,23,42,.08);transform:translateY(-1px)}
.navlinks a.active{background:linear-gradient(135deg,#0b5cff,#063b9a);color:#fff;border-color:rgba(255,255,255,.38);box-shadow:var(--shadow-glow)}
.navlinks a.nav-exit{margin-right:auto;color:#9f1239;background:#fff1f2;border-color:#ffe4e6}
.navlinks a.nav-exit:hover{background:#ffe4e6}

.league-hero{
  display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:18px;
  margin:4px 0 20px;padding:26px;border-radius:32px;color:#fff;
  background:
    radial-gradient(circle at 12% 8%,rgba(247,201,72,.25),transparent 36%),
    linear-gradient(135deg,#07111f,#0b1f43 62%,#06101f);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 24px 70px rgba(0,0,0,.24);
  overflow:hidden;position:relative;
}
.league-hero:after{
  content:"";position:absolute;left:-80px;bottom:-120px;width:310px;height:310px;border-radius:999px;
  background:rgba(11,92,255,.24);filter:blur(18px)
}
.league-hero--compact{grid-template-columns:1fr auto;align-items:center}
.league-hero__copy,.league-scoreboard,.hero-actions{position:relative;z-index:1}
.league-hero h1{font-size:38px;line-height:1.5;margin:10px 0 8px;color:#fff;font-weight:950}
.league-hero p{max-width:760px;color:rgba(226,232,240,.82);line-height:2.1;margin:0;font-size:15px}
.page-eyebrow{
  background:rgba(247,201,72,.14);border-color:rgba(247,201,72,.32);color:#ffdc64;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.1)
}
.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}

.league-scoreboard{
  align-self:stretch;min-height:220px;padding:22px;border-radius:28px;
  background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.16);backdrop-filter:blur(14px);
  display:flex;flex-direction:column;justify-content:space-between;box-shadow:inset 0 1px 0 rgba(255,255,255,.12)
}
.score-label{display:inline-flex;align-self:flex-start;padding:7px 11px;border-radius:999px;background:rgba(7,17,31,.44);border:1px solid rgba(255,255,255,.14);color:#ffdc64;font-size:12px;font-weight:950;letter-spacing:.06em}
.score-row strong{display:block;font-size:56px;line-height:1;color:#fff;font-weight:950;letter-spacing:-.05em}
.score-row span{display:block;margin-top:9px;color:rgba(226,232,240,.82);font-weight:800}
.score-mini-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px}
.score-mini-grid div{padding:12px;border-radius:18px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1);text-align:center}
.score-mini-grid b{display:block;font-size:22px;color:#fff}
.score-mini-grid small{color:rgba(226,232,240,.72);font-weight:800}

.card,.glass,.section-card{
  border-color:rgba(226,232,240,.94);
  box-shadow:var(--shadow-soft);
}
.card{
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
}
.card--highlight{
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.94)),
    radial-gradient(circle at 18% 0,rgba(247,201,72,.20),transparent 30%);
}
.section-card{padding:24px;border-radius:28px}
.section-title-row h2{font-size:21px;font-weight:950}
.soft-badge{background:#fff;border-color:#dfe8f3;color:#475569;box-shadow:0 5px 16px rgba(15,23,42,.05)}

.dashboard-layout{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:16px}

.stat-grid{gap:16px}
.stat-card{
  position:relative;overflow:hidden;
  min-height:156px;padding:20px 20px 18px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  border:1px solid rgba(219,226,236,.94);
  border-radius:28px;
  box-shadow:0 16px 40px rgba(15,23,42,.08);
}
.stat-card:before{content:"";position:absolute;top:0;right:0;left:0;height:5px;background:linear-gradient(90deg,#0b5cff,#f7c948)}
.stat-card:after{content:"";position:absolute;left:-54px;bottom:-58px;width:130px;height:130px;border-radius:999px;background:rgba(11,92,255,.07)}
.stat-card span{font-size:12px;color:#64748b;font-weight:950}
.stat-card strong{font-size:34px;color:#0f172a;font-weight:950;letter-spacing:-.05em}
.stat-card small{position:relative;z-index:1;color:#667085}
.stat-card--users:before{background:linear-gradient(90deg,#0b5cff,#38bdf8)}
.stat-card--courses:before{background:linear-gradient(90deg,#7c3aed,#f7c948)}
.stat-card--assignments:before{background:linear-gradient(90deg,#059669,#34d399)}
.stat-card--submissions:before{background:linear-gradient(90deg,#f97316,#f7c948)}

.quick-links{gap:14px}
.quick-link{
  position:relative;overflow:hidden;
  background:#fff;border:1px solid #e1e9f4;border-radius:22px;
  padding:18px 18px 18px 46px;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.quick-link:after{
  content:"›";position:absolute;left:18px;top:50%;transform:translateY(-50%);
  width:24px;height:24px;border-radius:999px;background:var(--primary-soft);color:var(--primary);
  display:flex;align-items:center;justify-content:center;font-weight:950
}
.quick-link:hover{transform:translateY(-3px);box-shadow:0 16px 38px rgba(15,23,42,.10);border-color:#cfe0f8}
.quick-link strong{font-size:16px;font-weight:950}
.quick-link span{color:#667085}

.data-kv{
  background:#fff;border:1px solid #e1e9f4;border-radius:22px;padding:18px;
  box-shadow:0 10px 22px rgba(15,23,42,.04)
}
.data-kv span{font-weight:900;color:#667085}
.data-kv b{color:#0f172a;font-size:16px}

.table-wrap{border-radius:22px;border:1px solid #e1e9f4;background:#fff}
.table,.table--clean{border-collapse:separate;border-spacing:0}
.table thead th,.table--clean thead th{
  background:#f5f8fc;color:#475569;border-bottom:1px solid #e1e9f4;font-weight:950
}
.table tbody td,.table--clean tbody td{border-bottom:1px solid #eef3f8}
.table tbody tr:hover td,.table--clean tbody tr:hover td{background:#f8fbff}

.btn,.submit-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:none;cursor:pointer;text-decoration:none;
  border-radius:17px;padding:12px 18px;font-weight:950;line-height:1.6;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease,border-color .15s ease
}
.btn:hover,.submit-btn:hover{transform:translateY(-1px)}
.btn--primary,.submit-btn{
  color:#fff;background:linear-gradient(135deg,#0b5cff,#063b9a);
  box-shadow:0 16px 36px rgba(11,92,255,.24)
}
.btn--primary:hover,.submit-btn:hover{box-shadow:0 20px 46px rgba(11,92,255,.30)}
.btn--ghost{
  background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.18)
}
.card .btn--ghost,.section-card .btn--ghost{background:#fff;color:#0b5cff;border:1px solid #dbeafe}
.btn--secondary{background:#fff;color:#0f172a;border:1px solid #dbe3ef}
.btn--danger{background:#fff1f2;color:#be123c;border:1px solid #fecdd3}
.text-link{color:#0b5cff;font-weight:950}
.text-link:hover{text-decoration:underline}

.input,select.input,textarea.input,input[type="text"],input[type="password"],input[type="number"],input[type="datetime-local"],input[type="url"],input[type="email"],textarea,select{
  border:1px solid #dbe4ef;border-radius:16px;background:#fff;color:#111827;
  padding:12px 14px;outline:none;box-shadow:0 1px 0 rgba(15,23,42,.03);
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease
}
.input:focus,input:focus,textarea:focus,select:focus{
  border-color:#94bfff;box-shadow:0 0 0 4px rgba(11,92,255,.12);background:#fff
}
.form-label,.field label{font-weight:950;color:#334155}
.pill,.eyebrow{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;
  font-size:12px;font-weight:950
}
.pill{background:var(--accent-soft);color:#8a5a00;border:1px solid #fde68a}
.empty-state{border:1px dashed #cbd5e1;background:#f8fafc;color:#64748b;border-radius:22px;padding:22px;text-align:center;font-weight:800}
.error-box,.error{border-radius:18px;background:#fff1f2;color:#be123c;border:1px solid #fecdd3;font-weight:800}

.auth-shell,.login-shell{
  max-width:1200px;min-height:100vh;grid-template-columns:1.05fr .95fr;gap:22px;
}
.auth-panel{
  padding:36px;border-radius:34px;color:#fff;
  background:
    radial-gradient(circle at 16% 0,rgba(247,201,72,.24),transparent 33%),
    linear-gradient(135deg,rgba(7,17,31,.96),rgba(10,31,68,.92));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 28px 90px rgba(0,0,0,.34)
}
.auth-title{font-size:40px;line-height:1.55;font-weight:950;margin:18px 0 12px}
.auth-subtitle{font-size:15px;color:rgba(226,232,240,.82)}
.auth-list li{line-height:2;color:rgba(226,232,240,.9)}
.bullet{background:rgba(247,201,72,.15);border-color:rgba(247,201,72,.30);color:#ffdc64}
.auth-kpi{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12);border-radius:20px}
.auth-kpi strong{font-weight:950}
.form-card,.login-card{
  border-radius:34px;background:rgba(255,255,255,.96);border:1px solid rgba(255,255,255,.72);
  box-shadow:0 28px 90px rgba(0,0,0,.20);padding:34px;backdrop-filter:blur(12px)
}
.form-card h1,.login-card h1{font-size:32px;font-weight:950}
.submit-btn{width:100%}
.sub-links{align-items:center}
.sub-links a{color:#0b5cff;font-weight:950}

.footer{color:rgba(255,255,255,.72);font-weight:800}
.bottom-nav{
  background:rgba(255,255,255,.93);
  border-top:1px solid rgba(226,232,240,.9);
  backdrop-filter:blur(18px);
  box-shadow:0 -12px 38px rgba(15,23,42,.12)
}
.bottom-nav__item{display:grid;place-items:center;gap:2px;color:#64748b;border:1px solid transparent}
.bottom-nav__item span{font-size:16px;line-height:1}
.bottom-nav__item b{font-size:11px;font-weight:950}
.bottom-nav__item.is-active{background:linear-gradient(135deg,#0b5cff,#063b9a);color:#fff;border-color:rgba(255,255,255,.6);box-shadow:0 10px 26px rgba(11,92,255,.22)}

.ltr-text,.mono{direction:ltr;unicode-bidi:embed}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
.status-pill,.badge{
  display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;
  background:#f1f5f9;border:1px solid #e2e8f0;font-weight:900;color:#475569;font-size:12px
}

@media (min-width:901px){
  body.admin-body,body{padding-bottom:24px}
}
@media (max-width:1200px){
  .league-hero{grid-template-columns:1fr}
  .league-scoreboard{min-height:auto}
  .dashboard-layout{grid-template-columns:1fr}
}
@media (max-width:900px){
  body.admin-body,body{background:linear-gradient(180deg,#07111f 0,#0b1730 220px,#eef3fb 221px,#eef3fb 100%)}
  .app-hero{border-radius:26px;padding:16px}
  .brand-badge{width:54px;height:54px;border-radius:18px}
  .brand-title b{font-size:18px}
  .app-hero__stats{display:none}
  .league-hero,.league-hero--compact{grid-template-columns:1fr;border-radius:26px;padding:20px}
  .league-hero h1{font-size:29px}
  .league-hero p{font-size:14px}
  .hero-actions{width:100%}
  .hero-actions .btn{flex:1}
  .auth-shell,.login-shell{grid-template-columns:1fr;padding:18px 12px}
  .auth-panel{order:2;border-radius:28px;padding:26px}
  .form-card,.login-card{border-radius:28px;padding:26px}
}
@media (max-width:640px){
  .container-shell{padding:14px 10px 24px}
  .app-hero__main{align-items:stretch}
  .brand{width:100%}
  .mini-user-box{width:100%;min-width:0}
  .league-scoreboard{padding:18px}
  .score-row strong{font-size:44px}
  .score-mini-grid{grid-template-columns:1fr}
  .quick-links{grid-template-columns:1fr}
  .stat-card{min-height:138px}
}

/* === Polish pass: typography, brand mark, user avatar === */
:root{
  --font-fa:Vazirmatn,Dana,IRANYekanX,YekanBakh,IRANSansX,IRANSans,Shabnam,"Segoe UI",Tahoma,Arial,sans-serif;
  --font-display:YekanBakh,Dana,Vazirmatn,IRANSansX,"Segoe UI",Tahoma,Arial,sans-serif;
}
html{font-feature-settings:"kern" 1;text-rendering:optimizeLegibility}
body.admin-body,body.login-body,body{
  font-family:var(--font-fa);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  letter-spacing:-.018em;
}
:where(h1,h2,h3,.brand-title b,.auth-title,.league-hero h1,.section-title-row h2,.stat-card strong,.score-row strong){
  font-family:var(--font-display);
  letter-spacing:-.035em;
}
:where(p,.auth-subtitle,.table td,.quick-link span,.data-kv b,.identity-line small){line-height:2.08}
.brand-badge--image{
  padding:0;overflow:hidden;background:transparent!important;border:0!important;box-shadow:0 18px 46px rgba(11,92,255,.24)!important;
}
.brand-badge--image img{width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit}
.brand-title b{font-size:23px}.brand-title span{font-size:13.5px}
.mini-user-box--with-avatar{display:flex;align-items:center;gap:12px;min-width:245px;padding:10px 12px}
.mini-user-box__meta{min-width:0}
.user-avatar{
  width:48px;height:48px;flex:0 0 48px;border-radius:17px;overflow:hidden;
  display:grid;place-items:center;background:linear-gradient(135deg,#0b5cff,#06101f);
  box-shadow:0 14px 28px rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.2)
}
.user-avatar img{width:100%;height:100%;display:block;object-fit:cover}
.app-hero__stats span{font-size:12.5px;letter-spacing:-.01em}
.auth-logo-row{
  display:inline-flex;align-items:center;gap:10px;padding:8px 13px;border-radius:999px;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#eaf3ff;font-size:12px;font-weight:950
}
.auth-logo-row img{width:30px;height:30px;border-radius:10px;box-shadow:0 8px 20px rgba(0,0,0,.18)}
.auth-title{max-width:720px}.auth-subtitle{max-width:760px}
.auth-list li{gap:12px}.auth-list b{font-weight:950}
.panel-foot{color:rgba(226,232,240,.72)}
.form-card h1,.login-card h1{letter-spacing:-.04em}
.person-cell{display:flex;align-items:center;gap:11px;min-width:180px}
.table-avatar{
  width:42px;height:42px;flex:0 0 42px;border-radius:15px;display:grid;place-items:center;
  background:linear-gradient(135deg,#0b5cff,#063b9a);color:#fff;font-weight:950;font-size:16px;
  box-shadow:0 10px 20px rgba(11,92,255,.18);border:1px solid rgba(255,255,255,.72)
}
.table-avatar--staff{background:linear-gradient(135deg,#f8d44f,#b98517 48%,#0b5cff 49%,#063b9a)}
.link-button{padding:0;border:0;background:transparent;color:#0b5cff;font:inherit;font-weight:950;cursor:pointer;line-height:1.95}
.link-button:hover{text-decoration:underline}.link-button--danger{color:#be123c}
.badge--ok{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.badge--muted{background:#f1f5f9;border-color:#e2e8f0;color:#64748b}
.mini-login-logo{
  display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-muted);color:#20405f;font-size:12px;font-weight:900
}
.mini-login-logo img{width:28px;height:28px;border-radius:10px}
@media (max-width:640px){
  .mini-user-box--with-avatar{min-width:0}.user-avatar{width:44px;height:44px;flex-basis:44px}.brand-title b{font-size:18px}
}

/* Main UI refresh - 2026-05-24 */
.public-body{
  min-height:100vh;
  background:
    radial-gradient(circle at 84% 6%,rgba(11,92,255,.14),transparent 34%),
    radial-gradient(circle at 10% 0,rgba(247,201,72,.16),transparent 32%),
    linear-gradient(180deg,#f8fbff 0,#edf3fb 100%);
  color:#111827;
}
.public-shell{max-width:1180px;margin:0 auto;padding:20px 16px 36px}
.public-shell--narrow{max-width:920px}
.public-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.public-brand{display:flex;align-items:center;gap:10px;font-weight:950;color:#0f172a}
.public-brand img{width:44px;height:44px;border-radius:16px;box-shadow:0 10px 24px rgba(11,92,255,.14)}
.public-brand span{font-size:20px}
.public-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.public-nav a{padding:9px 13px;border-radius:999px;background:rgba(255,255,255,.72);border:1px solid rgba(219,226,236,.9);font-weight:900;color:#334155;font-size:13px}
.public-hero{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(300px,.65fr);gap:18px;align-items:stretch;margin-top:12px}
.public-hero__content,.public-panel,.student-card{border:1px solid rgba(219,226,236,.95);background:rgba(255,255,255,.86);box-shadow:0 24px 70px rgba(15,23,42,.10);border-radius:34px;backdrop-filter:blur(14px)}
.public-hero__content{padding:44px 40px}
.public-eyebrow{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#eaf1ff;color:#0b5cff;border:1px solid #dbeafe;font-size:12px;font-weight:950}
.public-hero h1{font-size:44px;line-height:1.55;margin:18px 0 12px;color:#0f172a;font-weight:950;letter-spacing:-.045em}
.public-hero p,.public-section__head p,.public-course-card p,.public-entry small,.student-card p{color:#5b6b7c;line-height:2.05;font-size:15px}
.public-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.btn--ghost-light{background:rgba(15,23,42,.06);color:#0f172a;border:1px solid rgba(15,23,42,.08)}
.public-panel{padding:28px;display:grid;align-content:center;gap:18px;background:linear-gradient(180deg,#0f172a,#16335f);color:#fff;border-color:rgba(255,255,255,.12)}
.public-panel__top{display:flex;align-items:center;justify-content:space-between;color:rgba(226,232,240,.82);font-weight:900}
.public-panel__top strong{color:#86efac}
.public-metric{display:grid;gap:6px;padding:18px;border-radius:24px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.10)}
.public-metric b{font-size:56px;line-height:1;font-weight:950;color:#fff}
.public-metric span{color:#cbd5e1;font-weight:900}
.public-panel__list{display:grid;gap:10px}
.public-panel__list span{padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.09);color:#e2e8f0;font-size:13px;line-height:1.9}
.public-section{margin-top:24px;padding:30px;border-radius:34px;background:rgba(255,255,255,.76);border:1px solid rgba(219,226,236,.9);box-shadow:0 18px 46px rgba(15,23,42,.07)}
.public-section__head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.public-section__head h2{margin:10px 0 0;font-size:28px;font-weight:950;color:#0f172a}
.public-section__head p{max-width:520px;margin:0}
.public-course-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.public-course-card{padding:20px;border-radius:24px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 12px 30px rgba(15,23,42,.05)}
.public-course-card__badge{display:inline-flex;padding:6px 10px;border-radius:999px;background:#fff8db;color:#8a5a00;border:1px solid #fde68a;font-size:11px;font-weight:950}
.public-course-card h3{margin:12px 0 8px;font-size:18px;line-height:1.7;color:#0f172a;font-weight:950}
.public-course-card p{margin:0;font-size:13px}
.public-empty{padding:18px;border-radius:22px;background:#f8fafc;border:1px dashed #cbd5e1;color:#64748b;text-align:center;font-weight:800}
.public-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.public-entry{display:grid;gap:8px;padding:24px;border-radius:28px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 14px 34px rgba(15,23,42,.06)}
.public-entry span{color:#64748b;font-size:12px;font-weight:950}.public-entry strong{font-size:23px;color:#0f172a;font-weight:950}.public-entry small{font-size:13px}
.student-card{padding:42px;margin-top:20px}.student-card h1{font-size:34px;line-height:1.6;margin:14px 0 8px;font-weight:950;color:#0f172a}.student-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}

.brand-title b{font-size:20px}.brand-title span{font-size:13px;line-height:1.9}.app-hero{padding:20px;border-radius:30px}.app-hero__stats span{font-size:12px}.league-hero{min-height:auto}.league-scoreboard{min-height:220px}.bottom-nav__item span{font-size:10px;font-weight:950}.bottom-nav__item b{font-size:10px}.table-wrap{overflow:auto;-webkit-overflow-scrolling:touch}.table{min-width:720px}.table--compact{min-width:620px}.table--clean{min-width:860px}.table th,.table td{vertical-align:middle}.person-cell{min-width:190px}.stacked-meta{display:grid;gap:4px}.stacked-meta span{white-space:nowrap}.page-head p,.section-subtitle,.quick-link span,.stat-card small{line-height:1.95}.footer{color:#64748b}

@media (max-width:900px){
  .public-shell{padding:14px 10px 26px}.public-header{align-items:flex-start}.public-nav{justify-content:flex-end}.public-hero{grid-template-columns:1fr}.public-hero__content{padding:28px 22px;border-radius:28px}.public-hero h1{font-size:30px}.public-panel{border-radius:28px}.public-section{padding:22px;border-radius:28px}.public-section__head{display:grid}.public-course-grid{grid-template-columns:1fr}.public-entry-grid{grid-template-columns:1fr}.student-card{padding:28px 22px;border-radius:28px}.student-card h1{font-size:27px}
}
@media (max-width:640px){
  .public-header{display:grid}.public-nav a{font-size:12px;padding:8px 11px}.public-actions .btn,.student-actions .btn{width:100%}.public-metric b{font-size:46px}.app-hero{margin-bottom:14px}.brand-title b{font-size:16px}.brand-title span{font-size:12px}.mini-user-box{display:none}.league-hero{padding:18px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat-card{padding:16px;border-radius:22px}.stat-card strong{font-size:28px}.section-card{padding:18px;border-radius:22px}.table-wrap{border-radius:18px;margin-inline:-2px}.auth-title{font-size:28px}.auth-shell,.login-shell{padding:12px 10px}.auth-panel{display:none}.form-card,.login-card{padding:22px;border-radius:26px}.bottom-nav{left:8px;right:8px;bottom:8px}.bottom-nav__item{padding:8px 2px}
}

/* Security/UI patch - 2026-05-24 */
:root{
  --font-fa:Dana,YekanBakh,Vazirmatn,IRANSansX,IRANSans,"Segoe UI",Tahoma,Arial,sans-serif;
  --font-display:Dana,YekanBakh,Vazirmatn,IRANSansX,"Segoe UI",Tahoma,Arial,sans-serif;
}
body.admin-body,body.login-body,body.public-body,body{font-family:var(--font-fa);font-size-adjust:.52;text-rendering:geometricPrecision}
:where(h1,h2,h3,.brand-title b,.public-hero h1,.public-entry strong,.stat-card strong){font-family:var(--font-display);letter-spacing:-.04em}
.app-hero--compact{padding:16px 18px;border-radius:28px;margin-bottom:12px;background:linear-gradient(135deg,#07111f,#0d2244 62%,#123b72)}
.header-account{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.top-action{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:999px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.16);color:#fff;font-size:12px;font-weight:950;line-height:1}
.top-action svg{width:16px;height:16px;fill:currentColor}.top-action--danger{background:rgba(220,38,38,.16);border-color:rgba(248,113,113,.26);color:#fff}
.navlinks--icons a{display:inline-flex;align-items:center;gap:7px}.navlinks--icons svg{width:18px;height:18px;fill:currentColor;opacity:.88}.navlinks--icons a.active svg{opacity:1}
.bottom-nav--icons .bottom-nav__item{gap:3px}.bottom-nav--icons svg{width:20px;height:20px;fill:currentColor}.bottom-nav__item--logout{color:#be123c!important}
.notice{padding:13px 16px;border-radius:18px;margin:0 0 14px;font-weight:900;border:1px solid var(--line);background:#fff;color:var(--text)}
.notice--success{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.home-editor textarea{resize:vertical;min-height:84px}.home-editor .field--full{grid-column:1/-1}
.public-hero--refined .public-hero__content{background:rgba(255,255,255,.90)}
.public-nav a:hover,.public-entry:hover,.public-course-card:hover{transform:translateY(-1px);box-shadow:0 18px 44px rgba(15,23,42,.08)}
.public-entry,.public-course-card,.public-nav a{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.public-actions .btn{min-height:46px}.public-panel__list span{position:relative;padding-right:34px}.public-panel__list span:before{content:"";position:absolute;right:14px;top:22px;width:8px;height:8px;border-radius:99px;background:#f7c948;box-shadow:0 0 0 4px rgba(247,201,72,.12)}
.table th{white-space:nowrap}.table td{line-height:1.85}.table .mono{direction:ltr;text-align:left}
@media (max-width:760px){
  .app-hero--compact{padding:14px;border-radius:24px}.app-hero__main{align-items:flex-start}.header-account{width:100%;justify-content:space-between}.mini-user-box--with-avatar{display:flex!important;min-width:0;flex:1}.header-actions{flex:0 0 auto}.top-action{padding:8px 10px}.top-action:not(.top-action--danger){display:none}.brand-title span{display:block}.bottom-nav{padding-bottom:env(safe-area-inset-bottom)}
  .navlinks--icons a svg{width:17px;height:17px}.public-hero h1{letter-spacing:-.035em}
}
@media (max-width:430px){.mini-user-box__role{font-size:11px}.mini-user-box__name{font-size:13px}.user-avatar{width:40px!important;height:40px!important;flex-basis:40px!important}.brand-badge{width:54px;height:54px}.brand-title b{font-size:15px}.brand-title span{font-size:11px}.top-action--danger span{display:none}.top-action svg{width:18px;height:18px}}


/* === Full fix polish 2026-05-24 === */
:root{--font-fa:Vazirmatn,YekanBakh,Dana,IRANSansX,IRANSans,"Segoe UI",Tahoma,Arial,sans-serif;--font-display:YekanBakh,Vazirmatn,Dana,IRANSansX,"Segoe UI",Tahoma,Arial,sans-serif}
body.admin-body,body.login-body,body.public-body,body{font-family:var(--font-fa);font-kerning:normal;text-rendering:optimizeLegibility}
:where(h1,h2,h3,.brand-title b,.auth-title,.public-hero h1,.section-title-row h2,.stat-card strong){font-family:var(--font-display);font-weight:900}
.navlinks--icons svg,.bottom-nav--icons svg,.top-action svg{width:18px;height:18px;fill:currentColor;display:inline-block;vertical-align:middle}
.header-account{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}.header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.top-action{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:14px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.14);color:#fff;font-weight:900;font-size:12px}.top-action--danger{background:rgba(220,38,38,.14);border-color:rgba(248,113,113,.24)}
.navlinks--icons a{gap:8px}.navlinks--icons a span{filter:none}.bottom-nav--icons .bottom-nav__item{display:grid;gap:3px;place-items:center}.bottom-nav--icons svg{width:20px;height:20px}.bottom-nav__item--logout{color:#b91c1c}
.btn--secondary{background:#fff;border-color:#dbe5f0;color:#0f2f5f}.notice{padding:13px 15px;border-radius:18px;margin-bottom:14px;border:1px solid #dbe5f0;background:#fff}.notice--success{background:#eefbf3;border-color:#c8ecd5;color:#166534}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field--full{grid-column:1/-1}.form-actions{display:flex;gap:10px;flex-wrap:wrap}.home-editor input,.home-editor textarea{background:#fff}
@media(max-width:760px){.form-grid{grid-template-columns:1fr}.header-account{width:100%;justify-content:space-between}.header-actions{width:100%;justify-content:flex-start}.top-action{flex:1}.public-actions .btn{width:100%}}


/* Tickets and support polish - 2026-05-24 */
.table th:last-child,.table td:last-child{white-space:nowrap}
.ticket-id-pill{display:inline-flex;align-items:center;justify-content:center;min-width:54px;min-height:32px;padding:4px 10px;border-radius:999px;background:var(--surface-muted);border:1px solid var(--line);color:#42566b;font-weight:800;direction:ltr;unicode-bidi:isolate}
.btn--table{min-height:34px;padding:6px 12px;border-radius:12px;font-size:12px;white-space:nowrap}
.ticket-user-cell{display:grid;gap:2px}.ticket-user-cell strong{font-size:13px;color:#17212b}.ticket-subject-cell{min-width:220px}.ticket-subject-cell strong{display:block;line-height:1.8}.ticket-subject-cell small{display:block;color:var(--muted);font-size:11px;line-height:1.8}.ticket-actions-cell{text-align:left}.support-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.support-summary-card{padding:14px;border-radius:20px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-soft)}.support-summary-card span{display:block;color:var(--muted);font-size:11px;font-weight:800}.support-summary-card b{display:block;margin-top:6px;font-size:24px;line-height:1.25;color:#112033;font-weight:900}.ticket-detail-hero{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:stretch;margin-bottom:16px}.ticket-detail-hero__main{padding:20px;border-radius:24px;background:linear-gradient(135deg,#fff,#f7fbff);border:1px solid var(--line);box-shadow:var(--shadow-soft)}.ticket-detail-hero__main h1{margin:6px 0 0;font-size:26px;line-height:1.55}.ticket-detail-hero__main p{margin:6px 0 0;color:var(--muted)}.ticket-detail-hero__side{min-width:260px;padding:16px;border-radius:24px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-soft);display:grid;gap:10px}.ticket-status-row{display:flex;gap:8px;flex-wrap:wrap}.message-bubble{padding:14px;border-radius:18px;background:var(--surface-soft);border:1px solid var(--line)}.message-bubble--staff{background:#f2f7ff;border-color:#d7e7fb}.message-bubble__top{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;color:var(--muted);font-size:12px}.message-bubble__body{white-space:pre-wrap;color:#17212b;line-height:2}
@media (max-width:760px){.support-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ticket-detail-hero{grid-template-columns:1fr}.ticket-detail-hero__side{min-width:0}.table-wrap{overflow-x:auto}.ticket-subject-cell{min-width:190px}}

@font-face{font-family:"SharifUI";src:url("/static/fonts/Vazirmatn-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"SharifUI";src:url("/static/fonts/Vazirmatn-Medium.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"SharifUI";src:url("/static/fonts/Vazirmatn-Bold.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
body{font-family:"SharifUI",Vazirmatn,Dana,YekanBakh,IRANYekanX,IRANSansX,"Segoe UI",Tahoma,Arial,sans-serif}
.role-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:10px}
.role-check-card{display:flex;align-items:flex-start;gap:12px;padding:14px 15px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fff,#f9fbfd);cursor:pointer;transition:.15s ease;min-height:92px}
.role-check-card:hover{border-color:#bad0e8;box-shadow:var(--shadow-soft);transform:translateY(-1px)}
.role-check-card input{margin-top:7px;accent-color:var(--primary);width:18px;height:18px;flex:0 0 auto}
.role-check-card span{display:grid;gap:4px}.role-check-card strong{font-size:14px;color:#102235;font-weight:900}.role-check-card small{font-size:12px;color:var(--muted);line-height:1.9}
.badge-list{display:flex;flex-wrap:wrap;gap:6px}.staff-access-form{max-width:980px}.form-grid{display:grid;gap:14px}.form-grid--two{grid-template-columns:repeat(2,minmax(0,1fr))}.toggle-line{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:var(--surface-soft);font-weight:800;color:#30465c}.toggle-line input{accent-color:var(--primary);width:18px;height:18px}
.alert{padding:13px 16px;border-radius:16px;border:1px solid var(--line);font-weight:800}.alert--danger{background:#fff1f2;border-color:#fecdd3;color:#be123c}
@media (max-width:760px){.role-check-grid,.form-grid--two{grid-template-columns:1fr}.role-check-card{min-height:auto}}

/* Final stabilization: local fonts, responsive grids and safe table scrolling */
@font-face{font-family:SharifVazir;src:url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:SharifVazir;src:url('/static/fonts/Vazirmatn-Medium.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:SharifVazir;src:url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
body,.admin-body,input,button,textarea,select{font-family:SharifVazir,Vazirmatn,Dana,YekanBakh,"Segoe UI",Tahoma,Arial,sans-serif!important}
.content-shell,.section-card,.card,.grid,.table-wrap{min-width:0}.table-wrap{display:block;width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;direction:ltr;padding-bottom:8px}.table-wrap>table{direction:rtl;min-width:1040px}.table-wrap::-webkit-scrollbar{height:10px}.table-wrap::-webkit-scrollbar-thumb{background:#c8d4e3;border-radius:999px}.table-wrap::-webkit-scrollbar-track{background:#eef3f8;border-radius:999px}.users-table,.staff-table,.tickets-table{min-width:1120px}.btn--table{white-space:nowrap}.message-bubble--internal{background:#fff7ed!important;border-color:#fed7aa!important}.ticket-event-list{display:grid;gap:8px}.ticket-event-item{background:#f8fafc;border:1px solid #e5edf6;border-radius:14px;padding:10px 12px;color:#475569;font-size:13px}.report-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.report-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:22px;padding:18px;box-shadow:0 16px 45px rgba(15,23,42,.06)}.report-card span{display:block;color:#64748b;font-weight:700}.report-card b{display:block;font-size:30px;margin-top:6px}.report-list{display:grid;gap:10px}.report-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f8fafc;border:1px solid #e5edf6;border-radius:16px;padding:12px 14px}@media(max-width:900px){.report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.table-wrap>table{min-width:960px}}@media(max-width:560px){.report-grid{grid-template-columns:1fr}}


/* === Sharif Star final font normalization + table responsiveness (no font files included) === */
@font-face{font-family:"SharifVazirmatn";src:url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"SharifVazirmatn";src:url('/static/fonts/Vazirmatn-Medium.woff2') format('woff2');font-weight:500 700;font-style:normal;font-display:swap}
@font-face{font-family:"SharifVazirmatn";src:url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');font-weight:800 950;font-style:normal;font-display:swap}
:root{--font-fa:"SharifVazirmatn",Vazirmatn,Dana,YekanBakh,IRANYekanX,IRANSansX,"Segoe UI",Tahoma,Arial,sans-serif;--font-display:"SharifVazirmatn",Vazirmatn,Dana,YekanBakh,IRANYekanX,IRANSansX,"Segoe UI",Tahoma,Arial,sans-serif}
html,body{font-family:var(--font-fa)!important}
body :where(a,p,span,b,strong,small,label,legend,li,td,th,button,input,textarea,select,option,h1,h2,h3,h4,h5,h6,div){font-family:var(--font-fa)!important;font-synthesis-weight:none}
:where(h1,h2,h3,h4,.brand-title b,.public-hero h1,.auth-title,.section-title-row h2,.stat-card strong){font-family:var(--font-display)!important;font-weight:900;letter-spacing:-.035em}
:where(input,textarea,select,button){font-family:var(--font-fa)!important}
.table-wrap,.content-shell,.section-card,.card,.glass{min-width:0}
.table-wrap{display:block;width:100%;max-width:100%;overflow-x:auto!important;overflow-y:hidden;-webkit-overflow-scrolling:touch;direction:ltr;padding-bottom:8px}
.table-wrap>table{direction:rtl;min-width:980px}
.table-wrap .users-table,.table-wrap .staff-table,.table-wrap .tickets-table{min-width:1120px}
.table-wrap::-webkit-scrollbar{height:10px}.table-wrap::-webkit-scrollbar-thumb{background:#c8d4e3;border-radius:999px}.table-wrap::-webkit-scrollbar-track{background:#eef3f8;border-radius:999px}
@media (max-width:760px){.table-wrap>table{min-width:920px}.page-head h1{font-size:25px}.section-card{padding:16px}.navlinks{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px}.navlinks a{white-space:nowrap}}


/* === Final UX hardening: logo, header account, settings, exports, avatars === */
body.admin-body { padding-bottom: 108px; }
.content-shell { padding-bottom: 72px; }
.bottom-nav {
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -18px 40px rgba(15, 23, 42, .12);
}
.footer { margin-bottom: 84px; }
.brand-badge--image img { object-fit: contain; padding: 2px; background: transparent; }
.header-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mini-user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 18px;
  padding: 6px;
}
.top-action--danger {
  padding: 8px 10px !important;
  border-radius: 13px !important;
  font-size: 12px;
  line-height: 1;
}
.top-action--danger svg { width: 16px; height: 16px; }
.table-avatar img,
.user-avatar img,
.profile-avatar img,
.student-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-editor-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 16px;
  background: rgba(248,250,252,.9);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 22px;
  padding: 16px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#e0e7ff,#f8fafc);
  color: #1e3a8a;
  font-weight: 900;
  font-size: 26px;
  border: 1px solid rgba(148,163,184,.3);
}
.profile-avatar--lg { width: 92px; height: 92px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}
.settings-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(15,23,42,.07);
}
.settings-card--wide { grid-column: 1 / -1; }
.settings-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.settings-card__head h2 { margin: 0; font-size: 18px; }
.settings-kv-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.settings-kv,
.channel-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  min-width: 0;
}
.settings-kv span,
.channel-box span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 8px;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.code-chip,
.path-display {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #eef2ff;
  color: #1e3a8a;
  border-radius: 14px;
  padding: 9px 11px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.7;
}
.code-chip--wrap { white-space: normal; }
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill--ok { background: #ecfdf5; color: #047857; }
.status-pill--danger { background: #fef2f2; color: #b91c1c; }
.status-pill--muted { background: #f1f5f9; color: #475569; }
.settings-details summary {
  cursor: pointer;
  margin-top: 14px;
  color: #1d4ed8;
  font-weight: 800;
}
.sms-template-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}
.sms-template-card {
  border: 1px solid rgba(226,232,240,.9);
  border-radius: 22px;
  background: #f8fafc;
  padding: 16px;
}
.sms-template-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.log-snippet {
  display: block;
  max-width: 360px;
  max-height: 44px;
  overflow: hidden;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}
.home-editor .field {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
}
.home-editor .field label {
  display: block;
  font-weight: 800;
  color: #334155;
  margin-bottom: 8px;
}
.home-editor input,
.home-editor textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  background: white;
  outline: none;
}
.home-editor textarea { resize: vertical; min-height: 96px; }

@media (max-width: 768px) {
  .settings-grid,
  .settings-kv-grid,
  .channel-grid,
  .sms-template-grid {
    grid-template-columns: 1fr;
  }
  .profile-editor-head {
    grid-template-columns: 1fr;
  }
  .header-account {
    justify-content: stretch;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
