@font-face {
    font-family: yekan;
    src: url('../fonts/YekanNewFaceD4.ttf');
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: yekan;
}

body{
    background:#0f172a;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    color:#1e293b;
}

.page{
    width:100%;
    max-width:850px;
}

.card{
    background:white;
    border-radius:18px;
    padding:40px;
    box-shadow:
            0 10px 30px rgba(0,0,0,0.15),
            0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 100%;
}

.header{
    margin-bottom:35px;
}

.header h1{
    font-size:22px;
    margin-bottom:6px;
}

.header p{
    font-size:13px;
    color:#475569;
}

.grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.full{
    grid-column:span 2;
}

.input-group{
    position:relative;
}

.input-group input,
.input-group select{
    width:100%;
    height:48px;
    border-radius:10px;
    border:1px solid #e2e8f0;
    padding:0 14px;
    font-size:14px;
    background:white;
    transition:all .2s;
}

.input-group input:focus,
.input-group select:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,0.1);
}

.input-group label{
    position:absolute;
    right:12px;
    top:14px;
    font-size:13px;
    color:#334155;
    background:white;
    padding:0 6px;
    transition:0.2s;
    pointer-events:none;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group select:focus + label{
    top:-8px;
    font-size:11px;
    color:#1e40af;
}

.submit-btn{
    margin-top:28px;
    width:100%;
    height:50px;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:white;
    font-size:15px;
    cursor:pointer;
    transition:all .2s;
}

.submit-btn:hover{
    background:#1d4ed8;
    transform:translateY(-1px);
    box-shadow:0 8px 20px rgba(37,99,235,0.25);
}

@media (max-width:700px){

    .grid{
        grid-template-columns:1fr;
    }

    .full{
        grid-column:span 1;
    }

    .card{
        padding:28px;
    }

}
.section-title{
    margin:26px 0 14px;
    font-size:16px;
    color:#1e293b;
}

.courses-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:14px;
}

.course-card{
    display:block;
    cursor:pointer;
    position:relative;
}

.course-card input{
    position:absolute;
    opacity:0;
}

.course-inner{
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:14px;
    display:flex;
    flex-direction:column;
    gap:8px;
    background:white;
    transition:.2s;
    position:relative;
}

.course-card:hover .course-inner{
    border-color:#2563eb;
    box-shadow:0 6px 14px rgba(0,0,0,0.08);
}

.course-title{
    font-size:15px;
    font-weight:700;
    color:#0f172a;
}

.course-times{
    font-size:13px;
    color:#1d4ed8;
    font-weight:600;
    display:flex;
    flex-direction:column;
    gap:2px;
}

.course-teacher{
    font-size:12px;
    color:#64748b;
}

.course-bottom{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:6px;
}

.course-price{
    font-size:13px;
    font-weight:600;
    color:#0f172a;
}

.capacity{
    font-size:11px;
    padding:4px 8px;
    border-radius:6px;
}

.capacity.available{
    background:#dcfce7;
    color:#166534;
}

.capacity.full{
    background:#fee2e2;
    color:#991b1b;
}

.course-card.full{
    opacity:.6;
    cursor:not-allowed;
}

.checkmark{
    position:absolute;
    top:10px;
    left:10px;
    width:22px;
    height:22px;
    border-radius:6px;
    background:#2563eb;
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:13px;
    opacity:0;
    transform:scale(.7);
    transition:.2s;
}

.course-card input:checked + .course-inner{
    border-color:#2563eb;
    background:#f8fbff;
}

.course-card input:checked + .course-inner .checkmark{
    opacity:1;
    transform:scale(1);
}
.admin-container{
    max-width:1200px;
    margin:30px auto;
    padding:0 20px;
}

/* هدر */
.main-header{
    margin-bottom:25px;
}

.main-header h1{
    font-size:20px;
    color:#0f172a;
    margin-bottom:4px;
}

.main-header p{
    font-size:13px;
    color:#64748b;
}

/* منوی دوره‌ها */

