/* =========================================================
   MUSTAQIL O‘QITUVCHI GURUHLARI
   ========================================================= */

.teacher-groups-section {
    min-height: calc(100vh - 76px);
    padding: 40px 0 110px;
    background:
        radial-gradient(circle at 7% 12%,
            rgba(37, 99, 235, 0.08),
            transparent 28%),
        radial-gradient(circle at 94% 84%,
            rgba(124, 58, 237, 0.07),
            transparent 30%),
        var(--background);
}

/* =========================================================
   OBUNA HOLATI
   ========================================================= */

.teacher-groups-subscription-note {
    display: grid;
    grid-template-columns:
        48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 16px;
    background:
        linear-gradient(135deg,
            rgba(237, 233, 254, 0.82),
            rgba(219, 234, 254, 0.68),
            rgba(255, 255, 255, 0.96));
    box-shadow:
        0 13px 32px rgba(124, 58, 237, 0.08);
}

.teacher-groups-subscription-note>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: var(--secondary);
    background: var(--white);
    box-shadow:
        0 8px 20px rgba(124, 58, 237, 0.12);
    font-size: 17px;
}

.teacher-groups-subscription-note>div {
    min-width: 0;
}

.teacher-groups-subscription-note strong {
    display: block;
    color: var(--dark);
    font-size: 11px;
}

.teacher-groups-subscription-note p {
    margin-top: 4px;
    color: var(--text-light);
    font-size: 9px;
    line-height: 1.6;
}

.teacher-groups-subscription-note>a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 10px;
    color: var(--secondary);
    background: var(--white);
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.teacher-groups-subscription-note>a:hover {
    color: var(--white);
    border-color: var(--secondary);
    background: var(--secondary);
    transform: translateX(3px);
}

/* =========================================================
   GURUH YARATISH PANELI
   ========================================================= */

.teacher-group-create-panel {
    margin-bottom: 22px;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.22);
    box-shadow:
        0 16px 42px rgba(37, 99, 235, 0.1);
}

.teacher-group-create-form {
    display: grid;
    grid-template-columns:
        minmax(230px, 0.8fr) minmax(320px, 1.2fr);
    gap: 18px;
    padding: 22px;
}

.teacher-group-create-form .form-group {
    min-width: 0;
    margin: 0;
}

.teacher-group-create-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
}

.teacher-group-create-form input,
.teacher-group-create-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    border-radius: 12px;
    color: var(--dark);
    background: var(--background);
    font-size: 11px;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.teacher-group-create-form input {
    min-height: 47px;
    padding: 11px 14px;
}

.teacher-group-create-form textarea {
    min-height: 112px;
    padding: 13px 14px;
    line-height: 1.65;
    resize: vertical;
}

.teacher-group-create-form input:focus,
.teacher-group-create-form textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1);
}

.teacher-group-create-form .profile-form-actions {
    grid-column: 1 / -1;
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* =========================================================
   STATISTIKA KARTALARI
   ========================================================= */

.teacher-groups-statistics {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.teacher-group-stat-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 17px;
    color: inherit;
    background: var(--white);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

a.teacher-group-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: var(--shadow-medium);
}

.teacher-group-stat-card.active {
    border-color: rgba(37, 99, 235, 0.34);
    background:
        linear-gradient(135deg,
            rgba(219, 234, 254, 0.82),
            rgba(237, 233, 254, 0.56));
    box-shadow:
        0 14px 34px rgba(37, 99, 235, 0.12);
}

.teacher-group-stat-card>span {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 17px;
}

.teacher-group-stat-card:nth-child(2)>span {
    color: var(--success);
    background: var(--success-light);
}

.teacher-group-stat-card:nth-child(3)>span {
    color: var(--warning);
    background: var(--warning-light);
}

.teacher-group-stat-card:nth-child(4)>span {
    color: var(--secondary);
    background: var(--secondary-light);
}

.teacher-group-stat-card:nth-child(5)>span {
    color: var(--dark);
    background: var(--background);
}

.teacher-group-stat-card>div {
    min-width: 0;
}

.teacher-group-stat-card small {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-stat-card strong {
    display: block;
    margin-top: 4px;
    color: var(--dark);
    font-size: 22px;
    line-height: 1;
}

/* =========================================================
   GURUHLAR PANELI
   ========================================================= */

.teacher-groups-panel {
    overflow: visible;
}

.teacher-groups-panel .my-tests-toolbar {
    border-radius: 20px 20px 0 0;
}

/* =========================================================
   GURUHLAR GRID
   ========================================================= */

.teacher-groups-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 20px;
}

/* =========================================================
   GURUH KARTASI
   ========================================================= */

.teacher-group-card {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.teacher-group-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.29);
    box-shadow: var(--shadow-medium);
}

.teacher-group-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background:
        linear-gradient(90deg,
            var(--primary),
            var(--secondary));
    content: "";
}

/* =========================================================
   KARTA YUQORI QISMI
   ========================================================= */

.teacher-group-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 16px 0;
}

.teacher-group-status-form {
    margin: 0;
}

.teacher-group-status-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    background: var(--background);
    cursor: pointer;
    font-size: 11px;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.teacher-group-status-form button:hover {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.3);
    background: var(--primary-light);
    transform: translateY(-2px);
}

/* =========================================================
   KARTA ASOSIY QISMI
   ========================================================= */

