/* =========================================================
   SHAPERS TRAINING PLATFORM
   Modern responsive dashboard CSS
========================================================= */

:root {
    --primary: #1769aa;
    --primary-dark: #0d4f82;
    --primary-soft: #eaf5fb;

    --navy: #123c69;
    --cyan: #0ea5b7;
    --cyan-soft: #e8f9fb;
    --gold: #f4b942;

    --ink: #172033;
    --muted: #64748b;
    --muted-dark: #475569;

    --page-bg: #f3f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --border: #e2e8f0;
    --border-dark: #cbd5e1;

    --success: #15803d;
    --success-bg: #dcfce7;

    --danger: #b91c1c;
    --danger-bg: #fee2e2;

    --warning: #b45309;
    --warning-bg: #fef3c7;

    --info: #1d4ed8;
    --info-bg: #dbeafe;

    --shadow-small: 0 3px 12px rgba(15, 35, 60, 0.06);
    --shadow-medium: 0 10px 28px rgba(15, 35, 60, 0.09);
    --shadow-large: 0 18px 45px rgba(15, 35, 60, 0.13);

    --radius-small: 8px;
    --radius-medium: 14px;
    --radius-large: 20px;

    --transition: 180ms ease;
}

/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(
            180deg,
            #f9fcff 0%,
            var(--page-bg) 52%,
            #edf4f9 100%
        );
    color: var(--ink);
    font-family: Inter, Poppins, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--primary);
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--navy);
    line-height: 1.25;
}

h1 {
    margin: 0 0 24px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.5px;
}

h2 {
    margin: 0 0 18px;
    font-size: clamp(23px, 3vw, 31px);
}

h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

h4 {
    margin: 24px 0 12px;
}

p {
    color: var(--muted-dark);
}

::selection {
    background: var(--cyan);
    color: #fff;
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid rgba(14, 165, 183, 0.65);
    outline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(14, 165, 183, 0.65);
    outline-offset: 3px;
}

/* =========================================================
   NAVIGATION
========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    min-height: 72px;
    padding: 14px 6%;

    background:
        linear-gradient(
            135deg,
            #123c69 0%,
            #155b8e 55%,
            #0b7e91 100%
        );

    color: #fff;
    box-shadow: 0 5px 22px rgba(18, 60, 105, 0.22);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: #fff;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.brand::before {
    content: "S";

    display: grid;
    place-items: center;

    width: 35px;
    height: 35px;

    border-radius: 11px;
    background: linear-gradient(135deg, var(--gold), #ffdb7a);
    color: var(--navy);
    font-weight: 900;
    box-shadow: 0 5px 14px rgba(244, 185, 66, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
}

.navbar a {
    padding: 8px 12px;
    border-radius: var(--radius-small);

    color: #fff;
    font-weight: 600;
    text-decoration: none;

    transition:
        background var(--transition),
        color var(--transition),
        transform var(--transition);
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

.navbar a:last-child {
    background: rgba(255, 255, 255, 0.17);
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.container {
    width: min(1160px, 92%);
    margin: 34px auto 60px;
}

.container > h1:first-child {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(240px, 1fr)
    );
    gap: 20px;
}

.admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0 10px;
}

.admin-links .btn {
    margin-top: 0;
}

/* =========================================================
   CARDS
========================================================= */