.course-selector{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:22px;
}

.course-btn{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    padding:10px 14px;
    border-radius:10px;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    min-width:150px;
    transition:all .2s;
    text-align:right;
}

.course-btn:hover{
    background:#f1f5f9;
}

.course-btn.active{
    background:#2563eb;
    border-color:#2563eb;
    color:white;
}

.c-name{
    font-weight:600;
    font-size:13px;
}

.c-count{
    font-size:11px;
    margin-top:3px;
    opacity:.8;
}

/* کارت جدول */

.table-card{
    background:white;
    border-radius:12px;
    border:1px solid #e2e8f0;
    overflow:hidden;
}

.table-header{
    padding:16px 18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-bottom:1px solid #f1f5f9;
    flex-wrap:wrap;
    gap:10px;
}

.table-header h2{
    font-size:16px;
    color:#0f172a;
}

.table-header h2 span{
    color:#2563eb;
}

/* ابزارها */

.table-actions{
    display:flex;
    gap:8px;
    align-items:center;
}

.table-search{
    padding:7px 12px;
    border:1px solid #e2e8f0;
    border-radius:8px;
    font-size:12px;
    width:180px;
    font-family:inherit;
}

.btn-secondary{
    padding:7px 12px;
    background:#f1f5f9;
    border:1px solid #e2e8f0;
    border-radius:8px;
    font-size:12px;
    cursor:pointer;
}

.btn-secondary:hover{
    background:#e2e8f0;
}

/* جدول */

.table-responsive{
    overflow:auto;
}

.modern-table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

.modern-table th{
    background:#f8fafc;
    padding:12px 16px;
    color:#475569;
    font-weight:600;
    text-align:right;
}

.modern-table td{
    padding:12px 16px;
    border-bottom:1px solid #f1f5f9;
}

.modern-table tbody tr:hover td{
    background:#f8fafc;
}

/* وضعیت */

.status-badge{
    padding:3px 9px;
    border-radius:20px;
    font-size:11px;
    font-weight:500;
}

.success{
    background:#dcfce7;
    color:#15803d;
}

.warning{
    background:#fef9c3;
    color:#a16207;
}

/* لینک عملیات */

.view-link{
    color:#2563eb;
    background:none;
    border:none;
    cursor:pointer;
    font-size:12px;
}

.view-link:hover{
    text-decoration:underline;
}

.success-alert{
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert{
    padding:12px 16px;
    border-radius:8px;
    margin-bottom:18px;
    font-size:14px;
}

.alert.success{
    background:#e8f5ec;
    border:1px solid #b6e2c4;
    color:#2e7d32;
}

.alert.error{
    background:#fdeeee;
    border:1px solid #f5c2c2;
    color:#b42323;
}
.field-error{
    margin-top:6px;
    font-size:13px;
    padding:6px 10px;
    border-radius:6px;
    background:rgba(220,38,38,0.08);
    color:#b42323;
}
.form-alert{
    padding:12px 16px;
    border-radius:8px;
    margin-bottom:18px;
    font-size:14px;
}

.form-alert-success{
    background:#e8f5ec;
    border:1px solid #b6e2c4;
    color:#2e7d32;
}

.form-alert-error{
    background:#fdeeee;
    border:1px solid #f5c2c2;
    color:#b42323;
}

.form-field-error{
    margin-top:6px;
    font-size:13px;
    padding:6px 10px;
    border-radius:6px;
    background:rgba(220,38,38,0.08);
    color:#b42323;
}

.admin-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 320px;

    background: #1e293b;
    padding: 20px 0;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 320px;
    overflow-y: auto;
    transition: transform .3s ease;
    z-index: 200;
}

/* موبایل: مخفی */
.sidebar-closed {
    transform: translateX(100%);
}

/* دکمه موبایل (هامبرگری) */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 300;
    background: #2563eb;
    border: none;
    color: white;
    font-size: 20px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.sidebar-title {
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    color: #FFF;
}