.teacher-group-card-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    padding: 17px;
}

.teacher-group-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 17px;
    color: var(--white);
    background:
        linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    box-shadow:
        0 13px 28px rgba(37, 99, 235, 0.2);
    font-size: 20px;
}

.teacher-group-card-body h2 {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 15px;
    color: var(--dark);
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.teacher-group-card-body>p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin-top: 7px;
    color: var(--text-light);
    font-size: 10px;
    line-height: 1.65;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* =========================================================
   TAKLIF KODI
   ========================================================= */

.teacher-group-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 11px 12px;
    border: 1px dashed rgba(37, 99, 235, 0.32);
    border-radius: 11px;
    background:
        linear-gradient(135deg,
            rgba(219, 234, 254, 0.58),
            rgba(255, 255, 255, 0.95));
}

.teacher-group-code span {
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
}

.teacher-group-code code {
    overflow: hidden;
    max-width: 155px;
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--white);
    font-family: monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   KARTA STATISTIKASI
   ========================================================= */

.teacher-group-card-stats {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.teacher-group-card-stats>div {
    display: grid;
    grid-template-columns:
        30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 9px;
    border-radius: 10px;
    background: var(--background);
}

.teacher-group-card-stats i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: var(--primary);
    background: var(--white);
    font-size: 10px;
}

.teacher-group-card-stats>div:nth-child(2) i {
    color: var(--success);
}

.teacher-group-card-stats>div:nth-child(3) i {
    color: var(--warning);
}

.teacher-group-card-stats>div:nth-child(4) i {
    color: var(--secondary);
}

.teacher-group-card-stats span {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-card-stats strong {
    color: var(--dark);
    font-size: 10px;
}

/* =========================================================
   KARTA PASTKI QISMI
   ========================================================= */

.teacher-group-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 13px;
    padding: 13px 16px;
    border-top: 1px solid var(--border);
    background: var(--background);
}

.teacher-group-card-footer>span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 8px;
}

.teacher-group-card-footer .my-test-open-button {
    flex-shrink: 0;
}

/* =========================================================
   HOLAT BELGILARI
   ========================================================= */

.teacher-groups-section .organization-status-badge.status-active {
    color: var(--success);
    background: var(--success-light);
}

.teacher-groups-section .organization-status-badge.status-archived {
    color: var(--text-muted);
    background: var(--background);
}

/* =========================================================
   BO‘SH HOLAT
   ========================================================= */

.teacher-groups-panel .dashboard-empty-state {
    min-height: 430px;
    padding: 45px 24px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .teacher-groups-statistics {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .teacher-groups-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .teacher-group-create-form {
        grid-template-columns: 1fr;
    }

    .teacher-group-create-form .profile-form-actions {
        grid-column: auto;
    }

    .teacher-groups-subscription-note {
        grid-template-columns:
            48px minmax(0, 1fr);
    }

    .teacher-groups-subscription-note>a {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .teacher-groups-statistics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .teacher-groups-section {
        padding: 25px 0 85px;
    }

    .teacher-groups-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .teacher-group-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-group-card-footer .my-test-open-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .teacher-groups-statistics {
        grid-template-columns: 1fr;
    }

    .teacher-group-stat-card {
        padding: 14px;
    }

    .teacher-group-create-form {
        padding: 16px;
    }

    .teacher-group-create-form .profile-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .teacher-group-create-form .profile-form-actions .button {
        width: 100%;
    }

    .teacher-groups-grid {
        padding: 11px;
    }

    .teacher-group-card {
        border-radius: 15px;
    }

    .teacher-group-card-body {
        padding: 15px;
    }

    .teacher-group-card-stats {
        grid-template-columns: 1fr;
    }

    .teacher-group-code {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-group-code code {
        width: 100%;
        max-width: none;
        text-align: center;
    }

    .teacher-groups-subscription-note {
        grid-template-columns: 1fr;
        padding: 15px;
    }
}

/* =========================================================
   MUSTAQIL O‘QITUVCHI — GURUH TAFSILOTLARI
   ========================================================= */

.teacher-group-detail-section {
    min-height: calc(100vh - 76px);
    padding: 38px 0 110px;
    background:
        radial-gradient(circle at 7% 12%,
            rgba(37, 99, 235, 0.08),
            transparent 28%),
        radial-gradient(circle at 94% 84%,
            rgba(124, 58, 237, 0.07),
            transparent 30%),
        var(--background);
}

/* =========================================================
   YUQORI GURUH MA’LUMOTI
   ========================================================= */

.teacher-group-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 22px 0;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.98),
            rgba(219, 234, 254, 0.62),
            rgba(237, 233, 254, 0.48));
    box-shadow: var(--shadow-medium);
}

.teacher-group-detail-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.teacher-group-detail-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 22px;
    color: var(--white);
    background:
        linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    box-shadow:
        0 16px 36px rgba(37, 99, 235, 0.23);
    font-size: 28px;
}

.teacher-group-detail-heading>div {
    min-width: 0;
}

.teacher-group-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.teacher-group-subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--secondary);
    background: var(--secondary-light);
    font-size: 8px;
    font-weight: 800;
}