.card,
.form-card,
.learning-card,
.stat-card {
    margin: 18px 0;
    padding: 24px;

    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

.card {
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.card:hover {
    border-color: #bfd7e6;
    box-shadow: var(--shadow-medium);
}

.card p {
    margin: 8px 0;
}

.form-card {
    width: 100%;
    max-width: 500px;
    margin: 26px auto;
    padding: 30px;
    box-shadow: var(--shadow-medium);
}

.form-card h1 {
    margin-bottom: 23px;
    text-align: center;
    font-size: 29px;
}

.learning-card {
    max-width: 920px;
    margin: 0 auto 26px;
    padding: clamp(23px, 4vw, 42px);
    box-shadow: var(--shadow-medium);
}

.learning-card h2 {
    padding-bottom: 17px;
    border-bottom: 1px solid var(--border);
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 27px 20px;
    text-align: center;
}

.stat-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 5px;

    background: linear-gradient(
        90deg,
        var(--primary),
        var(--cyan)
    );
}

.stat-card h2 {
    margin: 6px 0 2px;
    color: var(--navy);
    font-size: 40px;
}

.stat-card p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

/* =========================================================
   FORM ELEMENTS
========================================================= */

form {
    margin-bottom: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

label {
    display: block;
    margin: 10px 0 6px;

    color: var(--muted-dark);
    font-size: 14px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;

    border: 1px solid var(--border-dark);
    border-radius: var(--radius-small);

    background: #fff;
    color: var(--ink);
    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

input:hover,
textarea:hover,
select:hover {
    border-color: #94a3b8;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.13);
}



textarea {
    min-height: 130px;
    resize: vertical;
}

input[type="file"] {
    min-height: auto;
    padding: 9px;
    background: var(--surface-soft);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
    accent-color: var(--primary);
}

/* Registration page */
.register-card {
    max-width: 540px;
}

.register-form {
    display: flex;
    flex-direction: column;
}

.register-form .btn {
    margin-top: 8px;
}

/* =========================================================
   BUTTONS
========================================================= */

.btn,
.modern-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: auto;
    min-height: 44px;
    padding: 11px 18px;

    border: 1px solid transparent;
    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #0e82a0
        );

    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.btn:hover,
.modern-button:hover {
    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            #086a83
        );

    color: #fff;
    box-shadow: 0 7px 16px rgba(23, 105, 170, 0.2);
    transform: translateY(-2px);
}

.btn:active,
.modern-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.form-card form .btn {
    width: 100%;
    margin-top: 12px;
}

.btn.primary-btn {
    background:
        linear-gradient(
            135deg,
            var(--primary),
            #0e82a0
        );
}

.btn.secondary {
    background: #64748b;
    color: #fff;
}

.btn.secondary:hover {
    background: #475569;
}

.btn.danger {
    background:
        linear-gradient(
            135deg,
            #dc2626,
            #b91c1c
        );

    color: #fff;
}

.btn.danger:hover {
    background: #991b1b;
}

.btn.success {
    background:
        linear-gradient(
            135deg,
            #16a34a,
            #15803d
        );
}

.btn.warning {
    background:
        linear-gradient(
            135deg,
            #d97706,
            #b45309
        );
}

.btn.outline {
    border-color: var(--primary);
    background: transparent;
    color: var(--primary);
}

.btn.outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn.small {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 7px;
    font-size: 13px;
}

.home-btn {
    background: #e5e7eb;
    color: var(--ink);
}

.home-btn:hover {
    background: #d1d5db;
    color: #111827;
}

/* =========================================================
   ALERTS
========================================================= */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin: 0 0 18px;
    padding: 14px 16px;

    border: 1px solid transparent;
    border-radius: 10px;

    font-weight: 600;
}

.alert.success {
    border-color: #bbf7d0;
    background: var(--success-bg);
    color: var(--success);
}

.alert.danger {
    border-color: #fecaca;
    background: var(--danger-bg);
    color: var(--danger);
}

.alert.info {
    border-color: #bfdbfe;
    background: var(--info-bg);
    color: var(--info);
}

.alert.warning {
    border-color: #fde68a;
    background: var(--warning-bg);
    color: var(--warning);
}

/* =========================================================
   STATUS BADGES
========================================================= */

.status,
.badge {
    display: inline-flex;
    align-items: center;

    width: fit-content;
    min-height: 27px;
    padding: 4px 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: capitalize;
}

.status-pending,
.badge-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-active,
.status-confirmed,
.status-completed,
.badge-active,
.badge-confirmed,
.badge-completed {
    background: var(--success-bg);
    color: var(--success);
}

.status-rejected,
.status-cancelled,
.badge-rejected,
.badge-cancelled {
    background: var(--danger-bg);
    color: var(--danger);
}

/* =========================================================
   STUDENT DASHBOARD
========================================================= */

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-header p {
    margin: 0;
}

.dashboard-section {
    margin: 34px 0;
}

.dashboard-section > h2 {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.balance-box {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(150px, 1fr)
    );
    gap: 14px;
    margin: 20px 0;
}

.balance-item {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.balance-item span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.balance-item strong {
    color: var(--navy);
    font-size: 22px;
}

/* =========================================================
   COURSE CARDS
========================================================= */

.course-layout {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(300px, 1fr)
    );
    gap: 20px;
}