.menu-group {
    margin-bottom: 10px;
}

/* عنوان دسته بندی (دکمه آکاردئون) */
.menu-group-header {
    padding: 12px 20px;
    font-size: 14px;
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-group-header:hover {
    background: #334155;
}

.menu-arrow {
    transition: transform .3s;
}

.menu-group.open .menu-arrow {
    transform: rotate(180deg);
}

/* زیرمنو */
.admin-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background: #243248;
}

.menu-group.open .admin-submenu {
    display: block;
}

.admin-submenu li a {
    display: block;
    padding: 10px 28px;
    text-decoration: none;
    color: #e2e8f0;
    font-size: 14px;
    border-bottom: 1px solid #334155;
    transition: .2s;
}

.admin-submenu li a:hover,
.admin-submenu li a.active {
    background: #2563eb;
    color: white;
}

/* Main content */
.admin-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 30px;
    margin-right: 260px;
}

/* Footer */
.admin-footer {
    margin-top: 40px;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    border-top: 1px solid #1e293b;
    text-align: center;
}

@media (max-width: 768px) {

    .mobile-menu-btn {
        display: block;
    }

    .admin-sidebar {
        width: 240px;
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        transform: translateX(320px); /* پیش‌فرض: پنهان */
    }

    .admin-sidebar.show {
        transform: translateX(0) !important; /* نمایش */
    }

    .admin-content {
        margin-right: 0 !important;
        padding-top: 70px;
    }
}
/* ردیف جزئیات مخفی */
.details-row {
    display: none;
    background: #f8fafc;
}

.details-row.open {
    display: table-row;
}

.details-box {
    padding: 20px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.d-row {
    margin-bottom: 8px;
    font-size: 15px;
}

.d-row span:first-child {
    color: #475569;
    margin-left: 6px;
    font-weight: 600;
}

.details-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

.student-row {
    cursor: pointer;
}

.student-row:hover {
    background: #f1f5f9;
}
.student-name{
    color:#0f172a;
    font-weight:600;
}
.modern-table td,
.modern-table th {
    color: #0f172a;   /* رنگ تیره و خوانا */
}
.admin-content .card {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}



@media (max-width: 768px) {
    .admin-content {
        margin-right: 0 !important;   /* موبایل: سایدبار شناور است */
    }
}
.modern-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* لیبل‌ها */
.modern-form label {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    display: block;
    margin-bottom: 8px;
}

/* ورودی‌ها (input, select, textarea) */
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    transition: all .2s ease;
}

.form-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* textarea ارتفاع بهتر */
.form-input textarea {
    resize: vertical;
}

/* گروه‌های فرم */
.form-group {
    display: flex;
    flex-direction: column;
}