.teacher-group-detail-heading h1 {
    margin-top: 10px;
    color: var(--dark);
    font-size: clamp(27px, 4vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
}

.teacher-group-detail-heading p {
    max-width: 680px;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.7;
}

/* =========================================================
   TAKLIF KODI
   ========================================================= */

.teacher-group-detail-code {
    display: grid;
    flex-shrink: 0;
    min-width: 255px;
    gap: 7px;
    padding: 17px;
    border: 1px dashed rgba(37, 99, 235, 0.36);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

.teacher-group-detail-code>span {
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.teacher-group-detail-code code {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-light);
    font-family: monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-align: center;
}

.teacher-group-detail-code small {
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.55;
}

/* =========================================================
   STATISTIKA
   ========================================================= */

.teacher-group-detail-statistics {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.teacher-group-detail-statistics article {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.teacher-group-detail-statistics article:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.29);
    box-shadow: var(--shadow-medium);
}

.teacher-group-detail-statistics article>span {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 17px;
}

.teacher-group-detail-statistics article:nth-child(2)>span {
    color: var(--success);
    background: var(--success-light);
}

.teacher-group-detail-statistics article:nth-child(3)>span {
    color: var(--secondary);
    background: var(--secondary-light);
}

.teacher-group-detail-statistics article:nth-child(4)>span {
    color: var(--warning);
    background: var(--warning-light);
}

.teacher-group-detail-statistics article:nth-child(5)>span {
    color: var(--dark);
    background: var(--background);
}

.teacher-group-detail-statistics article>div {
    min-width: 0;
}

.teacher-group-detail-statistics small {
    display: block;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-detail-statistics strong {
    display: block;
    margin-top: 5px;
    color: var(--dark);
    font-size: 20px;
    line-height: 1;
}

/* =========================================================
   ASOSIY JOYLASHUV
   ========================================================= */

.teacher-group-detail-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.65fr) minmax(285px, 0.72fr);
    align-items: start;
    gap: 20px;
}

.teacher-group-detail-main,
.teacher-group-detail-side {
    display: grid;
    gap: 20px;
}

/* =========================================================
   O‘QUVCHILAR JADVALI
   ========================================================= */

.teacher-group-student-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.teacher-group-student-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.teacher-group-student-table th {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    background: var(--background);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.teacher-group-student-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-light);
    font-size: 10px;
    vertical-align: middle;
}

.teacher-group-student-table tbody tr {
    transition: background var(--transition);
}

.teacher-group-student-table tbody tr:hover {
    background:
        linear-gradient(90deg,
            rgba(219, 234, 254, 0.38),
            rgba(255, 255, 255, 0.95));
}

.teacher-group-student-table tbody tr:last-child td {
    border-bottom: none;
}

.teacher-group-student-person {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 210px;
}

.teacher-group-student-person>span {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 41px;
    height: 41px;
    border-radius: 12px;
    color: var(--white);
    background:
        linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    font-size: 11px;
    font-weight: 800;
}

.teacher-group-student-person>div {
    min-width: 0;
}

.teacher-group-student-person strong {
    display: block;
    overflow: hidden;
    color: var(--dark);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-student-person small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-remove-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(220, 38, 38, 0.23);
    border-radius: 10px;
    color: var(--danger);
    background: var(--danger-light);
    cursor: pointer;
    font-size: 11px;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.teacher-group-remove-button:hover {
    color: var(--white);
    border-color: var(--danger);
    background: var(--danger);
    transform: translateY(-2px);
}

/* =========================================================
   TEST BIRIKTIRISHLARI
   ========================================================= */

.teacher-group-assignment-list {
    display: grid;
}

.teacher-group-assignment-item {
    display: grid;
    grid-template-columns:
        minmax(210px, 1.15fr) minmax(265px, 1fr);
    gap: 15px 20px;
    padding: 17px 19px;
    border-bottom: 1px solid var(--border);
}

.teacher-group-assignment-item:last-child {
    border-bottom: none;
}

.teacher-group-assignment-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.teacher-group-assignment-main>span {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 13px;
    color: var(--secondary);
    background: var(--secondary-light);
    font-size: 16px;
}

.teacher-group-assignment-main>div {
    min-width: 0;
}

.teacher-group-assignment-main strong {
    display: block;
    overflow: hidden;
    color: var(--dark);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-assignment-main small {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-assignment-data {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.teacher-group-assignment-data>span {
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--text-muted);
    background: var(--background);
    font-size: 7px;
}

.teacher-group-assignment-data strong {
    display: block;
    margin-top: 4px;
    color: var(--dark);
    font-size: 10px;
}

.teacher-group-progress-line {
    grid-column: 1 / -1;
    overflow: hidden;
    height: 7px;
    border-radius: 999px;
    background: var(--background);
}

.teacher-group-progress-line>span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg,
            var(--primary),
            var(--secondary));
}

.teacher-group-assignment-footer {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.teacher-group-assignment-footer>div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 12px;
}

.teacher-group-assignment-footer small {
    color: var(--text-muted);
    font-size: 8px;
}

.teacher-group-assignment-action-form {
    display: flex;
    gap: 7px;
}

.teacher-group-assignment-action-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--primary);
    background: var(--background);
    cursor: pointer;
    font-size: 11px;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.teacher-group-assignment-action-form button:hover {
    color: var(--white);
    border-color: var(--primary);
    background: var(--primary);
    transform: translateY(-2px);
}

.teacher-group-assignment-action-form button.danger {
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.22);
    background: var(--danger-light);
}