.course-card {
    display: flex;
    align-items: flex-start;
    gap: 17px;

    width: 100%;
    min-height: 150px;
    padding: 22px;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.course-card:hover {
    border-color: #b7d5e7;
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.course-card > i,
.course-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    border-radius: 13px;
    background: var(--cyan-soft);
    color: var(--primary);
    font-size: 23px;
}

.course-info {
    flex: 1;
    min-width: 0;
}

.course-info h3,
.course-card h3 {
    margin: 0 0 7px;
    color: var(--navy);
    font-size: 19px;
}

.course-info p,
.course-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

.course-card .btn,
.course-card .modern-button {
    margin-top: 12px;
    padding: 9px 13px;
    font-size: 13px;
}

/* =========================================================
   COURSE DETAILS
========================================================= */

.course-header {
    padding: 30px;
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            135deg,
            #123c69,
            #087d9d
        );

    color: #fff;
    box-shadow: var(--shadow-medium);
}

.course-header h1,
.course-header h2,
.course-header h3,
.course-header p {
    color: #fff;
}

.course-header p {
    opacity: 0.9;
}

.course-detail-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

/* =========================================================
   MODULES AND LEARNING
========================================================= */

.module-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin: 11px 0;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);

    transition:
        border-color var(--transition),
        background var(--transition);
}

.module-row:hover {
    border-color: #b9d4e4;
    background: #f0f8fb;
}

.module-row > span {
    color: var(--ink);
    font-weight: 700;
}

.module-content {
    margin: 24px 0;
    padding: 20px;

    border-left: 4px solid var(--cyan);
    border-radius: 0 10px 10px 0;
    background: var(--surface-soft);

    color: var(--muted-dark);
    line-height: 1.9;
    white-space: pre-wrap;
}

.learning-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    max-width: 920px;
    margin: 0 auto;
}

/* =========================================================
   PAYMENT
========================================================= */

.payment-summary {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(180px, 1fr)
    );
    gap: 15px;
    margin: 20px 0;
}

.payment-summary-item {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.payment-summary-item small {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-weight: 700;
}

.payment-summary-item strong {
    color: var(--navy);
    font-size: 21px;
}

.payment-instructions {
    margin: 22px 0;
    padding: 23px;

    border: 1px solid #bae6fd;
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #effaff,
            #f8fdff
        );
}

.payment-instructions h2 {
    margin-bottom: 12px;
}

.payment-instructions strong {
    color: var(--primary-dark);
}

/* =========================================================
   ADMIN PAGES
========================================================= */

.enrollment-admin {
    margin-top: 18px;
    padding: 19px;

    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.enrollment-admin form {
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.enrollment-admin form:first-of-type {
    margin-top: 12px;
}

.enrollment-admin .btn {
    margin-top: 8px;
}

.card > form {
    display: inline-block;
    margin: 8px 6px 0 0;
    vertical-align: middle;
}

.card > form .btn {
    margin-top: 0;
}

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background: var(--surface-soft);
    color: var(--navy);
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.admin-table td {
    color: var(--muted-dark);
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table tr:hover td {
    background: #fbfdff;
}

/* =========================================================
   STUDENT CARDS GRID
========================================================= */

.students-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fill,
        minmax(320px, 1fr)
    );
    gap: 22px;
    align-items: start;
    margin-top: 25px;
}

.student-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 22px;
}

.student-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.student-card-header h3 {
    margin: 0;
    color: var(--navy);
}

.student-card > p {
    margin: 6px 0;
}

.student-card h4 {
    margin: 20px 0 10px;
}

.student-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.student-actions form {
    display: inline-block;
    margin: 0;
}

.student-actions .btn {
    margin: 0;
}

.edit-btn {
    background: var(--primary);
    color: #fff;
}

.edit-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* =========================================================
   CERTIFICATES
========================================================= */

.certificate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.certificate-card strong {
    color: var(--navy);
}

/* =========================================================
   EMPTY STATES
========================================================= */

.empty-state {
    padding: 42px 22px;
    border: 1px dashed var(--border-dark);
    border-radius: var(--radius-medium);
    background: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

/* =========================================================
   PROGRESS BAR
========================================================= */

.progress-wrapper {
    margin: 20px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 8px;

    color: var(--muted-dark);
    font-size: 13px;
    font-weight: 700;
}

.progress-track {
    width: 100%;
    height: 10px;
    overflow: hidden;

    border-radius: 999px;
    background: var(--border);
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--primary),
            var(--cyan)
        );
    transition: width 400ms ease;
}

/* =========================================================
   MODERN LANDING-PAGE SUPPORT
========================================================= */

.modern-container {
    width: min(1160px, 92%);
    margin: auto;
}

.modern-header {
    background: #fff;
    box-shadow: 0 4px 20px rgba(16, 42, 67, 0.08);
}

