@font-face { font-family: 'Vazirmatn'; src: url('admin-ui/assets/vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
    --admin-font: 'Vazirmatn', Tahoma, sans-serif;
    --brand: #504099;
    --brand-deep: #512b82;
    --canvas: #f3f4f6;
    --surface: #fff;
    --sidebar: rgba(81,43,130,.05);
    --text: #424242;
    --muted: #86828d;
    --line: #e9e6ef;
    --green: #257e6c;
    --gold: #9d7115;
    --radius: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.9 var(--admin-font); background: var(--surface); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #9a87d2; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
img { vertical-align: middle; }
.skip-link { position: fixed; inset-block-start: -100px; inset-inline-start: 20px; z-index: 10; background: var(--brand); color: white; padding: 12px; border-radius: 8px; }
.skip-link:focus { inset-block-start: 12px; }
.admin-shell { display: grid; grid-template-columns: minmax(230px, .277fr) minmax(0, 1fr); align-items: start; gap: 24px; width: min(1728px, calc(100% - 96px)); margin: 64px auto; }
.sidebar { position: sticky; top: 32px; margin-block-start: 160px; min-width: 0; }
.brand { display: block; text-align: center; padding: 0 6px 20px; }
.brand img { max-width: 100%; height: auto; }
.brand span { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.sidebar-nav { background: var(--sidebar); border-radius: 38px; padding: 36px 0 24px 14px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 57px; padding: 14px 24px 14px 12px; margin-bottom: 7px; color: var(--text); border: 0; background: transparent; text-align: right; border-radius: 0 32px 32px 0; font-weight: 500; cursor: pointer; transition: background .18s, color .18s; }
.nav-item:hover { background: rgba(80,64,153,.05); color: var(--brand); }
.nav-item.is-active { background: var(--surface); color: var(--brand-deep); font-weight: 600; }
.nav-icon { display: flex; align-items: center; justify-content: center; width: 28px; flex: 0 0 28px; }
.nav-icon img { max-width: 28px; max-height: 28px; width: auto; height: auto; }
.nav-soon { margin-inline-start: auto; color: var(--muted); font-size: 9px; font-weight: 400; border: 1px solid var(--line); border-radius: 20px; padding: 0 5px; white-space: nowrap; }
.logout-form { margin: 0; }
.workspace { min-width: 0; min-height: calc(100vh - 128px); background: var(--canvas); border-radius: 40px; padding: 34px; box-shadow: inset 0 0 8px rgba(0,0,0,.05); }
.workspace-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 38px; }
.eyebrow { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.header-greeting { color: var(--muted); font-size: 12px; margin-top: 3px; }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.round-tool { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); color: var(--brand); border: 0; cursor: pointer; }
.round-tool img { max-width: 22px; max-height: 22px; width: auto; height: auto; opacity: .65; }
.round-tool span { font: 26px/1 Georgia, serif; }
.button, button:not(.nav-item):not(.round-tool) { border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--brand); color: white; padding: 10px 20px; cursor: pointer; font-weight: 500; }
.button:hover { background: var(--brand-deep); }
.button.compact { font-size: 12px; padding: 9px 13px; }
.button.secondary, button.secondary { background: #eeeaf8; color: var(--brand); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 0 32px; }
.stat-card { display: flex; align-items: center; gap: 12px; padding: 10px; min-height: 80px; border-radius: var(--radius); color: white; background-size: 100% 100%; }
.stat-gold { background-color: #ebb02e; background-image: url('admin-ui/assets/stat-gold.svg'); }
.stat-purple { background-color: #504099; background-image: url('admin-ui/assets/stat-purple.svg'); }
.stat-coral { background-color: #ff8d8c; background-image: url('admin-ui/assets/stat-coral.svg'); }
.stat-green { background-color: #56bf9e; background-image: url('admin-ui/assets/stat-green.svg'); }
.stat-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 50px; height: 55px; border-radius: 12px; background: rgba(255,255,255,.18); }
.stat-icon img { display: block; }
.stat-label { font-size: 11px; opacity: .93; }
.stat-number { font-size: 23px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.stat-number small { font-weight: 400; font-size: 10px; margin-inline-start: 7px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.section-heading, .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading { background: var(--surface); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.section-heading h2 { font-size: 14px; }
.pill-link { display: inline-flex; gap: 10px; align-items: center; color: var(--brand); background: #f2eef9; border-radius: 12px; padding: 4px 9px; font-size: 10px; white-space: nowrap; }
.pill-link span { font-size: 20px; line-height: 1; }
.course-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.course-card { padding: 9px; border-radius: var(--radius); background: var(--surface); box-shadow: 0 4px 25px rgba(0,0,0,.07); min-width: 0; transition: transform .18s, box-shadow .18s; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(80,64,153,.12); }
.course-cover-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(145deg,#e2f3ee,#f0eaf8); color: var(--green); min-height: 140px; border-radius: 12px; font-size: 11px; }
.course-cover-placeholder img { width: auto; height: auto; opacity: .6; }
.course-card h3 { color: var(--text); font-size: 14px; line-height: 1.9; min-height: 54px; padding: 14px 4px 4px; overflow-wrap: anywhere; }
.course-teacher { font-size: 11px; color: var(--muted); padding: 0 4px 12px; }
.course-card footer { border-top: 1px solid var(--line); padding: 12px 4px 4px; display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 11px; }
.panel { background: var(--surface); border-radius: var(--radius); border: 1px solid transparent; margin-bottom: 20px; }
.panel-heading { padding: 10px 16px; background: rgba(37,126,108,.05); border-bottom: 1px solid rgba(37,126,108,.12); border-radius: var(--radius) var(--radius) 0 0; }
.panel-heading h2 { font-size: 14px; }
.panel-heading a { font-size: 10px; }
.future-panel .panel-heading { background: rgba(235,176,46,.05); border-color: rgba(235,176,46,.15); }
.status-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.status-row + .status-row { padding-top: 4px; padding-bottom: 20px; }
.badge { display: inline-block; font-size: 10px; font-weight: 400; white-space: nowrap; border-radius: 5px; padding: 3px 8px; background: #f0edf8; color: var(--brand); }
.badge-green { color: var(--green); background: rgba(86,191,158,.1); }
.badge-gold { color: var(--gold); background: rgba(235,176,46,.1); }
.mini-empty { padding: 25px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.mini-empty img { width: auto; height: auto; opacity: .3; margin-bottom: 10px; }
.empty-state { display: flex; align-items: center; flex-direction: column; text-align: center; gap: 12px; padding: 48px 24px; }
.empty-state p { color: var(--muted); font-size: 13px; }
.empty-icon { width: 64px; height: 64px; background: #f2eef9; display: flex; align-items: center; justify-content: center; border-radius: 20px; margin-bottom: 6px; }
.empty-icon img { width: auto; height: auto; }
.coming-soon { min-height: 420px; justify-content: center; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 10px 0 22px; }
.heading p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.table-wrap { overflow: auto; padding: 8px 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 17px 12px; text-align: right; border-bottom: 1px solid var(--line); }
th { font-weight: 500; font-size: 12px; color: var(--muted); white-space: nowrap; }
td { font-size: 13px; min-width: 90px; }
td:first-child { min-width: 190px; }
tbody tr:last-child td { border: 0; }
.empty { text-align: center; padding: 55px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 28px; padding: 28px; }
.full { grid-column: 1/-1; }
label { display: block; font-size: 12px; margin-bottom: 7px; }
input, select, textarea { display: block; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
textarea { resize: vertical; }
.form-heading { margin-bottom: 18px; }
.actions { display: flex; align-items: center; gap: 22px; }
.notice { background: #e4f2ec; color: var(--green); padding: 12px 18px; border-radius: 10px; margin-bottom: 22px; }
.error { background: #fff0ef; color: #9d2727; padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; }
.danger { padding: 18px 24px; }
.danger summary { color: #ad3545; cursor: pointer; }
.danger p { color: var(--muted); margin: 15px 0; font-size: 12px; }
button.danger-button { background: #ad3545 !important; }
.auth-body { background: var(--canvas); }
.auth-main { max-width: 470px; padding: 32px 20px; margin: 6vh auto; }
.auth-brand { display: block; text-align: center; margin-bottom: 24px; }
.auth-brand img { max-width: 100%; height: auto; }
.login { padding: 34px; }
.login h1 { font-size: 24px; }
.login p { color: var(--muted); margin: 8px 0 25px; font-size: 12px; }
.login label { margin-top: 18px; }
.login button { width: 100%; margin-top: 26px; }
.mobile-menu { display: none !important; }
[data-theme='dark'] { --canvas: #242131; --surface: #191723; --sidebar: #252030; --text: #eeebf4; --muted: #aaa3bb; --line: #383145; --brand: #b5a0e9; --brand-deep: #d2bdfc; }
[data-theme='dark'] .button { background: #6b4f9c; color: white; }
[data-theme='dark'] .nav-icon img, [data-theme='dark'] .round-tool img, [data-theme='dark'] .mini-empty img { filter: invert(.9); }
[data-theme='dark'] .brand img, [data-theme='dark'] .auth-brand img { background: white; border-radius: 14px; }
[data-theme='dark'] .course-cover-placeholder { background: #343047; color: #94dac4; }
@media (max-width: 1250px) {
    .admin-shell { width: calc(100% - 48px); gap: 18px; grid-template-columns: 240px minmax(0,1fr); margin: 32px auto; }
    .workspace { padding: 25px; border-radius: 30px; min-height: calc(100vh - 64px); }
    .stats-grid { gap: 12px; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .nav-item { padding-inline-start: 18px; gap: 10px; font-size: 13px; }
    .workspace-header { align-items: start; }
    .header-tools { flex-wrap: wrap; justify-content: flex-end; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-side { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    .overview-panel { grid-column: 1/-1; }
}
@media (max-width: 760px) {
    .admin-shell { display: flex; flex-direction: column; width: calc(100% - 28px); margin: 18px auto; gap: 18px; }
    .sidebar { width: 100%; position: static; margin: 0; }
    .brand { text-align: right; padding: 0; display: flex; align-items: center; gap: 14px; }
    .brand img { width: 170px; height: auto; }
    .brand span { font-size: 10px; margin: 0; }
    .mobile-menu { display: inline-flex !important; margin-top: 14px; width: 100%; }
    .sidebar-nav { display: block; margin-top: 10px; border-radius: 22px; padding: 14px; }
    [data-js='ready'] .sidebar-nav { display: none; }
    [data-js='ready'] .sidebar-nav.is-open { display: block; }
    .nav-item { border-radius: 14px; }
    .workspace { width: 100%; padding: 20px 16px; min-height: calc(100vh - 160px); border-radius: 24px; }
    .workspace-header { gap: 16px; flex-direction: column; margin-bottom: 25px; }
    .header-tools { width: 100%; justify-content: start; }
    .header-tools .button { margin-inline-start: auto; }
    h1 { font-size: 21px; }
    .stat-card { gap: 7px; padding: 9px; }
    .stat-icon { flex-basis: 38px; height: 48px; }

    .stat-label { font-size: 10px; }
    .stat-number { font-size: 20px; }
    .stat-number small { font-size: 9px; margin-inline-start: 5px; }
    .course-cards, .dashboard-side, .grid { grid-template-columns: 1fr; }
    .course-cover-placeholder { min-height: 160px; }
    .heading { flex-direction: column; align-items: stretch; }
    .grid { padding: 20px; gap: 18px; }
    .section-heading { padding: 12px; }
    .login { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.form-note { color: var(--muted); font-size: 12px; margin-top: 10px; }
.permission-guide { background: var(--canvas); border-radius: 12px; padding: 18px; }
.permission-guide p { color: var(--muted); font-size: 12px; margin-top: 8px; }