.teacher-group-assignment-action-form button.danger:hover {
    color: var(--white);
    border-color: var(--danger);
    background: var(--danger);
}

/* =========================================================
   HOLAT BELGILARI
   ========================================================= */

.teacher-group-detail-section .organization-status-badge.status-active {
    color: var(--success);
    background: var(--success-light);
}

.teacher-group-detail-section .organization-status-badge.status-completed {
    color: var(--primary);
    background: var(--primary-light);
}

.teacher-group-detail-section .organization-status-badge.status-cancelled,
.teacher-group-detail-section .organization-status-badge.status-archived {
    color: var(--text-muted);
    background: var(--background);
}

/* =========================================================
   REYTING
   ========================================================= */

.teacher-group-ranking-list {
    display: grid;
}

.teacher-group-ranking-item {
    display: grid;
    grid-template-columns:
        42px minmax(0, 1fr) minmax(85px, auto) minmax(85px, auto);
    align-items: center;
    gap: 13px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.teacher-group-ranking-item:last-child {
    border-bottom: none;
}

.teacher-group-ranking-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 11px;
    font-weight: 800;
}

.teacher-group-ranking-item:nth-child(1) .teacher-group-ranking-position {
    color: #92400e;
    background: #fef3c7;
}

.teacher-group-ranking-item:nth-child(2) .teacher-group-ranking-position {
    color: #475569;
    background: #e2e8f0;
}

.teacher-group-ranking-item:nth-child(3) .teacher-group-ranking-position {
    color: #9a3412;
    background: #ffedd5;
}

.teacher-group-ranking-item>div {
    min-width: 0;
}

.teacher-group-ranking-item>div:nth-child(2) strong {
    display: block;
    overflow: hidden;
    color: var(--dark);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-group-ranking-item small,
.teacher-group-ranking-item>div:nth-child(n + 3) span {
    display: block;
    color: var(--text-muted);
    font-size: 8px;
}

.teacher-group-ranking-item>div:nth-child(n + 3) strong {
    display: block;
    margin-top: 4px;
    color: var(--primary);
    font-size: 12px;
}

/* =========================================================
   YON FORMALAR
   ========================================================= */

.teacher-group-detail-form {
    display: grid;
    gap: 14px;
    padding: 17px;
}

.teacher-group-detail-form .form-group {
    min-width: 0;
    margin: 0;
}

.teacher-group-detail-form label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 9px;
    font-weight: 800;
}

.teacher-group-detail-form input,
.teacher-group-detail-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    outline: none;
    border-radius: 11px;
    color: var(--dark);
    background: var(--background);
    font-size: 10px;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.teacher-group-detail-form input:focus,
.teacher-group-detail-form select:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1);
}

.teacher-group-detail-form .button {
    width: 100%;
}

.teacher-group-detail-form .button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.teacher-group-form-note {
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.6;
    text-align: center;
}

/* =========================================================
   GURUH MA’LUMOTLARI
   ========================================================= */

.teacher-group-information-list {
    display: grid;
}

.teacher-group-information-list article {
    display: grid;
    gap: 6px;
    padding: 14px 17px;
    border-bottom: 1px solid var(--border);
}

.teacher-group-information-list article:last-child {
    border-bottom: none;
}

.teacher-group-information-list span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 8px;
}

.teacher-group-information-list span i {
    color: var(--primary);
}

.teacher-group-information-list strong {
    color: var(--dark);
    font-size: 10px;
    overflow-wrap: anywhere;
}

/* =========================================================
   BO‘SH HOLAT
   ========================================================= */

.teacher-group-detail-section .organization-small-empty {
    padding: 42px 20px;
    color: var(--text-muted);
    font-size: 9px;
    text-align: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .teacher-group-detail-statistics {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .teacher-group-detail-layout {
        grid-template-columns:
            minmax(0, 1.35fr) minmax(270px, 0.7fr);
    }
}

@media (max-width: 950px) {
    .teacher-group-detail-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-group-detail-code {
        width: 100%;
        min-width: 0;
    }

    .teacher-group-detail-layout {
        grid-template-columns: 1fr;
    }

    .teacher-group-detail-side {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 750px) {
    .teacher-group-detail-section {
        padding: 25px 0 85px;
    }

    .teacher-group-detail-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-group-detail-statistics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .teacher-group-detail-side {
        grid-template-columns: 1fr;
    }

    .teacher-group-assignment-item {
        grid-template-columns: 1fr;
    }

    .teacher-group-assignment-data {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .teacher-group-ranking-item {
        grid-template-columns:
            40px minmax(0, 1fr) auto;
    }

    .teacher-group-ranking-item>div:last-child {
        grid-column: 2 / -1;
    }
}

@media (max-width: 560px) {
    .teacher-group-detail-hero {
        padding: 18px;
        border-radius: 17px;
    }

    .teacher-group-detail-icon {
        width: 59px;
        height: 59px;
        border-radius: 17px;
        font-size: 22px;
    }

    .teacher-group-detail-statistics {
        grid-template-columns: 1fr;
    }

    .teacher-group-detail-statistics article {
        padding: 14px;
    }

    .teacher-group-assignment-data {
        grid-template-columns: 1fr;
    }

    .teacher-group-assignment-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .teacher-group-assignment-action-form,
    .teacher-group-assignment-action-form button {
        width: 100%;
    }

    .teacher-group-ranking-item {
        grid-template-columns:
            38px minmax(0, 1fr);
    }

    .teacher-group-ranking-item>div:nth-child(n + 3) {
        grid-column: 2;
    }
}

/* =========================================================
   O‘QUVCHI — GURUHGA QO‘SHILISH SAHIFASI
   ========================================================= */

.join-group-section {
    min-height: calc(100vh - 76px);
    padding: 38px 0 110px;
    background:
        radial-gradient(circle at 8% 10%,
            rgba(37, 99, 235, 0.08),
            transparent 28%),
        radial-gradient(circle at 95% 85%,
            rgba(124, 58, 237, 0.07),
            transparent 30%),
        var(--background);
}

/* =========================================================
   ASOSIY JOYLASHUV
   ========================================================= */

.join-group-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr) minmax(280px, 0.7fr);
    align-items: start;
    gap: 22px;
}

.join-group-main,
.join-group-side {
    display: grid;
    gap: 20px;
}

/* =========================================================
   KOD KIRITISH PANELI
   ========================================================= */

.join-group-form-panel {
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.24);
    box-shadow:
        0 18px 45px rgba(37, 99, 235, 0.1);
}

