* { margin:0; padding:0; box-sizing:border-box; }

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #e4574d;
    --accent: #29b7a8;
    --info: #3d8fd1;
    --warning: #e6a23c;
    --success: #1faa8a;
    --danger: #e11d48;
    --gray: #5a7083;
    --ink: #102536;
    --bg: #e8eef1;
    --surface: #ffffff;
    --line: rgba(16, 37, 54, 0.1);
    --shadow: rgba(14, 58, 72, 0.12);
}

body {
    font-family: 'Vazirmatn', Vazirmatn, Tahoma, 'Segoe UI', sans-serif;
    background: var(--bg, #e8eef1);
    color: var(--ink, #102536);
    min-height: 100vh;
    overflow-x: hidden;
}

.animated-bg {
    position: fixed; top:0; left:0; width:100%; height:100%;
    z-index: -1; overflow: hidden;
}
.animated-bg .orb {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.25;
    animation: float 20s infinite ease-in-out;
}
.animated-bg .orb-1 {
    width:400px;height:400px;
    background: linear-gradient(135deg,#FF6B6B,#FD79A8);
    top:-100px; right:-100px;
}
.animated-bg .orb-2 {
    width:300px;height:300px;
    background: linear-gradient(135deg,#4ECDC4,#54A0FF);
    bottom:-50px; left:-50px;
    animation-delay: -7s;
}
.animated-bg .orb-3 {
    width:200px;height:200px;
    background: linear-gradient(135deg,#FFE66D,#FF9F43);
    top:50%; left:50%;
    animation-delay: -14s;
}
@keyframes float {
    0%,100%{transform:translate(0,0) scale(1)}
    25%{transform:translate(60px,-40px) scale(1.1)}
    50%{transform:translate(-30px,30px) scale(0.9)}
    75%{transform:translate(20px,50px) scale(1.05)}
}

.particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1; overflow: hidden;
}
.particle {
    position: absolute; border-radius: 50%;
    background: rgba(255,107,107,0.1);
    animation: float 20s infinite ease-in-out;
}

.login-container { display:flex; justify-content:center; align-items:flex-start; min-height:100vh; position:relative; overflow-x:hidden; overflow-y:auto; padding:24px 12px; }
.login-container > .login-box, .login-container > .login-stack { margin:auto; }
.login-stack { display:flex; flex-direction:column; width:95%; max-width:480px; gap:14px; position:relative; z-index:10; }
.login-stack > .login-box { width:100%; max-width:100%; }
.app-download-box {
    width:100%; background:rgba(255,255,255,0.95); backdrop-filter:blur(20px);
    border-radius:20px; padding:18px 20px; display:flex; align-items:center; gap:14px;
    box-shadow:0 12px 32px rgba(255,107,107,0.18), 0 0 0 1px rgba(255,255,255,0.5);
    animation:slideUp 0.7s ease-out 0.15s backwards;
}
.app-download-icon {
    width:52px; height:52px; flex-shrink:0; border-radius:14px;
    background:linear-gradient(135deg,#0F9D58,#0B7A43);
    display:flex; align-items:center; justify-content:center; font-size:26px;
    box-shadow:0 6px 16px rgba(15,157,88,0.35);
}
.app-download-info { flex:1; min-width:0; }
.app-download-info h3 { margin:0 0 3px; font-size:15px; font-weight:700; color:#2D3436; }
.app-download-info p { margin:0; font-size:12px; color:#8892b0; line-height:1.7; }
.app-download-btn {
    display:inline-flex; align-items:center; gap:7px; flex-shrink:0;
    padding:11px 18px; border-radius:12px; background:linear-gradient(135deg,#0F9D58,#0B7A43);
    color:#fff; font-size:13px; font-weight:700; text-decoration:none; white-space:nowrap;
    box-shadow:0 6px 16px rgba(15,157,88,0.3); transition:transform 0.2s, box-shadow 0.2s;
}
.app-download-btn:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(15,157,88,0.4); color:#fff; }
.app-download-btn.is-disabled {
    background:#dfe4ea; color:#8892b0; box-shadow:none; cursor:not-allowed; pointer-events:none;
}
@media (max-width:480px) {
    .app-download-box { flex-wrap:wrap; padding:16px; }
    .app-download-btn { width:100%; justify-content:center; }
}
.login-box {
    background:rgba(255,255,255,0.95); backdrop-filter:blur(20px);
    border-radius:28px; padding:55px 45px; width:480px; max-width:95%;
    box-shadow:0 24px 64px rgba(255,107,107,0.25), 0 0 0 1px rgba(255,255,255,0.5);
    position:relative; z-index:10; animation:slideUp 0.7s ease-out;
}
@keyframes slideUp { from{opacity:0;transform:translateY(40px)} to{opacity:1;transform:translateY(0)} }
.login-logo {
    width:80px; height:80px; margin:0 auto 20px;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE,#54A0FF,#4ECDC4,#FFE66D);
    background-size:300% 300%; border-radius:50%; display:flex;
    align-items:center; justify-content:center; font-size:40px;
    box-shadow:0 8px 24px rgba(255,107,107,0.3); animation:bounce 2s infinite;
}
.login-logo img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.login-header { text-align:center; margin-bottom:20px; }
.login-header h1 {
    font-size:28px; font-weight:800; margin-bottom:6px;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE,#54A0FF,#4ECDC4,#FFE66D);
    background-size:300% 300%; -webkit-background-clip:text; -webkit-text-fill-color:transparent;
    background-clip:text; animation:gradientFlow 5s ease infinite;
}
@keyframes gradientFlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.login-header p { color:#8892B0; font-size:14px; margin-bottom:16px; }

.login-features { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:24px; }
.login-feature { display:flex; align-items:center; gap:8px; padding:10px 14px;
    background:linear-gradient(135deg,rgba(255,107,107,0.06),rgba(162,155,254,0.06));
    border:1px solid rgba(0,0,0,0.04); border-radius:12px; font-size:13px; color:#555;
    transition:all 0.3s; cursor:default; }
.login-feature:hover { border-color:rgba(255,107,107,0.2); transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(255,107,107,0.1); }
.login-feature-icon { font-size:18px; }

@media (max-width:480px) {
    .login-features { grid-template-columns: 1fr; }
}

@media (max-width:768px) {
    .voc-hero {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }
    .voc-hero-icon { width: 50px; height: 50px; font-size: 32px; }
    .voc-hero-title { font-size: 16px; }
    .voc-hero-desc { font-size: 12px; }
    .voc-hero-arrow { margin-right: 0; margin-top: 8px; }
}

.toggle-pass,
.pass-toggle-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #5a7083;
    opacity: 0.85;
    transition: color 0.2s, background 0.2s, opacity 0.2s, transform 0.15s;
}
.toggle-pass:hover,
.pass-toggle-btn:hover {
    opacity: 1;
    color: #0e3a48;
    background: rgba(14, 58, 72, 0.08);
}
.toggle-pass:active,
.pass-toggle-btn:active {
    transform: translateY(-50%) scale(0.96);
}
.toggle-pass .eye-icon,
.pass-toggle-btn .eye-icon {
    stroke: currentColor;
    width: 18px;
    height: 18px;
    display: block;
}

.layout { display:flex; min-height:100vh; }

.sidebar {
    width:280px;
    background:linear-gradient(180deg,#FFFFFF 0%,#F8F9FA 30%,#FFFFFF 60%,#F1F3F5 100%);
    color:#2D3436; position:fixed; right:0; top:0; height:100vh; height:100dvh; overflow:hidden; z-index:100;
    box-shadow:-6px 0 24px rgba(0,0,0,0.08); border-left:1px solid rgba(0,0,0,0.04);
    display:flex; flex-direction:column;
    isolation:isolate;
}
.sidebar::after {
    content:'';
    position:absolute; inset:0; pointer-events:none; z-index:0;
    background:
        radial-gradient(120px 80px at 85% 8%, rgba(255,107,107,0.12), transparent 70%),
        radial-gradient(140px 100px at 10% 92%, rgba(84,160,255,0.10), transparent 70%);
    animation:sidebarGlowPulse 8s ease-in-out infinite;
}
.sidebar-ambient {
    position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0;
}
.sidebar-blob {
    position:absolute; border-radius:50%; filter:blur(42px); opacity:0.45;
    will-change:transform;
}
.sidebar-blob-1 {
    width:180px; height:180px;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8);
    top:-40px; right:-50px;
    animation:sidebarBlobDrift 14s ease-in-out infinite;
}
.sidebar-blob-2 {
    width:150px; height:150px;
    background:linear-gradient(135deg,#54A0FF,#4ECDC4);
    bottom:18%; left:-60px;
    animation:sidebarBlobDrift 18s ease-in-out infinite reverse;
    animation-delay:-4s;
}
.sidebar-blob-3 {
    width:120px; height:120px;
    background:linear-gradient(135deg,#A29BFE,#FD79A8);
    bottom:-30px; right:20%;
    animation:sidebarBlobDrift 16s ease-in-out infinite;
    animation-delay:-8s;
}
.sidebar-shine {
    position:absolute; top:-40%; right:-30%; width:70%; height:50%;
    background:linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.55) 45%, transparent 70%);
    transform:rotate(18deg);
    animation:sidebarShineSweep 7s ease-in-out infinite;
    opacity:0.55;
}
.sidebar-spark {
    position:absolute; width:5px; height:5px; border-radius:50%;
    background:rgba(255,107,107,0.55);
    box-shadow:0 0 10px rgba(255,107,107,0.45);
    animation:sidebarSpark 5s ease-in-out infinite;
}
.sidebar-spark:nth-child(5) { top:22%; right:18%; animation-delay:0s; background:rgba(84,160,255,0.55); box-shadow:0 0 10px rgba(84,160,255,0.4); }
.sidebar-spark:nth-child(6) { top:48%; left:16%; animation-delay:1.2s; width:4px; height:4px; }
.sidebar-spark:nth-child(7) { top:68%; right:28%; animation-delay:2.4s; background:rgba(162,155,254,0.6); box-shadow:0 0 10px rgba(162,155,254,0.4); }
.sidebar-spark:nth-child(8) { top:86%; left:30%; animation-delay:3.1s; width:3px; height:3px; background:rgba(78,205,196,0.7); }

.sidebar-header,
.sidebar-nav,
.sidebar-year-alert { position: relative; z-index: 1; }

.sidebar-header { padding:30px 25px; border-bottom:1px solid rgba(0,0,0,0.04); text-align:center; position:relative; flex-shrink:0; }
.sidebar-logo {
    width:65px; height:65px; margin:0 auto 12px;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE,#54A0FF,#4ECDC4,#FFE66D);
    background-size:300% 300%; border-radius:50%; display:inline-flex;
    align-items:center; justify-content:center; font-size:30px;
    box-shadow:0 4px 20px rgba(255,107,107,0.2); animation:gradientFlow 4s ease infinite;
    position:relative;
}
.sidebar-logo::before {
    content:'';
    position:absolute; inset:-6px; border-radius:50%;
    border:2px solid transparent;
    background:linear-gradient(135deg,#FF6B6B,#54A0FF,#4ECDC4,#FF6B6B) border-box;
    -webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite:xor;
    mask-composite:exclude;
    animation:sidebarRingSpin 6s linear infinite;
    opacity:0.7;
}
.sidebar-logo::after {
    content:'';
    position:absolute; inset:-14px; border-radius:50%;
    background:radial-gradient(circle, rgba(255,107,107,0.22) 0%, transparent 70%);
    animation:sidebarLogoPulse 2.8s ease-in-out infinite;
    z-index:-1;
}
.sidebar-logo img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; position:relative; z-index:1; }
.sidebar-header h2 {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #2D3436;
    margin: 0 0 6px;
    line-height: 1.3;
    animation:sidebarTitleIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}
.sidebar-header p {
    display: block;
    font-size: 12px;
    color: #8892B0;
    margin: 0;
    line-height: 1.7;
    padding: 0 8px;
    animation:sidebarTitleIn 0.7s cubic-bezier(0.22,1,0.36,1) 0.08s both;
}
.sidebar-nav { padding:15px 0; flex:1; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:rgba(255,107,107,0.25) transparent; }
.sidebar-nav::-webkit-scrollbar { width:4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background:rgba(255,107,107,0.25); border-radius:10px; }
.sidebar-nav a {
    display:flex; align-items:center; gap:14px; padding:14px 25px;
    color:rgba(45,52,54,0.85); text-decoration:none; font-size:14px; font-weight:500;
    transition:transform 0.35s cubic-bezier(0.22,1,0.36,1), color 0.3s ease, border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border-left:3px solid transparent;
    position:relative; overflow:hidden;
    opacity:0;
    animation:sidebarLinkIn 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
    animation-delay:calc(0.04s * var(--i, 0) + 0.12s);
}
.sidebar-nav a::before {
    content:''; position:absolute; right:0; top:0; width:0; height:100%;
    background:linear-gradient(90deg,rgba(255,107,107,0.12),rgba(162,155,254,0.06),transparent);
    transition:width 0.4s cubic-bezier(0.22,1,0.36,1); z-index:0;
}
.sidebar-nav a::after {
    content:'';
    position:absolute; left:10px; top:50%; width:6px; height:6px; border-radius:50%;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8);
    transform:translateY(-50%) scale(0);
    opacity:0; transition:transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s;
    box-shadow:0 0 10px rgba(255,107,107,0.5);
}
.sidebar-nav a:hover::before, .sidebar-nav a.active::before { width:100%; }
.sidebar-nav a:hover::after, .sidebar-nav a.active::after { transform:translateY(-50%) scale(1); opacity:1; }
.sidebar-nav a>* { position:relative; z-index:1; }
.sidebar-nav a:hover {
    color:#FF6B6B; border-left-color:#FF6B6B;
    transform:translateX(-4px);
}
.sidebar-nav a.active {
    color:#FF6B6B; border-left-color:#FF6B6B;
    background:linear-gradient(90deg,rgba(255,107,107,0.08),rgba(162,155,254,0.04));
    box-shadow:inset 0 0 0 1px rgba(255,107,107,0.06);
}
.sidebar-nav a .nav-badge {
    margin-right:auto;
    min-width:20px;
    height:20px;
    padding:0 6px;
    border-radius:999px;
    background:#29b7a8;
    color:#fff;
    font-size:11px;
    font-weight:800;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:relative;
    z-index:1;
}
.sidebar-nav a .nav-icon {
    width:38px; height:38px; border-radius:12px;
    background:rgba(255,107,107,0.05); display:flex; align-items:center;
    justify-content:center; font-size:18px;
    transition:transform 0.4s cubic-bezier(0.34,1.56,0.64,1), background 0.3s, box-shadow 0.3s, color 0.3s, font-size 0.3s;
    color:#2D3436; flex-shrink:0;
}
.sidebar-nav a:hover .nav-icon, .sidebar-nav a.active .nav-icon {
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE);
    background-size:200% 200%;
    animation:gradientFlow 3s ease infinite;
    box-shadow:0 6px 18px rgba(255,107,107,0.35);
    font-size:20px; color:#fff;
    transform:scale(1.08) rotate(-6deg);
}
.sidebar-nav a.sidebar-search-link,
.sidebar-nav a.sidebar-messages-link {
    margin-top:8px;
    border-top:1px solid rgba(0,0,0,0.05);
}
.sidebar-nav .nav-group-label {
    margin: 16px 20px 8px;
    padding: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--sidebar-muted, #8892B0);
    opacity: .85;
}
.sidebar-nav .nav-hint {
    margin: 4px 14px 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--sidebar-muted, #636e72);
    background: rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.05);
}
.sidebar-nav .nav-details {
    margin: 6px 10px;
    border-radius: 14px;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.05);
    overflow: hidden;
}
.sidebar-nav .nav-details > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ink, #2D3436);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
    transition: background .2s ease;
}
.sidebar-nav .nav-details > summary:hover { background: rgba(0,0,0,.03); }
.sidebar-nav .nav-details > summary::-webkit-details-marker { display: none; }
.sidebar-nav .nav-details > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: .45;
    transition: transform .22s ease;
    flex-shrink: 0;
}
.sidebar-nav .nav-details[open] > summary::after { transform: rotate(135deg); }
.sidebar-nav .nav-details-body { padding: 0 0 6px; }
.sidebar-nav .nav-details-body a {
    margin: 0 4px;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 13.5px;
}
.sidebar-nav .nav-details-body a .nav-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 10px;
}
.sidebar-nav .nav-school-form { margin: 0 12px 8px; }
.sidebar-nav .nav-school-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,.06);
    background: rgba(255,255,255,.55);
    color: var(--ink, #2D3436);
    border-radius: 14px;
    padding: 10px 12px;
    font: inherit;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sidebar-nav .nav-school-btn:hover {
    background: #fff;
    border-color: rgba(255,107,107,.25);
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transform: translateX(-2px);
}
.sidebar-nav .nav-school-btn .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: rgba(255,107,107,.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.sidebar-nav .nav-school-btn:hover .nav-icon {
    background: linear-gradient(135deg,#FF6B6B,#FD79A8);
    color: #fff;
}
.sidebar-nav .nav-back-school,
.sidebar-nav button.nav-back-school {
    background: rgba(245,158,11,.12) !important;
    border-color: rgba(245,158,11,.35) !important;
    color: #9a3412 !important;
}
.sidebar-nav button.nav-back-school:hover {
    background: rgba(245,158,11,.2) !important;
}
.sidebar-nav .nav-school-text {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.sidebar-nav .nav-school-text strong {
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-nav .nav-school-text small {
    font-size: 11px;
    opacity: .65;
    font-weight: 700;
    direction: ltr;
    text-align: right;
}
.sidebar-school-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--sidebar-muted, #636e72);
    background: rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.06);
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
a.sidebar-school-chip:hover {
    background: rgba(41,183,168,.12);
    border-color: rgba(41,183,168,.28);
    color: var(--ink, #102536);
}
.sidebar-school-chip code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 10.5px;
    font-weight: 800;
    opacity: .8;
    direction: ltr;
}
.sidebar-nav a.logout { margin-top:24px; color:rgba(255,71,87,0.8); }
.sidebar-nav a.logout:hover { color:#FF4757; border-left-color:#FF4757; }
.sidebar-nav a.logout:hover .nav-icon,
.sidebar-nav a.logout.active .nav-icon {
    background:linear-gradient(135deg,#FF4757,#FF6B6B);
}

/* داشبورد خلوت مدرسه */
.dash-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}
.dash-quick a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--ink, #2D3436);
    background: var(--surface, #fff);
    border: 1px solid var(--line, rgba(0,0,0,.06));
    box-shadow: 0 2px 8px var(--shadow, rgba(0,0,0,.04));
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dash-quick a:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary, #FF6B6B) 35%, transparent);
    box-shadow: 0 6px 16px var(--shadow, rgba(0,0,0,.08));
}
.dash-rate {
    background: var(--surface, #fff);
    border: 1px solid var(--line, rgba(0,0,0,.05));
    border-radius: 18px;
    padding: 18px 20px;
    margin-top: 8px;
    box-shadow: 0 4px 14px var(--shadow, rgba(0,0,0,.05));
}
.dash-rate h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink, #2D3436);
}
.dash-rate-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.dash-rate-num {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary, #FF6B6B);
    line-height: 1;
}
.dash-rate-bar {
    flex: 1;
    min-width: 180px;
}
.dash-rate-bar p {
    margin: 0 0 8px;
    color: var(--gray, #8892B0);
    font-size: 13px;
}
.dash-rate-track {
    background: var(--surface-3, #E8ECF1);
    border-radius: 50px;
    height: 12px;
    overflow: hidden;
}
.dash-rate-fill {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--accent, #4ECDC4), #22c55e);
    transition: width .6s ease;
}
.topbar-school {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
    color: var(--ink-soft, #5a7083);
    background: var(--chip-bg, rgba(41,183,168,.12));
    border: 1px solid var(--line, rgba(0,0,0,.06));
    max-width: min(42vw, 240px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.stats-grid.stats-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.stats-grid.stats-grid--compact .stat-card { padding: 18px; }
.stats-grid.stats-grid--compact .stat-icon-wrap { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
.stats-grid.stats-grid--compact .stat-info h3 { font-size: 22px; }

@keyframes sidebarBlobDrift {
    0%,100% { transform:translate(0,0) scale(1); }
    33% { transform:translate(-18px,22px) scale(1.12); }
    66% { transform:translate(14px,-16px) scale(0.92); }
}
@keyframes sidebarShineSweep {
    0%,100% { transform:translateX(18%) rotate(18deg); opacity:0.25; }
    50% { transform:translateX(-35%) rotate(18deg); opacity:0.65; }
}
@keyframes sidebarSpark {
    0%,100% { transform:translateY(0) scale(1); opacity:0.25; }
    50% { transform:translateY(-10px) scale(1.4); opacity:0.9; }
}
@keyframes sidebarGlowPulse {
    0%,100% { opacity:0.85; }
    50% { opacity:1; }
}
@keyframes sidebarRingSpin {
    to { transform:rotate(360deg); }
}
@keyframes sidebarLogoPulse {
    0%,100% { transform:scale(0.92); opacity:0.55; }
    50% { transform:scale(1.12); opacity:0.95; }
}
@keyframes sidebarTitleIn {
    from { opacity:0; transform:translateY(8px); }
    to { opacity:1; transform:translateY(0); }
}
@keyframes sidebarLinkIn {
    from { opacity:0; transform:translateX(18px); }
    to { opacity:1; transform:translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar::after,
    .sidebar-blob,
    .sidebar-shine,
    .sidebar-spark,
    .sidebar-logo,
    .sidebar-logo::before,
    .sidebar-logo::after,
    .sidebar-header h2,
    .sidebar-header p,
    .sidebar-nav a,
    .sidebar-nav a .nav-icon {
        animation: none !important;
    }
    .sidebar-nav a { opacity:1; transform:none; }
}

.sidebar-header-actions {
    position:absolute;
    top:10px;
    left:10px;
    right:auto;
    z-index:40;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    direction:ltr; /* ✕ و 📩 کنار هم از لبه چپ سایدبار */
    pointer-events:none;
}
.sidebar-header-actions > * { pointer-events:auto; }
.notification-container {
    position:relative;
    top:auto;
    left:auto;
    z-index:40;
    margin:0;
}
.notification-btn {
    background:rgba(255,255,255,0.92);
    border:1px solid rgba(255,107,107,0.18);
    border-radius:14px;
    width:44px;
    height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    cursor:pointer;
    transition:transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position:relative;
    z-index:2;
    box-shadow:0 4px 14px rgba(255,107,107,0.12);
    padding:0;
    color:#2D3436;
}
.notification-btn:hover,
.notification-container.open .notification-btn {
    background:#fff;
    transform:scale(1.06);
    box-shadow:0 6px 18px rgba(255,107,107,0.22);
}
.notification-btn-icon { line-height:1; pointer-events:none; }
.notification-badge {
    position:absolute;
    top:-4px;
    right:-4px;
    background:#FF4757;
    color:#fff;
    font-size:10px;
    font-weight:700;
    border-radius:999px;
    min-width:20px;
    height:20px;
    padding:0 5px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 2px 8px rgba(255,71,87,0.35);
    line-height:1;
}
.notification-dropdown {
    position:fixed;
    top:64px;
    left:12px;
    width:min(320px, calc(100vw - 24px));
    background:#fff;
    border:1px solid rgba(0,0,0,0.08);
    border-radius:16px;
    box-shadow:0 16px 48px rgba(45,52,54,0.18);
    max-height:min(420px, calc(100vh - 80px));
    overflow:hidden;
    display:none;
    flex-direction:column;
    direction:rtl;
    z-index:1200;
    text-align:right;
}
.notification-container.open .notification-dropdown,
.notification-dropdown.is-open {
    display:flex;
    animation:notifDropIn 0.22s cubic-bezier(0.22,1,0.36,1);
}
.notification-dropdown[hidden] { display:none !important; }
@keyframes notifDropIn {
    from { opacity:0; transform:translateY(-8px) scale(0.98); }
    to { opacity:1; transform:translateY(0) scale(1); }
}
.notification-header {
    padding:12px 14px;
    border-bottom:1px solid rgba(0,0,0,0.06);
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    font-size:13px;
    background:linear-gradient(180deg,#fff,#fafbfc);
    flex-shrink:0;
}
.notification-header strong { color:#2D3436; }
.notification-mark-all {
    color:#FF6B6B;
    cursor:pointer;
    font-weight:600;
    font-size:12px;
    background:none;
    border:none;
    padding:4px 6px;
    border-radius:8px;
    font-family:inherit;
}
.notification-mark-all:hover { background:rgba(255,107,107,0.08); }
.notification-mark-all[hidden] { display:none !important; }
.notification-list {
    max-height:300px;
    overflow-y:auto;
    overscroll-behavior:contain;
    flex:1;
    -webkit-overflow-scrolling:touch;
}
.notification-item {
    display:grid;
    grid-template-columns:36px 1fr;
    gap:10px;
    align-items:flex-start;
    width:100%;
    padding:12px 14px;
    border:0;
    border-bottom:1px solid rgba(0,0,0,0.04);
    background:#fff;
    cursor:pointer;
    transition:background 0.15s;
    text-align:right;
    font-family:inherit;
    color:inherit;
}
.notification-icon {
    width:36px;
    height:36px;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:rgba(41,183,168,0.12);
    font-size:16px;
    flex-shrink:0;
}
.notification-item.is-chat .notification-icon { background:rgba(14,165,233,0.14); }
.notification-body { min-width:0; }
.notification-item:hover,
.notification-item:focus-visible { background:rgba(255,107,107,0.05); outline:none; }
.notification-title {
    font-size:13px;
    font-weight:700;
    color:#2D3436;
    margin-bottom:4px;
    line-height:1.4;
    word-break:break-word;
}
.notification-text {
    font-size:12px;
    color:#636E72;
    line-height:1.55;
    word-break:break-word;
    white-space:normal;
}
.notification-time {
    font-size:11px;
    color:#B2BEC3;
    margin-top:6px;
}
.notification-empty {
    padding:28px 16px;
    text-align:center;
    color:#B2BEC3;
    font-size:13px;
}
.notification-footer {
    padding:10px 14px;
    border-top:1px solid rgba(0,0,0,0.06);
    text-align:center;
    background:#fafbfc;
    flex-shrink:0;
}
.notification-footer a {
    color:#FF6B6B;
    text-decoration:none;
    font-size:13px;
    font-weight:600;
}
.notification-footer a:hover { text-decoration:underline; }

.sidebar-toggle {
    display:none;
    position:fixed;
    top:16px;
    right:16px;
    left:auto;
    width:46px;
    height:46px;
    border-radius:14px;
    background:linear-gradient(135deg, var(--primary, #e4574d), var(--accent, #29b7a8));
    border:1px solid transparent;
    color:#fff;
    box-shadow:0 4px 16px var(--shadow, rgba(14,58,72,0.22));
    z-index:100;
    align-items:center;
    justify-content:center;
    font-size:22px;
    line-height:1;
    cursor:pointer;
    backdrop-filter:blur(10px);
    transition:all 0.3s cubic-bezier(0.4,0,0.2,1);
    -webkit-tap-highlight-color: transparent;
    padding:0;
}
.sidebar-toggle-bars {
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:5px;
    width:20px;
    pointer-events:none;
}
.sidebar-toggle-bars span {
    display:block;
    height:2.5px;
    width:100%;
    border-radius:99px;
    background:#fff;
    box-shadow:0 1px 2px rgba(0,0,0,.2);
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    background:linear-gradient(135deg, var(--accent, #29b7a8), var(--primary, #e4574d));
    color:#fff;
    box-shadow:0 6px 20px var(--shadow, rgba(14,58,72,0.3));
    transform:scale(1.05);
    outline: none;
}
.topbar-start {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}
.topbar-start .topbar-title,
.topbar-start h1 {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.topbar .sidebar-toggle,
.topbar .sidebar-toggle.in-topbar {
    position: static;
    order: 0;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    margin: 0;
    box-shadow: 0 2px 10px var(--shadow, rgba(14,58,72,0.18));
}
.sidebar-overlay {
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.5);
    z-index:99;
}
.sidebar-close {
    display:none;
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    width:40px;
    height:40px;
    border-radius:12px;
    background:rgba(255,255,255,0.12);
    border:1px solid rgba(255,255,255,0.18);
    font-size:20px;
    cursor:pointer;
    color:#fff;
    z-index:101;
    transition:background 0.25s, color 0.25s, transform 0.2s;
    align-items:center;
    justify-content:center;
    line-height:1;
    flex:0 0 auto;
}
.sidebar-close:hover,
.sidebar-close:focus-visible {
    background:rgba(255,255,255,0.22);
    color:#fff;
    transform:scale(1.05);
    outline:none;
}

.sidebar-expanded .sidebar { width:260px; }
.sidebar-expanded .sidebar-header h2,
.sidebar-expanded .sidebar-header p { display: block; }
.sidebar-expanded .sidebar-nav a span:not(.nav-icon) { display: inline; }
.sidebar-expanded .sidebar-nav a { justify-content:flex-start; padding:14px 25px; }
.sidebar-expanded .sidebar-nav a .nav-icon { margin-left:14px; }
.sidebar-expanded .sidebar-close { display:inline-flex; }
.sidebar-expanded .sidebar-overlay { display:block; }
.sidebar-expanded .sidebar-toggle { display:none; }
.sidebar-expanded .main-content { margin-right:260px !important; }

.main-content { flex:1; margin-right:280px; min-height:100vh; }

.topbar {
    background:linear-gradient(135deg,rgba(255,255,255,0.95),rgba(255,240,245,0.85),rgba(240,255,250,0.9));
    backdrop-filter:blur(12px); padding:18px 30px; display:flex;
    justify-content:space-between; align-items:center; gap:12px; position:sticky; top:0;
    z-index:50; border-bottom:2px solid rgba(255,107,107,0.12);
}
.topbar h1,
.topbar .topbar-title {
    font-size:22px; font-weight:800; display:flex; align-items:center; gap:8px;
    color:#2D3436; unicode-bidi:isolate; margin:0; min-width:0;
}
.topbar-emoji { flex-shrink:0; line-height:1; unicode-bidi:isolate; }

.topbar-end {
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
    flex-wrap:nowrap;
    min-width:0;
    max-width: min(320px, 58vw);
}
.topbar-refresh {
    -webkit-appearance: none !important;
    appearance: none !important;
    width:40px;
    height:40px;
    min-width:40px;
    min-height:40px;
    margin:0;
    border-radius:50%;
    border:1px solid rgba(15, 23, 42, 0.08) !important;
    background: rgba(255,255,255,.92) !important;
    color: #334155 !important;
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    flex-shrink:0;
    padding:0 !important;
    line-height:1;
    font: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.topbar-refresh:hover {
    background: #f1f5f9 !important;
    color: #0f766e !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    transform: none;
}
.topbar-refresh:active { transform: scale(.94); }
.topbar-refresh:focus-visible {
    outline:2px solid #2ec4b6;
    outline-offset:2px;
}
.topbar-refresh:disabled {
    opacity: .7;
    cursor: wait;
}
.topbar-refresh.is-spinning .topbar-refresh-svg {
    animation: topbar-refresh-spin .7s linear infinite;
}
.topbar-refresh-svg {
    display:block;
    width:18px;
    height:18px;
    flex-shrink:0;
}
@keyframes topbar-refresh-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.user-chip { display:flex; align-items:center; gap:10px;
    background:linear-gradient(135deg,rgba(255,107,107,0.1),rgba(78,205,196,0.08),rgba(255,230,109,0.06));
    padding:4px 12px 4px 4px; border-radius:999px; border:1px solid rgba(255,107,107,0.12);
    max-width: min(240px, 48vw); min-width: 0; flex: 1 1 auto; height:40px; box-sizing:border-box;
}
.user-chip-clickable,
.user-chip-link { cursor:pointer; transition: background .15s ease, box-shadow .15s ease; }
.user-chip-clickable:hover,
.user-chip-link:hover { background: rgba(84,160,255,.10); box-shadow: 0 0 0 1px rgba(84,160,255,.18); }
.user-chip-clickable:focus-visible,
.user-chip-link:focus-visible { outline: 2px solid #54A0FF; outline-offset: 2px; }
.user-chip-avatar { width:32px; height:32px; border-radius:50%;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE);
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-weight:700; font-size:13px; flex-shrink:0;
    box-shadow:0 1px 4px rgba(15,23,42,0.12);
    overflow:hidden; }
.user-chip-avatar.has-photo { background:#e8edf2; padding:0; }
.user-chip-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.user-chip-info {
    display:flex; flex-direction:column; justify-content:center;
    min-width:0; flex:1; text-align:right; gap:0;
    overflow:hidden;
}
.user-chip-name {
    font-size:13px; font-weight:700; color:var(--ink,#2D3436);
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3;
}
.user-chip .user-chip-role,
.topbar .user-chip-role {
    display: none !important;
}

.content { padding:30px; }

.toolbar { padding:20px 30px; background:rgba(255,255,255,0.95); border-bottom:1px solid rgba(0,0,0,0.04); flex-wrap:wrap; gap:15px; }

.login-container { background: linear-gradient(135deg, #FF6B6B20, #FD79A820, #A29BFE20); }

.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px; margin-bottom:30px; }
.stat-card { background:#fff; border-radius:20px; padding:24px; display:flex;
    align-items:center; gap:18px; box-shadow:0 4px 12px rgba(255,107,107,0.1);
    transition:all 0.4s cubic-bezier(0.4,0,0.2,1); position:relative;
    overflow:hidden; border:1px solid rgba(0,0,0,0.04); cursor:pointer; }
.stat-card::before { content:''; position:absolute; top:0; left:0; width:4px; height:100%;
    border-radius:0 4px 4px 0; transition:width 0.3s; }
.stat-card:hover { transform:translateY(-8px); box-shadow:0 16px 40px rgba(255,107,107,0.2); }
.stat-card:hover::before { width:6px; }
.stat-icon-wrap { width:60px; height:60px; border-radius:14px; display:flex;
    align-items:center; justify-content:center; font-size:26px; flex-shrink:0; }
.stat-info h3 { font-size:26px; font-weight:800; line-height:1; margin-bottom:4px; color:#2D3436; }
.stat-info p { color:#8892B0; font-size:12px; font-weight:500; }
.stat-card.total .stat-icon-wrap { background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE); box-shadow:0 4px 16px rgba(255,107,107,0.2); }
.stat-card.total::before { background:linear-gradient(180deg,#FF6B6B,#FD79A8); }
.stat-card.students .stat-icon-wrap { background:linear-gradient(135deg,#00B894,#00CEC9,#4ECDC4); box-shadow:0 4px 16px rgba(0,184,148,0.2); }
.stat-card.students::before { background:linear-gradient(180deg,#00B894,#00CEC9); }
.stat-card.teachers .stat-icon-wrap { background:linear-gradient(135deg,#54A0FF,#A29BFE,#FD79A8); box-shadow:0 4px 16px rgba(84,160,255,0.2); }
.stat-card.teachers::before { background:linear-gradient(180deg,#54A0FF,#A29BFE); }
    .stat-card.admins .stat-icon-wrap { background:linear-gradient(135deg,#FFE66D,#FF9F43,#E17055); box-shadow:0 4px 16px rgba(253,203,110,0.2); }
    .stat-card.admins::before { background:linear-gradient(180deg,#FFE66D,#FF9F43); }
    .stat-card.managers .stat-icon-wrap { background:linear-gradient(135deg,#6366f1,#8b5cf6,#a855f7); box-shadow:0 4px 16px rgba(168,85,247,0.2); }
    .stat-card.managers::before { background:linear-gradient(180deg,#6366f1,#8b5cf6); }
.stat-card.present .stat-icon-wrap { background:linear-gradient(135deg,#00B894,#4ECDC4,#FFE66D); box-shadow:0 4px 16px rgba(0,184,148,0.2); }
.stat-card.present::before { background:linear-gradient(180deg,#00B894,#4ECDC4); }
.stat-card.absent .stat-icon-wrap { background:linear-gradient(135deg,#FF4757,#FF6B6B,#FD79A8); box-shadow:0 4px 16px rgba(255,71,87,0.2); }
    .stat-card.absent::before { background:linear-gradient(180deg,#FF4757,#FF6B6B); }
    .stat-card.late { background:linear-gradient(135deg,#FFE66D,#FF9F43,#E17055); box-shadow:0 4px 16px rgba(255,159,67,0.2); }
    .stat-card.late .stat-icon-wrap { background:linear-gradient(135deg,#FFE66D,#FF9F43); box-shadow:0 4px 16px rgba(255,159,67,0.2); }
    .stat-card.late::before { background:linear-gradient(180deg,#FFE66D,#FF9F43); }

.card { background:var(--surface,#fff); border-radius:20px; padding:28px; margin-bottom:25px;
    box-shadow:0 4px 12px var(--shadow, rgba(14,58,72,0.1)); border:1px solid var(--line, rgba(0,0,0,0.04));
    transition:box-shadow 0.3s; }
.card:hover { box-shadow:0 8px 24px var(--shadow, rgba(14,58,72,0.16)); }
.card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.card-header h3 { font-size:18px; font-weight:700; color:#2D3436; display:flex; align-items:center; gap:10px; }
.card-icon { width:42px; height:42px; border-radius:12px; display:flex; align-items:center;
    justify-content:center; font-size:22px;
    background:linear-gradient(135deg,rgba(255,107,107,0.15),rgba(78,205,196,0.08)); }

.form-row { display:flex; gap:16px; margin-bottom:16px; flex-wrap:wrap; }
.form-group { flex:1; min-width:200px; position:relative; }
.form-group label { display:block; margin-bottom:6px; font-weight:600; color:#555; font-size:13px; }
.form-group input, .form-group select, .form-group textarea,
.form-input {
    width:100%; padding:12px 16px; border:2px solid #E8ECF1; border-radius:14px;
    font-size:14px; font-family:'Vazirmatn', Tahoma; transition:all 0.3s cubic-bezier(0.4,0,0.2,1);
    background:#FAFBFC; color:#2D3436; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.form-input:focus {
    outline:none; border-color:#FF6B6B; background:#fff;
    box-shadow:0 0 0 4px rgba(255,107,107,0.1); }
.form-group input::placeholder,
.form-input::placeholder { color:#B0B8C4; }

.btn { padding:12px 28px; border:none; border-radius:14px; font-size:14px; font-family:'Vazirmatn', Tahoma;
    cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:8px;
    transition:all 0.3s cubic-bezier(0.4,0,0.2,1); font-weight:600; position:relative; overflow:hidden; }
.btn::after { content:''; position:absolute; inset:0; background:rgba(255,255,255,0); transition:background 0.3s; }
.btn:hover::after { background:rgba(255,255,255,0.12); }
.btn:active { transform:scale(0.97); }
.btn-primary { background:linear-gradient(135deg,var(--primary),var(--accent));
    background-size:160% 160%; color:#fff; box-shadow:0 4px 16px var(--shadow, rgba(14,58,72,0.18)); }
.btn-primary:hover { box-shadow:0 8px 24px var(--shadow, rgba(14,58,72,0.28)); transform:translateY(-2px); }
.btn-success { background:linear-gradient(135deg,#00B894,#00CEC9,#55EFC4); color:#fff; box-shadow:0 4px 16px rgba(0,184,148,0.3); }
.btn-success:hover { box-shadow:0 8px 24px rgba(0,184,148,0.4); transform:translateY(-2px); }
.btn-warning { background:linear-gradient(135deg,#FF9F43,#FDCB6E,#FFE66D); color:#fff; box-shadow:0 4px 16px rgba(255,159,67,0.3); }
.btn-warning:hover { box-shadow:0 8px 24px rgba(255,159,67,0.4); transform:translateY(-2px); }
.btn-late { background:linear-gradient(135deg,#FFE66D,#FF9F43,#E17055); color:#fff; box-shadow:0 4px 16px rgba(255,159,67,0.3); }
.btn-late:hover { box-shadow:0 8px 24px rgba(255,159,67,0.4); transform:translateY(-2px); }
.btn-danger { background:linear-gradient(135deg,#FF4757,#FF6B6B,#FD79A8); color:#fff; box-shadow:0 4px 16px rgba(255,71,87,0.3); }
.btn-secondary { background:linear-gradient(135deg,#8892B0,#A29BFE); color:#fff; }
.btn-sm { padding:6px 14px; font-size:12px; border-radius:8px; }
.btn-block { display:flex; justify-content:center; align-items:center; width:100%; padding:16px; font-size:16px;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE,#54A0FF,#4ECDC4,#FFE66D);
    background-size:300% 300%; color:#fff; box-shadow:0 4px 16px rgba(255,107,107,0.3); animation:gradientFlow 4s ease infinite; }
.btn-group { display:flex; gap:10px; flex-wrap:wrap; }

.search-toolbar { margin-bottom:16px; }
.search-toolbar form { display:flex; gap:10px; align-items:center; }
.search-toolbar input[type="text"] { flex:1; padding:10px 14px; border:2px solid #E1E4EA; border-radius:8px; font-size:14px; background:rgba(255,255,255,0.05); }

.password-cell {
    font-family: monospace;
    font-size: 12px;
    color: var(--info);
    cursor: pointer;
    background: rgba(84,160,255,0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: text;
    -webkit-user-select: text;
    transition: background .15s ease, color .15s ease;
}
.password-cell:hover {
    background: rgba(84,160,255,0.18);
}
.password-cell.is-copied {
    background: rgba(0,184,148,0.18);
    color: #00b894;
}
.password-cell.is-copy-error {
    background: rgba(255,71,87,0.16);
    color: #ff4757;
}

.alert { padding:16px 20px; border-radius:14px; margin-bottom:20px; font-size:14px; display:flex; align-items:center; gap:10px; animation:fadeIn 0.4s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.alert-success { background:linear-gradient(135deg,rgba(0,184,148,0.12),rgba(0,206,201,0.06)); color:#00796b; border:1px solid rgba(0,184,148,0.2); }
.alert-danger { background:linear-gradient(135deg,rgba(255,71,87,0.12),rgba(255,118,117,0.06)); color:#c0392b; border:1px solid rgba(255,71,87,0.2); }

.tabs { display:flex; gap:8px; margin-bottom:20px; background:#fff; border-radius:14px; padding:4px; box-shadow:0 2px 8px rgba(0,0,0,0.05); border:1px solid rgba(0,0,0,0.06); }
.tab-btn { flex:1; padding:12px 16px; border:none; background:transparent; font-size:14px; font-weight:600; color:#8892B0; cursor:pointer; border-radius:10px; transition:all 0.3s; display:flex; align-items:center; justify-content:center; gap:6px; }
.tab-btn:hover { color:#FF6B6B; background:rgba(255,107,107,0.05); }
.tab-btn.active { background:linear-gradient(135deg,var(--primary),var(--accent)); color:#fff; box-shadow:0 4px 12px rgba(255,107,107,0.2); }
.tab-content { display:none; }
.tab-content.active { display:block; animation:fadeIn 0.3s ease; }

.dynamic-fields {
    background:linear-gradient(135deg,rgba(255,107,107,0.06),rgba(78,205,196,0.04),rgba(255,230,109,0.03));
    padding:24px; border-radius:14px; margin-bottom:20px;
    border:2px dashed rgba(255,107,107,0.2); position:relative; }
.dynamic-fields::before { content:'✨'; position:absolute; top:-14px; right:20px; background:#fff; padding:2px 10px;
    border-radius:20px; font-size:14px; box-shadow:0 2px 8px rgba(0,0,0,0.1); }
.dynamic-fields h4 { color:#FF6B6B; margin-bottom:16px; font-size:15px; font-weight:700; }

.table-responsive { overflow-x:auto; border-radius:14px; border:1px solid var(--line, rgba(0,0,0,0.06)); background:var(--surface,#fff); }
.data-table { width:max-content; min-width:100%; max-width:none; border-collapse:collapse; background:var(--surface,#fff); color:var(--ink,#2D3436); }
.data-table.cls-board-table { width: 100%; min-width: 980px; table-layout: fixed; }
.data-table th, .data-table td { padding:14px 16px; text-align:right; border-bottom:1px solid var(--line,#F1F3F5); font-size:13px; transition:all 0.2s; color:var(--ink,#2D3436); }
.data-table th { background:var(--table-head,#F1F3F5); color:var(--ink,#2D3436); font-weight:700; font-size:13px; padding-top:16px; padding-bottom:16px; }
.data-table tbody tr:hover { background:var(--table-hover, rgba(41,183,168,0.08)); }
.data-table tbody tr:last-child td { border-bottom:none; }

.badge { padding:5px 14px; border-radius:50px; font-size:12px; font-weight:600; display:inline-flex; align-items:center; gap:5px; }
.badge-student { background:linear-gradient(135deg,#00B894,#00CEC9); color:#fff; }
.badge-teacher { background:linear-gradient(135deg,#A29BFE,#6C5CE7,#FD79A8); color:#fff; }
.badge-parent { background:linear-gradient(135deg,#54A0FF,#74b9ff,#0984e3); color:#fff; }
.badge-manager { background:linear-gradient(135deg,#6366f1,#8b5cf6,#a855f7); color:#fff; }
.badge-admin { background:linear-gradient(135deg,#FFE66D,#FF9F43,#E17055); color:#fff; }
.badge-employee { background:linear-gradient(135deg,#636e72,#b2bec3); color:#fff; }
.badge-present { background:linear-gradient(135deg,#00B894,#4ECDC4); color:#fff; }
.badge-absent { background:linear-gradient(135deg,#FF4757,#FF6B6B); color:#fff; }
.badge-late { background:linear-gradient(135deg,#FFE66D,#FF9F43); color:#fff; }
.badge-warning { background:linear-gradient(135deg,#FFE66D,#FF9F43); color:#fff; }
.badge-danger { background:linear-gradient(135deg,#FF4757,#FF6B6B); color:#fff; }
.badge-info { background:linear-gradient(135deg,#54A0FF,#A29BFE); color:#fff; }

.text-muted { color:#8892B0 !important; font-size:12px; }

.search-box { position:relative; margin-bottom:20px; }
.search-box input { width:100%; padding:14px 20px 14px 50px; border:2px solid #E8ECF1; border-radius:50px;
    font-size:15px; font-family:'Vazirmatn', Tahoma; background:#fff; transition:all 0.3s; }
.search-box input:focus { outline:none; border-color:#FF6B6B; box-shadow:0 0 0 4px rgba(255,107,107,0.1); }
.search-box .search-icon { position:absolute; left:18px; top:50%; transform:translateY(-50%); font-size:20px; opacity:0.4; }

.help-text {
    color:#8892B0;
    font-size:13px;
    margin-bottom:15px;
    line-height:1.7;
    padding:10px 14px;
    background:rgba(84,160,255,0.06);
    border-radius:10px;
    border-right:3px solid #54A0FF;
    display:block;
    max-width:100%;
    box-sizing:border-box;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.form-group .help-text {
    margin-top:8px;
    margin-bottom:0;
    padding:8px 12px;
    font-size:12px;
}
.perm-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:10px; }
.perm-item { display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:12px; background:#F8F9FE; font-size:13px; }
.perm-item.yes { background:rgba(0,184,148,0.1); }
.perm-item.no { background:rgba(255,71,87,0.08); color:#636e72; }

.login-footer { text-align:center; margin-top:20px; padding-top:16px; border-top:1px solid rgba(0,0,0,0.06); }
.login-footer a { color:#7C70DC; font-size:14px; text-decoration:none; transition:all 0.3s; }
.login-footer a:hover { color:#FF6B6B; }

.voc-divider { display:flex; align-items:center; margin:22px 0; text-align:center; }
.voc-divider::before, .voc-divider::after { content:''; flex:1; height:1px; background:linear-gradient(90deg,transparent,rgba(162,155,254,0.3),transparent); }
.voc-divider span { padding:0 14px; color:#8892B0; font-size:13px; font-weight:500; }

.voc-hero { display:flex; align-items:center; gap:16px; padding:24px; margin-top:8px;
    background:linear-gradient(135deg,rgba(255,107,107,0.08),rgba(162,155,254,0.1),rgba(78,205,196,0.05));
    border:2px solid rgba(162,155,254,0.2); border-radius:18px; cursor:pointer;
    transition:all 0.3s cubic-bezier(0.4,0,0.2,1); text-decoration:none; position:relative; overflow:hidden; }
.voc-hero::before { content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(255,107,107,0.1),rgba(162,155,254,0.08));
    opacity:0; transition:opacity 0.3s; }
.voc-hero:hover { border-color:rgba(162,155,254,0.5); transform:translateY(-3px); box-shadow:0 12px 32px rgba(162,155,254,0.2); }
.voc-hero:hover::before { opacity:1; }
.voc-hero>* { position:relative; z-index:1; }
.voc-hero-icon { font-size:42px; width:60px; height:60px; display:flex; align-items:center; justify-content:center;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE); border-radius:16px; flex-shrink:0; box-shadow:0 4px 16px rgba(255,107,107,0.25); }
.voc-hero-title { font-size:18px; font-weight:800; color:#2D3436; margin-bottom:2px; }
.voc-hero-desc { font-size:12px; color:#8892B0; margin-bottom:0; }
.voc-hero-arrow { font-size:24px; color:#A29BFE; font-weight:700; margin-right:auto; transition:transform 0.3s; }
.voc-hero:hover .voc-hero-arrow { transform:translateX(-4px); }

.vocational-hero { text-align:center; margin-bottom:35px; padding:30px;
    background:linear-gradient(135deg,rgba(255,107,107,0.08),rgba(162,155,254,0.08));
    border-radius:20px; border:2px solid rgba(162,155,254,0.15); position:relative; overflow:hidden; }
.vocational-hero::before { content:'🎓'; position:absolute; top:-20px; left:-10px; font-size:80px; opacity:0.06; }
.vocational-hero::after { content:'📚'; position:absolute; bottom:-20px; right:-10px; font-size:80px; opacity:0.06; }
.vocational-hero .voc-icon { font-size:48px; margin-bottom:12px; animation:bounce 2s infinite; }
.vocational-hero h2 { font-size:22px; font-weight:800;
    background:linear-gradient(135deg,#FF6B6B,#FD79A8,#A29BFE,#54A0FF);
    background-size:200% 200%; -webkit-background-clip:text; -webkit-text-fill-color:transparent;
    background-clip:text; animation:gradientFlow 6s ease infinite; margin-bottom:6px; }
.vocational-hero p { color:#8892B0; font-size:13px; }

.no-results { text-align:center; color:#8892B0; padding:60px 20px; font-size:16px; }
.no-results .big-icon { font-size:60px; margin-bottom:15px; opacity:0.5; }

.visual-stats { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:25px; }
.viz-card { background:#fff; border-radius:20px; padding:24px;
    box-shadow:0 4px 12px rgba(255,107,107,0.1); border:1px solid rgba(0,0,0,0.04); }
.viz-card h3 { font-size:16px; font-weight:700; color:#2D3436; margin-bottom:16px; }
.donut-chart { width:180px; height:180px; border-radius:50%; display:flex;
    align-items:center; justify-content:center; margin:0 auto 16px; position:relative; }
.donut-center { text-align:center; background:#fff; padding:20px; border-radius:50%;
    width:100px; height:100px; display:flex; flex-direction:column;
    align-items:center; justify-content:center; }
.donut-center h4 { font-size:24px; font-weight:800; color:#2D3436; margin:0; }
.donut-center span { font-size:12px; color:#8892B0; }
.legend { display:flex; justify-content:center; gap:20px; }
.legend-item { display:flex; align-items:center; gap:6px; font-size:13px; color:#555; }
.legend-dot { width:10px; height:10px; border-radius:50%; }

@media (max-width:1200px) {
    .card-page { grid-template-columns: repeat(4, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width:1024px) {
    .sidebar-toggle { display: flex; }
    .sidebar { width:260px; }
    .main-content { margin-right:260px; }
    .card-page { grid-template-columns: repeat(3, 1fr); }
    .topbar { padding: 15px 20px; }
    .content { padding: 20px; }
}
@media (max-width:900px) {
    .card-page { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .user-card { height: 160px; padding: 12px; }
}
@media (max-width:768px) {
    .sidebar-toggle { display: flex; }
    .sidebar {
        width:80px;
        position:fixed;
    }
    .sidebar-header { padding:18px 8px; }
    .sidebar-header h2, .sidebar-header p { display: none; }
    .sidebar-nav a span:not(.nav-icon) { display: none; }
    .sidebar-logo { width:48px; height:48px; font-size:24px; margin-bottom:0; }
    .sidebar-nav a { justify-content:center; padding:12px 5px; }
    .sidebar-nav a .nav-icon { margin:0; }
    .sidebar-close { display:none; }
    .main-content { margin-right:80px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction:column; }
    .form-group { min-width:auto; }
    .topbar h1 { font-size:18px; }
    .card-page { grid-template-columns: repeat(2, 1fr); }
    .user-card { height: 150px; }
    .toolbar { padding: 15px; }
    .toolbar .btn { margin-left: 4px; margin-bottom: 4px; }
    .search-box { width: 100%; }
    .table-responsive { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 6px; }
}
@media (max-width:600px) {
    .card-page { grid-template-columns: 1fr; }
    .card-page-a5 { grid-template-columns: 1fr; }
    .user-card { height: auto; min-height: 140px; }
    .btn { padding: 10px 16px; font-size: 13px; }
    .btn-sm { padding: 5px 10px; font-size: 11px; }
    .topbar { padding: 12px 15px; flex-wrap: wrap; gap: 10px; }
    .topbar h1 { font-size: 16px; }
    .content { padding: 12px; }
    .card { padding: 16px; }
    .stat-card { padding: 16px; }
    .stat-icon-wrap { width: 50px; height: 50px; font-size: 20px; }
    .stat-info h3 { font-size: 20px; }
    .visual-stats { grid-template-columns: 1fr; }
    .donut-chart { width: 150px; height: 150px; }
    .donut-center { width: 80px; height: 80px; }
    .donut-center h4 { font-size: 18px; }
    .login-box { padding: 30px 20px; width: 95%; }
    .login-header h1 { font-size: 22px; }
    .form-group input, .form-group select, .form-group textarea { padding: 10px 12px; font-size: 14px; }
    .btn-block { padding: 12px; font-size: 14px; }
}
@media (max-width:480px) {
    .sidebar-toggle { display: flex; }
    .sidebar {
        width:260px;
        position:fixed;
        right:-260px;
        transition:right 0.3s cubic-bezier(0.4,0,0.2,1);
    }
    .sidebar-header { padding:30px 25px; }
    .sidebar-logo { width:65px; height:65px; font-size:30px; margin-bottom:12px; }
    .sidebar-header h2, .sidebar-header p { display: block; }
    .sidebar-nav a span:not(.nav-icon) { display: inline; }
    .sidebar-nav a { justify-content:flex-start; padding:14px 25px; }
    .sidebar-nav a .nav-icon { margin-left:14px; }
    .sidebar-close { display:inline-flex; }
    body.sidebar-expanded { overflow:hidden; }
    .main-content { margin-right:0 !important; }
    .stats-grid { grid-template-columns: 1fr; }
    .content { padding: 10px; }
    .card-page { gap: 8px; }
    .user-card { padding: 10px; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar > div > div { flex-wrap: wrap; justify-content: center; }
    .form-group label { font-size: 12px; }
    .data-table { font-size: 11px; }
    .data-table th, .data-table td { padding: 6px 4px; }
    .badge { padding: 4px 10px; font-size: 10px; }
    .user-chip-avatar { width: 32px; height: 32px; font-size: 12px; }
    .sidebar-nav a .nav-icon { width: 32px; height: 32px; font-size: 16px; }
}

@media (max-width:768px) and (orientation: landscape) {
    .sidebar { width: 240px; }
    .sidebar-header h2, .sidebar-header p { display: block; }
    .sidebar-nav a span:not(.nav-icon) { display: inline; }
    .sidebar-nav a { justify-content: flex-start; padding: 14px 20px; }
    .sidebar-nav a .nav-icon { margin-left: 14px; }
    .main-content { margin-right: 240px; }
    .card-page { grid-template-columns: repeat(3, 1fr); }
}

@media print {
    .sidebar, .topbar, .toolbar, .animated-bg, .no-print { display: none !important; }
    .main-content { margin: 0; }
    .content { padding: 0; }
    body { background: white; }
}

@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .form-group input, .form-group select, .form-group textarea { min-height: 44px; }
    .sidebar-nav a { min-height: 44px; }
    .data-table th, .data-table td { min-height: 44px; }
    .nav-icon { min-width: 44px; min-height: 44px; }
}

@media (max-width:768px) {
    .form-row { flex-direction: column; }
    .btn-group { flex-direction: column; }
    .btn-group .btn { width: 100%; justify-content: center; }
    .search-toolbar > div[style*="flex"],
    .search-toolbar form[style*="flex"],
    .search-toolbar div[style*="display:flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .search-toolbar input[type="text"] { width: 100% !important; }
}

@media (max-width:480px) {
    .sidebar-expanded .sidebar { right: 0; }
    .sidebar-expanded .main-content { margin-right: 0 !important; }
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    max-width: 100%;
    width: 100%;
    border-radius: 14px;
    position: relative;
}
.table-responsive::after {
    content: "↔ برای دیدن بقیه جدول انگشت بکشید";
    display: none;
    position: sticky;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted, #8892b0);
    background: linear-gradient(180deg, transparent, var(--surface, #fff) 40%);
    padding: 8px 6px 4px;
    pointer-events: none;
    z-index: 1;
}
.data-table {
    min-width: 720px;
    width: max-content;
    max-width: none;
    border-collapse: collapse;
}
.data-table:not(.cls-board-table) > thead > tr > th,
.data-table:not(.cls-board-table) > tbody > tr > td {
    white-space: nowrap;
}
.data-table td.wrap,
.data-table th.wrap {
    white-space: normal;
    min-width: 140px;
    max-width: 260px;
}
@media (max-width:768px) {
    .table-responsive::after { display: block; }
    .data-table {
        min-width: 680px;
        font-size: 12px;
    }
    .data-table thead th { font-size: 11px; white-space: nowrap; }
    .data-table th, .data-table td {
        padding: 10px 8px;
        vertical-align: middle;
    }
    .data-table img { width: 32px; height: 32px; }
    .data-table td .btn-group {
        flex-direction: column;
        gap: 4px;
    }
    .data-table td .btn-group .btn {
        width: 100%;
        padding: 8px 10px;
        font-size: 12px;
        min-height: 40px;
    }
    .content { padding-inline: 12px; }
    .card { padding: 14px; border-radius: 16px; }
    .card-header h3 { font-size: 15px; }
    .topbar {
        gap: 8px;
        align-items: center;
    }
    .topbar h1 {
        font-size: 16px;
        line-height: 1.3;
        max-width: calc(100% - 56px);
    }
    .user-chip-info { max-width: 42vw; }
    .user-chip-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
@media (max-width:480px) {
    .data-table { min-width: 520px; }
    .content { padding: 10px; }
    .alert { font-size: 13px; line-height: 1.5; }
}

.modal-overlay {
    padding: 10px;
}
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}
@media (max-width:480px) {
    .modal-content {
        margin: 10px;
        padding: 15px;
        border-radius: 12px;
    }
}

.hidden-mobile { display: none; }
@media (min-width: 769px) {
    .hidden-mobile { display: block; }
}
.hidden-desktop { display: block; }
@media (min-width: 769px) {
    .hidden-desktop { display: none; }
}

/* —— انتخابگر تاریخ شمسی —— */
.jalali-date,
.pdp-container {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 420px;
    min-width: 0;
    background: var(--surface, #fff);
    border: 1.5px solid var(--line, rgba(16,37,54,.12));
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px var(--shadow, rgba(14,58,72,.08));
    position: relative;
    isolation: isolate;
    transition: border-color .2s, box-shadow .2s;
}
.jalali-date .jalali-date__fields,
.pdp-container .jalali-date__fields {
    flex: 1 1 auto;
    min-width: 0;
}
.jalali-date:focus-within,
.pdp-container:focus-within {
    border-color: var(--accent, #29b7a8);
    box-shadow: 0 0 0 4px var(--focus-ring, rgba(41,183,168,.16)), 0 8px 22px var(--shadow, rgba(14,58,72,.12));
}
.jalali-date::before,
.pdp-container::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary, #e4574d), var(--accent, #29b7a8));
    z-index: 1;
    pointer-events: none;
}
.pdp-container > input,
.pdp-container > select {
    position: relative;
    z-index: 2;
    pointer-events: auto;
}
.jalali-date__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    flex-shrink: 0;
    background: linear-gradient(160deg, color-mix(in srgb, var(--accent, #29b7a8) 16%, transparent), color-mix(in srgb, var(--primary, #e4574d) 10%, transparent));
    font-size: 18px;
    border-left: 1px solid var(--line, rgba(16,37,54,.08));
}
.jalali-date__fields {
    display: flex;
    flex: 1;
    min-width: 0;
}
.jalali-date__field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 10px 8px;
    border-left: 1px solid var(--line, rgba(16,37,54,.08));
    background: transparent;
    overflow: hidden;
}
.jalali-date__field:last-child { border-left: none; }
.jalali-date__field[data-label]::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    color: var(--muted, #6b7c8a);
    letter-spacing: .02em;
}
.jalali-date select,
.jalali-date input,
.pdp-container input.pdp-year,
.pdp-container select.pdp-month,
.pdp-container select.pdp-day,
.cls-board-datebar select.cls-board-date-sel {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 4px 0 2px;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--ink, #102536) !important;
    text-align: right;
    outline: none;
    position: static;
    z-index: auto;
}
.jalali-date select,
.pdp-container select.pdp-month,
.pdp-container select.pdp-day,
.cls-board-datebar select.cls-board-date-sel {
    padding: 4px 4px 2px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a7083' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 2px center !important;
    background-size: 10px !important;
    cursor: pointer;
}
.pdp-container .jalali-date__fields { flex: 1; display: flex; min-width: 0; }
.pdp-container input.pdp-year,
.pdp-container select.pdp-month,
.pdp-container select.pdp-day {
    width: 100%;
    border: none !important;
    min-height: 0;
}
.pdp-container input.pdp-year,
.jalali-date input.pdp-year {
    background: transparent !important;
    background-image: none !important;
    padding: 4px 0 2px !important;
    cursor: text;
    -moz-appearance: textfield;
}
.pdp-container input.pdp-year::-webkit-outer-spin-button,
.pdp-container input.pdp-year::-webkit-inner-spin-button,
.jalali-date input.pdp-year::-webkit-outer-spin-button,
.jalali-date input.pdp-year::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pdp-container .jalali-date__field:nth-child(1),
.jalali-date .jalali-date__field:nth-child(1) { flex: 0.95; min-width: 64px; }
.pdp-container .jalali-date__field:nth-child(2),
.jalali-date .jalali-date__field:nth-child(2) { flex: 1.5; min-width: 92px; }
.pdp-container .jalali-date__field:nth-child(3),
.jalali-date .jalali-date__field:nth-child(3) { flex: 0.85; min-width: 52px; }
.jalali-date select:focus,
.jalali-date input:focus,
.pdp-container input.pdp-year:focus,
.pdp-container select.pdp-month:focus,
.pdp-container select.pdp-day:focus {
    color: var(--primary, #e4574d) !important;
}

.cls-board-datebar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.cls-board-datebar .jalali-date,
.cls-board-datebar .jalali-date-wrap {
    flex: 1 1 260px;
    max-width: 380px;
}

@media (max-width:768px) {
    .jalali-date,
    .pdp-container {
        max-width: 100%;
    }
    .jalali-date__icon { width: 40px; font-size: 16px; }
    .jalali-date__field { padding: 6px 8px 7px; }
    .jalali-date select,
    .jalali-date input,
    .pdp-container input.pdp-year,
    .pdp-container select.pdp-month,
    .pdp-container select.pdp-day {
        font-size: 13px !important;
    }
    .pdp-container input.pdp-year,
    .pdp-container select.pdp-month,
    .pdp-container select.pdp-day {
        width: 100%;
        max-width: 100%;
        min-height: 0;
    }
}

.form-group:has(.pass-toggle-btn) input[type="password"],
.form-group:has(.toggle-pass) input[type="password"] {
    padding-left: 44px;
}
@media (max-width:480px) {
    .form-group:has(.pass-toggle-btn) input[type="password"],
    .form-group:has(.toggle-pass) input[type="password"] {
        padding-left: 42px;
    }
}

@media (max-width:360px) {
    .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
    .topbar h1 { font-size: 14px; }
    .content { padding: 8px; }
    .card { padding: 12px; }
    .stat-card { padding: 12px; }
    .stat-icon-wrap { width: 45px; height: 45px; font-size: 16px; }
    .stat-info h3 { font-size: 18px; }
    .stat-info p { font-size: 10px; }
    .badge { padding: 3px 8px; font-size: 9px; }
    .btn { padding: 8px 12px; font-size: 12px; }
    .btn-block { font-size: 13px; }
    .login-box { padding: 20px 15px; }
    .login-header h1 { font-size: 20px; }
    .data-table { font-size: 10px; }
    .data-table th, .data-table td { padding: 4px 2px; }
    .form-group label { font-size: 11px; }
}

.modal-overlay {
    display: flex;
    padding: 10px;
    align-items: center;
    justify-content: center;
}
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content .login-box {
    width: 90vw !important;
    max-width: 500px;
    padding: 24px !important;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #E1E4EA;
}
.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2D3436;
    margin: 0;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #8892b0;
    transition: all 0.2s;
}
.modal-close:hover {
    background: rgba(255,107,107,0.1);
    color: #FF6B6B;
}
.modal-body {
    padding: 20px 24px;
}
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px 20px;
    border-top: 1px solid #E1E4EA;
}
.modal { display: flex; }
.modal[style*="display: none"] { display: none; }

[id*="Modal"] > div[style*="width:100%"] {
    width: 100% !important;
    max-width: 95vw !important;
    margin: 10px auto !important;
}
@media (max-width: 480px) {
    [id*="Modal"] > div[style*="max-width:600px"],
    [id*="Modal"] > div[style*="max-width:700px"] {
        max-width: 95vw !important;
        padding: 16px !important;
        border-radius: 14px !important;
    }
    [id*="Modal"] > div > h3,
    [id*="Modal"] > div .login-header h3 {
        font-size: 17px !important;
    }
    [id*="Modal"] > div .form-row {
        flex-direction: column !important;
    }
    [id*="Modal"] > div .form-group {
        min-width: 100% !important;
    }
    [id*="Modal"] > div .btn-group {
        flex-direction: column !important;
        gap: 8px !important;
    }
    [id*="Modal"] > div .btn-group .btn {
        width: 100% !important;
    }
}

.student-search-wrapper {
    position: relative;
}
.student-search-wrapper .suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #E1E4EA;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.student-search-wrapper .suggestions-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 4px;
}
.student-search-wrapper .suggestions-dropdown li {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}
.student-search-wrapper .suggestions-dropdown li:hover {
    background: rgba(0,184,148,0.08);
}
@media (max-width:480px) {
    .modal-content { margin: 10px; padding: 15px; border-radius: 12px; }
    .modal-content .login-box { width: 95vw !important; padding: 20px !important; }
    .login-header h3 { font-size: 18px; }
}

@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 44px; }
    .form-group input, .form-group select, .form-group textarea { min-height: 44px; }
    .sidebar-nav a { min-height: 44px; }
    .data-table th, .data-table td { min-height: 44px; }
    .nav-icon { min-width: 44px; min-height: 44px; }
    .sidebar-toggle { min-width: 48px; min-height: 48px; font-size: 22px; }
    .tab-btn { min-height: 44px; }
    .btn-group { flex-direction: column; gap: 8px; }
    .btn-group .btn { width: 100%; }
}

@media (max-width: 768px) {
    .animated-bg .orb-1 { width: 250px; height: 250px; }
    .animated-bg .orb-2 { width: 180px; height: 180px; }
    .animated-bg .orb-3 { width: 120px; height: 120px; }
}
@media (max-width: 480px) {
    .animated-bg .orb-1 { width: 180px; height: 180px; }
    .animated-bg .orb-2 { width: 140px; height: 140px; }
    .animated-bg .orb-3 { width: 100px; height: 100px; }
    .animated-bg .orb { filter: blur(40px); }
}

@media (max-width: 480px) {
    .btn-block {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 768px) {
    .form-group select {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 768px) {
    .card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    body { overflow-x: hidden !important; }
    .layout { overflow-x: hidden !important; }
    .main-content { overflow-x: clip; }
    /* سقف ۱۰۰vw فقط برای لایه‌های اصلی؛ سلول‌های جدول نباید فشرده شوند */
    .layout, .main-content, .content, .card, .viz-card, .toolbar, .topbar, .alert, .tabs {
        max-width: 100vw;
    }
    .table-responsive,
    .schedule-wrapper,
    .my-week,
    .att-history-wrap,
    .excuse-table-wrap,
    .report-table-wrap {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y;
    }
    /* فقط خود جدول عریض شود؛ محتوای داخل سلول (مثل بورد کلاس) فشرده بماند */
    .table-responsive > .data-table:not(.cls-board-table),
    .schedule-wrapper > .schedule-table,
    .my-week > table {
        max-width: none !important;
    }
}


@media (max-width: 768px) {
    .content > .card > div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
    }
    
    .content .card div[style*="width:45px"] {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
    }
    
    .content .card[style*="min-height:250px"] {
        min-height: 180px !important;
    }
    
    .content .card {
        padding: 16px !important;
    }
}
@media (max-width: 480px) {
    .content > .card > div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .content .card strong { font-size: 13px !important; }
    .content .card small { font-size: 10px !important; }
    .content .card p { font-size: 11px !important; }
}

@media (max-width: 768px) {
    input[type="date"][style*="width:150px"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    input.pdp-year[style*="width:70px"],
    select.pdp-month[style*="width:140px"],
    select.pdp-day[style*="width:70px"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    input[style*="width:80px"],
    input[style*="width:70px"],
    input[style*="width:120px"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    select[style*="width:140px"] {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    th[style*="width:120px"],
    th[style*="width:100px"],
    th[style*="width:80px"] {
        width: auto !important;
    }
}

@media (max-width: 768px) {
    .data-table[style*="min-width:900px"] {
        min-width: 600px !important;
    }
    .data-table[style*="min-width:600px"] {
        min-width: 400px !important;
    }
    
    .profile-card {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
    
    .avatar-preview,
    .avatar-big {
        width: 100px !important;
        height: 100px !important;
    }
    
    .form-row .form-group {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .login-box[style*="max-width:700px"] {
        max-width: 95vw !important;
        padding: 20px 15px !important;
    }
    
    .login-box[style*="max-width:600px"] {
        max-width: 95vw !important;
        padding: 20px 15px !important;
    }
    
    .login-box[style*="max-width:500px"] {
        max-width: 95vw !important;
        padding: 20px 15px !important;
    }
    
    .report-container[style*="max-width:900px"] {
        max-width: 100% !important;
        padding: 10px !important;
    }
}

@media (max-width: 480px) {
    img[style*="width:40px"] {
        width: 32px !important;
        height: 32px !important;
    }
    
    img[style*="width:18px"] {
        width: 15px !important;
        height: 15px !important;
    }
}

@media (max-width: 768px) {
    .form-group[style*="min-width:200px"],
    .form-group[style*="flex:1;min-width:200px"] {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
    
    input[style*="width:70px"][name*="feedback"],
    input[placeholder="بازخورد"] {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .print-container[style*="padding: 15px"] {
        padding: 10px !important;
    }
    
    .print-card {
        font-size: 11px !important;
    }
    
    .print-header {
        font-size: 12px !important;
    }
}

@media (max-width: 600px) {
    th[style*="width:120px"] { display: none !important; }
    th[style*="width:100px"] { display: none !important; }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }
    .card {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
    }
    .alert {
        width: 100% !important;
        max-width: 100% !important;
    }
}


@media (max-width: 380px) {
    .topbar {
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding: 10px 12px !important;
        align-items: center !important;
    }
    
    .topbar h1 {
        font-size: 14px !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .topbar-end {
        gap: 6px !important;
        max-width: min(210px, 62vw) !important;
    }
    .topbar-refresh {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    
    .user-chip {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 36px !important;
        gap: 8px !important;
        padding: 4px 10px 4px 4px !important;
    }
    .user-chip-info { display: flex !important; }
    .user-chip-name { font-size: 12px !important; }
    .user-chip .user-chip-role { display: none !important; }
    .user-chip-avatar { width: 28px !important; height: 28px !important; font-size: 12px !important; }
    
    .content {
        padding: 8px !important;
    }
    
    .stat-card {
        padding: 12px !important;
        min-height: 80px !important;
    }
    
    .stat-info h3 {
        font-size: 16px !important;
    }
    
    .stat-icon-wrap {
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 768px) {
    
    .form-row {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .btn-group {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .btn-group .btn {
        width: 100% !important;
    }
    
    .toolbar {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    
    .toolbar > * {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 8px !important;
    }
    
    .card {
        padding: 14px !important;
    }
    
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .card-header h3 {
        font-size: 16px !important;
    }
    
    .card-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 600px) {
    .visual-stats {
        grid-template-columns: 1fr !important;
    }
    
    .viz-card {
        padding: 16px !important;
    }
    
    .viz-card h3 {
        font-size: 14px !important;
    }
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
}

.data-table {
    width: max-content;
    max-width: none;
    box-sizing: border-box;
}

.hide-on-mobile { display: block; }
@media (max-width: 768px) {
    .hide-on-mobile { display: none !important; }
}

.show-on-mobile { display: none; }
@media (max-width: 768px) {
    .show-on-mobile { display: block !important; }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}
.empty-state .big-icon {
    font-size: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}
@media (max-width: 480px) {
    .empty-state .big-icon {
        font-size: 40px;
    }
}

@media (min-width:769px) and (max-width:1024px) {
    .sidebar {
        width:220px;
    }
    .sidebar-header {
        padding:20px 16px;
    }
    .sidebar-header h2 {
        font-size:17px;
    }
    .sidebar-nav a {
        padding:12px 20px;
        font-size:13px;
    }
    .main-content {
        margin-right:220px;
    }
    .sidebar-toggle {
        display:flex;
    }
    .stats-grid {
        grid-template-columns:repeat(3,1fr);
        gap:15px;
    }
    .card {
        padding:22px;
    }
    .card-header h3 {
        font-size:16px;
    }
    .topbar {
        padding:15px 24px;
    }
    .topbar h1 {
        font-size:19px;
    }
    .content {
        padding:24px;
    }
    .data-table th,
    .data-table td {
        padding:10px 12px;
        font-size:12px;
    }
    .btn {
        padding:10px 20px;
        font-size:13px;
    }
    .btn-sm {
        padding:5px 10px;
        font-size:11px;
    }
}

@media (min-width:769px) and (max-width:1024px) and (orientation:landscape) {
    .stats-grid {
        grid-template-columns:repeat(4,1fr);
    }
    .visual-stats {
        grid-template-columns:1fr 1fr;
    }
    .card {
        padding:20px;
    }
    .content {
        padding:20px;
    }
    .sidebar-nav a {
        padding:10px 16px;
    }
}

@media (max-width:768px) {
    .send-mode-tabs {
        gap:4px;
    }
    .send-mode-tab {
        flex:1;
        padding:8px 10px;
        font-size:12px;
    }
    .class-select-grid {
        grid-template-columns:repeat(auto-fill,minmax(120px,1fr)) !important;
        gap:8px;
    }
    .users-checkbox-list {
        max-height:250px;
    }
}
@media (max-width:480px) {
    .users-checkbox-list {
        max-height:200px;
    }
    .send-mode-tab {
        font-size:11px;
        padding:6px 8px;
    }
    .role-option {
        font-size:12px;
        padding:7px 10px;
    }
}

@media (max-width:768px) {
    .search-filters {
        flex-direction:column !important;
    }
}



.bell-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 16px;
    border-bottom: 2px dashed #E1E4EA;
    margin-bottom: 14px;
}
.bell-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 78px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f5f7fa;
    border: 2px solid #E1E4EA;
    color: #57606f;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: all .18s;
}
.bell-tab:hover { border-color: #54A0FF; color: #54A0FF; }
.bell-tab.is-disabled,
.bell-tab.is-disabled:hover {
    opacity: .38;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #DFE6E9;
    color: #636E72;
    background: #F1F2F6;
    box-shadow: none;
    text-decoration: none;
}
.bell-tab.active {
    background: linear-gradient(135deg, #54A0FF, #4ECDC4);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(84,160,255,.35);
}
.bell-tab-num { font-size: 17px; font-weight: 900; }
.bell-tab-count { font-size: 10px; font-weight: 600; opacity: .75; }
.bell-tab-count.ok { opacity: 1; }
.bell-tab.active .bell-tab-count { color: #eafff8; }

.att-quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.att-quick .btn { flex: 1 1 auto; min-height: 46px; font-size: 14px; }
.btn-ghost {
    background: #eef1f7;
    color: #57606f;
    box-shadow: none;
}
.btn-ghost:hover { background: #e2e6ee; }

.att-list { list-style: none; margin: 0; padding: 0; }
.att-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) minmax(230px, 1fr);
    gap: 10px 14px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 16px;
    background: #fbfcfe;
    border: 2px solid #EDF0F5;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.att-row.is-saved { background: #f6fdfa; border-color: #d6f5ea; }
.att-row.is-touched { border-color: #cfd8e6; box-shadow: 0 3px 12px rgba(52,152,219,.10); }

.att-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.att-avatar {
    flex: 0 0 40px;
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #54A0FF, #4ECDC4);
    color: #fff; font-weight: 800; font-size: 17px;
}
.att-names { display: flex; flex-direction: column; min-width: 0; }
.att-names b { font-size: 14px; color: #2D3436; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-names small { font-size: 11px; color: #98A2B3; }

.att-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.att-choice {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-height: 52px;
    padding: 6px 4px;
    border: 2px solid var(--line, #E1E4EA);
    border-radius: 12px;
    background: var(--surface, #fff);
    color: var(--muted, #6b7684);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.att-choice:active { transform: scale(.96); }
.att-choice-ico { font-size: 18px; line-height: 1; }
.att-choice-txt { line-height: 1.2; text-align: center; }
.att-choice.is-present.is-active { background: linear-gradient(135deg, var(--success, #00B894), var(--accent, #4ECDC4)); border-color: transparent; color: #fff; }
.att-choice.is-absent.is-active  { background: linear-gradient(135deg, var(--danger, #FF4757), #FF6B6B); border-color: transparent; color: #fff; }
.att-choice.is-late.is-active    { background: linear-gradient(135deg, var(--warning, #FF9F43), #FDCB6E); border-color: transparent; color: #fff; }
.att-choice.is-not-done.is-active {
    background: color-mix(in srgb, var(--muted, #8892B0) 22%, var(--surface, #fff));
    border-color: var(--line, #c5cad3);
    color: var(--ink, #2D3436);
}

.att-late-box {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff8ec;
    border: 1px dashed #FFCF87;
}
.att-late-label { font-size: 12px; font-weight: 700; color: #b46b12; }
.att-late-picks { display: flex; gap: 5px; flex-wrap: wrap; }
.att-late-pick {
    min-width: 42px; min-height: 34px;
    padding: 4px 8px;
    border-radius: 9px;
    border: 2px solid #FFE0B2;
    background: #fff;
    color: #b46b12;
    font-family: inherit; font-size: 12px; font-weight: 800;
    cursor: pointer;
}
.att-late-pick.is-active { background: linear-gradient(135deg,#FF9F43,#FDCB6E); border-color: transparent; color: #fff; }
.att-late-input {
    width: 78px; padding: 6px 8px;
    border: 2px solid #FFE0B2; border-radius: 9px;
    font-family: inherit; font-size: 13px;
}

.att-avatar { overflow: hidden; padding: 0; }
.att-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}
.att-avatar .avatar-initial { line-height: 1; }

.avatar-link {
    flex: 0 0 auto;
    display: inline-flex;
    border-radius: 12px;
    text-decoration: none;
    position: relative;
    z-index: 2;
    transition: transform 0.15s, box-shadow 0.15s;
    padding: 3px;
    margin: -3px;
}
.avatar-link:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(45, 52, 54, 0.22);
}
.avatar-link:focus-visible { outline: 3px solid #54A0FF; outline-offset: 2px; }

.att-name-link {
    color: inherit; text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 100%;
}
.att-name-link:hover b { color: #0984E3; text-decoration: underline; }
.att-name-link:focus-visible { outline: 2px solid #54A0FF; outline-offset: 2px; border-radius: 4px; }

.att-class-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 2px solid #E1E4EA;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(84, 160, 255, .07), rgba(78, 205, 196, .05));
}
.att-class-filter__label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-inline-end: 12px;
    margin-inline-end: 4px;
    border-inline-end: 2px solid #E1E4EA;
    font-size: 13px;
    font-weight: 800;
    color: #57606f;
    white-space: nowrap;
}
.att-class-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 2px solid #E1E4EA;
    border-radius: 30px;
    background: #fff;
    color: #57606f;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.7;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, border-color .15s, background .15s, color .15s;
}
.att-class-chip:hover {
    border-color: #54A0FF;
    background: rgba(84, 160, 255, .08);
    color: #0b6fc4;
    transform: translateY(-1px);
}
.att-class-chip:active { transform: translateY(0); }
.att-class-chip.is-active {
    background: linear-gradient(135deg, #54A0FF, #4ECDC4);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(84, 160, 255, .32);
}
.att-class-chip:focus-visible {
    outline: 3px solid rgba(84, 160, 255, .35);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .att-class-filter { padding: 10px; gap: 6px; }
    .att-class-filter__label {
        width: 100%;
        border-inline-end: 0;
        border-bottom: 2px solid #E1E4EA;
        padding-inline-end: 0;
        margin-bottom: 4px;
        padding-bottom: 6px;
    }
    .att-class-chip { padding: 6px 11px; font-size: 12px; }
}

.att-carry-note {
    margin: 10px 0 4px;
    padding: 10px 14px;
    border: 2px dashed #54A0FF;
    border-radius: 12px;
    background: rgba(84, 160, 255, 0.07);
    color: #2D3436;
    font-size: 13px;
    line-height: 1.9;
}
.att-week-carry-note {
    border-color: #00B894;
    background: rgba(0, 184, 148, 0.08);
}
.att-row.is-week-carried {
    border-style: dashed;
    border-color: #00B894;
    background: linear-gradient(90deg, rgba(0, 184, 148, 0.06), transparent 55%);
}
.att-week-carried-tag {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(0, 184, 148, 0.14);
    color: #0a7a62 !important;
    font-size: 10.5px;
    font-weight: 700;
    cursor: help;
}
.att-row.is-carried {
    border-style: dashed;
    border-color: #54A0FF;
    background: rgba(84, 160, 255, 0.045);
}
.att-counsel-tag {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(108, 92, 231, 0.14);
    color: #5a4bd1 !important;
    font-size: 11px;
    font-weight: 800;
}
.att-row.is-counseling {
    border-color: rgba(108, 92, 231, 0.35);
    background: linear-gradient(90deg, rgba(108, 92, 231, 0.06), transparent 55%);
}
.att-carried-tag {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(84, 160, 255, 0.14);
    color: #0b6fc4 !important;
    font-size: 10.5px;
    font-weight: 700;
    cursor: help;
}

.stu-photo-box {
    display: flex; align-items: center; gap: 12px;
    margin-top: 10px; padding: 12px;
    border: 2px solid #E1E4EA; border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
}
.stu-photo-box[hidden] { display: none; }
.stu-photo-box .avatar {
    flex: 0 0 64px; width: 64px; height: 64px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #54A0FF, #4ECDC4);
    color: #fff; font-weight: 800; font-size: 26px; overflow: hidden;
}
.stu-photo-box .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stu-photo-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stu-photo-info b { font-size: 15px; color: #2D3436; }
.stu-photo-info small { font-size: 12px; color: #8892b0; }

.select2-results__option .student-option-photo {
    width: 34px; height: 34px; border-radius: 9px;
    object-fit: cover; float: right; margin-left: 8px;
    background: linear-gradient(135deg, #54A0FF, #4ECDC4);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px; vertical-align: middle;
    overflow: hidden;
}
.select2-results__option--highlighted .student-option-photo { border-color: rgba(255,255,255,0.7); }
.select2-selection__rendered .student-option-photo { margin-left: 6px; vertical-align: middle; }

.att-savebar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(84,160,255,.10), rgba(78,205,196,.10));
    border: 2px dashed #cfd8e6;
}
.att-savebar-info { font-size: 13px; font-weight: 700; color: #2D3436; }
.att-savebar-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }
.att-savebar-btns .btn { min-height: 48px; font-size: 14px; }

.att-draft-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 12px; padding: 11px 14px;
    border-radius: 12px; font-size: 13px; font-weight: 700; color: #8a5a00;
    background: linear-gradient(135deg, rgba(255,159,67,.18), rgba(255,71,87,.10));
    border: 1px solid rgba(255,159,67,.45);
}
.att-draft-bar[hidden] { display: none; }
.att-draft-bar .btn { margin-inline-start: auto; min-height: 38px; }

@media (max-width: 768px) {
    .bell-tabs {
        position: sticky;
        top: 0;
        z-index: 40;
        margin: 0 -12px 12px;
        padding: 10px 12px;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(6px);
        border-bottom: 2px solid #E1E4EA;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 6px;
    }
    .bell-tabs::-webkit-scrollbar { height: 4px; }
    .bell-tabs::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--accent, #54A0FF) 45%, #cfd6e0);
        border-radius: 4px;
    }
    .bell-tab {
        min-width: 64px;
        flex: 0 0 auto;
        padding: 6px 8px;
    }
    .bell-tab-num { font-size: 15px; }
    .bell-tab.complete::after {
        content: '✔';
        position: absolute;
        top: 3px; inset-inline-end: 5px;
        font-size: 10px;
        color: #00B894;
    }
    .bell-tab { position: relative; }

    .cls-board-desktop { display: none !important; }
    .cls-board-mobile { display: grid !important; }
    #classesBoard .card {
        overflow-x: visible;
        max-width: 100%;
    }
    #classesBoard .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    #classesBoard .stats-grid {
        grid-template-columns: 1fr !important;
    }
    #classesBoard .cls-board-datebar {
        flex-direction: column;
        align-items: stretch;
    }
    #classesBoard .cls-board-datebar .jalali-date {
        flex: 1 1 auto;
        max-width: none;
        width: 100%;
    }
    #classesBoard .cls-board-datebar .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
    #classesBoard .bell-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 6px;
    }
    #classesBoard .bell-tab {
        flex: 0 0 auto;
        min-width: 92px;
    }

    .att-quick { position: sticky; top: 62px; z-index: 39; margin: 0 -12px 12px; padding: 8px 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); }
    .att-quick .btn { min-height: 44px; padding: 8px 10px; font-size: 13px; }

    .att-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
        margin-bottom: 10px;
    }
    .att-choice { min-height: 56px; font-size: 12px; }
    .att-choice-ico { font-size: 20px; }
    .att-late-pick { min-width: 46px; min-height: 40px; }
    .att-late-input { width: 100%; min-height: 42px; }

    .att-savebar {
        position: sticky;
        bottom: 0;
        z-index: 45;
        margin: 14px -12px -12px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        border-radius: 18px 18px 0 0;
        border: none;
        border-top: 2px solid #E1E4EA;
        box-shadow: 0 -6px 20px rgba(0,0,0,.08);
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(8px);
    }
    .att-savebar-info { width: 100%; font-size: 12px; }
    .att-savebar-btns { width: 100%; margin-inline-start: 0; }
    .att-savebar-btns .btn { flex: 1 1 auto; min-height: 50px; font-size: 13px; padding: 8px 10px; }
}

.stat-card-link {
    text-decoration: none;
    color: inherit;
    padding-bottom: 44px;
}
.stat-card-link .stat-info h3,
.stat-card-link .stat-info p { color: inherit; }
.stat-card-link .stat-card-hint {
    position: absolute;
    bottom: 10px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(84,160,255,.12);
    color: #0984e3;
    font-size: 11px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px);
    transition: all .25s;
    pointer-events: none;
}
.stat-card-link:hover .stat-card-hint,
.stat-card-link:focus-visible .stat-card-hint { opacity: 1; transform: translateY(0); }
@media (hover: none) {
    .stat-card-link .stat-card-hint { opacity: 1; transform: none; }
}

.sidebar-year-alert {
    margin: 12px 10px 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,159,67,0.18), rgba(255,71,87,0.12));
    border: 1px solid rgba(255,159,67,0.45);
    color: #8a5a00;
    font-size: 12px;
    line-height: 1.9;
    text-align: right;
}
.sidebar-year-alert b { color: #d35400; }
.sidebar-year-alert-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, #FF9F43, #FF6B6B);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(255,107,107,0.3);
}
.sidebar-year-alert-btn:hover { filter: brightness(1.05); }
.sidebar-year-alert-form { margin: 0; }
.sidebar-year-alert-form .sidebar-year-alert-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.card-header.cls-board-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 14px;
}
.cls-board-head-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.cls-board-head-top h3 { margin: 0; flex-wrap: wrap; }
.cls-board-datebar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.cls-board-datebar .jalali-date {
    flex: 1 1 280px;
    max-width: 360px;
    min-height: 52px;
}
.cls-board-datebar .jalali-date--compact .jalali-date__field { padding: 5px 8px 6px; }
.cls-board-datebar .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
}
.cls-board-nav {
    background: var(--surface-2, #eef1f7) !important;
    color: var(--ink, #2D3436) !important;
    border: 1px solid var(--line, #e1e4ea) !important;
}

.cls-board-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 980px;
}
.cls-board-table th,
.cls-board-table td {
    background: var(--surface, #fff) !important;
}
.cls-board-table .cls-period-cell {
    min-width: 148px;
    max-width: 180px !important;
    width: 160px;
    vertical-align: top;
    font-size: 12px;
    line-height: 1.45;
    padding: 10px 8px !important;
    white-space: normal !important;
    overflow: hidden;
}
.cls-board-table th,
.cls-board-table td {
    white-space: normal !important;
}
.cls-board-table .cls-slot {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.cls-period-teacher,
.cls-period-lesson {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}
.cls-board-mobile { display: none; gap: 12px; }
.cls-m-card {
    border: 1px solid var(--line, #e8ecf1);
    border-radius: 16px;
    background: var(--surface, #fff);
    box-shadow: 0 4px 14px rgba(16, 37, 54, 0.05);
    overflow: hidden;
}
.cls-m-card.is-missing { border-color: rgba(255, 71, 87, 0.28); }
.cls-m-card.is-partial { border-color: rgba(253, 203, 110, 0.55); }
.cls-m-card.is-done { border-color: rgba(0, 184, 148, 0.35); }
.cls-m-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--line, #eef1f5);
}
.cls-m-head h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: var(--ink, #102536);
    line-height: 1.35;
}
.cls-m-head p {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted, #8892b0);
}
.cls-m-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    background: rgba(136, 146, 176, 0.14);
    color: #6b778c;
}
.cls-m-card.is-done .cls-m-status {
    background: rgba(0, 184, 148, 0.14);
    color: #0a8f72;
}
.cls-m-card.is-partial .cls-m-status {
    background: rgba(253, 203, 110, 0.22);
    color: #9a6b00;
}
.cls-m-card.is-missing .cls-m-status {
    background: rgba(255, 71, 87, 0.12);
    color: #c0392b;
}
.cls-m-periods {
    display: grid;
    gap: 12px;
    padding: 12px 14px 14px;
}
.cls-m-period-title {
    font-size: 12px;
    font-weight: 900;
    color: var(--ink, #2c3e50);
    margin-bottom: 8px;
}
.cls-slot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 10px 9px;
    margin: 0;
    border-radius: 12px;
    background: linear-gradient(165deg, #ffffff 0%, #f7f9fc 100%);
    border: 1px solid rgba(225, 228, 234, 0.95);
    box-shadow: 0 1px 2px rgba(45, 52, 54, 0.04), 0 6px 14px rgba(45, 52, 54, 0.04);
    text-align: center;
}
.cls-slot + .cls-slot { margin-top: 8px; border-top: none; }
.cls-board-mobile .cls-slot {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}
.cls-board-mobile .cls-slot .badge {
    justify-content: center;
    width: 100%;
    margin-top: 2px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none !important;
    color: #fff !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.cls-board-mobile .cls-slot .badge-absent {
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
}
.cls-board-mobile .cls-slot .badge-present {
    background: linear-gradient(135deg, #00b894, #55efc4) !important;
}
@media (min-width: 769px) {
    .cls-board-mobile { display: none !important; }
    .cls-board-desktop { display: block !important; }
}
@media (max-width: 768px) {
    .cls-board-desktop { display: none !important; }
    .cls-board-mobile { display: grid !important; }
}
.cls-period-teacher {
    font-weight: 800;
    color: var(--ink, #2D3436);
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.cls-period-lesson {
    color: #667085;
    font-size: 11.5px;
    font-weight: 600;
    margin-top: 0;
    line-height: 1.35;
}
.cls-period-empty {
    color: #C0C6D4;
    text-align: center;
    padding: 18px 8px;
    font-size: 16px;
}
.cls-board-table .cls-slot .badge {
    justify-content: center;
    width: 100%;
    margin-top: 2px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    text-decoration: none !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.cls-board-table .cls-slot .badge:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #fff !important;
}
.cls-board-table .cls-slot .badge-absent {
    background: linear-gradient(135deg, #ff4757, #ff6b81) !important;
    color: #fff !important;
}
.cls-board-table .cls-slot .badge-present {
    background: linear-gradient(135deg, #00b894, #55efc4) !important;
    color: #fff !important;
}
.cls-board-table a.badge-absent,
.cls-board-table a.badge-present {
    color: #fff !important;
}
.cls-row.is-missing td { background: #fff7f8 !important; }
.cls-row.is-partial td { background: #fffbf0 !important; }
.cls-row.is-done td { background: #f3fcf9 !important; }
.cls-row.is-missing .cls-slot {
    border-color: rgba(255, 71, 87, 0.22);
    background: linear-gradient(165deg, #ffffff 0%, #fff5f6 100%);
}
.cls-row.is-partial .cls-slot {
    border-color: rgba(253, 203, 110, 0.45);
    background: linear-gradient(165deg, #ffffff 0%, #fff9ec 100%);
}
.cls-row.is-done .cls-slot {
    border-color: rgba(0, 184, 148, 0.25);
    background: linear-gradient(165deg, #ffffff 0%, #f0fbf7 100%);
}
.cls-teacher-btn {
    display:inline-flex;
    align-items:center;
    gap:4px;
    white-space:nowrap;
}
.cls-teacher-box {
    margin-top:10px;
    padding:12px 14px;
    border-radius:12px;
    background:linear-gradient(135deg,rgba(84,160,255,0.08),rgba(78,205,196,0.04));
    border:1px solid rgba(84,160,255,0.25);
    display:flex;
    flex-direction:column;
    gap:8px;
    text-align:right;
}
.cls-teacher-item {
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.cls-teacher-name { font-weight:700; color:#2D3436; font-size:13px; }
.cls-teacher-none { color:#8892B0; font-size:12px; }
.cls-dabir {
    font-size:12px;
    color:#555;
    border-top:1px dashed rgba(0,0,0,0.08);
    padding-top:8px;
}
.cls-teacher-box .btn { align-self:flex-start; }

/* منوی راست‌کلیک سراسری سامانه */
.app-ctx {
    position: fixed;
    z-index: 4000;
    min-width: 180px;
    background: color-mix(in srgb, var(--surface, #fff) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid color-mix(in srgb, var(--line, rgba(0,0,0,.1)) 80%, transparent);
    border-radius: 16px;
    box-shadow: 0 16px 40px var(--shadow, rgba(0,0,0,.24));
    padding: 6px;
    display: flex;
    flex-direction: column;
    animation: app-ctx-in .16s ease both;
}
.app-ctx[hidden] { display: none !important; }
.app-ctx button {
    appearance: none;
    border: none;
    background: transparent;
    text-align: right;
    padding: 11px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    color: var(--ink, #2D3436);
    transition: background .15s;
}
.app-ctx button:hover { background: color-mix(in srgb, var(--accent, #29b7a8) 12%, transparent); }
.app-ctx button.danger { color: var(--danger, #b91c1c); }
.app-ctx button.danger:hover { background: color-mix(in srgb, var(--danger, #ef4444) 12%, transparent); }
.app-ctx button[hidden] { display: none !important; }
@keyframes app-ctx-in {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .app-ctx { animation: none !important; }
}

.report-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
    gap:20px;
    margin-bottom:25px;
}
.report-card {
    background: var(--surface, #fff);
    color: var(--ink, #2D3436);
    border-radius:20px;
    padding:24px;
    box-shadow:0 4px 12px var(--shadow, rgba(255,107,107,0.1));
    border:1px solid var(--line, rgba(0,0,0,0.04));
    display:flex;
    flex-direction:column;
    gap:14px;
    transition:transform .3s, box-shadow .3s;
}
.report-card:hover { transform:translateY(-4px); box-shadow:0 12px 32px var(--shadow, rgba(255,107,107,0.18)); }
.report-card-head { display:flex; align-items:center; gap:12px; }
.report-card-icon {
    width:48px; height:48px; border-radius:14px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center; font-size:24px;
    background:linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
}
.report-card-head h3 { font-size:16px; font-weight:700; color: var(--ink, #2D3436); margin:0; }
.report-card-head p { font-size:12px; color: var(--muted, #8892B0); margin:2px 0 0; }
.report-card-form { display:flex; flex-direction:column; gap:10px; }
.report-card-form .form-row {
    margin-bottom:0;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}
.report-card-form .form-row .form-group { min-width:0; }
.report-card-form .pdp-container {
    width:100%;
    max-width:100%;
    flex-wrap:wrap;
}
.report-card-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:auto; }
.report-parent-actions { margin-top:0; }
.report-card-link {
    display:inline-flex; align-items:center; justify-content:center; gap:6px;
    padding:10px 16px; border-radius:12px; text-decoration:none;
    border:none; cursor:pointer; font-family:inherit;
    background:linear-gradient(135deg, var(--primary, #54A0FF), var(--accent, #4ECDC4));
    color:#fff; font-size:13px; font-weight:700;
    box-shadow:0 3px 10px color-mix(in srgb, var(--primary) 35%, transparent);
    transition:filter .2s;
}
.report-card-link:hover { filter:brightness(1.06); color:#fff; }
.report-card-link.secondary {
    background: var(--surface-2, #eef1f7);
    color: var(--ink, #2D3436);
    box-shadow:none;
    border:1px solid var(--line, transparent);
}
.report-card-link.secondary:hover { color: var(--ink, #2D3436); filter:none; background: color-mix(in srgb, var(--primary) 10%, var(--surface-2)); }
.report-mini-stats { display:flex; gap:8px; flex-wrap:wrap; }
.report-mini-stat {
    flex:1 1 auto; min-width:100px;
    background: var(--surface-2, #f8f9fc);
    border:1px solid var(--line, #eef1f7);
    border-radius:12px;
    padding:8px 12px; text-align:center;
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
a.report-mini-stat:hover {
    transform: translateY(-1px);
    border-color: rgba(255,107,107,.35);
    box-shadow: 0 6px 16px rgba(45,52,54,.06);
}
.report-mini-stat b { display:block; font-size:18px; font-weight:800; color: var(--ink, #2D3436); }
.report-mini-stat span { font-size:11px; color: var(--muted, #8892B0); }
@media (max-width:520px) {
    .report-card-form .form-row { grid-template-columns:1fr; }
}

.excuse-form-cell {
    background:linear-gradient(135deg,rgba(255,193,7,0.06),rgba(255,215,0,0.03));
    border-top:1px dashed rgba(255,159,67,0.35);
    border-bottom:1px dashed rgba(255,159,67,0.35);
}
.excuse-form-wrap { padding:14px 6px; }
.excuse-form-wrap .form-row { margin-bottom:0; }
.excuse-form-wrap .form-group { min-width:180px; }

.disc-type-form { margin-bottom: 14px; }
.disc-type-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 12px;
    align-items: end;
}
.disc-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.disc-type-chip {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f5f7fa;
    border: 1px solid #E1E4EA;
    font-size: 13px;
    font-weight: 600;
}
.disc-type-chip small {
    color: #8892b0;
    font-weight: 500;
    font-size: 11px;
}
.disc-type-chip .btn { padding: 2px 8px; min-height: 28px; }
@media (max-width: 768px) {
    .disc-type-form .form-row { grid-template-columns: 1fr; }
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, canvas, svg { max-width: 100%; height: auto; }
.main-content, .content, .card, .viz-card { min-width: 0; max-width: 100%; }
/* اسکرول افقی فقط داخل .table-responsive تا با انگشت گیر نکند */
.card, .viz-card { overflow-x: visible; overflow-y: visible; }
.card > .table-responsive,
.viz-card > .table-responsive {
    margin-inline: -2px;
}
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.search-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-toolbar input[type="text"], .search-toolbar select { max-width: 100%; }
.select2-container { width: 100% !important; max-width: 100%; }

.my-week { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #E1E4EA; border-radius: 12px; background: #fff; }
.my-week table { width: 100%; border-collapse: collapse; min-width: 720px; }
.my-week th { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; padding: 10px 6px; font-size: 13px; text-align: center; }
.my-week th.today, .my-week td.today { box-shadow: inset 0 0 0 2px #FF9F43; }
.my-week td { border: 1px solid #e8eaef; vertical-align: top; padding: 6px; min-width: 96px; background: #fff; }
.my-week tr:nth-child(even) td { background: #fafbfe; }
.my-week .bell { width: 64px; text-align: center; font-weight: 700; background: #f4f6fb !important; color: #2D3436; }
.my-slot { background: #f7f8ff; border: 1px solid #e4e7f5; border-radius: 8px; padding: 6px 7px; margin-bottom: 6px; text-align: right; }
.my-slot:last-child { margin-bottom: 0; }
.my-slot .ln { font-weight: 700; font-size: 13px; color: #2D3436; }
.my-slot .meta { font-size: 11px; color: #636e72; margin-top: 2px; line-height: 1.5; }
.my-slot .grp { display: inline-block; margin-top: 4px; background: #f39c12; color: #fff; border-radius: 8px; padding: 1px 6px; font-size: 10px; }
.my-week-cards { display: none; }
.my-day-card { background: #fff; border: 1px solid #E1E4EA; border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.my-day-card.today { border-color: #FF9F43; box-shadow: 0 0 0 2px rgba(255,159,67,0.15); }
.my-day-card h4 { margin: 0 0 10px; font-size: 15px; }
.my-day-card h4 small { color: #FF9F43; font-weight: 600; }
.my-day-empty { color: #b2bec3; margin: 0; font-size: 13px; }
.my-day-period { margin-bottom: 10px; }
.my-day-period > span { display: inline-block; font-size: 11px; font-weight: 700; color: #667eea; margin-bottom: 6px; }

@media (max-width: 1024px) {
    .sidebar-toggle { display: flex !important; }
    .sidebar-close { display: inline-flex; }
    .sidebar {
        width: min(86vw, 300px) !important;
        right: -320px !important;
        transition: right 0.28s ease;
        box-shadow: none;
    }
    .sidebar-header h2,
    .sidebar-header p { display: block !important; }
    .sidebar-nav a span:not(.nav-icon) { display: inline !important; }
    .sidebar-nav a { justify-content: flex-start !important; padding: 14px 22px !important; }
    .sidebar-nav a .nav-icon { margin-left: 14px !important; }
    .main-content { margin-right: 0 !important; }
    .sidebar-expanded .sidebar { right: 0 !important; box-shadow: -10px 0 32px rgba(0,0,0,0.18); }
    .sidebar-expanded .sidebar-overlay { display: block; }
    .sidebar-expanded .main-content { margin-right: 0 !important; }
    .sidebar-expanded { overflow: hidden; }
    .content { padding: 18px; }
    .topbar { padding: 12px 16px; gap: 10px; flex-wrap: nowrap; }
    .topbar h1 { font-size: 18px; flex: 1; min-width: 0; }
    .topbar .sidebar-toggle { order: -1; }
    .card-page { grid-template-columns: repeat(3, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .visual-stats { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .content { padding: 12px; }
    .card, .viz-card { padding: 16px; border-radius: 16px; }
    .form-row, .btn-group { flex-direction: column; }
    .form-group, .btn-group .btn { width: 100%; min-width: 0; }
    .stats-grid { gap: 12px; }
    .card-page { grid-template-columns: repeat(2, 1fr); }
    .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .search-box, .search-toolbar, .search-toolbar form { width: 100%; }
    .search-toolbar form { display: flex; flex-direction: column; }
    .data-table { min-width: 520px; }
    .schedule-table { min-width: 640px !important; font-size: 11px !important; }
    .schedule-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .my-week { display: none; }
    .my-week-cards { display: block; }
    .login-box { padding: 28px 18px; width: 100%; }
    .login-features { grid-template-columns: 1fr; }
    .report-info, .comments-section, .signature-row { grid-template-columns: 1fr !important; }
    .notification-dropdown {
        left: 12px;
        right: auto;
        width: min(320px, calc(100vw - 24px));
    }
}

@media (max-width: 480px) {
    .stats-grid, .card-page, .card-page-a5 { grid-template-columns: 1fr; }
    .content { padding: 10px; }
    .topbar h1 { font-size: 16px; }
    .data-table { min-width: 420px; font-size: 11px; }
    .app-download-box { flex-wrap: wrap; }
    .app-download-btn { width: 100%; justify-content: center; }
}

@media (max-width: 768px) and (orientation: landscape) {
    .sidebar { width: min(70vw, 280px) !important; }
    .main-content { margin-right: 0 !important; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@supports (padding: max(0px)) {
    .sidebar { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
    .content { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
}

/* Rich text editor */
.rt-editor {
  border:2px solid var(--input-border, #E1E4EA);
  border-radius:12px;
  background: var(--input-bg, #fff);
  color: var(--ink, #2D3436);
  overflow:hidden;
}
.rt-toolbar {
  display:flex; flex-wrap:wrap; gap:4px; padding:8px;
  border-bottom:1px solid var(--line, #E1E4EA);
  background: var(--surface-2, #f7f8fc);
}
.rt-toolbar button {
  border:1px solid var(--line, #E1E4EA);
  background: var(--surface, #fff);
  color: var(--ink, #2D3436);
  border-radius:8px; padding:5px 9px;
  cursor:pointer; font-size:12px; min-width:32px; line-height:1.2;
  font-family: inherit;
}
.rt-toolbar button:hover {
  border-color: var(--primary, #54A0FF);
  background: color-mix(in srgb, var(--primary, #54A0FF) 12%, var(--surface, #fff));
  color: var(--ink, #2D3436);
}
.rt-toolbar button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring, rgba(84,160,255,.22));
}
.rt-sep { width:1px; background: var(--line, #E1E4EA); margin:0 4px; align-self:stretch; }
.rt-area {
  padding:12px 14px; outline:none; line-height:1.9; font-size:14px; direction:rtl; text-align:right;
  min-height:120px; max-height:360px; overflow-y:auto;
  color: var(--ink, #2D3436);
  background: transparent;
}
.rt-area:empty:before {
  content:attr(data-placeholder);
  color: var(--muted, #a0a5b0);
  pointer-events:none;
}
/* جلوگیری از رنگ/پس‌زمینه پیست‌شده از ورد و مرورگر */
.rt-area *,
.rt-area *::before,
.rt-area *::after {
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-text-fill-color: currentColor !important;
}
.rt-area a { color: var(--info, #0984e3) !important; }
.rich-body *,
.rich-body *::before,
.rich-body *::after {
  color: inherit !important;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-text-fill-color: currentColor !important;
}
.rich-body a { color: var(--info, #0984e3) !important; }
.rt-hidden { position:absolute !important; left:-9999px !important; width:1px !important; height:1px !important; opacity:0 !important; }
.rich-body { line-height:1.9; word-break:break-word; color: var(--ink, #2D3436); }
.rich-body ul, .rich-body ol { padding-right:22px; margin:6px 0; }
.rich-body a { color: var(--info, #0984e3); text-decoration:underline; }

/* بزرگ‌نمایی عکس پروفایل */
.avatar-zoomable,
.att-avatar.has-photo img,
.avatar.has-photo img,
img.avatar-big,
img.avatar-preview,
img.avatar-img,
img.student-option-photo[src]:not([src=""]) {
    cursor: zoom-in;
}
.avatar-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(18, 24, 38, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.avatar-lightbox.is-open { display: flex; }
.avatar-lightbox__dialog {
    position: relative;
    max-width: min(920px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: avatarZoomIn .18s ease;
}
@keyframes avatarZoomIn {
    from { transform: scale(.92); opacity: .4; }
    to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .avatar-lightbox__dialog { animation: none; }
}
.avatar-lightbox__img {
    max-width: 100%;
    max-height: min(78vh, 820px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0,0,0,.35);
    background: #fff;
}
.avatar-lightbox__caption {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.avatar-lightbox__close {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #2d3436;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.avatar-lightbox__close:hover { background: #ffe8e6; color: #e4574d; }

/* —— اسکرول افقی لمسی سراسری برای لیست‌ها و جداول —— */
.table-responsive,
.schedule-wrapper,
.my-week,
.att-history-wrap,
.excuse-table-wrap,
.report-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    max-width: 100%;
}
.table-responsive > .data-table:not(.cls-board-table),
.schedule-wrapper > .schedule-table,
.my-week > table {
    width: max-content;
    max-width: none !important;
    min-width: min(100%, 720px);
}
.table-responsive > .data-table.cls-board-table {
    width: 100%;
    min-width: 980px;
    max-width: none;
}
@media (max-width: 768px) {
    .table-responsive > .data-table:not(.cls-board-table),
    .schedule-wrapper > .schedule-table {
        min-width: 680px;
    }
}