/* دکمه اصلی */
.btn-primary {
    padding: 12px 18px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:active {
    background: #1e40af;
}

/* بخش دکمه‌ها */
.form-actions {
    margin-top: 10px;
    text-align: left;
}

/* واکنش‌گرا */
@media (max-width: 768px) {
    .card {
        padding: 18px;
    }
    .card-title {
        font-size: 20px;
    }
}

.class-box {
    background:#f4f4f4;
    padding:12px;
    margin-bottom:10px;
    border-radius:6px;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.class-box select {
    width:auto;
    min-width:70px;
}
.time-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-group span {
    font-weight: bold;
    font-size: 18px;
    color: #000;
    display: inline-block;
}
.exam-intro-wrapper{
    display:flex;
    justify-content:center;
    padding:40px 15px;
}

.exam-intro-card{
    background:#ffffff;
    padding:30px 24px;
    border-radius:14px;
    max-width:800px;
    width:100%;
    box-shadow:0 3px 10px rgba(0,0,0,.06);
    color:#111827;
}

.exam-intro-title{
    font-size:22px;
    font-weight:700;
    margin-bottom:10px;
}

.exam-intro-subtitle{
    font-size:14px;
    color:#4b5563;
    margin-bottom:20px;
}

.exam-intro-section{
    margin-bottom:22px;
}

.exam-intro-section h2{
    font-size:16px;
    font-weight:600;
    margin-bottom:8px;
    color:#111827;
}

.exam-intro-section p{
    font-size:14px;
    line-height:1.8;
    color:#374151;
    margin-bottom:8px;
}

.exam-intro-section ul{
    padding-right:18px;
    margin:0;
}

.exam-intro-section li{
    font-size:14px;
    line-height:1.7;
    color:#374151;
    margin-bottom:4px;
}

.exam-info-list li strong{
    font-weight:600;
}

.exam-intro-footer{
    margin-top:10px;
    border-top:1px solid #e5e7eb;
    padding-top:15px;
    font-size:14px;
    color:#374151;
}

.exam-start-btn{
    display:inline-block;
    margin-top:12px;
    background:#2563eb;
    color:#ffffff;
    padding:10px 22px;
    border-radius:8px;
    font-weight:600;
    font-size:14px;
    text-decoration:none;
    transition:background .2s ease, transform .1s ease;
}

.exam-start-btn:hover{
    background:#1e40af;
    transform:translateY(-1px);
}

@media (max-width:640px){
    .exam-intro-card{
        padding:20px 16px;
    }

    .exam-intro-title{
        font-size:18px;
    }
}
/* کانتینر صفحه */
.exam-page-wrapper{
    display:flex;
    justify-content:center;
    padding:40px 15px;
}

.exam-card{
    background:white;
    padding:35px;
    border-radius:16px;
    width:100%;
    max-width:950px;
    box-shadow:0 4px 16px rgba(0,0,0,.08);
}

/* بلوک سوال */
.question-block{
    background:#f8fafc;
    padding:22px 26px;
    border-radius:14px;
    border:1px solid #e2e8f0;
    margin-bottom:26px;
}

.question-title{
    font-size:18px;
    font-weight:700;
    margin-bottom:16px;
}

/* لیست گزینه‌ها */
.choices-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}

/* کارت گزینه */
.choice-item{
    position:relative;
    padding:18px 20px;
    background:white;
    border:2px solid #e5e7eb;
    border-radius:14px;
    cursor:pointer;
    font-size:16px;
    display:flex;
    align-items:center;
    gap:14px;
    transition:all .25s ease;
}

/* هاور */
.choice-item:hover{
    border-color:#86efac;
    background:#f0fdf4;
}

/* مخفی کردن رادیو */
.choice-item input[type="radio"]{
    opacity:0;
    position:absolute;
}

/* مربع انتخاب */
.choice-item::before{
    content:"";
    width:22px;
    height:22px;
    border-radius:6px;
    border:2px solid #9ca3af;
    background:white;
    flex-shrink:0;
    transition:all .25s ease;
}

/* آیکون تیک */
.choice-item::after{

    position:absolute;
    right:18px;
    font-size:18px;
    color:white;
    background:#22c55e;
    width:22px;
    height:22px;
    border-radius:6px;
    display:flex;
    align-items:center;
    justify-content:center;
    transform:scale(0);
    transition:all .25s ease;
}

/* حالت انتخاب‌شده */
.choice-item input[type="radio"]:checked ~ .choice-item {}
.choice-item input[type="radio"]:checked{
    /* خالی */
}

/* مهم‌ترین بخش */
.choice-item input[type="radio"]:checked + span,
.choice-item input[type="radio"]:checked ~ span{
    font-weight:700;
    color:#065f46;
}

/* کارت انتخاب‌شده */
.choice-item:has(input[type="radio"]:checked){
    border-color:#16a34a;
    background:#dcfce7;
    box-shadow:0 0 0 4px rgba(34,197,94,0.25);
}

/* مربع سبز */
.choice-item:has(input[type="radio"]:checked)::before{
    border-color:#16a34a;
    background:#bbf7d0;
}

/* تیک ظاهر شود */
.choice-item:has(input[type="radio"]:checked)::after{
    transform:scale(1);
}