.join-group-total-badge {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.join-group-form {
    display: grid;
    gap: 17px;
    padding: 24px;
}

.join-group-form .form-group {
    min-width: 0;
    margin: 0;
}

.join-group-form label {
    display: block;
    margin-bottom: 9px;
    color: var(--text);
    font-size: 10px;
    font-weight: 800;
}

.join-group-code-input {
    position: relative;
}

.join-group-code-input>i {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    color: var(--primary);
    font-size: 14px;
    transform: translateY(-50%);
}

.join-group-code-input input {
    width: 100%;
    min-height: 55px;
    padding: 13px 16px 13px 45px;
    border: 1px solid var(--border);
    outline: none;
    border-radius: 14px;
    color: var(--dark);
    background:
        linear-gradient(135deg,
            var(--background),
            var(--white));
    font-family: monospace;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.join-group-code-input input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1);
}

.join-group-code-input input::placeholder {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.join-group-form .form-helper {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.65;
}

.join-group-form .form-helper strong {
    color: var(--primary);
    font-family: monospace;
}

.join-group-form>.button {
    justify-self: flex-start;
}

/* =========================================================
   GURUHLAR RO‘YXATI
   ========================================================= */

.join-group-list {
    display: grid;
}

.join-group-item {
    display: grid;
    grid-template-columns:
        50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 17px 19px;
    border-bottom: 1px solid var(--border);
    transition:
        background var(--transition),
        transform var(--transition);
}

.join-group-item:last-child {
    border-bottom: none;
}

.join-group-item:hover {
    background:
        linear-gradient(90deg,
            rgba(219, 234, 254, 0.4),
            rgba(255, 255, 255, 0.96));
}

.join-group-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    font-size: 18px;
}

.join-group-item-icon.teacher {
    color: var(--primary);
    background:
        linear-gradient(135deg,
            var(--primary-light),
            var(--white));
}

.join-group-item-icon.organization {
    color: var(--secondary);
    background:
        linear-gradient(135deg,
            var(--secondary-light),
            var(--white));
}

.join-group-item>div {
    min-width: 0;
}

.join-group-item strong {
    display: block;
    overflow: hidden;
    color: var(--dark);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.join-group-item p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 9px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.join-group-item small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 8px;
}

.join-group-item code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 155px;
    padding: 8px 10px;
    overflow: hidden;
    border: 1px dashed rgba(37, 99, 235, 0.3);
    border-radius: 9px;
    color: var(--primary);
    background: var(--primary-light);
    font-family: monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   KOD TURLARI
   ========================================================= */

.join-group-type-list {
    display: grid;
}

.join-group-type-list article {
    display: grid;
    grid-template-columns:
        46px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 17px;
    border-bottom: 1px solid var(--border);
}

.join-group-type-list article:last-child {
    border-bottom: none;
}

.join-group-type-list article>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 16px;
}

.join-group-type-list article:nth-child(2)>span {
    color: var(--secondary);
    background: var(--secondary-light);
}

.join-group-type-list article>div {
    min-width: 0;
}

.join-group-type-list code {
    display: inline-block;
    margin-bottom: 6px;
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--primary);
    background: var(--background);
    font-family: monospace;
    font-size: 9px;
    font-weight: 800;
}

.join-group-type-list strong {
    display: block;
    color: var(--dark);
    font-size: 10px;
}

.join-group-type-list p {
    margin-top: 5px;
    color: var(--text-light);
    font-size: 8px;
    line-height: 1.6;
}

/* =========================================================
   XAVFSIZLIK BLOKI
   ========================================================= */

.join-group-security-note {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 18px;
}

.join-group-security-note>span {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: var(--success);
    background: var(--success-light);
    font-size: 17px;
}

.join-group-security-note p {
    color: var(--text-light);
    font-size: 9px;
    line-height: 1.7;
}

.join-group-security-note strong {
    color: var(--dark);
    font-family: monospace;
    font-size: 8px;
}

/* =========================================================
   BO‘SH HOLAT
   ========================================================= */

.join-group-section .organization-small-empty {
    padding: 46px 22px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.7;
    text-align: center;
}