.modern-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
}

.modern-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--navy);
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
}

.modern-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.modern-menu {
    display: flex;
    align-items: center;
    gap: 27px;

    margin: 0;
    padding: 0;
    list-style: none;
}

.modern-menu a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
}

.modern-menu a:hover {
    color: var(--primary);
}

.modern-section {
    padding: 76px 0;
}

.section-heading {
    max-width: 750px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading h2 {
    margin: 10px 0 14px;
}

.section-heading p {
    color: var(--muted);
    line-height: 1.8;
}

.eyebrow {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.7px;
    text-transform: uppercase;
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 950px) {
    .navbar {
        padding-right: 4%;
        padding-left: 4%;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 14px;
    }

    .navbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
        padding: 13px 5%;
    }

    .brand {
        font-size: 18px;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    .navbar a {
        padding: 7px 9px;
        font-size: 14px;
    }

    .container {
        width: 94%;
        margin-top: 24px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .course-layout {
        grid-template-columns: 1fr;
    }

    .module-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-row .btn,
    .module-row .modern-button {
        width: 100%;
    }

    .card > form {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .card > form .btn {
        width: 100%;
    }

    .students-grid {
        grid-template-columns: 1fr;
    }

    .student-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .student-actions .btn,
    .student-actions form {
        width: 100%;
    }

    .student-actions form .btn {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .card,
    .form-card,
    .learning-card,
    .stat-card {
        margin: 14px 0;
        padding: 18px;
        border-radius: 11px;
    }

    .form-card h1 {
        font-size: 24px;
    }

    .course-card {
        gap: 13px;
        padding: 17px;
    }

    .course-card > i,
    .course-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .course-card h3 {
        font-size: 17px;
    }

    .course-card .btn,
    .course-card .modern-button,
    .form-card form .btn {
        width: 100%;
    }

    .admin-links {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-links .btn {
        width: 100%;
    }

    .learning-navigation {
        align-items: stretch;
        flex-direction: column;
    }

    .learning-navigation .btn {
        width: 100%;
    }

    .certificate-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .certificate-card .btn {
        width: 100%;
    }

    .payment-summary {
        grid-template-columns: 1fr;
    }

    .payment-instructions {
        padding: 18px;
    }

    .btn,
    .modern-button {
        min-height: 44px;
    }
}

@media (max-width: 380px) {
    .brand {
        font-size: 16px;
    }

    .navbar a {
        font-size: 13px;
    }

    .form-card {
        padding: 16px 13px;
    }

    .form-card h1 {
        font-size: 21px;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Student search */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.search-form input {
    flex: 1;
    min-width: 220px;
}

/* Student details header */
.student-details-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 28px;
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: var(--surface);
    box-shadow: var(--shadow-small);
}

.student-details-header h1 {
    margin-bottom: 10px;
}

.student-details-header p {
    margin: 5px 0;
}

/* Table action buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

/* Mobile */
@media (max-width: 720px) {
    .student-details-header {
        flex-direction: column;
    }

    .student-details-header .student-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .table-actions .btn,
    .table-actions form,
    .table-actions form .btn {
        width: 100%;
    }
}
/* ===== Module row ===== */
.module-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin: 11px 0;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.module-title {
    flex: 1;
    min-width: 0;

    color: var(--ink);
    font-weight: 700;
    word-break: break-word;
}

/* Edit and Delete remain in one horizontal row on large screens */
.module-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
}

.module-actions form {
    margin: 0;
}

.module-actions .btn {
    margin: 0;
    white-space: nowrap;
}

.edit-btn {
    background: var(--primary);
    color: #fff;
}

.edit-btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ===== Mobile: Edit and Delete stack vertically ===== */
@media (max-width: 720px) {
    .module-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .module-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .module-actions .btn,
    .module-actions form,
    .module-actions form .btn {
        width: 100%;
    }
}
/* ===== Instructor live class page ===== */
.live-class-card {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(22px, 4vw, 38px);

    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-medium);
}

.live-class-card h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 32px);
}

.live-class-card p {
    margin-bottom: 25px;
    color: var(--muted);
}

.live-class-card .form-group {
    margin-bottom: 18px;
}

.live-class-card label {
    display: block;
    margin-bottom: 7px;
    font-weight: 800;
}

.live-class-card input,
.live-class-card textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
}

.live-class-card button {
    margin-top: 10px;
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 22px;
    padding: 14px 16px;
    border-left: 4px solid var(--cyan);
    border-radius: 0 10px 10px 0;
    background: var(--cyan-soft);

    color: var(--primary-dark);
    font-size: 14px;
}


/* ===== Admin payment management ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: clamp(26px, 3vw, 34px);
}

.page-header p {
    margin: 0;
    color: var(--muted);
}

.payment-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-medium);
}

.stat-card small {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-weight: 700;
}

.stat-card strong {
    font-size: 28px;
}

.stat-card.pending {
    border-left: 5px solid #f59e0b;
}

.stat-card.unseen {
    border-left: 5px solid #10b981;
}

.stat-card.students {
    border-left: 5px solid var(--cyan);
}

.student-payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.student-payment-card {
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-medium);
}

.student-payment-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.student-avatar {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--cyan-soft);
    color: var(--primary-dark);
    font-weight: 900;
    font-size: 20px;
}

.student-avatar.large {
    width: 72px;
    height: 72px;
    font-size: 28px;
}

.student-payment-card h3 {
    margin: 0 0 4px;
}

.student-payment-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.student-payment-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.pending-badge {
    background: #fef3c7;
    color: #92400e;
}

.unseen-badge {
    background: #d1fae5;
    color: #065f46;
}

.student-payment-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.student-payment-summary small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.student-payment-summary strong {
    font-size: 18px;
}

.full-width {
    width: 100%;
    text-align: center;
}

.student-details-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    margin-bottom: 28px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-medium);
}

.student-details-card h2 {
    margin: 0 0 4px;
}

.student-details-card p {
    margin: 2px 0;
    color: var(--muted);
}

.payments-table-card {
    padding: 10px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-medium);
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.modern-table th {
    padding: 15px;
    text-align: left;
    background: var(--surface-soft);
    color: var(--primary-dark);
    font-size: 13px;
    text-transform: uppercase;
}

.modern-table td {
    padding: 15px;
    border-top: 1px solid var(--border);
    color: var(--muted-dark);
}

.status {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.completed {
    background: #d1fae5;
    color: #065f46;
}

.status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.inline-form {
    display: flex;
    gap: 8px;
}

.btn.small {
    padding: 7px 13px;
    font-size: 13px;
}

.btn.success {
    background: var(--success);
}

.btn.danger {
    background: #dc2626;
}

.muted-text {
    color: var(--muted);
}

.empty-state {
    padding: 50px 20px;
    text-align: center;
    border-radius: 18px;
    background: #fff;
    border: 1px dashed var(--border);
}

/* Responsive */
@media (max-width: 992px) {
    .payment-stats,
    .student-payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-stats,
    .student-payment-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== Student payment page ===== */
.payment-page {
    max-width: 1100px;
    margin: 0 auto;
}

.payment-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.payment-summary-card,
.payment-form-card,
.manual-payment-card {
    padding: clamp(22px, 4vw, 32px);
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-medium);
}

.payment-course-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
}

