:root {
    --navy: #0d2368;
    --navy-950: #071235;
    --sky: #78bedc;
    --green: #2d806f;
    --gold: #f2c77f;
    --ink: #172033;
    --muted: #687289;
    --line: rgba(16, 35, 104, 0.13);
    --surface: #ffffff;
    --page: #f7f8fb;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --shadow: 0 24px 70px rgba(7, 18, 53, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(13, 35, 104, 0.06), transparent 34%),
        linear-gradient(315deg, rgba(45, 128, 111, 0.08), transparent 42%),
        var(--page);
    color: var(--ink);
    font-family: "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(380px, 560px);
    overflow: hidden;
}

.brand-panel {
    position: relative;
    padding: clamp(34px, 7vw, 92px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 38px;
    color: white;
    background:
        linear-gradient(145deg, rgba(7, 18, 53, 0.98), rgba(13, 35, 104, 0.96) 58%, rgba(18, 53, 95, 0.98)),
        var(--navy-950);
    isolation: isolate;
}

.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    inset: auto;
    z-index: -1;
    pointer-events: none;
}

.brand-panel::before {
    width: 58%;
    height: 58%;
    left: -18%;
    top: -12%;
    background: radial-gradient(circle, rgba(120, 190, 220, 0.42), transparent 65%);
}

.brand-panel::after {
    width: 70%;
    height: 70%;
    right: -26%;
    bottom: -18%;
    background: radial-gradient(circle, rgba(242, 199, 127, 0.30), transparent 64%);
}