/* =========================================================
   XABARLAR
   ========================================================= */

.join-group-section .form-alert {
    margin-bottom: 20px;
}

.join-group-section .form-error {
    display: block;
    min-height: 15px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 8px;
}

.join-group-section .has-error input {
    border-color: rgba(220, 38, 38, 0.5);
    background: var(--danger-light);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .join-group-layout {
        grid-template-columns: 1fr;
    }

    .join-group-side {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .join-group-section {
        padding: 25px 0 85px;
    }

    .join-group-side {
        grid-template-columns: 1fr;
    }

    .join-group-item {
        grid-template-columns:
            46px minmax(0, 1fr);
    }

    .join-group-item code {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
    }

    .join-group-form>.button {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .join-group-form {
        padding: 17px;
    }

    .join-group-code-input input {
        min-height: 50px;
        font-size: 12px;
    }

    .join-group-item {
        padding: 14px;
    }

    .join-group-item-icon {
        width: 45px;
        height: 45px;
    }

    .join-group-type-list article {
        grid-template-columns: 1fr;
    }

    .join-group-security-note {
        flex-direction: column;
    }
}

/* =========================================================
   O‘QUVCHI DASHBOARDI — BIRIKTIRILGAN TESTLAR
   ========================================================= */

.student-assigned-tests {
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.student-assigned-test-list {
    display: grid;
}

/* =========================================================
   TEST KARTASI
   ========================================================= */

.student-assigned-test-item {
    position: relative;
    display: grid;
    grid-template-columns:
        minmax(260px, 1.3fr) minmax(190px, 0.8fr) minmax(130px, auto);
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    transition:
        background var(--transition),
        transform var(--transition);
}

.student-assigned-test-item:last-child {
    border-bottom: none;
}

.student-assigned-test-item:hover {
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(219, 234, 254, 0.42),
            rgba(255, 255, 255, 0.98));
}

.student-assigned-test-item::before {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--primary);
    content: "";
}

.student-assigned-test-item.source-organization::before {
    background: var(--secondary);
}

/* =========================================================
   TESTNING ASOSIY MA’LUMOTI
   ========================================================= */

.student-assigned-test-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
}

.student-assigned-test-icon {
    display: inline-flex;
    flex: 0 0 50px;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    font-size: 18px;
}

.student-assigned-test-icon.teacher {
    color: var(--primary);
    background:
        linear-gradient(135deg,
            var(--primary-light),
            var(--white));
    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.12);
}

.student-assigned-test-icon.organization {
    color: var(--secondary);
    background:
        linear-gradient(135deg,
            var(--secondary-light),
            var(--white));
    box-shadow:
        0 10px 24px rgba(124, 58, 237, 0.12);
}

.student-assigned-test-main>div {
    min-width: 0;
}

