/* =========================
   Layout اصلی داشبورد
========================= */

.school-dashboard {

    min-height:100vh;
    background:#f5f7fb;

}


.dashboard-body {

    display:flex;

}


.dashboard-content {

    flex:1;
    padding:30px;

}


/* =========================
   Header
========================= */


.school-header {

    background:#fff;

    padding:20px 30px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    box-shadow:0 5px 20px rgba(0,0,0,.06);

    margin-bottom:25px;

    position:relative;

}


.school-header::after {

    content:"";

    position:absolute;

    bottom:-8px;

    left:30px;

    right:30px;

    height:4px;

    background:var(--role-color,#2563eb);

    border-radius:10px;

}


.school-title {

    display:flex;

    align-items:center;

    gap:12px;

    font-size:22px;

    font-weight:700;

}


.school-logo {

    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:100px;
    height:100px;
    color:var(--role-color,#2563eb);
    flex-shrink:0;

}


.school-logo svg {

    width:100%;
    height:100%;

}


.user-info {

    display:flex;

    align-items:center;

    gap:20px;

}



/* =========================
   دکمه خروج
========================= */


.logout-btn {

    background:var(--role-color,#2563eb);

    color:#fff !important;

    padding:10px 18px;

    border-radius:10px;

    text-decoration:none !important;

    display:inline-block;

    transition:transform .25s ease, box-shadow .25s ease;

}


.logout-btn:hover {

    transform:scale(1.08);

    box-shadow:0 6px 15px rgba(0,0,0,.15);

    color:#fff !important;

    text-decoration:none !important;

}



/* =========================
   Sidebar
========================= */


.school-sidebar {

    width:260px;

    background:#fff;

    min-height:calc(100vh - 90px);

    padding:20px 15px;

    box-shadow:0 5px 20px rgba(0,0,0,.05);

}


.mobile-menu-toggle {

    display:none;
    background:none;
    border:none;
    font-size:22px;
    cursor:pointer;
    color:var(--role-color,#2563eb);
    padding:4px 8px;
    margin-left:8px;

}



.school-menu {

    list-style:none;

    padding:0;

    margin:0;

}



.school-menu li {

    margin-bottom:8px;

}


.school-menu a {

    display:block;

    padding:12px 15px;

    border-radius:12px;

    color:#333;

    text-decoration:none !important;

    border-bottom:none !important;

    transition:.3s;

}



.school-menu a:hover {

    background:#f1f5f9;

    color:#333;

    text-decoration:none !important;

    border-bottom:none !important;

}



/* منوی فعال */


.school-menu li.active a {

    background:var(--role-color,#2563eb);

    color:#fff;

}



/* =========================
   کارت‌های داشبورد
========================= */


.dashboard-cards {

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));

    gap:25px;

    margin-top:30px;

}



.dashboard-card {

    background:#fff;

    border-radius:16px;

    padding:25px;

    color:#222;

    text-decoration:none !important;

    border-bottom:none !important;

    box-shadow:0 5px 20px rgba(0,0,0,.08);

    transition:.3s;

    display:block;

}



.dashboard-card:hover {

    transform:translateY(-7px);

    color:#222;

    text-decoration:none !important;

    box-shadow:0 10px 30px rgba(0,0,0,.15);

}



.dashboard-card .icon {

    width:42px;
    height:42px;
    margin-bottom:15px;
    color:var(--role-color,#2563eb);

}


.dashboard-card .icon svg {

    width:100%;
    height:100%;

}



.dashboard-card h3 {

    margin:0 0 10px;

    font-size:20px;

}



.dashboard-card p {

    margin:0;

    color:#666;

    line-height:1.8;

}



/* =========================
   حذف قطعی زیرخط لینک‌ها
========================= */


.school-dashboard a,
.school-dashboard a:hover {

    text-decoration:none !important;

    border-bottom:none !important;

}



/* =========================
   موبایل
========================= */


/* =========================
   موبایل و تبلت
   (سایدبار به‌جای کشو، یک نوار افقی قابل‌اسکرول می‌شود)
========================= */


@media(max-width:1024px){


    body {

        overflow-x:hidden;

    }



    .dashboard-body {

        display:block;

    }



    .mobile-menu-toggle {

        display:none !important;

    }



    .school-sidebar {

        width:100%;
        min-height:auto;
        padding:10px 12px;
        box-sizing:border-box;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;

    }



    .school-sidebar nav {

        width:max-content;
        min-width:100%;

    }



    .school-menu {

        display:flex;
        flex-wrap:nowrap;
        gap:8px;
        list-style:none;
        padding:0;
        margin:0;

    }



    .school-menu li {

        flex-shrink:0;

    }



    .school-menu li.coming-soon {

        display:flex;
        align-items:center;

    }



    .school-menu a {

        display:inline-block;
        white-space:nowrap;
        padding:8px 16px;
        border-radius:999px;
        background:#f1f5f9;
        color:#1e293b !important;

    }



    .dashboard-content {

        padding:15px;
        max-width:100vw;
        box-sizing:border-box;
        overflow-x:hidden;

    }



    .school-header {

        display:block;
        padding:15px;

    }



    .school-title {

        display:flex;
        align-items:center;

    }



    .user-info {

        margin-top:15px;

        justify-content:space-between;

    }



    .dashboard-cards {

        grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
        gap:16px;

    }


    .class-grid {

        grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
        gap:14px;

    }


    /* جدول‌ها: به‌جای بیرون‌زدن از صفحه، خودشان به‌صورت مهارشده اسکرول افقی می‌گیرند */
    .table-scroll-wrap {

        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        margin-bottom:10px;

    }


    .school-table {

        display:table !important;
        min-width:600px !important;
        width:auto !important;
        white-space:normal !important;
        box-sizing:border-box;

    }


    .school-table thead,
    .school-table tbody {

        display:table-row-group !important;
        width:auto !important;
        min-width:0 !important;

    }


    .school-table thead {

        display:table-header-group !important;

    }


    .school-table tr {

        display:table-row !important;
        width:auto !important;

    }


    .school-table th,
    .school-table td {

        display:table-cell !important;
        white-space:normal !important;
        padding:8px 10px;
        font-size:13px;

    }


    /* جدول‌های رزرو غذا از همان قاعده‌ی عمومی بالا استفاده می‌کنند (چون
       کلاس school-table را هم دارند) — این قوانین فقط برای اطمینان اضافی‌اند */
    .food-week-current,
    .food-week-next {

        display:table !important;
        min-width:640px !important;
        width:auto !important;
        white-space:normal !important;

    }


    .food-week-current thead,
    .food-week-next thead,
    .food-week-current tbody,
    .food-week-next tbody,
    .food-week-current tr,
    .food-week-next tr {

        display:table-row-group !important;
        width:auto !important;
        min-width:0 !important;

    }


    .food-week-current thead,
    .food-week-next thead {

        display:table-header-group !important;

    }


    .food-week-current tr,
    .food-week-next tr {

        display:table-row !important;

    }


    .food-week-current th,
    .food-week-next th,
    .food-week-current td,
    .food-week-next td {

        display:table-cell !important;
        white-space:normal !important;

    }


    .food-table-scroll {

        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
        margin-bottom:10px;

    }


    /* جدول دانش‌آموزان: فقط چک‌باکس، عکس، نام، نام‌خانوادگی و عملیات در موبایل دیده می‌شود */
    .students-table th:nth-child(2),
    .students-table td:nth-child(2),
    .students-table th:nth-child(6),
    .students-table td:nth-child(6),
    .students-table th:nth-child(7),
    .students-table td:nth-child(7),
    .students-table th:nth-child(8),
    .students-table td:nth-child(8),
    .students-table th:nth-child(9),
    .students-table td:nth-child(9) {

        display:none;

    }


    .students-table thead,
    .students-table tbody,
    .students-table tr {

        min-width:0;

    }

}


@media(max-width:640px){


    .school-dashboard {

        padding:0 4px;

    }


    .dashboard-cards,
    .class-grid {

        grid-template-columns:1fr;

    }


    .dashboard-card {

        padding:16px;

    }


    .school-form input[type="text"],
    .school-form input[type="number"],
    .school-form input[type="email"],
    .school-form input[type="password"],
    .school-form select,
    .school-form textarea {

        max-width:100%;

    }


    .school-form select.birth-date-part {

        width:31%;
        min-width:0;
        margin-left:2%;
        margin-bottom:8px;

    }


    .school-form select.birth-date-part:last-child {

        margin-left:0;

    }


    .school-page-actions {

        flex-direction:column;

    }


    .school-page-actions .dashboard-card {

        width:100%;
        box-sizing:border-box;

    }


    .attendance-date-bar {

        flex-wrap:wrap;
        gap:8px;

    }


    .attendance-date-bar form {

        order:1;
        width:100%;

    }


    .date-nav-btn {

        flex:1;
        text-align:center;

    }


    .school-filter-bar {

        overflow-x:auto;
        flex-wrap:nowrap;
        -webkit-overflow-scrolling:touch;

    }


    .monthly-chart {

        gap:8px;

    }


    .monthly-chart-bar-wrap {

        min-width:44px;

    }


    .exam-print-content,
    .report-print-content {

        padding:16px;

    }


    .form-grid {

        grid-template-columns:1fr;

    }


    .school-datepicker-popup {

        width:250px;
        padding:10px;

    }

}


/* =========================
   دکمه اصلی
========================= */

.btn-primary {

    display:inline-block;
    background:var(--role-color,#2563eb);
    color:#fff !important;
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none !important;
    border:none;
    cursor:pointer;

}


.page-title-link {

    color:inherit !important;
    text-decoration:none !important;
    cursor:pointer;
    display:inline-block;
    border-bottom:2px solid transparent;
    padding-bottom:2px;
    transition:color .15s ease, border-color .15s ease, transform .15s ease;

}


.page-title-link:hover {

    color:var(--role-color,#2563eb) !important;
    border-bottom-color:var(--role-color,#2563eb);
    transform:scale(1.05);

}


.btn {

    display:inline-block;
    background:#f1f5f9;
    color:#1e293b !important;
    padding:10px 18px;
    border-radius:10px;
    text-decoration:none !important;
    border:none;
    cursor:pointer;
    font-family:inherit;

}


.btn-warning {

    background:#fef3c7;
    color:#92400e !important;

}


.btn-danger {

    background:#fee2e2;
    color:#991b1b !important;

}


.btn-sm {

    padding:6px 12px;
    font-size:12px;

}


.form-grid {

    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
    gap:16px;
    margin-bottom:10px;

}


.form-group label {

    display:block;
    margin-bottom:6px;
    font-size:13px;
    color:#475569;

}


.form-group input,
.form-group select {

    width:100%;
    padding:10px 12px;
    border:1px solid #e2e8f0;
    border-radius:10px;
    box-sizing:border-box;
    font-family:inherit;

}


/* =========================
   پیام‌ها
========================= */

.notice-success {

    background:#ecfdf5;
    color:#065f46;
    border:1px solid #a7f3d0;
    padding:12px 18px;
    border-radius:10px;
    margin-bottom:20px;

}


.notice-error {

    background:#fef2f2;
    color:#991b1b;
    border:1px solid #fecaca;
    padding:12px 18px;
    border-radius:10px;
    margin-bottom:20px;

}


/* =========================
   دکمه‌های بالای صفحه دانش‌آموزان/کلاس‌ها
========================= */

.school-page-actions {

    display:flex;
    flex-wrap:wrap;
    gap:15px;

}


.finance-section {

    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:16px;
    padding:20px;
    margin-bottom:24px;

}


.finance-section h3.finance-section-title {

    margin-top:0;
    font-size:19px;

}


/* =========================
   فرم‌ها
========================= */

.school-form input[type="text"],
.school-form input[type="number"],
.school-form select {

    width:100%;
    max-width:320px;
    padding:10px 12px;
    border:1px solid #e2e8f0;
    border-radius:10px;
    margin-top:5px;
    box-sizing:border-box;

}


.school-form select {

    -webkit-appearance:none;
    appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:left 12px center;
    background-size:14px;
    padding-left:34px;

}


.school-form select.birth-date-part {

    display:inline-block;
    width:auto;
    max-width:none;
    min-width:90px;
    margin-left:6px;
    background-position:left 10px center;
    padding-left:30px;

}


.school-form button {

    background:var(--role-color,#2563eb);
    color:#fff;
    border:none;
    padding:10px 20px;
    border-radius:10px;
    cursor:pointer;

}


/* =========================
   جدول‌ها
========================= */

.school-table {

    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 5px 20px rgba(0,0,0,.06);

}


.school-table select {

    -webkit-appearance:none;
    appearance:none;
    background-color:#fff;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:left 8px center;
    background-size:12px;
    padding:6px 8px;
    padding-left:26px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    font-family:inherit;

}


.school-table th,
.school-table td {

    padding:12px 15px;
    text-align:right;
    border-bottom:1px solid #eef1f5;

}


.school-table th {

    background:#f8fafc;
    font-weight:700;

}


.school-table tr:last-child td {

    border-bottom:none;

}


/* رنگ‌بندی دو جدول رزرو غذا، متناسب با رنگ‌های لوگوی مدرسه */

.food-week-current th {

    background:#dbeafe;
    color:#1e3a8a;

}


.food-week-next th {

    background:#ffedd5;
    color:#9a3412;

}


/* =========================
   فیلتر کلاس‌ها در لیست دانش‌آموزان
========================= */

.school-filter-bar {

    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:15px 0 25px;

}


.school-filter-bar a {

    padding:8px 16px;
    border-radius:999px;
    background:#fff;
    color:#333 !important;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
    text-decoration:none !important;

}


.school-filter-bar a.active {

    background:var(--role-color,#2563eb);
    color:#fff !important;

}


/* =========================
   کارت‌های کلاس
========================= */

.class-card-actions {

    display:flex;
    gap:12px;
    margin-top:12px;
    flex-wrap:wrap;

}


.grade-badge {

    display:inline-block;
    background:#eef2ff;
    color:var(--role-color,#2563eb);
    font-size:12px;
    font-weight:600;
    padding:3px 10px;
    border-radius:999px;
    margin-bottom:8px;

}


.class-teacher-name {

    color:#64748b;
    font-size:13px;

}


.index-add-note {

    background:#fff;
    border-radius:14px;
    padding:20px;
    margin:20px 0 30px;
    box-shadow:0 5px 20px rgba(0,0,0,.06);

}


.attendance-date-bar {

    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    margin:20px 0;

}


.attendance-date-bar form {

    margin:0;

}


.date-nav-btn {

    background:#fff;
    padding:8px 16px;
    border-radius:999px;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
    color:#1e293b !important;

}


.recent-dates {

    text-align:center;
    color:#64748b;
    font-size:13px;
    margin-bottom:20px;

}


.recent-dates a {

    display:inline-block;
    margin:0 6px;
    color:var(--role-color,#2563eb) !important;

}


/* =========================
   امکانات به‌زودی (ساخته‌نشده)
========================= */

.school-menu li.coming-soon {

    opacity:.55;
    cursor:default;

}


.school-menu li.coming-soon .badge-soon {

    font-size:10px;
    background:#f1f5f9;
    color:#64748b;
    padding:2px 7px;
    border-radius:999px;
    margin-right:6px;

}


.dashboard-card.coming-soon {

    opacity:.6;
    cursor:default;
    position:relative;

}


.dashboard-card.coming-soon .badge-soon {

    position:absolute;
    top:12px;
    left:12px;
    font-size:10px;
    background:#f1f5f9;
    color:#64748b;
    padding:3px 9px;
    border-radius:999px;

}


/* =========================
   فونت و تنظیمات عمومی
========================= */

.school-dashboard,
.school-dashboard input,
.school-dashboard select,
.school-dashboard button,
.school-dashboard textarea {

    font-family:'Vazirmatn', Tahoma, Arial, sans-serif;

}


.school-dashboard a,
.school-dashboard a:hover,
.school-dashboard a:visited,
.school-dashboard a:active {

    text-decoration:none !important;

}


/* =========================
   کارت‌های انتخاب کلاس (لیست دانش‌آموزان)
========================= */

.class-grid {

    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
    gap:18px;
    margin:20px 0;

}


.class-grid-card {

    display:block;
    background:#fff;
    border-radius:14px;
    padding:22px 20px;
    box-shadow:0 5px 20px rgba(0,0,0,.06);
    color:#1e293b !important;
    transition:transform .15s ease, box-shadow .15s ease;

}


.class-grid-card:hover {

    transform:translateY(-3px);
    box-shadow:0 10px 25px rgba(0,0,0,.1);

}


.class-grid-card h3 {

    margin:0 0 8px;
    font-size:18px;
    font-weight:700;

}


.class-grid-card-desc {

    color:#64748b;
    font-size:13px;
    margin:0 0 10px;

}


.class-grid-card-count {

    display:inline-block;
    background:#eef2ff;
    color:var(--role-color,#2563eb);
    font-size:12px;
    font-weight:600;
    padding:4px 10px;
    border-radius:999px;

}


/* =========================
   ورودی تاریخ تولد (تقویم شمسی)
========================= */

.school-form input.school-date {

    background-color:#fff;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    background-repeat:no-repeat;
    background-position:left 12px center;
    padding-left:38px;
    cursor:pointer;

}


/* =========================
   پاپ‌آپ تقویم شمسی
========================= */

.school-datepicker-popup {

    position:absolute;
    z-index:9999;
    background:#fff;
    border-radius:14px;
    box-shadow:0 15px 40px rgba(0,0,0,.18);
    padding:14px;
    width:280px;
    font-family:'Vazirmatn', Tahoma, Arial, sans-serif;
    direction:rtl;

}


.school-datepicker-popup .sdp-header {

    display:flex;
    align-items:center;
    margin-bottom:10px;

}


.school-datepicker-popup .sdp-title {

    display:flex;
    gap:8px;
    flex:1;
    min-width:0;

}


.school-datepicker-popup .sdp-title select {

    flex:1;
    min-width:0;
    border:1px solid #e2e8f0;
    border-radius:8px;
    padding:4px 3px;
    padding-left:20px;
    font-family:inherit;
    font-size:12px;
    -webkit-appearance:none;
    appearance:none;
    background-color:#fff;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:left 4px center;
    background-size:11px;

}


.school-datepicker-popup .sdp-weekdays {

    display:grid;
    grid-template-columns:repeat(7, 1fr);
    text-align:center;
    font-size:12px;
    color:#94a3b8;
    margin-bottom:6px;

}


.school-datepicker-popup .sdp-days {

    display:grid;
    grid-template-columns:repeat(7, 1fr);
    gap:4px;

}


.school-datepicker-popup .sdp-day {

    -webkit-appearance:none;
    appearance:none;
    border:none;
    background:transparent;
    color:#1e293b !important;
    padding:8px 0;
    border-radius:8px;
    cursor:pointer;
    font-family:inherit;
    font-size:13px;
    line-height:1.4;
    box-shadow:none;
    text-shadow:none;

}


.school-datepicker-popup .sdp-day:hover {

    background:#eef2ff;

}


.school-datepicker-popup .sdp-day-selected {

    background:var(--role-color,#2563eb) !important;
    color:#fff;

}


.school-datepicker-popup .sdp-day-empty {

    cursor:default;

}


.school-datepicker-popup .sdp-footer {

    text-align:center;
    margin-top:8px;
    border-top:1px solid #f1f5f9;
    padding-top:8px;

}


.school-datepicker-popup .sdp-today {

    -webkit-appearance:none;
    appearance:none;
    background:none;
    border:none;
    color:var(--role-color,#2563eb) !important;
    cursor:pointer;
    font-family:inherit;
    font-size:13px;
    box-shadow:none;

}


/* =========================
   برگه‌ی چاپ آزمون / گزارش
========================= */

.exam-print-content,
.report-print-content {

    background:#fff;
    border-radius:14px;
    padding:30px;
    box-shadow:0 5px 20px rgba(0,0,0,.06);
    max-width:700px;
    margin:0 auto;

}


.karnameh-print-only {

    display:none;

}


.karnameh-official {

    font-family:inherit;
    direction:rtl;

}


.karnameh-official .karnameh-bismillah {

    text-align:center;
    font-size:14px;
    color:#475569;
    margin-bottom:16px;

}


.karnameh-official .karnameh-school-name {

    text-align:center;
    font-size:20px;
    font-weight:700;
    margin-bottom:4px;

}


.karnameh-official .karnameh-subtitle {

    text-align:center;
    font-size:13px;
    color:#64748b;
    margin-bottom:20px;

}


.karnameh-official .karnameh-info-table {

    width:100%;
    border-collapse:collapse;
    margin-bottom:20px;
    font-size:13px;

}


.karnameh-official .karnameh-info-table td {

    padding:6px 8px;
    border:1px solid #e2e8f0;

}


.karnameh-official .karnameh-photo {

    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:8px;
    border:1px solid #e2e8f0;

}


.karnameh-official .karnameh-subjects-table {

    width:100%;
    border-collapse:collapse;
    margin-bottom:30px;

}


.karnameh-official .karnameh-subjects-table th,
.karnameh-official .karnameh-subjects-table td {

    border:1px solid #cbd5e1;
    padding:8px 10px;
    font-size:13px;
    text-align:right;

}


.karnameh-official .karnameh-subjects-table th {

    background:#f1f5f9;

}


.karnameh-official .karnameh-signatures {

    display:flex;
    justify-content:space-between;
    margin-top:40px;

}


.karnameh-official .karnameh-signature-box {

    width:45%;
    text-align:center;

}


.karnameh-official .karnameh-signature-img {

    max-width:140px;
    max-height:55px;
    display:block;
    margin:0 auto 6px;

}


.karnameh-official .karnameh-signature-line {

    border-top:1px solid #94a3b8;
    padding-top:6px;
    font-size:12px;
    color:#475569;

}


/* فرم رسمی وزارتی (ماهانه/نوبت اول/نوبت دوم) */

.karnameh-official-form {

    font-size:12px;
    direction:rtl;

}


.karnameh-official-logo {

    text-align:center;
    margin-bottom:16px;

}


.karnameh-official-top {

    width:100%;
    border-collapse:collapse;
    margin-bottom:16px;

}


.karnameh-official-top td {

    border:1px solid #333;
    padding:6px 8px;
    font-size:12px;

}


.karnameh-official-photo-cell {

    width:90px;
    text-align:center;
    vertical-align:middle;

}


.karnameh-official-photo {

    width:80px;
    height:90px;
    object-fit:cover;
    border:1px solid #333;

}


.karnameh-official-photo-empty {

    display:flex;
    align-items:center;
    justify-content:center;
    color:#94a3b8;
    font-size:10px;
    text-align:center;

}


.karnameh-official-subjects {

    width:100%;
    border-collapse:collapse;
    margin-bottom:16px;

}


.karnameh-official-subjects th,
.karnameh-official-subjects td {

    border:1px solid #333;
    padding:8px 10px;
    font-size:12px;
    text-align:right;
    height:26px;

}


.karnameh-official-subjects th {

    background:#e5e5e5;
    text-align:center;

}


.karnameh-official-bottom {

    width:100%;
    border-collapse:collapse;

}


.karnameh-official-bottom td {

    border:1px solid #333;
    padding:10px;
    text-align:center;
    vertical-align:top;
    font-size:12px;
    width:25%;

}


.karnameh-official-date-cell {

    text-align:right !important;
    vertical-align:middle !important;
}


/* کارنامه‌ی تجمعی */

.karnameh-cumulative {

    font-size:11px;
    direction:rtl;

}


.karnameh-cumulative-table {

    width:100%;
    border-collapse:collapse;
    margin-bottom:16px;
    table-layout:fixed;

}


.karnameh-cumulative-table th,
.karnameh-cumulative-table td {

    border:1px solid #333;
    padding:5px 4px;
    font-size:10px;
    text-align:center;

}


.karnameh-cumulative-table th {

    background:#e5e5e5;

}


.karnameh-cumulative-subject-col {

    text-align:right !important;
    width:16%;
    white-space:nowrap;
    font-weight:700;
}


.karnameh-arrow-up {

    color:#16a34a;
    font-weight:700;

}


.karnameh-arrow-down {

    color:#dc2626;
    font-weight:700;

}


.exam-print-header {

    border-bottom:2px solid #e2e8f0;
    padding-bottom:15px;
    margin-bottom:20px;

}


/* =========================
   کارنامه‌ی رسمی
========================= */

.karnameh-print-options {

    background:#f8fafc;
    border-radius:10px;
    padding:12px 16px;
    margin-bottom:20px;
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    align-items:center;

}


.karnameh-print-options label {

    font-weight:normal;
    display:inline-flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    cursor:pointer;

}


.karnameh-header {

    text-align:center;
    border-bottom:3px double #1e293b;
    padding-bottom:12px;
    margin-bottom:18px;

}


.karnameh-header h2 {

    margin:0 0 6px;
    font-size:20px;

}


.karnameh-header p {

    margin:2px 0;
    color:#475569;
    font-size:13px;

}


.karnameh-student-box {

    display:flex;
    gap:16px;
    align-items:flex-start;
    margin-bottom:20px;

}


.karnameh-photo {

    flex-shrink:0;
    width:90px;

}


.karnameh-photo-placeholder {

    width:90px;
    height:110px;
    border-radius:6px;
    background:#f1f5f9;
    color:#94a3b8;
    display:flex;
    align-items:center;
    justify-content:center;

}


.karnameh-photo-placeholder svg {

    width:40px;
    height:40px;

}


.karnameh-info-table {

    flex:1;
    border-collapse:collapse;
    width:100%;

}


.karnameh-info-table td {

    border:1px solid #e2e8f0;
    padding:8px 10px;
    font-size:13px;

}


.karnameh-info-table .karnameh-label {

    background:#f8fafc;
    font-weight:700;
    white-space:nowrap;
    width:1%;

}


.karnameh-grid {

    margin-bottom:20px;

}


.karnameh-signatures {

    display:flex;
    justify-content:space-between;
    gap:20px;
    margin-top:30px;
    font-size:13px;
    text-align:center;

}


.karnameh-signatures > div {

    flex:1;

}


.karnameh-sign-line {

    margin-top:35px;
    border-top:1px solid #94a3b8;

}


.exam-print-section {

    margin-bottom:20px;

}


.exam-print-answers {

    background:#f8fafc;
    border-radius:10px;
    padding:15px;

}


/* =========================
   نمودار میانگین ماهانه
========================= */

.monthly-chart {

    display:flex;
    align-items:flex-end;
    gap:14px;
    height:220px;
    padding:20px 10px 0;
    border-bottom:2px solid #e2e8f0;
    overflow-x:auto;

}


.monthly-chart-bar-wrap {

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-end;
    height:100%;
    min-width:60px;

}


.monthly-chart-value {

    font-size:12px;
    font-weight:700;
    color:#1e293b;
    margin-bottom:4px;

}


.monthly-chart-bar {

    width:36px;
    background:linear-gradient(180deg, var(--role-color,#2563eb), #93c5fd);
    border-radius:8px 8px 0 0;
    transition:height .3s ease;

}


.monthly-chart-label {

    margin-top:8px;
    font-size:12px;
    color:#64748b;
    white-space:nowrap;

}


/* =========================
   نمودار میانگین ماهانه
========================= */

.monthly-chart {

    display:flex;
    align-items:flex-end;
    gap:14px;
    height:220px;
    padding:20px 10px 0;
    overflow-x:auto;
    border-bottom:2px solid #e2e8f0;

}


.monthly-chart-bar-wrap {

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-end;
    min-width:60px;
    height:100%;

}


.monthly-chart-value {

    font-size:12px;
    font-weight:700;
    color:#1e293b;
    margin-bottom:4px;

}


.monthly-chart-bar {

    width:32px;
    background:linear-gradient(180deg, var(--role-color,#2563eb), #93c5fd);
    border-radius:6px 6px 0 0;

}


.monthly-chart-label {

    font-size:11px;
    color:#64748b;
    margin-top:8px;
    white-space:nowrap;

}


@media print {

    @page {
        size: A4;
        margin: 8mm;
    }

    .karnameh-official-form,
    .karnameh-cumulative-table {
        font-size:11px !important;
    }

    body * {

        visibility:hidden;

    }

    .exam-print-content,
    .exam-print-content *,
    .report-print-content,
    .report-print-content * {

        visibility:visible;

    }

    .exam-print-content,
    .report-print-content {

        position:absolute;
        top:0;
        right:0;
        left:0;
        width:100%;
        box-shadow:none !important;
        max-width:100% !important;

    }

    .no-print {

        display:none !important;

    }

    .karnameh-screen-only {

        display:none !important;

    }

    .karnameh-print-only {

        display:block !important;

    }

}


/* =========================
   حذف عنوان پیش‌فرض قالب وردپرس در صفحاتی که محتوای این افزونه
   نمایش داده می‌شود (چون خودمان یک عنوان استایل‌خورده داریم و
   عنوان قالب باعث تکرار می‌شد)
========================= */

body:has(.school-dashboard) .entry-title,
body:has(.school-dashboard) h1.page-title,
body:has(.school-dashboard) .entry-header .entry-title {

    display:none !important;

}


/* =========================
   حذف هدر موبایل پیش‌فرض قالب (نام سایت + آیکون منوی همبرگری که همه‌ی
   صفحات سایت را نشان می‌دهد) در صفحات پنل — چون خود پنل منوی
   اختصاصی و کامل‌تری در سایدبار دارد و این هدر فقط تکراری و
   گیج‌کننده است. این فقط در صفحات پنل حذف می‌شود، نه در کل سایت.
========================= */

body:has(.school-dashboard) #ast-mobile-header,
body:has(.school-dashboard) .ast-mobile-header-wrap,
body:has(.school-dashboard) .ast-header-break-point .ast-main-header-bar,
body:has(.school-dashboard) .ast-header-break-point .main-header-bar,
body:has(.school-dashboard) .ast-builder-menu-1-trigger,
body:has(.school-dashboard) .menu-toggle-icon,
body:has(.school-dashboard) .mobile-menu-toggle-icon {

    display:none !important;

}