.brand-glow {
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    pointer-events: none;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand-logo {
    width: clamp(132px, 16vw, 210px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 26px;
    background: white;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.brand-lockup h1,
.brand-copy h2,
.dashboard-header h1 {
    margin: 0;
    letter-spacing: 0;
}

.brand-lockup h1 {
    font-size: clamp(42px, 6vw, 82px);
    line-height: 1;
    color: white;
}

.brand-copy {
    max-width: 620px;
}

.brand-copy h2 {
    max-width: 620px;
    font-size: clamp(34px, 4.4vw, 62px);
    line-height: 1.12;
    color: white;
}

.brand-copy p,
.panel-heading p,
.dashboard-card p,
.dashboard-header p {
    color: var(--muted);
    line-height: 1.8;
}

.brand-copy p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 18px;
}

.brand-strip {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1.45fr;
    gap: 10px;
    width: min(420px, 100%);
}

.brand-strip span {
    height: 8px;
    border-radius: 999px;
}

.brand-strip span:nth-child(1) {
    background: var(--gold);
}

.brand-strip span:nth-child(2) {
    background: var(--sky);
}

.brand-strip span:nth-child(3) {
    background: var(--green);
}

.brand-strip span:nth-child(4) {
    background: white;
    opacity: 0.88;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--green);
    font-weight: 800;
}

.brand-panel .eyebrow {
    color: var(--gold);
}

.login-panel {
    padding: clamp(24px, 5vw, 64px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: min(100%, 480px);
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.portal-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 7px;
    margin-bottom: 30px;
    background: rgba(13, 35, 104, 0.07);
    border: 1px solid rgba(13, 35, 104, 0.08);
    border-radius: 14px;
}

.portal-tabs a {
    min-height: 46px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 800;
}

.portal-tabs a.active {
    background: var(--surface);
    color: var(--navy);
    box-shadow: 0 10px 28px rgba(16, 38, 111, 0.14);
}

.panel-heading h2 {
    margin: 0;
    color: var(--navy-950);
    font-size: 34px;
    letter-spacing: 0;
}

.alert {
    padding: 14px 16px;
    border: 1px solid #ffccc7;
    border-radius: 12px;
    color: var(--danger);
    background: var(--danger-bg);
    font-weight: 700;
}

.login-form {
    display: grid;
    gap: 18px;
    margin-top: 26px;
}

.login-form label {
    display: grid;
    gap: 9px;
    color: var(--navy-950);
    font-weight: 800;
}

.login-form input,
.login-form select,
.country-form input,
.country-edit-form input {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font: inherit;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-form select {
    cursor: pointer;
}

.login-form input:focus,
.login-form select:focus,
.country-form input:focus,
.country-edit-form input:focus {
    outline: 4px solid rgba(120, 190, 220, 0.27);
    border-color: var(--sky);
}

.login-form button,
.logout-link,
.country-form button,
.inline-actions button,
.country-list button,
.country-edit-form button,
.country-name-form button,
.country-actions button {
    min-height: 56px;
    border: 0;
    border-radius: 14px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--navy), var(--green));
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-grid;
    place-items: center;
    box-shadow: 0 18px 38px rgba(13, 35, 104, 0.24);
}

.login-form button:hover,
.logout-link:hover,
.country-form button:hover,
.inline-actions button:hover,
.country-list button:hover,
.country-edit-form button:hover,
.country-name-form button:hover,
.country-actions button:hover {
    transform: translateY(-1px);
}

.secondary-button,
.login-form .secondary-button,
.country-list .secondary-button,
.country-edit-form .secondary-button,
.country-actions .secondary-button {
    background: linear-gradient(135deg, var(--gold), #d9a755);
    color: var(--navy-950);
}

.danger-button,
.inline-actions .danger-button,
.country-actions .danger-button {
    background: linear-gradient(135deg, #c0392b, #8f1e17);
}

.muted-button,
.country-actions .muted-button {
    background: rgba(13, 35, 104, 0.08);
    color: var(--navy);
    border: 1px solid rgba(13, 35, 104, 0.12);
}

.alert.success {
    border-color: rgba(45, 128, 111, 0.24);
    color: var(--green);
    background: rgba(45, 128, 111, 0.10);
}

.student-register {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.signup-prompt {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.signup-prompt button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    place-items: center;
    padding: 22px;
    background: rgba(7, 18, 53, 0.62);
    backdrop-filter: blur(10px);
}

.modal-backdrop.is-open {
    display: grid;
}

.register-modal {
    position: relative;
    width: min(100%, 520px);
    max-height: min(90vh, 760px);
    overflow: auto;
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.30);
}

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: white;
    color: var(--navy-950);
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.panel-heading.compact h2 {
    font-size: 26px;
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
    background:
        linear-gradient(135deg, rgba(120, 190, 220, 0.12), transparent 35%),
        linear-gradient(315deg, rgba(242, 199, 127, 0.18), transparent 38%),
        var(--page);
}

.sidebar {
    margin: 18px;
    padding: 28px;
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(7, 18, 53, 0.98), rgba(13, 35, 104, 0.97)),
        var(--navy-950);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 22px 60px rgba(7, 18, 53, 0.20);
}

.sidebar-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.sidebar-logo {
    width: 66px;
    height: 66px;
    border-radius: 16px;
    object-fit: cover;
    background: white;
}

.sidebar strong,
.sidebar span {
    display: block;
}

.sidebar strong {
    font-size: 26px;
}

.sidebar span {
    color: var(--gold);
    margin-top: 4px;
}

.sidebar-nav {
    width: 100%;
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-nav a {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(242, 199, 127, 0.42);
}

.portal-admin .sidebar-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.portal-admin .sidebar-nav a {
    width: 100%;
    min-height: 52px;
    justify-content: flex-start;
    font-size: 16px;
}

.dashboard-main {
    padding: clamp(24px, 5vw, 58px);
    min-width: 0;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: var(--navy);
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.08;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-card {
    min-height: 205px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 46px rgba(7, 18, 53, 0.10);
}

.dashboard-card span {
    width: 48px;
    height: 9px;
    display: block;
    border-radius: 999px;
    background: var(--gold);
}

.dashboard-card:nth-child(2) span {
    background: var(--sky);
}

.dashboard-card:nth-child(3) span {
    background: var(--green);
}

.dashboard-card h2 {
    margin: 30px 0 8px;
    color: var(--navy);
    font-size: 26px;
    letter-spacing: 0;
}

.admin-section {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 46px rgba(7, 18, 53, 0.09);
    overflow: hidden;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 28px;
}

.status-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(242, 199, 127, 0.28);
    color: var(--navy-950);
    font-weight: 800;
    white-space: nowrap;
}

.empty-state {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(247, 248, 251, 0.72);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 15px 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    vertical-align: middle;
}

th {
    color: var(--navy);
    font-weight: 800;
    background: rgba(13, 35, 104, 0.04);
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-actions button,
.country-list button {
    min-height: 40px;
    padding: 0 14px;
    box-shadow: none;
}

.country-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
}

.country-form label {
    display: grid;
    gap: 9px;
    color: var(--navy-950);
    font-weight: 800;
}

.countries-toolbar {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(247, 248, 251, 0.72);
    margin: 22px 0 18px;
}

.country-status {
    width: fit-content;
    min-width: 82px;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 800;
    text-align: center;
}

.country-status.active {
    color: var(--green);
    background: rgba(45, 128, 111, 0.12);
}

.country-status.inactive {
    color: #8f1e17;
    background: rgba(192, 57, 43, 0.10);
}

.students-wrap {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(7, 18, 53, 0.06);
}

.admin-data-table {
    width: 100%;
    min-width: 860px;
}

.admin-data-table th {
    padding: 16px 18px;
    color: var(--navy);
    background: rgba(13, 35, 104, 0.055);
    font-size: 15px;
}

.admin-data-table td {
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.62);
}

.admin-data-table tr:hover td {
    background: rgba(120, 190, 220, 0.08);
}

.student-status {
    display: inline-grid;
    min-width: 110px;
    padding: 8px 12px;
    border-radius: 999px;
    place-items: center;
    font-weight: 800;
}

.student-status.approved {
    color: var(--green);
    background: rgba(45, 128, 111, 0.12);
}

.student-status.pending {
    color: #8a5a00;
    background: rgba(242, 199, 127, 0.26);
}

.student-status.rejected {
    color: #8f1e17;
    background: rgba(192, 57, 43, 0.10);
}

.is-hidden {
    display: none !important;
}

.students-admin-table {
    width: 100%;
    min-width: 920px;
    table-layout: fixed;
}

.students-admin-table th {
    padding: 18px;
    color: var(--navy);
    background: rgba(13, 35, 104, 0.055);
    font-size: 15px;
}

.students-admin-table td {
    padding: 18px;
    background: rgba(255, 255, 255, 0.68);
}

.student-display-row:hover td {
    background: rgba(120, 190, 220, 0.08);
}

.students-admin-table th:nth-child(1),
.students-admin-table td:nth-child(1) {
    width: 31%;
}

.students-admin-table th:nth-child(2),
.students-admin-table td:nth-child(2) {
    width: 16%;
}

.students-admin-table th:nth-child(3),
.students-admin-table td:nth-child(3) {
    width: 15%;
}

.students-admin-table th:nth-child(4),
.students-admin-table td:nth-child(4) {
    width: 14%;
}

.students-admin-table th:nth-child(5),
.students-admin-table td:nth-child(5) {
    width: 24%;
}

.student-identity {
    display: grid;
    gap: 6px;
}

.student-identity strong {
    color: var(--navy);
    font-size: 18px;
}

.student-identity span {
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.student-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.student-row-actions form {
    margin: 0;
}

.student-action-button {
    min-height: 38px;
    border: 0;
    border-radius: 11px;
    padding: 0 14px;
    background: linear-gradient(135deg, var(--navy), var(--green));
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(13, 35, 104, 0.16);
    white-space: nowrap;
}

.student-action-button.gold {
    background: linear-gradient(135deg, var(--gold), #d9a755);
    color: var(--navy-950);
}

.student-action-button.danger {
    background: linear-gradient(135deg, #c0392b, #8f1e17);
}

.student-action-button.muted {
    color: var(--navy);
    background: rgba(13, 35, 104, 0.08);
    border: 1px solid rgba(13, 35, 104, 0.12);
    box-shadow: none;
}

.student-editor-row td {
    padding: 0 18px 18px;
    background: rgba(255, 255, 255, 0.68);
}

.student-editor-row td::before {
    display: none !important;
}

.student-edit-form,
.student-password-form {
    display: grid;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid rgba(13, 35, 104, 0.12);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13, 35, 104, 0.035), rgba(45, 128, 111, 0.04));
}

.student-edit-form {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
}

.student-password-form {
    grid-template-columns: minmax(240px, 380px) auto;
}

.student-edit-form label,
.student-password-form label {
    display: grid;
    gap: 8px;
    color: var(--navy-950);
    font-weight: 800;
}

.student-edit-form input,
.student-edit-form select,
.student-password-form input {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    color: var(--ink);
    background: white;
}

.student-form-actions {
    display: flex;
    align-items: end;
    gap: 8px;
}

.countries-wrap {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 28px rgba(7, 18, 53, 0.06);
}

.countries-admin-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.countries-admin-table th:nth-child(1),
.countries-admin-table td:nth-child(1) {
    width: 56%;
}

.countries-admin-table th:nth-child(2),
.countries-admin-table td:nth-child(2) {
    width: 14%;
}

.countries-admin-table th:nth-child(3),
.countries-admin-table td:nth-child(3) {
    width: 30%;
}

.countries-admin-table th {
    padding: 16px 18px;
    color: var(--navy);
    background: rgba(13, 35, 104, 0.055);
    font-size: 15px;
}

.countries-admin-table td {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.62);
}

.countries-admin-table tr:hover td {
    background: rgba(120, 190, 220, 0.08);
}

.country-name-form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 74px;
    gap: 10px;
    align-items: center;
}

.country-name-form input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    color: var(--ink);
    background: white;
}