.student-assigned-test-source {
    display: block;
    overflow: hidden;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.source-organization .student-assigned-test-source {
    color: var(--secondary);
}

.student-assigned-test-main strong {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: var(--dark);
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-assigned-test-main small {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =========================================================
   TEST HOLATI VA SANALAR
   ========================================================= */

.student-assigned-test-details {
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 7px;
    min-width: 0;
}

.student-assigned-test-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}

.student-assigned-test-status.status-available {
    color: var(--success);
    background: var(--success-light);
}

.student-assigned-test-status.status-in_progress {
    color: var(--primary);
    background: var(--primary-light);
}

.student-assigned-test-status.status-completed {
    color: var(--secondary);
    background: var(--secondary-light);
}

.student-assigned-test-status.status-upcoming {
    color: var(--warning);
    background: var(--warning-light);
}

.student-assigned-test-status.status-expired,
.student-assigned-test-status.status-cancelled,
.student-assigned-test-status.status-unavailable {
    color: var(--text-muted);
    background: var(--background);
}

.student-assigned-test-details small {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-assigned-test-details small i {
    flex-shrink: 0;
    color: var(--primary);
}

/* =========================================================
   TEST AMALI
   ========================================================= */

.student-assigned-test-action {
    display: grid;
    justify-items: end;
    gap: 8px;
    min-width: 125px;
}

.student-assigned-test-action>strong {
    color: var(--success);
    font-size: 18px;
    line-height: 1;
}

.student-assigned-test-action .button {
    min-width: 125px;
    justify-content: center;
    white-space: nowrap;
}

.student-assigned-test-disabled {
    cursor: not-allowed;
    opacity: 0.58;
    pointer-events: none;
}

/* =========================================================
   TEST HOLATIGA QARAB KARTA KO‘RINISHI
   ========================================================= */

.student-assigned-test-item:has(.status-completed) {
    background:
        linear-gradient(90deg,
            rgba(220, 252, 231, 0.24),
            var(--white));
}

.student-assigned-test-item:has(.status-upcoming) {
    background:
        linear-gradient(90deg,
            rgba(254, 243, 199, 0.24),
            var(--white));
}

.student-assigned-test-item:has(.status-expired),
.student-assigned-test-item:has(.status-cancelled),
.student-assigned-test-item:has(.status-unavailable) {
    opacity: 0.76;
}

/* =========================================================
   BO‘SH HOLAT
   ========================================================= */

.student-assigned-tests .dashboard-results-empty {
    min-height: 320px;
    padding: 46px 24px;
}

.student-assigned-tests .dashboard-results-empty .dashboard-empty-icon {
    display: inline-flex;
    width: 72px;
    height: 72px;
    align-items: center;
    justify-content: center;
    border-radius: 21px;
    color: var(--primary);
    background:
        linear-gradient(135deg,
            var(--primary-light),
            var(--secondary-light));
    font-size: 25px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .student-assigned-test-item {
        grid-template-columns:
            minmax(250px, 1.2fr) minmax(180px, 0.8fr);
    }

    .student-assigned-test-action {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .student-assigned-test-item {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 17px;
    }

    .student-assigned-test-details {
        padding: 12px;
        border-radius: 11px;
        background: var(--background);
    }

    .student-assigned-test-action {
        grid-column: auto;
        justify-content: space-between;
    }

    .student-assigned-test-action .button {
        min-width: 140px;
    }
}

@media (max-width: 500px) {
    .student-assigned-test-main {
        align-items: flex-start;
    }

    .student-assigned-test-icon {
        flex-basis: 45px;
        width: 45px;
        height: 45px;
        border-radius: 13px;
        font-size: 16px;
    }

    .student-assigned-test-main strong {
        white-space: normal;
    }

    .student-assigned-test-main small {
        display: -webkit-box;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .student-assigned-test-action {
        align-items: stretch;
        flex-direction: column;
    }

    .student-assigned-test-action>strong {
        text-align: center;
    }

    .student-assigned-test-action .button {
        width: 100%;
        min-width: 0;
    }
}

.notification-button {
    position: relative;
}

.notification-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--white);
    border-radius: 999px;
    color: var(--white);
    background: var(--danger);
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

/* =========================================================
   BILDIRISHNOMALAR SAHIFASI
   ========================================================= */

.notifications-section {
    min-height: calc(100vh - 76px);
    padding: 38px 0 110px;
    background:
        radial-gradient(circle at 8% 12%,
            rgba(37, 99, 235, 0.08),
            transparent 28%),
        radial-gradient(circle at 93% 82%,
            rgba(124, 58, 237, 0.07),
            transparent 30%),
        var(--background);
}

.notifications-container {
    max-width: 1280px;
}

/* =========================================================
   SAHIFA SARLAVHASI
   ========================================================= */

.notifications-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.notifications-page-header>div:first-child {
    min-width: 0;
}

.notifications-page-header h1 {
    margin-top: 14px;
    color: var(--dark);
    font-size: clamp(29px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.notifications-page-header p {
    max-width: 670px;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.7;
}

.notifications-header-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
}

.notifications-header-actions form {
    margin: 0;
}

/* =========================================================
   STATISTIKA VA FILTRLAR
   ========================================================= */

.notifications-statistics {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.notifications-statistics>a {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 17px;
    color: inherit;
    background: var(--white);
    box-shadow: var(--shadow-small);
    text-decoration: none;
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.notifications-statistics>a:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow-medium);
}

.notifications-statistics>a.active {
    border-color: rgba(37, 99, 235, 0.34);
    background:
        linear-gradient(135deg,
            rgba(219, 234, 254, 0.75),
            rgba(255, 255, 255, 0.98));
    box-shadow:
        0 15px 38px rgba(37, 99, 235, 0.1);
}

.notifications-statistics>a>span {
    display: inline-flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 17px;
}

.notifications-statistics>a:nth-child(2)>span {
    color: var(--danger);
    background: var(--danger-light);
}

.notifications-statistics>a:nth-child(3)>span {
    color: var(--success);
    background: var(--success-light);
}

.notifications-statistics>a>div {
    min-width: 0;
}

.notifications-statistics small {
    display: block;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
}

.notifications-statistics strong {
    display: block;
    margin-top: 5px;
    color: var(--dark);
    font-size: 21px;
    line-height: 1;
}

/* =========================================================
   ASOSIY PANEL
   ========================================================= */

.notifications-panel {
    overflow: hidden;
    border-radius: 20px;
}

.notifications-list {
    display: grid;
}

/* =========================================================
   BILDIRISHNOMA ELEMENTI
   ========================================================= */

.notification-item {
    position: relative;
    display: grid;
    grid-template-columns:
        52px minmax(0, 1fr) minmax(185px, auto);
    align-items: center;
    gap: 16px;
    padding: 19px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    transition:
        background var(--transition),
        transform var(--transition);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(219, 234, 254, 0.35),
            rgba(255, 255, 255, 0.98));
}

.notification-item::before {
    position: absolute;
    top: 13px;
    bottom: 13px;
    left: 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: transparent;
    content: "";
}

.notification-item.is-unread::before {
    background: var(--primary);
}

.notification-item.is-read {
    opacity: 0.78;
}

/* =========================================================
   BILDIRISHNOMA IKONKASI
   ========================================================= */

.notification-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    color: var(--primary);
    background:
        linear-gradient(135deg,
            var(--primary-light),
            var(--white));
    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.11);
    font-size: 18px;
}

.notification-item.type-group_test_completed .notification-item-icon {
    color: var(--success);
    background:
        linear-gradient(135deg,
            var(--success-light),
            var(--white));
}

.notification-item.type-organization_test_completed .notification-item-icon {
    color: var(--secondary);
    background:
        linear-gradient(135deg,
            var(--secondary-light),
            var(--white));
}

.notification-item.type-system .notification-item-icon {
    color: var(--warning);
    background:
        linear-gradient(135deg,
            var(--warning-light),
            var(--white));
}

/* =========================================================
   BILDIRISHNOMA MATNI
   ========================================================= */

.notification-item-content {
    min-width: 0;
}

.notification-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 13px;
}

.notification-item-meta>span {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.notification-item-meta time {
    color: var(--text-muted);
    font-size: 8px;
}

.notification-item-content h3 {
    margin-top: 8px;
    overflow: hidden;
    color: var(--dark);
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item-content p {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 9px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* =========================================================
   AMALLAR
   ========================================================= */

.notification-item-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
    min-width: 180px;
}

.notification-item-actions form {
    width: 100%;
    margin: 0;
}

.notification-item-actions .button {
    width: 100%;
    min-height: 39px;
    justify-content: center;
    padding: 9px 12px;
    font-size: 8px;
    white-space: nowrap;
}

.notification-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 7px;
    font-weight: 800;
}

.notification-mark-read-button {
    display: inline-flex;
    width: 100%;
    min-height: 37px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--success);
    background: var(--success-light);
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.notification-mark-read-button:hover {
    color: var(--white);
    border-color: var(--success);
    background: var(--success);
    transform: translateY(-2px);
}

/* =========================================================
   BO‘SH HOLAT
   ========================================================= */

.notifications-empty-state {
    min-height: 360px;
    padding: 50px 24px;
}

.notifications-empty-state .dashboard-empty-icon {
    display: inline-flex;
    width: 76px;
    height: 76px;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: var(--primary);
    background:
        linear-gradient(135deg,
            var(--primary-light),
            var(--secondary-light));
    font-size: 27px;
}

/* =========================================================
   SAHIFALASH
   ========================================================= */

.notifications-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.notifications-pagination a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-small);
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition);
}