.course-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--cyan-soft);
    color: var(--primary-dark);
    font-size: 22px;
}

.payment-course-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
}

.payment-course-header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.payment-summary {
    display: grid;
    gap: 12px;
}

.payment-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.payment-summary-item small {
    color: var(--muted);
    font-weight: 700;
}

.payment-summary-item strong {
    font-size: 17px;
}

.payment-summary-item.balance {
    border-left: 4px solid var(--cyan);
}

.payment-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--cyan-soft);
    color: var(--primary-dark);
    font-size: 14px;
}

.payment-form-card h2 {
    margin: 0 0 8px;
}

.payment-form-card > p {
    margin-bottom: 22px;
    color: var(--muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 800;
}

.input-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.input-icon span {
    color: var(--muted);
    font-weight: 800;
}

.input-icon input {
    border: none;
    padding: 13px 0;
    width: 100%;
    outline: none;
    font-size: 15px;
}

.payment-form-card input,
.payment-form-card select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
}

.manual-payment-card {
    margin-bottom: 30px;
}

.manual-payment-card h2 {
    margin: 0 0 18px;
}

.paybill-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 22px;
}

.paybill-item {
    padding: 16px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.paybill-item small {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-weight: 700;
}

.paybill-item strong {
    font-size: 17px;
}

.payment-steps {
    padding-left: 20px;
    color: var(--muted-dark);
    line-height: 1.9;
}

/* Responsive */
@media (max-width: 992px) {
    .payment-layout,
    .paybill-details {
        grid-template-columns: 1fr;
    }
}