.country-name-form button,
.country-actions button {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    box-shadow: none;
}

.country-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

@media (max-width: 920px) {
    .login-shell,
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 48vh;
        text-align: center;
        align-items: center;
    }

    .brand-lockup {
        flex-direction: column;
    }

    .dashboard-header,
    .sidebar {
        align-items: flex-start;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-main {
        padding: 22px;
        min-width: 0;
    }

    .countries-admin-table th:nth-child(1),
    .countries-admin-table td:nth-child(1),
    .countries-admin-table th:nth-child(2),
    .countries-admin-table td:nth-child(2),
    .countries-admin-table th:nth-child(3),
    .countries-admin-table td:nth-child(3) {
        width: auto;
    }

    .sidebar {
        margin: 14px;
        padding: 18px;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-nav a {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .brand-panel,
    .login-panel,
    .dashboard-main {
        padding: 22px;
    }

    .brand-glow {
        inset: 12px;
        border-radius: 20px;
    }

    .login-card,
    .dashboard-card,
    .sidebar {
        border-radius: 18px;
    }

    .portal-tabs {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .country-form {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .country-form button {
        width: 100%;
    }

    .countries-wrap {
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .countries-admin-table,
    .countries-admin-table thead,
    .countries-admin-table tbody,
    .countries-admin-table tr,
    .countries-admin-table th,
    .countries-admin-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .countries-admin-table thead {
        display: none;
    }

    .countries-admin-table tr {
        margin-bottom: 12px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.84);
        box-shadow: 0 10px 28px rgba(7, 18, 53, 0.06);
    }

    .countries-admin-table td {
        padding: 0;
        border-bottom: 0;
        background: transparent;
    }

    .countries-admin-table td + td {
        margin-top: 12px;
    }

    .countries-admin-table td::before {
        display: block;
        margin-bottom: 7px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
    }

    .countries-admin-table td:nth-child(1)::before {
        content: "الدولة";
    }

    .countries-admin-table td:nth-child(2)::before {
        content: "الحالة";
    }

    .countries-admin-table td:nth-child(3)::before {
        content: "الإجراءات";
    }

    .students-wrap {
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .students-admin-table,
    .students-admin-table thead,
    .students-admin-table tbody,
    .students-admin-table tr,
    .students-admin-table th,
    .students-admin-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .students-admin-table thead {
        display: none;
    }

    .students-admin-table tr {
        margin-bottom: 12px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.84);
        box-shadow: 0 10px 28px rgba(7, 18, 53, 0.06);
    }

    .students-admin-table td {
        padding: 0;
        border-bottom: 0;
        background: transparent;
        overflow-wrap: anywhere;
    }

    .students-admin-table td + td {
        margin-top: 12px;
    }

    .students-admin-table td::before {
        display: block;
        margin-bottom: 7px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
    }

    .students-admin-table td:nth-child(1)::before {
        content: "الطالب";
    }

    .students-admin-table td:nth-child(2)::before {
        content: "رقم الهاتف";
    }

    .students-admin-table td:nth-child(3)::before {
        content: "الدولة";
    }

    .students-admin-table td:nth-child(4)::before {
        content: "الحالة";
    }

    .students-admin-table td:nth-child(5)::before {
        content: "الإجراءات";
    }

    .students-admin-table .student-editor-row {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .students-admin-table .student-editor-row td {
        padding: 0 0 12px;
    }

    .student-status {
        min-width: 100%;
    }

    .student-edit-form,
    .student-form-actions,
    .student-password-form {
        grid-template-columns: 1fr;
    }

    .student-row-actions,
    .student-form-actions {
        display: grid;
    }

    .student-row-actions form {
        width: 100%;
    }

    .student-action-button {
        width: 100%;
    }

    .country-name-form {
        grid-template-columns: 1fr;
    }

    .country-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .country-actions form,
    .country-actions button {
        width: 100%;
    }

    .country-status {
        min-width: 100%;
    }
}

@media (max-width: 420px) {
    .brand-lockup h1,
    .brand-copy h2,
    .dashboard-header h1 {
        font-size: 34px;
    }

    .sidebar-brand {
        width: 100%;
        align-items: center;
    }

    .sidebar-logo {
        width: 54px;
        height: 54px;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 16px;
    }

    .section-heading {
        gap: 10px;
    }

    .section-heading h2 {
        font-size: 24px;
    }
}

.students-admin-table .student-row-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.students-admin-table .student-row-actions form {
    display: inline-flex;
    margin: 0;
}

.students-admin-table button.student-action-button,
.student-edit-form button.student-action-button,
.student-password-form button.student-action-button {
    appearance: none;
    -webkit-appearance: none;
    min-width: 74px;
    min-height: 40px;
    border: 0;
    border-radius: 12px;
    padding: 0 15px;
    background: linear-gradient(135deg, var(--navy), var(--green));
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(13, 35, 104, 0.18);
    white-space: nowrap;
}

.students-admin-table button.student-action-button.gold {
    background: linear-gradient(135deg, var(--gold), #d9a755);
    color: var(--navy-950);
}

.students-admin-table button.student-action-button.danger {
    background: linear-gradient(135deg, #c0392b, #8f1e17);
    color: #ffffff;
}

.student-edit-form button.student-action-button.muted,
.student-password-form button.student-action-button.muted {
    border: 1px solid rgba(13, 35, 104, 0.14);
    background: rgba(13, 35, 104, 0.08);
    color: var(--navy);
    box-shadow: none;
}

@media (max-width: 520px) {
    .students-admin-table .student-row-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .students-admin-table .student-row-actions form,
    .students-admin-table button.student-action-button,
    .student-edit-form button.student-action-button,
    .student-password-form button.student-action-button {
        width: 100%;
    }
}
