/* Sina Academy / visual theme. Local assets only; no build or CDN required. */
:root {
    --bg:#f2f5f8; --card:#fff; --text:#1b2d40; --muted:#52667a;
    --primary:#087e81; --primary-d:#056466; --danger:#b42338; --ok:#14734e;
    --border:#dce5ec; --nav:#14283b; --nav-muted:#a5b9cd; --accent:#55d3c5;
    --radius:16px; --shadow:0 4px 18px rgba(25,49,72,.055);
    --sidebar-width:252px;
    font-size:15px; color-scheme:light;
}
* { box-sizing:border-box; }
html,body { margin:0; min-height:100%; }
body { font-family:Vazirmatn,Tahoma,"Segoe UI",Arial,sans-serif; background:var(--bg); color:var(--text); direction:rtl; text-align:right; line-height:1.8; }
button,input,select,textarea { font:inherit; }
a { color:var(--primary-d); text-decoration:none; font-weight:600; }
a:hover { text-decoration:underline; text-underline-offset:4px; }
:focus-visible { outline:3px solid #18a6a1; outline-offset:3px; }
[hidden] { display:none !important; }
img { max-width:100%; }
svg { flex-shrink:0; }
[dir="ltr"] { font-variant-numeric:tabular-nums; unicode-bidi:isolate; }
.muted { color:var(--muted); }
p { margin:.75rem 0; }
h1,h2,h3,h4 { line-height:1.55; letter-spacing:-.025em; overflow-wrap:anywhere; }
h1 { font-size:1.65rem; margin:0 0 1.2rem; font-weight:800; }
h2 { font-size:1.2rem; margin:1.4rem 0 .8rem; font-weight:700; }
h3 { font-size:1rem; margin:1.15rem 0 .5rem; }
/* Application shell */
.app-shell { display:grid; grid-template-columns:var(--sidebar-width) minmax(0,1fr); min-height:100vh; }
.sidebar { position:sticky; top:0; height:100vh; height:100dvh; display:flex; flex-direction:column; min-width:0; background:var(--nav); color:#eef6fa; padding:22px 14px 12px; box-shadow:-4px 0 16px rgba(15,35,54,.08); z-index:20; }
.brand { display:flex; gap:12px; align-items:center; padding:0 6px 22px; border-bottom:1px solid #ffffff18; }
.brand-mark { background:#b6f0e5; color:#075e62; width:43px; height:43px; flex:0 0 43px; border-radius:13px; display:grid; place-items:center; }
.brand-icon { width:27px; height:27px; }
.brand-copy { min-width:0; display:flex; flex-direction:column; gap:1px; }
.brand-copy strong { font-size:1.04rem; line-height:1.55; overflow-wrap:anywhere; }
.brand-copy span { color:var(--nav-muted); font-size:.72rem; }
.main-nav { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#486075 transparent; padding:6px 0 12px; }
.nav-group { margin:15px 0 0; }
.nav-group:not(:has(a)) { display:none; }
.nav-label { color:var(--nav-muted); font-size:.72rem; font-weight:700; padding:0 12px 6px; }
.nav-icon { width:20px; height:20px; }
.main-nav a { display:flex; align-items:center; position:relative; gap:11px; border-radius:8px; padding:8px 12px; min-height:40px; margin:2px 0; color:#d5e2ee; font-size:.88rem; font-weight:500; line-height:1.55; }
.main-nav a .nav-icon { color:#9db6cc; }
.main-nav a:hover { color:#fff; background:#ffffff0d; text-decoration:none; }
.main-nav a[aria-current="page"] { background:#24505b; color:#fff; font-weight:700; }
.main-nav a[aria-current="page"]::before { content:""; position:absolute; inset-inline-start:0; width:3px; top:8px; bottom:8px; border-radius:3px; background:var(--accent); }
.main-nav a[aria-current="page"] .nav-icon { color:var(--accent); }
.sidebar-footer { border-top:1px solid #ffffff18; padding:12px 8px 0; color:var(--nav-muted); font-size:.73rem; display:flex; align-items:center; gap:8px; }
.sidebar-dot { width:8px; height:8px; border-radius:50%; background:var(--accent); flex:none; }
.menu-toggle { display:none; }
.workspace { min-width:0; }
.app-header { min-height:76px; background:#fff; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px 28px; }
.header-title { display:flex; gap:7px; flex-wrap:wrap; align-items:center; color:var(--muted); font-size:.83rem; }
.header-title strong { color:var(--text); font-weight:700; }
.header-actions { display:flex; align-items:center; gap:14px; flex-wrap:wrap; min-width:0; }
.notification-button { display:grid; place-items:center; width:41px; height:41px; flex:none; background:#f5f8fa; border:1px solid var(--border); border-radius:11px; color:#38536b; position:relative; }
.notification-button:hover { background:#e8f5f3; text-decoration:none; }
.notification-count { position:absolute; top:-7px; inset-inline-end:-6px; background:var(--danger); color:#fff; min-width:21px; height:21px; border-radius:20px; padding:0 4px; text-align:center; font-size:.66rem; line-height:21px; border:1px solid white; }
.header-profile { display:flex; align-items:center; gap:9px; padding-inline-start:12px; border-inline-start:1px solid var(--border); }
.profile-mark { display:grid; place-items:center; background:#e2f3f0; color:var(--primary-d); border-radius:50%; width:38px; height:38px; flex:none; }
.profile-copy { display:flex; flex-direction:column; min-width:0; max-width:180px; line-height:1.6; }
.profile-copy strong { font-size:.84rem; overflow-wrap:anywhere; }
.profile-copy small { color:var(--muted); font-size:.72rem; }
.account-link { font-size:.8rem; white-space:nowrap; }
.logout-form { margin:0; }
.logout-button.btn-link { display:flex; align-items:center; gap:6px; margin:0; color:var(--danger); background:#fff4f5; padding:7px 10px; border-radius:9px; font-size:.8rem; }
.logout-button .nav-icon { width:17px; height:17px; }
.skip-link { position:absolute; z-index:100; top:-200px; inset-inline-start:12px; background:#fff; padding:10px; border-radius:8px; }
.skip-link:focus { top:8px; }
.container { max-width:1600px; margin:0 auto; padding:25px 28px 40px; min-width:0; }
.container:focus { outline:none; }
/* Content surfaces and typography */
.card { min-width:0; background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:22px 24px; margin-bottom:18px; box-shadow:var(--shadow); overflow-wrap:anywhere; }
.card > h1:first-child,.card > h2:first-child { margin-top:0; }
.card > h2:not(:first-child) { padding-top:13px; border-top:1px solid #edf1f4; }
.card > h2:first-child { display:flex; align-items:center; gap:9px; }
.card > h2:first-child::before { content:""; display:block; width:4px; height:19px; border-radius:4px; background:#0f9995; flex:none; }
.card .card { background:#f8fafb; box-shadow:none; }
.card p:last-child { margin-bottom:0; }
.card > div[style*="display:grid"],.card form[style*="display:grid"],.card form div[style*="display:grid"] { min-width:0; }
.card [style*="display:grid"] > * { min-width:0; }
.card form[method="GET"],.card form[method="get"] { background:#f7f9fb; border:1px solid #e4ebf0; border-radius:12px; padding:12px 14px; margin:0 0 16px; }
/* Controls, labels, validation */
label { display:block; margin:.65rem 0 .3rem; font-size:.86rem; font-weight:700; color:#32485e; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea { display:block; width:100%; min-width:0; min-height:43px; padding:9px 12px; border:1px solid #c8d5df; border-radius:9px; color:var(--text); font-size:.91rem; line-height:1.6; background:#fff; transition:border-color .15s, box-shadow .15s; }
input[dir="ltr"] { text-align:left; }
input[type="file"] { max-width:100%; }
input::placeholder,textarea::placeholder { color:#65788c; opacity:1; }
input:focus,select:focus,textarea:focus { border-color:#098c89; outline:2px solid #9de0d9; outline-offset:1px; }
input:disabled,select:disabled,textarea:disabled,input[readonly] { background:#edf1f5; color:#53677b; opacity:1; cursor:not-allowed; }
input[type="checkbox"],input[type="radio"] { width:17px; height:17px; margin:0 3px; accent-color:var(--primary); vertical-align:middle; cursor:pointer; }
textarea { resize:vertical; min-height:95px; }
fieldset { min-width:0; border:1px solid var(--border); border-radius:12px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; background:var(--primary); color:#fff; border:1px solid transparent; border-radius:9px; min-height:40px; padding:8px 15px; margin-block:2px; font-size:.86rem; font-weight:700; cursor:pointer; text-decoration:none; text-align:center; line-height:1.6; transition:background .16s, box-shadow .16s; }
.btn:hover { background:var(--primary-d); color:#fff; text-decoration:none; box-shadow:0 3px 8px #05646626; }
.btn:disabled,button:disabled { opacity:.55; cursor:not-allowed; box-shadow:none; }
.btn-link { background:none; border:0; color:var(--primary-d); cursor:pointer; font:inherit; font-size:.86rem; font-weight:600; padding:2px 4px; }
.btn-link:hover { text-decoration:underline; text-underline-offset:4px; }
.alert { padding:11px 15px; border:1px solid transparent; border-radius:11px; margin-bottom:15px; font-size:.9rem; }
.alert-ok { background:#e8f7ef; border-color:#b6e5ca; color:#145e41; }
.alert-err { background:#fff0f2; border-color:#f3c7ce; color:#982337; }
.alert a { color:inherit; text-decoration:underline; }
.field-error { color:var(--danger); font-size:.79rem; margin-top:4px; }
/* Tables: stable rows, readable figures and independent horizontal scrolling */
.table-scroll,.education-table { max-width:100%; overflow-x:auto; border:1px solid #e0e8ee; border-radius:11px; margin:10px 0 14px; scrollbar-width:thin; scrollbar-color:#b8c8d5 transparent; }
.table-scroll:focus-visible { outline-offset:1px; }
.education-table > .table-scroll { margin:0; border:0; }
table { width:100%; border-collapse:separate; border-spacing:0; font-size:.88rem; }
th,td { padding:12px 13px; border-bottom:1px solid #e5ecf1; text-align:right; vertical-align:middle; line-height:1.7; }
th { background:#f1f5f8; color:#43586d; font-size:.82rem; font-weight:700; }
tr:last-child > td,tr:last-child > th { border-bottom:0; }
thead tr:last-child > th { border-bottom:1px solid #dce5ec; }
tbody tr:nth-child(even) td { background:#fafbfd; }
tbody tr:hover td { background:#eff8f7; }
td a:not(.btn) { text-underline-offset:3px; }
td input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),td select { min-width:92px; padding:7px 8px; min-height:36px; }
td[colspan].muted { text-align:center; padding:24px 12px; background:#fafcfd; }
.table-scroll table:has(tr > :nth-child(5)) { min-width:590px; }
.table-scroll table:has(tr > :nth-child(8)) { min-width:820px; }
.education-filter { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:12px; align-items:end; }
.education-filter label { display:block; }
.education-filter input,.education-filter select { width:100%; box-sizing:border-box; }
.education-table th,.education-table td { white-space:normal; min-width:65px; }
/* Laravel pagination (no Tailwind build in this distribution) */
nav[role="navigation"] { margin-top:16px; font-size:.84rem; color:var(--muted); }
nav[role="navigation"] > .flex { display:none; }
nav[role="navigation"] > .hidden { display:flex; gap:10px; justify-content:space-between; align-items:center; flex-wrap:wrap; }
nav[role="navigation"] .inline-flex { display:inline-flex; align-items:center; flex-wrap:wrap; gap:3px; }
nav[role="navigation"] a,nav[role="navigation"] [aria-current="page"] > span,nav[role="navigation"] [aria-disabled="true"] > span { min-width:34px; min-height:34px; justify-content:center; padding:5px 8px; border:1px solid var(--border); border-radius:7px; background:#fff; }
nav[role="navigation"] [aria-current="page"] > span { background:var(--primary); color:#fff; border-color:var(--primary); }
nav[role="navigation"] [aria-disabled="true"] > span { color:#788b9b; background:#f6f8fa; }
nav[role="navigation"] svg { width:18px; height:18px; transform:scaleX(-1); }
nav[role="navigation"] p { margin:0; }
/* Dashboard */
.dashboard-hero { position:relative; isolation:isolate; overflow:hidden; padding:26px 28px; color:white; background:linear-gradient(110deg,#102e46,#175b65); border:0; box-shadow:0 8px 24px #15444b22; }
.dashboard-hero::after { content:""; position:absolute; z-index:-1; inset-inline-end:-55px; top:-108px; width:300px; height:300px; border-radius:50%; border:35px solid #ffffff0c; box-shadow:0 0 0 38px #ffffff08,0 0 0 76px #ffffff05; pointer-events:none; }
.hero-kicker { color:#a9ece1; font-size:.81rem; font-weight:700; margin-bottom:6px; }
.dashboard-hero h1 { font-size:1.7rem; }
.hero-meta { display:block; color:#d6e7ea; font-size:.88rem; margin-top:7px; }
.dashboard-stats { gap:12px !important; grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)) !important; }
.card.stat-card { position:relative; padding:19px 16px 17px; text-align:right !important; min-height:120px; border-top:3px solid #15948f; background:white; box-shadow:var(--shadow); display:flex; flex-direction:column; justify-content:center; gap:6px; }
.card.stat-card:nth-child(4n+2) { border-top-color:#4a7cb6; }
.card.stat-card:nth-child(4n+3) { border-top-color:#be8b3e; }
.card.stat-card:nth-child(4n) { border-top-color:#8873ae; }
.stat-card > div:first-child { font-size:clamp(1.15rem,1.6vw,1.72rem) !important; color:inherit; line-height:1.4; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.stat-card > .muted { font-size:.83rem; line-height:1.7; }
.quick-actions > .btn { margin:3px 0 3px 6px; }
.section-nav { display:flex; flex-wrap:wrap; gap:7px; align-items:center; background:#f4f7f9; border:1px solid var(--border); padding:11px; border-radius:12px; font-size:0; }
.section-nav a { font-size:.81rem; padding:6px 10px; border:1px solid #d7e3e9; border-radius:7px; background:white; }
.section-nav a:hover { background:#e2f3f0; text-decoration:none; }
/* Login */
.guest-body { background:radial-gradient(ellipse at 15% 15%,#d7eeeb 0,transparent 55%),#edf2f6; }
.guest-body .container { display:flex; flex-direction:column; justify-content:center; min-height:100vh; min-height:100dvh; padding:30px 20px; max-width:1080px; }
.login-wrap { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); background:#fff; border:1px solid #d7e3e9; border-radius:24px; overflow:hidden; width:100%; max-width:940px; margin:0 auto; box-shadow:0 24px 70px #18394a1c; }
.login-intro { min-height:535px; background:linear-gradient(150deg,#14283b,#174e59); color:#fff; padding:32px; display:flex; flex-direction:column; gap:22px; position:relative; overflow:hidden; isolation:isolate; }
.login-brand { display:flex; gap:12px; align-items:center; font-size:1.15rem; font-weight:700; }
.login-message h2 { font-size:1.85rem; line-height:1.65; margin:0 0 8px; }
.login-message p { color:#c8e1e4; font-size:.9rem; margin:0; }
.login-footer { margin-top:auto; font-size:.76rem; color:#b4cbd4; }
.login-art { min-height:186px; display:grid; place-items:center; position:relative; isolation:isolate; }
.orbit { position:absolute; border:1px solid #c2f3e826; border-radius:50%; width:182px; height:182px; z-index:-1; }
.orbit-two { width:248px; height:248px; }
.art-card { width:112px; height:112px; display:grid; place-items:center; background:#b6f0e5; color:#075e62; border-radius:28px; box-shadow:0 13px 40px #041c2b46; transform:rotate(-8deg); }
.art-icon { width:61px; height:61px; }
.art-small { position:absolute; display:grid; place-items:center; width:45px; height:45px; border-radius:13px; background:#fff; color:#087e81; box-shadow:0 8px 30px #071c2b28; }
.art-small .nav-icon { width:25px; height:25px; }
.art-small-one { top:18px; left:calc(50% - 120px); transform:rotate(8deg); }
.art-small-two { bottom:19px; right:calc(50% - 119px); transform:rotate(-9deg); }
.login-card.card { border:0; box-shadow:none; border-radius:0; margin:0; padding:48px 40px; display:flex; flex-direction:column; justify-content:center; }
.login-kicker { font-size:.83rem; color:var(--primary-d); font-weight:700; }
.login-card h1 { font-size:1.85rem; margin:7px 0; }
.login-help { font-size:.86rem; margin:0 0 19px; }
.login-card label { margin-top:13px; }
.login-card input { min-height:48px !important; }
.login-submit { margin-top:22px; }
.login-submit .btn { width:100%; min-height:48px; }
/* Responsive layout; retain all controls, including wide tabular input forms. */
@media(max-width:1100px) {
    :root { --sidebar-width:224px; }
    .container { padding:20px 20px 32px; }
    .app-header { padding:12px 20px; }
    .card { padding:18px; }
    .header-actions { gap:10px; }
    .card form[style*="display:grid"] { grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr)) !important; }
}
@media(max-width:900px) {
    .app-shell { display:block; }
    .sidebar { position:relative; height:auto; padding:12px 16px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; align-items:center; }
    .brand { padding:0; border:0; }
    .brand-mark { width:38px; height:38px; flex-basis:38px; }
    .brand-icon { width:25px; height:25px; }
    .main-nav { grid-column:1/-1; max-height:60vh; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr)); gap:0 12px; }
    .main-nav.is-collapsed { display:none; }
    .menu-ready .menu-toggle { display:flex; align-items:center; gap:8px; color:white; background:#ffffff12; border:1px solid #ffffff30; border-radius:9px; padding:8px 12px; cursor:pointer; }
    .sidebar-footer { display:none; }
    .app-header { min-height:65px; }
    .login-card.card { padding:32px; }
}
@media(max-width:600px) {
    .container { padding:15px 12px 24px; }
    .card { padding:16px 13px; border-radius:12px; margin-bottom:13px; }
    h1 { font-size:1.35rem; } h2 { font-size:1.1rem; }
    .app-header { padding:12px; align-items:flex-start; flex-direction:column; gap:8px; }
    .header-actions { width:100%; gap:8px; }
    .header-profile { padding-inline-start:8px; }
    .profile-copy { max-width:112px; }
    .notification-button { width:35px; height:35px; }
    .profile-mark { width:32px; height:32px; }
    .logout-button.btn-link { padding:6px 8px; }
    .dashboard-hero { padding:22px 18px; }
    .dashboard-hero h1 { font-size:1.35rem; }
    .dashboard-stats { grid-template-columns:repeat(auto-fit,minmax(min(100%,139px),1fr)) !important; gap:9px !important; }
    .card.stat-card { min-height:100px; padding:13px 10px; }
    .stat-card > div:first-child { font-size:1.15rem !important; }
    .card [style*="display:grid"]:not(.dashboard-stats) { grid-template-columns:minmax(0,1fr) !important; gap:8px !important; }
    /* Repeating grading components retain their column relationship. */
    .card [style*="grid-template-columns:2fr 1fr 1fr auto"]:has(input[type="checkbox"]),.card [style*="grid-template-columns:2fr 1fr 1fr auto"][style*="font-weight:700"] { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) minmax(0,1fr) auto !important; gap:4px !important; font-size:.72rem; }
    .card [style*="grid-template-columns:2fr 1fr 1fr auto"]:has(input[type="checkbox"]) input:not([type="checkbox"]) { padding:6px 4px; font-size:.75rem; }
    .education-filter { grid-template-columns:1fr; }
    th,td { padding:9px 10px; }
    nav[role="navigation"] > .hidden { display:none; }
    nav[role="navigation"] > .flex { display:flex; justify-content:space-between; gap:8px; }
    .login-wrap { display:flex; flex-direction:column; border-radius:18px; max-width:440px; }
    .login-intro { min-height:0; padding:19px 22px; gap:0; }
    .login-art,.login-message,.login-footer { display:none; }
    .login-card.card { padding:28px 22px; }
    .login-card h1 { font-size:1.55rem; }
    .guest-body .container { padding:20px 14px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important; scroll-behavior:auto !important; } }
@media print {
    :root { font-size:11pt; --bg:#fff; --text:#111; }
    body { background:#fff !important; color:#111 !important; }
    .topbar,.app-header,.skip-link,.education-filter,.education-actions,.no-print,.btn,.btn-link,nav[role="navigation"] { display:none !important; }
    .app-shell,.workspace { display:block; width:100%; }
    .container { max-width:none; width:100%; padding:0; margin:0; }
    .card { padding:8px 0; box-shadow:none !important; border:0; border-radius:0; background:white !important; }
    .dashboard-hero { color:#111; } .hero-kicker,.hero-meta { color:#333; }
    .dashboard-hero::after { display:none; }
    .table-scroll,.education-table { overflow:visible; border:0; margin:0; }
    .table-scroll table,.education-table table { min-width:0 !important; width:100%; font-size:9pt; }
    th,td,.education-table th,.education-table td { min-width:0; padding:4px; border-bottom:1px solid #bbb; }
    tr { break-inside:avoid; } thead { display:table-header-group; }
    a { color:inherit; text-decoration:none; }
}