.notifications-pagination a:hover {
    color: var(--white);
    border-color: var(--primary);
    background: var(--primary);
    transform: translateY(-2px);
}

.notifications-pagination span {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 800;
}

/* =========================================================
   DASHBOARDDAGI QO‘NG‘IROQ SONI
   ========================================================= */

.notification-button {
    position: relative;
}

.notification-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    display: inline-flex;
    min-width: 19px;
    height: 19px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--white);
    border-radius: 999px;
    color: var(--white);
    background: var(--danger);
    box-shadow:
        0 5px 14px rgba(220, 38, 38, 0.25);
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {
    .notifications-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .notifications-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .notifications-header-actions form,
    .notifications-header-actions .button {
        flex: 1;
    }

    .notification-item {
        grid-template-columns:
            50px minmax(0, 1fr);
    }

    .notification-item-actions {
        grid-column: 1 / -1;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .notification-unread-badge {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 700px) {
    .notifications-section {
        padding: 25px 0 85px;
    }

    .notifications-statistics {
        grid-template-columns: 1fr;
    }

    .notifications-statistics>a {
        padding: 15px;
    }

    .notifications-header-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .notifications-header-actions .button {
        width: 100%;
    }

    .notification-item {
        padding: 16px;
    }
}

@media (max-width: 520px) {
    .notification-item {
        grid-template-columns: 1fr;
    }

    .notification-item-icon {
        width: 47px;
        height: 47px;
        border-radius: 14px;
        font-size: 16px;
    }

    .notification-item-content h3 {
        white-space: normal;
    }

    .notification-item-actions {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .notification-unread-badge {
        grid-column: auto;
    }

    .notifications-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .notifications-pagination a {
        width: 100%;
    }

    .notifications-pagination span {
        text-align: center;
    }
}

/* BILDIRISHNOMALAR — JOYLASHUV TUZATISHI */

.notifications-page-header {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 24px !important;
    margin-bottom: 22px !important;
}

.notifications-header-actions {
    display: flex !important;
    flex-shrink: 0 !important;
    align-items: center !important;
    gap: 10px !important;
}

.notifications-statistics {
    display: grid !important;
    grid-template-columns:
        repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin-bottom: 22px !important;
}

.notifications-statistics>a {
    display: flex !important;
    min-width: 0 !important;
    align-items: center !important;
    gap: 13px !important;
    padding: 18px !important;
    border: 1px solid var(--border) !important;
    border-radius: 17px !important;
    color: inherit !important;
    background: var(--white) !important;
    box-shadow: var(--shadow-small) !important;
    text-decoration: none !important;
}

.notifications-statistics>a>span {
    display: inline-flex !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 48px !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 14px !important;
    color: var(--primary) !important;
    background: var(--primary-light) !important;
    font-size: 17px !important;
}

.notifications-statistics>a>div {
    min-width: 0 !important;
}

.notifications-statistics small {
    display: block !important;
    color: var(--text-muted) !important;
    font-size: 9px !important;
    font-weight: 700 !important;
}

.notifications-statistics strong {
    display: block !important;
    margin-top: 5px !important;
    color: var(--dark) !important;
    font-size: 21px !important;
    line-height: 1 !important;
}

@media (max-width: 700px) {
    .notifications-page-header {
        align-items: flex-start !important;
        flex-direction: column !important;
    }

    .notifications-header-actions {
        width: 100% !important;
    }

    .notifications-header-actions .button {
        width: 100% !important;
    }

    .notifications-statistics {
        grid-template-columns: 1fr !important;
    }
}