:root {
    --navy: #102b49;
    --navy-dark: #081d34;
    --navy-light: #173c63;

    --gold: #d89a27;
    --gold-light: #f0bd57;

    --white: #ffffff;
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;

    --text: #172333;
    --text-soft: #687586;
    --text-muted: #8b97a7;

    --border: #e5e9ef;
    --border-dark: #d9e0e8;

    --success: #198754;
    --success-bg: #eaf7f0;

    --danger: #c93b48;
    --danger-bg: #fcecef;

    --warning: #b7791f;
    --warning-bg: #fff6df;

    --info: #2767a5;
    --info-bg: #edf5fd;

    --shadow-sm: 0 2px 8px rgba(16, 43, 73, 0.05);
    --shadow-md: 0 8px 25px rgba(16, 43, 73, 0.08);
    --shadow-lg: 0 18px 45px rgba(16, 43, 73, 0.12);

    --radius: 14px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
}

.layout {
    min-height: 100vh;
    display: flex;
}


/* SIDEBAR */

.sidebar {
    width: 260px;
    min-width: 260px;
    min-height: 100vh;
    background: var(--navy-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #274361;
    border-radius: 10px;
}

.brand {
    height: 82px;
    padding: 17px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
}

.brand-text {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1.1;
}

.brand-sub {
    display: block;
    margin-top: 5px;
    color: #91a2b5;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1.2px;
}

.menu {
    padding: 18px 13px 28px;
}

.menu-title {
    color: #70849a;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.4px;
    padding: 15px 12px 7px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 10px;
    color: #c6d0db;
    font-size: 12px;
    font-weight: 600;
    margin: 3px 0;
    border: 1px solid transparent;
    transition: all .2s ease;
}

.menu a:hover {
    background: #162f4b;
    color: #fff;
    transform: translateX(2px);
}

.menu a.active {
    background: #1b3856;
    color: #fff;
    border: 1px solid rgba(216, 154, 39, .25);
    border-left: 3px solid var(--gold);
    padding-left: 11px;
}

.menu-icon {
    width: 20px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8295aa;
    font-size: 14px;
}

.menu a.active .menu-icon,
.menu a:hover .menu-icon {
    color: var(--gold-light);
}


/* MAIN */

.main {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
}

.topbar {
    height: 82px;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.page-title {
    color: var(--navy);
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -.3px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
}

.top-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.notification {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.notification-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--gold);
    border: 2px solid #fff;
    border-radius: 50%;
    top: 6px;
    right: 6px;
}

.admin {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 18px;
    border-left: 1px solid var(--border);
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.admin-name {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.admin-role {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 1px;
}


/* CONTENT */

.content {
    padding: 30px 32px 45px;
    max-width: 1800px;
}


/* STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 125px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all .2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d7dfe8;
}

.stat-label {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-value {
    color: var(--navy);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.6px;
}

.stat-change {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 5px;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #f4f7fa;
    border: 1px solid var(--border);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}


/* CARDS */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    min-height: 76px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.card-title {
    color: var(--navy);
    font-size: 14px;
    font-weight: 750;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 3px;
}

.card-body {
    padding: 22px;
}


/* BUTTONS */

.btn {
    border: 0;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all .2s ease;
}

.btn-primary {
    background: var(--navy);
    color: #fff;
}

.btn-primary:hover {
    background: var(--navy-light);
    box-shadow: 0 6px 16px rgba(16, 43, 73, .18);
}

.btn-gold {
    background: var(--gold);
    color: #fff;
}

.btn-gold:hover {
    background: #c7891f;
    box-shadow: 0 6px 16px rgba(216, 154, 39, .22);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}


/* FILTERS */

.filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.search-box {
    min-width: 260px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 17px;
    z-index: 2;
}

.search-box .form-control {
    padding-left: 36px;
}


/* FORMS */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group:last-child {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-dark);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font-size: 11px;
    outline: none;
    transition: all .2s ease;
}

textarea.form-control {
    height: auto;
    padding: 11px 12px;
    resize: vertical;
}

.form-control::placeholder {
    color: #aab3bf;
}

.form-control:hover {
    border-color: #c9d2dd;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(216, 154, 39, .10);
}


/* TABLE */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
    background: #fff;
}

thead {
    background: #f7f9fb;
}

th {
    color: #667487;
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    color: #455466;
    font-size: 11px;
    padding: 14px;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
}

tbody tr {
    transition: background .15s ease;
}

tbody tr:hover {
    background: #fafbfd;
}

tbody tr:last-child td {
    border-bottom: 0;
}


/* USER CELL */

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.avatar {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #edf2f6;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    border: 1px solid #e0e7ee;
}

.user-name {
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.user-secondary {
    color: var(--text-muted);
    font-size: 9px;
    margin-top: 2px;
}


/* BADGES */

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-success {
    color: var(--success);
    background: var(--success-bg);
}

.badge-danger {
    color: var(--danger);
    background: var(--danger-bg);
}

.badge-warning {
    color: var(--warning);
    background: var(--warning-bg);
}

.badge-info {
    color: var(--info);
    background: var(--info-bg);
}

.badge-secondary {
    color: #64748b;
    background: #f0f3f6;
}


/* ACTIONS */

.action-group {
    display: flex;
    gap: 5px;
}

.action-btn {
    min-height: 29px;
    padding: 0 9px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: #fff;
    color: #596779;
    font-size: 9px;
    font-weight: 650;
    transition: all .2s ease;
}

.action-btn:hover {
    color: var(--navy);
    border-color: #c8d1dc;
    background: #f7f9fb;
}


/* RESULT INFO */

.result-info {
    color: var(--text-muted);
    font-size: 10px;
    margin-bottom: 11px;
}


/* QUICK GRID */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.quick-item {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 16px;
    min-height: 78px;
}

.quick-title {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-value {
    color: var(--navy);
    font-size: 17px;
    font-weight: 800;
    margin-top: 6px;
}


/* DASHBOARD */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.quick-item {
    transition: all .2s ease;
}

.quick-item:hover {
    border-color: #d5dde6;
    background: #fff;
    box-shadow: var(--shadow-sm);
}


/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 29, 52, .58);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-box {
    width: min(600px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.7);
}

.modal-header {
    min-height: 64px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    color: var(--navy);
    font-size: 15px;
    font-weight: 750;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-muted);
    font-size: 16px;
}

.modal-close:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}


/* DETAILS */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.detail-box {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px;
}

.detail-box label {
    display: block;
    color: var(--text-muted);
    font-size: 9px;
    margin-bottom: 4px;
}

.detail-box strong {
    color: var(--text);
    font-size: 11px;
}


/* EMPTY STATE */

.empty-state {
    padding: 55px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state h3 {
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 5px;
}

.empty-state p {
    font-size: 11px;
}


/* PAGINATION */

.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 16px;
}

.page-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text-soft);
    font-size: 10px;
}

.page-btn:hover,
.page-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}


/* TOAST */

.toast-container {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    min-width: 280px;
    padding: 13px 16px;
    border-radius: 10px;
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 11px;
    font-weight: 600;
}


/* LOGIN */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-box {
    width: min(430px, 100%);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 38px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
    margin: 0 auto 18px;
}

.login-title {
    text-align: center;
    color: var(--navy);
    font-size: 23px;
    font-weight: 800;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    margin: 6px 0 28px;
}


/* SCROLLBAR */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #f1f3f6;
}

::-webkit-scrollbar-thumb {
    background: #c8d0da;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aeb9c6;
}


/* RESPONSIVE */

@media (max-width: 1200px) {

    .sidebar {
        width: 230px;
        min-width: 230px;
    }

    .main {
        margin-left: 230px;
        width: calc(100% - 230px);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {

    .sidebar {
        width: 210px;
        min-width: 210px;
    }

    .main {
        margin-left: 210px;
        width: calc(100% - 210px);
    }

    .topbar {
        padding: 0 20px;
    }

    .content {
        padding: 22px 20px 35px;
    }

    .admin {
        padding-left: 10px;
    }

    .admin-name,
    .admin-role {
        display: none;
    }
}

@media (max-width: 650px) {

    .sidebar {
        position: relative;
        width: 100%;
        min-width: 100%;
        min-height: auto;
        max-height: none;
    }

    .layout {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        height: auto;
        min-height: 75px;
        padding: 15px 18px;
    }

    .content {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group:last-child {
        grid-column: auto;
    }

    .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .filters {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .top-right {
        gap: 8px;
    }

    .page-title {
        font-size: 19px;
    }
}


/* PRINT */

@media print {

    .sidebar,
    .topbar,
    .btn,
    .action-group,
    .filters,
    .pagination {
        display: none !important;
    }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .content {
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #bbb;
    }

    body {
        background: #fff;
    }

    th,
    td {
        color: #000;
    }
}

/* ================================
   MERITO PREMIUM DASHBOARD
================================ */

.dashboard-welcome {
    background: #102b49;
    border-radius: 18px;
    padding: 25px 28px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(16, 43, 73, .16);
    animation: dashboardFade .55s ease both;
}

.dashboard-welcome::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(240, 189, 87, .20);
    border-radius: 50%;
    right: 90px;
    top: -85px;
}

.dashboard-welcome::before {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    right: 30px;
    bottom: -65px;
}

.welcome-label {
    color: #f0bd57;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin-bottom: 5px;
}

.dashboard-welcome h1 {
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.dashboard-welcome p {
    color: #aebdcd;
    font-size: 11px;
    margin-top: 5px;
}

.welcome-date {
    position: relative;
    z-index: 2;
    min-width: 145px;
    padding: 11px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    font-weight: 650;
}


/* KPI CARDS */

.dashboard-stats {
    gap: 16px;
}

.premium-stat {
    position: relative;
    overflow: hidden;
    min-height: 135px;
    animation: dashboardUp .55s ease both;
}

.premium-stat:nth-child(1) {
    animation-delay: .05s;
}

.premium-stat:nth-child(2) {
    animation-delay: .10s;
}

.premium-stat:nth-child(3) {
    animation-delay: .15s;
}

.premium-stat:nth-child(4) {
    animation-delay: .20s;
}

.premium-stat::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    right: -42px;
    bottom: -48px;
    background: rgba(216, 154, 39, .07);
}

.premium-stat .stat-icon {
    position: relative;
    z-index: 2;
}

.students-stat {
    border-top: 3px solid #2d73b9;
}

.students-stat .stat-icon {
    color: #2d73b9;
    background: #edf5fd;
    border-color: #d9e9f8;
}

.active-stat {
    border-top: 3px solid #198754;
}

.active-stat .stat-icon {
    color: #198754;
    background: #eaf7f0;
    border-color: #d4eddf;
}

.teacher-stat {
    border-top: 3px solid #8057b8;
}

.teacher-stat .stat-icon {
    color: #8057b8;
    background: #f3edfb;
    border-color: #e7ddf4;
}

.revenue-stat {
    border-top: 3px solid var(--gold);
}

.revenue-stat .stat-icon {
    color: var(--gold);
    background: #fff7e7;
    border-color: #f4e4bf;
}

.stat-change.positive {
    color: #198754;
}

.stat-change i {
    margin-right: 3px;
}


/* SECONDARY KPI */

.dashboard-kpis {
    grid-template-columns: repeat(6, 1fr);
    margin-bottom: 22px;
}

.dashboard-kpi {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    animation: dashboardUp .55s ease both;
}

.kpi-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.kpi-icon.blue {
    color: #2d73b9;
    background: #edf5fd;
}

.kpi-icon.purple {
    color: #8057b8;
    background: #f3edfb;
}

.kpi-icon.green {
    color: #198754;
    background: #eaf7f0;
}

.kpi-icon.orange {
    color: #c87920;
    background: #fff3e3;
}

.kpi-icon.gold {
    color: #b77c15;
    background: #fff7e7;
}

.kpi-icon.red {
    color: #c74755;
    background: #fcecef;
}

.dashboard-kpi .quick-value {
    font-size: 16px;
}


/* ANALYTICS */

.analytics-grid {
    grid-template-columns: 1.45fr 1fr;
    margin-bottom: 22px;
}

.analytics-card {
    min-height: 330px;
}

.analytics-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-value strong {
    color: var(--navy);
    font-size: 17px;
}

.analytics-value span {
    font-size: 9px;
    font-weight: 700;
}

.analytics-value .positive {
    color: var(--success);
}

.revenue-total {
    color: var(--gold);
    font-size: 18px;
    font-weight: 800;
}


/* GROWTH CHART */

.chart {
    height: 215px;
    display: flex;
    padding-top: 10px;
}

.chart-y {
    width: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 25px;
}

.chart-y span {
    color: #9aa5b3;
    font-size: 8px;
}

.chart-area {
    flex: 1;
    position: relative;
    height: 100%;
}

.chart-lines {
    position: absolute;
    inset: 0 0 25px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-lines span {
    display: block;
    border-top: 1px dashed #e7ebef;
}

.growth-bars {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 25px;
    top: 5px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 10px;
}

.bar-wrap {
    height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.bar {
    width: min(34px, 70%);
    background: #dce7f1;
    border-radius: 6px 6px 2px 2px;
    transform-origin: bottom;
    animation: barGrow .9s ease both;
}

.bar.active {
    background: var(--gold);
    box-shadow: 0 5px 15px rgba(216, 154, 39, .20);
}

.bar-wrap small {
    color: #8995a4;
    font-size: 8px;
}


/* REVENUE CHART */

.revenue-bars {
    height: 215px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 8px;
    padding: 12px 4px 0;
}

.revenue-bars > div {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    gap: 5px;
}

.revenue-bars span {
    color: #8d99a8;
    font-size: 8px;
    order: 3;
}

.revenue-bars i {
    width: min(28px, 65%);
    background: #dfe8f0;
    border-radius: 6px 6px 2px 2px;
    display: block;
    animation: barGrow .9s ease both;
}

.revenue-bars b {
    color: var(--navy);
    font-size: 7px;
    font-weight: 700;
    opacity: 0;
    transition: .2s;
}

.revenue-bars > div:hover b {
    opacity: 1;
}

.revenue-bars .current i {
    background: var(--gold);
    box-shadow: 0 5px 15px rgba(216, 154, 39, .20);
}


/* LIVE QUIZ */

.dashboard-middle {
    grid-template-columns: 1.45fr 1fr;
    margin-bottom: 22px;
}

.live-status {
    color: #198754;
    background: #eaf7f0;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.live-status span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #198754;
    animation: livePulse 1.4s infinite;
}

.live-quiz {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 4px 0 20px;
}

.live-quiz-main {
    display: flex;
    align-items: center;
    gap: 13px;
}

.quiz-symbol {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: #102b49;
    color: var(--gold-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.live-quiz h3 {
    color: var(--navy);
    font-size: 12px;
    font-weight: 750;
}

.live-quiz p {
    color: var(--text-muted);
    font-size: 9px;
    margin-top: 3px;
}

.live-metrics {
    display: flex;
    gap: 25px;
}

.live-metrics div {
    text-align: right;
}

.live-metrics strong {
    color: var(--navy);
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.live-metrics span {
    color: var(--text-muted);
    font-size: 8px;
}

.progress-row {
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.progress-row > div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
}

.progress-row span,
.progress-row strong {
    font-size: 9px;
}

.progress-row span {
    color: var(--text-muted);
}

.progress-row strong {
    color: var(--navy);
}

.progress {
    width: 100%;
    height: 7px;
    background: #edf0f3;
    border-radius: 20px;
    overflow: hidden;
}

.progress i {
    display: block;
    height: 100%;
    background: var(--gold);
    border-radius: 20px;
    animation: progressGrow 1s ease both;
}


/* LEVEL OVERVIEW */

.level-overview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    min-height: 210px;
}

.level-row {
    display: grid;
    grid-template-columns: 72px 1fr 32px;
    align-items: center;
    gap: 10px;
}

.level-row span {
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 600;
}

.level-row b {
    color: var(--navy);
    font-size: 9px;
    text-align: right;
}

.level-progress {
    height: 7px;
    background: #edf0f3;
    border-radius: 20px;
    overflow: hidden;
}

.level-progress i {
    display: block;
    height: 100%;
    background: var(--navy);
    border-radius: 20px;
    animation: progressGrow 1s ease both;
}


/* BOTTOM */

.bottom-grid {
    grid-template-columns: 1.25fr 1fr;
    margin-bottom: 22px;
}

.dashboard-link {
    color: var(--gold);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dashboard-link:hover {
    color: var(--navy);
}


/* PERFORMERS */

.performer {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    border-bottom: 1px solid #edf0f4;
}

.performer:last-child {
    border-bottom: 0;
}

.rank {
    width: 25px;
    color: #9aa5b2;
    font-size: 10px;
    font-weight: 800;
}

.gold-rank {
    color: #c99022;
}

.silver-rank {
    color: #758596;
}

.bronze-rank {
    color: #a66b40;
}

.performer-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 9px;
}

.performer-info {
    flex: 1;
}

.performer-info strong {
    color: var(--text);
    display: block;
    font-size: 10px;
}

.performer-info span {
    color: var(--text-muted);
    display: block;
    font-size: 8px;
    margin-top: 2px;
}

.performer-score {
    text-align: right;
}

.performer-score strong {
    display: block;
    color: var(--navy);
    font-size: 10px;
}

.performer-score span {
    color: var(--text-muted);
    font-size: 8px;
}


/* ACTIVITY */

.activity-list {
    padding-top: 8px;
    padding-bottom: 8px;
}

.activity {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf0f4;
}

.activity:last-child {
    border-bottom: 0;
}

.activity-icon {
    width: 31px;
    height: 31px;
    min-width: 31px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.activity-icon.blue {
    background: #edf5fd;
    color: #2d73b9;
}

.activity-icon.green {
    background: #eaf7f0;
    color: #198754;
}

.activity-icon.gold {
    background: #fff7e7;
    color: var(--gold);
}

.activity-icon.purple {
    background: #f3edfb;
    color: #8057b8;
}

.activity > div:nth-child(2) {
    flex: 1;
}

.activity strong {
    color: var(--text);
    display: block;
    font-size: 9px;
}

.activity span {
    color: var(--text-muted);
    display: block;
    font-size: 8px;
    margin-top: 2px;
}

.activity small {
    color: #9ba5b1;
    font-size: 8px;
}


/* FEATURE CARDS */

.dashboard-feature-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 22px;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: .25s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 43px;
    height: 43px;
    min-width: 43px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.scholarship-feature .feature-icon {
    background: #edf5fd;
    color: #2d73b9;
}

.rewards-feature .feature-icon {
    background: #fff7e7;
    color: var(--gold);
}

.notification-feature .feature-icon {
    background: #f3edfb;
    color: #8057b8;
}

.feature-card span {
    display: block;
    color: var(--text-muted);
    font-size: 9px;
}

.feature-card strong {
    display: block;
    color: var(--navy);
    font-size: 17px;
    margin-top: 2px;
}

.feature-card small {
    display: block;
    color: #99a3af;
    font-size: 8px;
    margin-top: 2px;
}

.feature-card > a {
    margin-left: auto;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    background: #f5f7f9;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    transition: .2s;
}

.feature-card > a:hover {
    background: var(--navy);
    color: #fff;
}


/* QUICK ACTIONS */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action {
    border: 1px solid var(--border);
    background: #fafbfd;
    border-radius: 11px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: .2s ease;
}

.quick-action:hover {
    background: #fff;
    border-color: #d3dce5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-action > span {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 9px;
    background: var(--navy);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.quick-action div {
    flex: 1;
}

.quick-action strong {
    color: var(--navy);
    display: block;
    font-size: 9px;
}

.quick-action small {
    color: var(--text-muted);
    display: block;
    font-size: 8px;
    margin-top: 2px;
}

.quick-action .arrow {
    color: #9aa5b2;
    font-size: 8px;
}


/* ANIMATIONS */

@keyframes dashboardFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashboardUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes barGrow {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

@keyframes progressGrow {
    from {
        width: 0;
    }
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, .35);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(25, 135, 84, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}


/* DASHBOARD RESPONSIVE */

@media (max-width: 1350px) {

    .dashboard-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1000px) {

    .analytics-grid,
    .dashboard-middle,
    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-feature-grid {
        grid-template-columns: 1fr;
    }

    .live-quiz {
        flex-direction: column;
        align-items: flex-start;
    }

    .live-metrics {
        width: 100%;
        justify-content: space-between;
    }

    .live-metrics div {
        text-align: left;
    }
}

@media (max-width: 700px) {

    .dashboard-welcome {
        padding: 20px;
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .welcome-date {
        width: 100%;
    }

    .dashboard-kpis {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .analytics-card {
        min-height: auto;
    }

    .live-metrics {
        gap: 15px;
    }

    .live-metrics strong {
        font-size: 13px;
    }
}

@media (max-width: 450px) {

    .dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-welcome h1 {
        font-size: 21px;
    }

    .chart {
        height: 180px;
    }

    .revenue-bars {
        height: 180px;
    }
}/* =========================================
   MERITO GLOBAL NAVIGATION IMPROVEMENTS
========================================= */

.topbar{
    position: sticky;
    top: 0;
    z-index: 500;
}

.sidebar{
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.main{
    min-height: 100vh;
}

.admin{
    position: relative;
}

.admin-toggle{
    display:flex;
    align-items:center;
    gap:10px;
    border:0;
    background:transparent;
    padding:0;
    cursor:pointer;
    color:inherit;
}

.admin-arrow{
    color:#8b97a7;
    font-size:9px;
    transition:.2s ease;
}

.admin.open .admin-arrow{
    transform:rotate(180deg);
}

.admin-dropdown{
    position:absolute;
    right:0;
    top:52px;
    width:215px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:13px;
    box-shadow:var(--shadow-lg);
    padding:7px;
    display:none;
    z-index:1000;
    animation:navDrop .18s ease both;
}

.admin.open .admin-dropdown{
    display:block;
}

.admin-dropdown-head{
    padding:11px 12px;
    border-bottom:1px solid var(--border);
    margin-bottom:5px;
}

.admin-dropdown-head strong{
    display:block;
    color:var(--navy);
    font-size:11px;
}

.admin-dropdown-head span{
    display:block;
    color:var(--text-muted);
    font-size:9px;
    margin-top:2px;
}

.admin-dropdown a,
.admin-dropdown button{
    width:100%;
    min-height:37px;
    display:flex;
    align-items:center;
    gap:10px;
    padding:0 11px;
    border:0;
    border-radius:8px;
    background:transparent;
    color:var(--text-soft);
    font-size:10px;
    font-weight:650;
    text-align:left;
    cursor:pointer;
}

.admin-dropdown a:hover,
.admin-dropdown button:hover{
    background:#f5f7f9;
    color:var(--navy);
}

.admin-dropdown .logout-item{
    color:var(--danger);
    border-top:1px solid var(--border);
    margin-top:5px;
    padding-top:4px;
}

.admin-dropdown .logout-item:hover{
    background:var(--danger-bg);
    color:var(--danger);
}

.admin-dropdown i{
    width:17px;
    text-align:center;
}

.mobile-menu-btn{
    display:none;
    width:38px;
    height:38px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#fff;
    color:var(--navy);
    align-items:center;
    justify-content:center;
    font-size:15px;
    cursor:pointer;
    box-shadow:var(--shadow-sm);
}

.sidebar-overlay{
    display:none;
}

.sidebar-close{
    display:none;
}

@keyframes navDrop{
    from{
        opacity:0;
        transform:translateY(-5px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* Prevent horizontal page movement */
html,
body{
    max-width:100%;
    overflow-x:hidden;
}

/* Better sidebar navigation */
.menu{
    padding-bottom:50px;
}

.menu a{
    position:relative;
}

.menu a.active{
    box-shadow:inset 0 0 0 1px rgba(216,154,39,.04);
}

/* MOBILE NAVIGATION */
@media(max-width:650px){

    .mobile-menu-btn{
        display:flex;
    }

    .sidebar{
        position:fixed;
        left:-285px;
        top:0;
        bottom:0;
        width:270px;
        min-width:270px;
        height:100vh;
        max-height:100vh;
        z-index:1200;
        transition:left .25s ease;
        box-shadow:10px 0 35px rgba(0,0,0,.20);
    }

    .sidebar.mobile-open{
        left:0;
    }

    .sidebar-overlay{
        position:fixed;
        inset:0;
        background:rgba(8,29,52,.48);
        z-index:1100;
        backdrop-filter:blur(2px);
    }

    .sidebar-overlay.show{
        display:block;
    }

    .sidebar-close{
        display:flex;
        position:absolute;
        top:22px;
        right:15px;
        width:30px;
        height:30px;
        border:1px solid rgba(255,255,255,.12);
        border-radius:8px;
        background:rgba(255,255,255,.06);
        color:#fff;
        align-items:center;
        justify-content:center;
        cursor:pointer;
    }

    .layout{
        display:block;
    }

    .main{
        margin-left:0;
        width:100%;
    }

    .topbar{
        position:sticky;
        top:0;
        min-height:70px;
        height:auto;
        padding:12px 16px;
    }

    .top-right{
        gap:8px;
    }

    .notification{
        width:36px;
        height:36px;
    }

    .admin{
        padding-left:8px;
    }

    .admin-name,
    .admin-role{
        display:none;
    }

    .admin-dropdown{
        position:fixed;
        right:12px;
        top:62px;
    }
}

/* SMALL MOBILE */
@media(max-width:420px){

    .page-title{
        font-size:17px;
    }

    .page-subtitle{
        font-size:9px;
    }

    .top-right{
        gap:5px;
    }

    .admin-avatar{
        width:35px;
        height:35px;
    }
}
/* ================================
   MOBILE VIEW FIX
================================ */

@media (max-width: 900px){

    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .sidebar{
        position:fixed;
        top:0;
        left:0;
        bottom:0;
        width:270px;
        min-width:270px;
        height:100vh;
        max-height:100vh;
        overflow-y:auto;
        overflow-x:hidden;
        transform:translateX(-100%);
        transition:transform .25s ease;
        z-index:1200;
    }

    .sidebar.mobile-open{
        transform:translateX(0);
    }

    .sidebar-overlay{
        position:fixed;
        inset:0;
        width:100%;
        height:100%;
        background:rgba(8,29,52,.55);
        z-index:1100;
        display:none;
    }

    .sidebar-overlay.show{
        display:block;
    }

    .main{
        width:100%;
        max-width:100%;
        margin-left:0;
        overflow-x:hidden;
    }

    .topbar{
        width:100%;
        min-height:70px;
        height:auto;
        padding:12px 15px;
        display:flex;
        align-items:center;
        gap:10px;
        position:sticky;
        top:0;
        z-index:1000;
    }

    .sidebar-toggle{
        display:flex;
        flex:0 0 38px;
        width:38px;
        min-width:38px;
        height:38px;
        align-items:center;
        justify-content:center;
    }

    .page-title{
        min-width:0;
        flex:1;
    }

    .page-title h1{
        font-size:18px;
        line-height:1.25;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .page-title p,
    .page-subtitle{
        font-size:10px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .top-right{
        flex-shrink:0;
    }

    .admin{
        padding:0;
    }

    .admin-account-toggle{
        gap:6px;
    }

    .admin-name{
        max-width:85px;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
    }

    .admin-role{
        display:none;
    }

    .admin-account-menu{
        position:fixed;
        top:68px;
        right:12px;
        width:205px;
        max-width:calc(100vw - 24px);
    }

    .content,
    .page-content{
        width:100%;
        max-width:100%;
        padding:18px 15px;
        overflow-x:hidden;
    }

    .dashboard-welcome{
        padding:22px 18px;
        border-radius:12px;
    }

    .dashboard-welcome h1{
        font-size:22px;
        line-height:1.3;
    }

    .dashboard-welcome p{
        font-size:11px;
    }

    .dashboard-stats,
    .dashboard-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }

    .premium-stat{
        min-width:0;
        padding:14px;
    }

    .premium-stat h3{
        font-size:19px;
    }

    .premium-stat p{
        font-size:10px;
    }

    .analytics-grid,
    .bottom-grid,
    .dashboard-feature-grid{
        grid-template-columns:1fr;
        gap:14px;
    }

    .chart,
    .live-quiz,
    .level-overview,
    .quick-actions,
    .feature-card{
        width:100%;
        min-width:0;
    }

    .quick-actions{
        grid-template-columns:1fr;
    }

    .quick-action{
        width:100%;
    }

    .table-container{
        width:100%;
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    table{
        min-width:700px;
    }

    .card{
        width:100%;
        max-width:100%;
        overflow:hidden;
    }

    .card-header{
        flex-wrap:wrap;
        gap:10px;
    }

    .card-header .actions,
    .card-header .header-actions{
        width:100%;
        display:flex;
        flex-wrap:wrap;
        gap:8px;
    }

    .card-header .actions .btn,
    .card-header .header-actions .btn{
        flex:1;
    }

    .filters{
        width:100%;
        display:grid;
        grid-template-columns:1fr;
        gap:10px;
    }

    .filter-group{
        width:100%;
    }

    input,
    select,
    textarea{
        max-width:100%;
    }

    .form-grid{
        grid-template-columns:1fr;
    }

    .modal{
        padding:15px;
        align-items:center;
    }

    .modal-content{
        width:100%;
        max-width:100%;
        max-height:90vh;
        overflow-y:auto;
        border-radius:12px;
    }

    .modal-footer{
        flex-wrap:wrap;
    }

    .modal-footer .btn{
        flex:1;
        min-width:120px;
    }

    .back-to-top{
        right:15px;
        bottom:15px;
        width:36px;
        height:36px;
    }

    body.nav-locked{
        overflow:hidden;
    }
}


/* ================================
   SMALL MOBILE
================================ */

@media (max-width:600px){

    .topbar{
        padding:10px 12px;
        min-height:64px;
    }

    .sidebar-toggle{
        width:36px;
        min-width:36px;
        height:36px;
    }

    .page-title h1{
        font-size:16px;
    }

    .page-title p,
    .page-subtitle{
        display:none;
    }

    .top-right{
        margin-left:auto;
    }

    .admin-avatar{
        width:34px;
        height:34px;
    }

    .admin-name{
        display:none;
    }

    .admin-account-arrow{
        display:none;
    }

    .content,
    .page-content{
        padding:14px 12px;
    }

    .dashboard-stats,
    .dashboard-kpis{
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .premium-stat{
        padding:12px 10px;
    }

    .premium-stat h3{
        font-size:17px;
    }

    .premium-stat p{
        font-size:9px;
    }

    .dashboard-welcome{
        padding:18px 15px;
    }

    .dashboard-welcome h1{
        font-size:19px;
    }

    .dashboard-welcome p{
        font-size:10px;
        line-height:1.6;
    }

    .btn{
        min-height:38px;
    }

    .modal{
        padding:10px;
    }

    .modal-content{
        max-height:94vh;
    }
}


/* ================================
   VERY SMALL MOBILE
================================ */

@media (max-width:400px){

    .dashboard-stats,
    .dashboard-kpis{
        grid-template-columns:1fr;
    }

    .topbar{
        gap:7px;
    }

    .page-title h1{
        font-size:15px;
    }

    .content,
    .page-content{
        padding:12px 10px;
    }

    .sidebar{
        width:255px;
        min-width:255px;
    }

    .admin-account-menu{
        right:8px;
        width:190px;
    }
}
.login-page{
    min-height:100vh;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px 20px;
    background:
        radial-gradient(circle at top right, rgba(216,154,39,.08), transparent 32%),
        linear-gradient(135deg,#f4f6f9 0%,#eef2f6 100%);
}

.login-card{
    width:100%;
    max-width:440px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    padding:42px 42px 30px;
    box-shadow:0 20px 60px rgba(16,43,73,.12);
}

.login-logo{
    width:82px;
    height:82px;
    margin:0 auto 22px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.login-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.login-heading{
    text-align:center;
    margin-bottom:30px;
}

.login-heading h1{
    color:var(--navy);
    font-size:30px;
    font-weight:800;
    letter-spacing:1px;
    margin-bottom:5px;
}

.login-heading p{
    color:var(--text-soft);
    font-size:13px;
}

.login-card .form-group{
    margin-bottom:18px;
}

.login-card .form-group label{
    display:block;
    margin-bottom:7px;
    color:var(--text);
    font-size:13px;
    font-weight:600;
}

.login-card .form-group input{
    width:100%;
    height:46px;
    border:1px solid var(--border-dark);
    border-radius:10px;
    padding:0 14px;
    outline:none;
    background:#fff;
    color:var(--text);
    font-size:14px;
    transition:.2s ease;
}

.login-card .form-group input:focus{
    border-color:var(--gold);
    box-shadow:0 0 0 3px rgba(216,154,39,.10);
}

.login-options{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin:4px 0 22px;
    font-size:12px;
}

.remember{
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--text-soft);
    cursor:pointer;
}

.remember input{
    accent-color:var(--gold);
}

.login-options a{
    color:var(--navy);
    text-decoration:none;
    font-weight:600;
}

.login-options a:hover{
    color:var(--gold);
}

.login-btn{
    width:100%;
    height:48px;
    border:0;
    border-radius:10px;
    background:var(--navy);
    color:#fff;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    transition:.2s ease;
}

.login-btn:hover{
    background:var(--navy-light);
    transform:translateY(-1px);
}

.login-btn span{
    color:var(--gold-light);
    font-size:18px;
}

.login-footer{
    margin-top:24px;
    padding-top:20px;
    border-top:1px solid var(--border);
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:7px;
    color:var(--text-muted);
    font-size:11px;
}

.security-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--success);
    display:inline-block;
}

@media(max-width:500px){
    .login-page{
        padding:20px 14px;
    }

    .login-card{
        padding:32px 22px 25px;
        border-radius:16px;
    }

    .login-heading h1{
        font-size:26px;
    }
}
/* ================= MOBILE AUTHORITY MENU ================= */

.mobile-menu-bar{
    display:none;
}

.mobile-menu-overlay{
    display:none;
}

@media(max-width:650px){

    body{
        overflow-x:hidden;
    }

    .mobile-menu-bar{
        display:flex;
        position:sticky;
        top:0;
        z-index:120;
        height:62px;
        background:var(--navy-dark);
        color:#fff;
        align-items:center;
        justify-content:space-between;
        padding:0 16px;
        box-shadow:0 4px 15px rgba(0,0,0,.12);
    }

    .mobile-menu-brand{
        display:flex;
        align-items:center;
        gap:10px;
        font-weight:800;
        letter-spacing:.5px;
    }

    .mobile-menu-brand img{
        width:32px;
        height:32px;
        object-fit:contain;
    }

    .mobile-menu-button{
        width:42px;
        height:40px;
        border:1px solid rgba(255,255,255,.15);
        border-radius:9px;
        background:#173c63;
        color:#fff;
        font-size:22px;
        cursor:pointer;
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .mobile-menu-button:active{
        transform:scale(.96);
    }

    .sidebar{
        position:fixed !important;
        top:0 !important;
        left:-290px !important;
        width:275px !important;
        height:100vh !important;
        z-index:200 !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        transition:left .25s ease !important;
        box-shadow:8px 0 30px rgba(0,0,0,.22);
    }

    .sidebar.mobile-open{
        left:0 !important;
    }

    .mobile-menu-overlay{
        position:fixed;
        inset:0;
        z-index:190;
        background:rgba(4,15,28,.48);
        backdrop-filter:blur(2px);
        display:block;
        opacity:0;
        visibility:hidden;
        transition:.25s ease;
    }

    .mobile-menu-overlay.show{
        opacity:1;
        visibility:visible;
    }

    .main{
        margin-left:0 !important;
        width:100% !important;
    }

    .topbar{
        position:relative !important;
        top:auto !important;
    }

    .menu{
        padding-bottom:30px;
    }

    .menu-title{
        padding-top:18px;
    }

    .menu a{
        min-height:44px;
    }

    .sidebar-brand{
        position:sticky;
        top:0;
        z-index:5;
        background:var(--navy-dark);
    }

    body.menu-open{
        overflow:hidden;
    }
}

@media(max-width:380px){

    .mobile-menu-bar{
        padding:0 12px;
    }

    .mobile-menu-brand{
        font-size:14px;
    }

    .mobile-menu-button{
        width:40px;
        height:38px;
    }

    .sidebar{
        width:265px !important;
    }
}
.admin{
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
}

.admin-details{
    min-width:90px;
}

.admin-menu-btn{
    width:30px;
    height:30px;
    border:0;
    background:transparent;
    color:#7d8996;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:6px;
    transition:.2s;
}

.admin-menu-btn:hover{
    background:#f1f4f7;
    color:var(--navy);
}

.admin-menu-btn i{
    font-size:11px;
    transition:.2s;
}

.admin.open .admin-menu-btn i{
    transform:rotate(180deg);
}

.admin-dropdown{
    position:absolute;
    top:calc(100% + 12px);
    right:0;
    width:190px;
    background:#fff;
    border:1px solid #e5e9ee;
    border-radius:12px;
    box-shadow:0 12px 35px rgba(8,29,52,.15);
    padding:7px;
    z-index:500;
    opacity:0;
    visibility:hidden;
    transform:translateY(-6px);
    transition:.2s ease;
}

.admin.open .admin-dropdown{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.admin-dropdown a,
.admin-dropdown button{
    width:100%;
    min-height:42px;
    display:flex;
    align-items:center;
    gap:11px;
    padding:0 12px;
    border:0;
    border-radius:8px;
    background:transparent;
    color:#344454;
    text-decoration:none;
    font-family:inherit;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    text-align:left;
}

.admin-dropdown a:hover,
.admin-dropdown button:hover{
    background:#f4f6f8;
    color:var(--navy);
}

.admin-dropdown i{
    width:18px;
    text-align:center;
    color:#718092;
    font-size:13px;
}

.admin-dropdown button:hover i{
    color:var(--gold);
}

@media(max-width:650px){

    .admin-details{
        display:none;
    }

    .admin{
        gap:3px;
    }

    .admin-dropdown{
        right:0;
        width:185px;
    }

    .admin-menu-btn{
        width:28px;
    }
}
.profile-section-label{
    display:block;
    color:var(--gold);
    font-size:10px;
    font-weight:800;
    letter-spacing:1.5px;
    margin-bottom:5px;
}

.profile-layout{
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(300px,.8fr);
    gap:18px;
    align-items:start;
}

.profile-main-card,
.security-card,
.account-card,
.activity-card{
    background:#fff;
    border:1px solid #e5e9ee;
    border-radius:14px;
    overflow:hidden;
}

.profile-cover{
    position:relative;
    min-height:150px;
    background:var(--navy);
    overflow:hidden;
}

.profile-cover-pattern{
    position:absolute;
    width:360px;
    height:360px;
    right:-120px;
    top:-210px;
    border:1px solid rgba(216,154,39,.25);
    border-radius:50%;
}

.profile-cover-pattern:after{
    content:"";
    position:absolute;
    width:250px;
    height:250px;
    right:30px;
    top:50px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:50%;
}

.profile-main{
    position:absolute;
    left:28px;
    right:28px;
    bottom:-1px;
    display:flex;
    align-items:center;
    gap:18px;
}

.large-profile-avatar{
    width:92px;
    height:92px;
    border-radius:50%;
    background:#fff;
    border:5px solid rgba(255,255,255,.25);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--navy);
    font-size:25px;
    font-weight:800;
    box-shadow:0 5px 18px rgba(0,0,0,.18);
    flex-shrink:0;
}

.profile-identity{
    padding-bottom:17px;
    color:#fff;
}

.profile-name-row{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.profile-identity h2{
    margin:0;
    font-size:22px;
    font-weight:750;
}

.profile-identity p{
    margin:4px 0 5px;
    color:#c8d2dc;
    font-size:12px;
}

.profile-id{
    color:var(--gold-light);
    font-size:10px;
    font-weight:700;
    letter-spacing:.5px;
}

.profile-status{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:4px 8px;
    border-radius:20px;
    background:rgba(255,255,255,.1);
    border:1px solid rgba(255,255,255,.14);
    color:#d9f5e4;
    font-size:9px;
    font-weight:700;
}

.profile-status i{
    width:6px;
    height:6px;
    border-radius:50%;
    background:#36b86b;
}

.profile-details{
    padding:24px 26px 20px;
}

.section-heading{
    margin-bottom:20px;
}

.section-heading h3{
    margin:0;
    font-size:15px;
    color:#182a3d;
}

.section-heading p{
    margin:5px 0 0;
    color:#7b8794;
    font-size:11px;
}

.profile-form-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.profile-field label{
    display:block;
    margin-bottom:7px;
    color:#526172;
    font-size:10px;
    font-weight:700;
}

.profile-input{
    height:43px;
    display:flex;
    align-items:center;
    border:1px solid #dfe4e9;
    border-radius:9px;
    background:#fff;
    overflow:hidden;
    transition:.2s;
}

.profile-input:focus-within{
    border-color:var(--gold);
    box-shadow:0 0 0 3px rgba(216,154,39,.08);
}

.profile-input > span{
    width:39px;
    text-align:center;
    color:#9aa5b1;
    font-size:13px;
    flex-shrink:0;
}

.profile-input input{
    width:100%;
    height:100%;
    border:0;
    outline:0;
    background:transparent;
    color:#27384a;
    font-size:12px;
    font-weight:600;
    padding:0 8px 0 0;
}

.profile-input.locked{
    background:#f7f8fa;
}

.profile-input.locked input{
    color:#657384;
}

.profile-input small{
    margin-right:10px;
    color:#98a3ae;
    font-size:7px;
    font-weight:800;
    letter-spacing:.5px;
}

.profile-save-area{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    margin-top:22px;
    padding-top:18px;
    border-top:1px solid #edf0f3;
}

.profile-save-area strong{
    display:block;
    color:#34475a;
    font-size:10px;
}

.profile-save-area span{
    display:block;
    color:#98a2ad;
    font-size:9px;
    margin-top:3px;
}

.profile-save-area .btn{
    min-width:120px;
}

.profile-side{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.security-card{
    padding:20px;
}

.security-card-header{
    display:flex;
    align-items:center;
    gap:11px;
    padding-bottom:15px;
    border-bottom:1px solid #edf0f3;
}

.security-card-icon{
    width:35px;
    height:35px;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f8f2e7;
    color:var(--gold);
    font-size:15px;
    font-weight:800;
}

.security-card-header h3{
    margin:0;
    font-size:14px;
    color:#1c3044;
}

.security-card-header p{
    margin:3px 0 0;
    color:#8a95a1;
    font-size:9px;
}

.security-row{
    display:grid;
    grid-template-columns:31px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    padding:15px 0;
    border-bottom:1px solid #f0f2f4;
}

.security-row:last-child{
    border-bottom:0;
    padding-bottom:2px;
}

.security-row-icon{
    width:30px;
    height:30px;
    border-radius:8px;
    background:#f4f6f8;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#7d8996;
    font-size:13px;
    font-weight:800;
}

.security-row-icon.security-success{
    background:#edf8f1;
    color:#29965a;
}

.security-row-content{
    min-width:0;
}

.security-row-content strong{
    display:block;
    color:#34475a;
    font-size:10px;
    line-height:1.3;
}

.security-row-content span{
    display:block;
    color:#929da8;
    font-size:8px;
    margin-top:3px;
    line-height:1.4;
}

.security-action{
    border:1px solid #dfe4e8;
    background:#fff;
    color:#526273;
    border-radius:7px;
    padding:6px 9px;
    font-size:8px;
    font-weight:800;
    cursor:pointer;
}

.security-action:hover{
    border-color:var(--gold);
    color:var(--gold);
}

.security-action.security-enabled{
    color:#2b9559;
    background:#f1faf4;
    border-color:#d7efdf;
}

.session-active{
    padding:5px 8px;
    border-radius:20px;
    background:#edf8f1;
    color:#29945a;
    font-size:8px;
    font-weight:800;
}

.account-card{
    padding:20px;
    background:var(--navy);
    color:#fff;
}

.account-card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.account-card-top > span{
    color:#aebdcb;
    font-size:8px;
    font-weight:800;
    letter-spacing:1.2px;
}

.account-symbol{
    width:39px;
    height:39px;
    border-radius:50%;
    background:rgba(216,154,39,.14);
    border:1px solid rgba(216,154,39,.3);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--gold-light);
    font-size:11px;
    font-weight:800;
}

.account-card h3{
    margin:18px 0 5px;
    font-size:18px;
}

.account-card p{
    margin:0;
    color:#b8c5d1;
    font-size:10px;
    line-height:1.5;
}

.account-permission{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:18px;
    padding-top:13px;
    border-top:1px solid rgba(255,255,255,.1);
}

.account-permission span{
    color:#93a5b5;
    font-size:8px;
    font-weight:700;
    letter-spacing:.7px;
}

.account-permission strong{
    color:var(--gold-light);
    font-size:9px;
}

.activity-card{
    margin-top:18px;
}

.activity-header{
    padding:20px 22px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:15px;
    border-bottom:1px solid #edf0f3;
}

.activity-header h3{
    margin:3px 0 4px;
    color:#1c3044;
    font-size:15px;
}

.activity-header p{
    margin:0;
    color:#8b96a1;
    font-size:10px;
}

.activity-count{
    white-space:nowrap;
    padding:7px 10px;
    border:1px solid #e2e7eb;
    border-radius:7px;
    color:#778493;
    font-size:8px;
    font-weight:700;
}

.activity-table-wrap{
    overflow-x:auto;
}

.activity-table-wrap table{
    width:100%;
    border-collapse:collapse;
    min-width:700px;
}

.activity-table-wrap th{
    background:#fafbfc;
    color:#87929e;
    font-size:8px;
    font-weight:800;
    letter-spacing:.7px;
    padding:12px 16px;
    text-align:left;
    border-bottom:1px solid #edf0f3;
}

.activity-table-wrap td{
    padding:14px 16px;
    color:#596878;
    font-size:10px;
    border-bottom:1px solid #f0f2f4;
}

.activity-table-wrap tbody tr:last-child td{
    border-bottom:0;
}

.device-cell{
    display:flex;
    align-items:center;
    gap:10px;
}

.device-icon{
    width:34px;
    height:34px;
    border-radius:8px;
    background:#f1f4f7;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#657486;
    font-size:8px;
    font-weight:800;
}

.device-cell strong{
    display:block;
    color:#34475a;
    font-size:10px;
}

.device-cell span{
    display:block;
    margin-top:3px;
    color:#98a2ad;
    font-size:8px;
}

.ip-address{
    font-family:monospace;
    color:#697888;
    font-size:9px;
}

.activity-status{
    display:inline-flex;
    padding:5px 9px;
    border-radius:20px;
    font-size:8px;
    font-weight:800;
}

.activity-status.current{
    background:#edf8f1;
    color:#29945a;
}

.activity-status.success{
    background:#f1f4f7;
    color:#697888;
}


@media(max-width:900px){

    .profile-layout{
        grid-template-columns:1fr;
    }

    .profile-side{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

}


@media(max-width:650px){

    .profile-details{
        padding:20px 16px;
    }

    .profile-main{
        left:16px;
        right:16px;
        gap:12px;
    }

    .large-profile-avatar{
        width:72px;
        height:72px;
        font-size:19px;
        border-width:4px;
    }

    .profile-identity h2{
        font-size:17px;
    }

    .profile-identity p{
        font-size:10px;
    }

    .profile-form-grid{
        grid-template-columns:1fr;
        gap:13px;
    }

    .profile-save-area{
        align-items:flex-start;
        flex-direction:column;
    }

    .profile-save-area .btn{
        width:100%;
    }

    .profile-side{
        display:flex;
    }

    .activity-header{
        align-items:flex-start;
        flex-direction:column;
    }

    .activity-count{
        width:max-content;
    }

}
.wallet-summary-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1fr;
    gap:14px;
    margin-bottom:18px;
}

.wallet-balance-card{
    min-height:155px;
    padding:22px;
    border-radius:14px;
    background:var(--navy);
    color:#fff;
    position:relative;
    overflow:hidden;
}

.wallet-balance-card:after{
    content:"";
    position:absolute;
    width:190px;
    height:190px;
    right:-70px;
    top:-80px;
    border:1px solid rgba(216,154,39,.2);
    border-radius:50%;
}

.wallet-balance-top{
    display:flex;
    justify-content:space-between;
    gap:15px;
    position:relative;
    z-index:2;
}

.wallet-label{
    display:block;
    color:#9eafbe;
    font-size:8px;
    font-weight:800;
    letter-spacing:1px;
}

.wallet-balance-card h2{
    margin:7px 0 3px;
    font-size:29px;
    letter-spacing:.2px;
}

.wallet-balance-card p{
    margin:0;
    color:#b6c4d0;
    font-size:9px;
}

.wallet-coin-icon{
    width:48px;
    height:48px;
    border-radius:12px;
    background:rgba(216,154,39,.13);
    border:1px solid rgba(216,154,39,.25);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
}

.wallet-value{
    position:absolute;
    bottom:19px;
    left:22px;
    right:22px;
    display:flex;
    align-items:center;
    gap:10px;
    padding-top:10px;
    border-top:1px solid rgba(255,255,255,.1);
    z-index:2;
}

.wallet-value span{
    color:#91a3b3;
    font-size:7px;
    font-weight:800;
    letter-spacing:.8px;
}

.wallet-value strong{
    color:var(--gold-light);
    font-size:13px;
}

.wallet-value small{
    color:#899bab;
    font-size:8px;
}

.wallet-stat-card{
    min-height:155px;
    background:#fff;
    border:1px solid #e4e8ec;
    border-radius:14px;
    padding:20px 16px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}

.wallet-stat-icon{
    width:35px;
    height:35px;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
    font-size:16px;
}

.wallet-stat-icon.earned{
    background:#edf8f1;
    color:#29955a;
}

.wallet-stat-icon.redeemed{
    background:#f7eeee;
    color:#b95d5d;
}

.wallet-stat-icon.pending{
    background:#fbf5e8;
    color:#bd8828;
}

.wallet-stat-card span{
    display:block;
    color:#748191;
    font-size:9px;
    font-weight:700;
}

.wallet-stat-card strong{
    display:block;
    color:#26394d;
    font-size:20px;
    margin:4px 0;
}

.wallet-stat-card small{
    color:#9aa4ae;
    font-size:8px;
}

.wallet-actions-card{
    background:#fff;
    border:1px solid #e4e8ec;
    border-radius:14px;
    padding:19px 20px;
    margin-bottom:18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
}

.wallet-section-label{
    display:block;
    color:var(--gold);
    font-size:8px;
    font-weight:800;
    letter-spacing:1.2px;
    margin-bottom:4px;
}

.wallet-actions-card h3{
    margin:0;
    font-size:14px;
    color:#25394d;
}

.wallet-actions-card p{
    margin:4px 0 0;
    color:#8b96a2;
    font-size:9px;
}

.wallet-action-buttons{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px;
    flex:1;
    max-width:700px;
}

.wallet-action-btn{
    display:flex;
    align-items:center;
    gap:9px;
    padding:10px;
    border:1px solid #e4e8ec;
    border-radius:9px;
    text-decoration:none;
    transition:.2s;
}

.wallet-action-btn:hover{
    border-color:rgba(216,154,39,.45);
    background:#fffcf6;
}

.wallet-action-btn > span{
    width:30px;
    height:30px;
    flex-shrink:0;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f7f4ec;
    color:var(--gold);
    font-size:12px;
    font-weight:800;
}

.wallet-action-btn strong{
    display:block;
    color:#3a4c5e;
    font-size:9px;
}

.wallet-action-btn small{
    display:block;
    margin-top:3px;
    color:#9aa3ad;
    font-size:7px;
}

.wallet-two-column{
    display:grid;
    grid-template-columns:1.2fr 1fr;
    gap:18px;
    margin-bottom:18px;
}

.wallet-fixed-rate{
    padding:6px 9px;
    border-radius:20px;
    background:#f8f3e8;
    color:#ae7b20;
    font-size:8px;
    font-weight:800;
}

.economy-list{
    padding:0 20px 10px;
}

.economy-item{
    display:grid;
    grid-template-columns:34px 1fr auto;
    align-items:center;
    gap:10px;
    padding:13px 0;
    border-bottom:1px solid #edf0f3;
}

.economy-item:last-child{
    border-bottom:0;
}

.economy-icon{
    width:32px;
    height:32px;
    border-radius:8px;
    background:#f5f7f8;
    color:#7b8793;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:800;
}

.economy-info strong{
    display:block;
    color:#425366;
    font-size:10px;
}

.economy-info span{
    display:block;
    color:#9aa4ae;
    font-size:8px;
    margin-top:3px;
}

.economy-value{
    color:#34495d;
    font-size:10px;
}

.redemption-summary{
    padding:4px 18px 18px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.redemption-box{
    padding:13px;
    border:1px solid #edf0f3;
    border-radius:9px;
}

.redemption-box span{
    display:block;
    color:#8a95a0;
    font-size:8px;
    font-weight:700;
}

.redemption-box strong{
    display:block;
    margin:5px 0 2px;
    color:#35495c;
    font-size:16px;
}

.redemption-box small{
    color:#a0a8b0;
    font-size:7px;
}

.wallet-transactions-card{
    margin-bottom:18px;
}

.text-link{
    color:var(--gold);
    font-size:9px;
    font-weight:800;
    text-decoration:none;
}

.transaction-type{
    display:inline-flex;
    padding:5px 8px;
    border-radius:20px;
    font-size:7px;
    font-weight:800;
}

.transaction-type.earned{
    background:#edf8f1;
    color:#29955a;
}

.transaction-type.redeemed{
    background:#f7eeee;
    color:#ae6060;
}

.coin-positive{
    color:#29955a;
}

.coin-negative{
    color:#b45d5d;
}

.redemption-process-card{
    background:#fff;
    border:1px solid #e4e8ec;
    border-radius:14px;
    padding:22px;
}

.process-heading{
    margin-bottom:24px;
}

.process-heading h3{
    margin:2px 0 4px;
    color:#263a4e;
    font-size:15px;
}

.process-heading p{
    margin:0;
    color:#8b96a1;
    font-size:9px;
}

.process-flow{
    display:flex;
    align-items:center;
}

.process-step{
    flex:1;
    text-align:center;
    position:relative;
}

.process-number{
    color:#a1aab3;
    font-size:7px;
    font-weight:800;
    letter-spacing:1px;
    margin-bottom:7px;
}

.process-icon{
    width:42px;
    height:42px;
    margin:0 auto 9px;
    border-radius:50%;
    background:#f8f3e8;
    border:1px solid #eee2c7;
    color:var(--gold);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:800;
}

.process-step strong{
    display:block;
    color:#3d5062;
    font-size:10px;
}

.process-step span{
    display:block;
    max-width:150px;
    margin:5px auto 0;
    color:#99a3ad;
    font-size:8px;
    line-height:1.5;
}

.process-line{
    width:60px;
    height:1px;
    background:#dfe4e8;
    flex-shrink:0;
}


@media(max-width:1100px){

    .wallet-summary-grid{
        grid-template-columns:1fr 1fr;
    }

    .wallet-balance-card{
        grid-column:span 2;
    }

    .wallet-actions-card{
        align-items:stretch;
        flex-direction:column;
    }

    .wallet-action-buttons{
        max-width:none;
    }

}


@media(max-width:900px){

    .wallet-two-column{
        grid-template-columns:1fr;
    }

    .process-flow{
        flex-wrap:wrap;
        gap:20px;
    }

    .process-step{
        min-width:calc(50% - 10px);
    }

    .process-line{
        display:none;
    }

}


@media(max-width:650px){

    .wallet-summary-grid{
        grid-template-columns:1fr;
    }

    .wallet-balance-card{
        grid-column:auto;
    }

    .wallet-actions-card{
        padding:17px;
    }

    .wallet-action-buttons{
        grid-template-columns:1fr 1fr;
    }

    .wallet-value{
        gap:7px;
    }

    .wallet-value strong{
        font-size:12px;
    }

    .process-step{
        min-width:100%;
    }

}
.wallet-rate-banner{
    display:flex;
    align-items:center;
    gap:14px;
    background:#fff;
    border:1px solid #e5e9ee;
    border-left:3px solid #d89a27;
    border-radius:10px;
    padding:13px 16px;
    margin-bottom:18px;
}

.wallet-rate-icon{
    width:38px;
    height:38px;
    border-radius:9px;
    background:#fff7e5;
    color:#c58617;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
}

.wallet-rate-banner strong{
    display:block;
    color:#102b49;
    font-size:12px;
}

.wallet-rate-banner span{
    display:block;
    color:#8b96a1;
    font-size:10px;
    margin-top:3px;
}

.wallet-rate-example{
    margin-left:auto;
    padding-left:20px;
    border-left:1px solid #e8ecf0;
}

.wallet-rate-example strong{
    color:#18734a;
}

.wallet-summary-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:15px;
    margin-bottom:18px;
}

.wallet-stat-card{
    background:#fff;
    border:1px solid #e4e9ef;
    border-radius:11px;
    padding:16px;
    display:flex;
    align-items:center;
    gap:13px;
}

.wallet-stat-icon{
    width:42px;
    height:42px;
    flex:0 0 42px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    font-weight:800;
}

.wallet-stat-icon.users{
    background:#edf3f8;
    color:#315775;
}

.wallet-stat-icon.earned{
    background:#edf7f1;
    color:#23764e;
}

.wallet-stat-icon.redeemed{
    background:#fff0ef;
    color:#b35a55;
}

.wallet-stat-icon.balance{
    background:#fff6df;
    color:#bd7d0d;
}

.wallet-stat-card span{
    display:block;
    color:#7e8994;
    font-size:10px;
    margin-bottom:5px;
}

.wallet-stat-card strong{
    display:block;
    color:#102b49;
    font-size:19px;
}

.wallet-stat-card small{
    display:block;
    color:#a0a9b2;
    font-size:9px;
    margin-top:4px;
}

.wallet-main-balance{
    border-color:rgba(216,154,39,.35);
}

.wallet-student-card{
    background:#fff;
    border:1px solid #e4e9ef;
    border-radius:12px;
    overflow:hidden;
}

.wallet-card-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:18px;
    border-bottom:1px solid #e7ebef;
}

.wallet-card-header h3{
    margin:4px 0 4px;
    color:#102b49;
    font-size:15px;
}

.wallet-card-header p{
    margin:0;
    color:#89949e;
    font-size:10px;
}

.wallet-section-label{
    color:#a08758;
    font-size:8px;
    letter-spacing:1px;
    font-weight:800;
}

.wallet-controls{
    display:flex;
    align-items:center;
    gap:8px;
}

.wallet-search{
    width:205px;
    height:35px;
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid #dfe5ea;
    border-radius:8px;
    padding:0 10px;
}

.wallet-search span{
    color:#8c98a2;
    font-size:17px;
}

.wallet-search input{
    width:100%;
    border:0;
    outline:0;
    font-size:10px;
    color:#34495d;
}

.wallet-controls select{
    height:35px;
    border:1px solid #dfe5ea;
    border-radius:8px;
    background:#fff;
    color:#526171;
    font-size:10px;
    padding:0 9px;
    outline:0;
}

.wallet-export-btn{
    height:35px;
    border:1px solid #d8e0e7;
    background:#102b49;
    color:#fff;
    border-radius:8px;
    padding:0 12px;
    font-size:10px;
    font-weight:700;
    cursor:pointer;
}

.wallet-table-wrap{
    width:100%;
    overflow-x:auto;
}

.wallet-student-table{
    width:100%;
    min-width:920px;
    border-collapse:collapse;
}

.wallet-student-table th{
    padding:12px 14px;
    text-align:left;
    background:#f8fafc;
    color:#788591;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:.35px;
    border-bottom:1px solid #e7ebef;
}

.wallet-student-table td{
    padding:12px 14px;
    border-bottom:1px solid #edf0f3;
    color:#4e5e6d;
    font-size:10px;
}

.wallet-student-table tbody tr:hover{
    background:#fcfdfd;
}

.wallet-student{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:165px;
}

.wallet-avatar{
    width:34px;
    height:34px;
    border-radius:9px;
    background:#edf3f8;
    color:#102b49;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:800;
}

.wallet-student strong{
    display:block;
    color:#263c52;
    font-size:10px;
    margin-bottom:3px;
}

.wallet-student span{
    display:block;
    color:#9ba5ae;
    font-size:8px;
}

.wallet-student-table td > strong{
    color:#31465a;
    font-size:11px;
}

.wallet-student-table td small{
    display:block;
    color:#9ca5ae;
    font-size:8px;
    margin-top:2px;
}

.redeemed-text{
    color:#b45c58 !important;
}

.available-coins{
    color:#bd7d0d !important;
    font-size:12px !important;
}

.available-money{
    color:#18734a !important;
    font-size:12px !important;
}

.wallet-status{
    display:inline-flex;
    padding:5px 8px;
    border-radius:20px;
    font-size:8px;
    font-weight:700;
}

.wallet-status.active{
    color:#22764e;
    background:#eaf7f0;
}

.wallet-view-btn{
    height:29px;
    padding:0 10px;
    border:1px solid #dbe2e8;
    border-radius:7px;
    background:#fff;
    color:#315775;
    font-size:9px;
    font-weight:700;
    cursor:pointer;
}

.wallet-view-btn:hover{
    border-color:#d89a27;
    color:#bd7d0d;
}

.wallet-table-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px 17px;
    color:#8c97a1;
    font-size:9px;
    background:#fafbfc;
}

.wallet-table-footer strong{
    color:#415568;
}

.wallet-table-footer span:last-child strong{
    color:#bd7d0d;
}

.wallet-info-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-top:18px;
}

.wallet-info-card{
    background:#fff;
    border:1px solid #e4e9ef;
    border-radius:12px;
    padding:18px;
}

.wallet-info-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    margin-bottom:14px;
}

.wallet-info-card h3{
    margin:4px 0 0;
    color:#102b49;
    font-size:14px;
}

.wallet-info-card-icon{
    width:35px;
    height:35px;
    border-radius:9px;
    background:#fff6df;
    color:#bd7d0d;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:800;
}

.wallet-calculation > div{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:9px 0;
    border-bottom:1px solid #edf0f3;
}

.wallet-calculation span{
    color:#73808c;
    font-size:10px;
}

.wallet-calculation strong{
    color:#344a5e;
    font-size:11px;
}

.wallet-calculation .calculation-minus strong{
    color:#b45c58;
}

.wallet-calculation .calculation-result{
    padding-top:12px;
}

.wallet-calculation .calculation-result strong{
    color:#bd7d0d;
    font-size:12px;
}

.wallet-calculation .calculation-result.money{
    border-bottom:0;
}

.wallet-calculation .calculation-result.money strong{
    color:#18734a;
    font-size:13px;
}

.conversion-list{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}

.conversion-list div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:9px 11px;
    background:#f8fafc;
    border:1px solid #edf0f3;
    border-radius:7px;
}

.conversion-list span{
    color:#74818d;
    font-size:10px;
}

.conversion-list strong{
    color:#bd7d0d;
    font-size:11px;
}

.student-wallet-modal{
    position:fixed;
    inset:0;
    background:rgba(8,29,52,.48);
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    z-index:3000;
}

.student-wallet-modal.show{
    display:flex;
}

.student-wallet-modal-box{
    width:100%;
    max-width:420px;
    background:#fff;
    border-radius:14px;
    padding:22px;
    position:relative;
    box-shadow:0 20px 55px rgba(0,0,0,.18);
}

.wallet-modal-close{
    position:absolute;
    right:15px;
    top:15px;
    width:30px;
    height:30px;
    border:1px solid #e2e7ec;
    border-radius:8px;
    background:#fff;
    color:#7b8792;
    font-size:18px;
    cursor:pointer;
}

.modal-student-header{
    display:flex;
    align-items:center;
    gap:12px;
    padding-right:35px;
}

.modal-student-avatar{
    width:48px;
    height:48px;
    border-radius:11px;
    background:#102b49;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:12px;
    font-weight:800;
}

.modal-student-header span{
    display:block;
    color:#a08758;
    font-size:8px;
    letter-spacing:1px;
    font-weight:800;
    margin-bottom:4px;
}

.modal-student-header h3{
    margin:0 0 3px;
    color:#102b49;
    font-size:17px;
}

.modal-student-header p{
    margin:0;
    color:#9aa4ad;
    font-size:9px;
}

.modal-student-class{
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:#f8fafc;
    padding:10px 12px;
    border-radius:8px;
    margin-top:16px;
}

.modal-student-class span{
    color:#7e8994;
    font-size:10px;
}

.modal-student-class strong{
    color:#102b49;
    font-size:11px;
}

.modal-wallet-balance{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:10px;
}

.modal-wallet-balance > div{
    padding:15px;
    background:#f8fafc;
    border:1px solid #e8edf1;
    border-radius:9px;
}

.modal-wallet-balance span{
    display:block;
    color:#89949e;
    font-size:9px;
    margin-bottom:7px;
}

.modal-wallet-balance strong{
    display:block;
    color:#bd7d0d;
    font-size:20px;
}

.modal-wallet-balance > div:last-child strong{
    color:#18734a;
}

.modal-wallet-balance small{
    display:block;
    color:#a1aab3;
    font-size:8px;
    margin-top:3px;
}

.modal-wallet-stats{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:10px;
}

.modal-wallet-stats div{
    padding:11px 12px;
    border-bottom:1px solid #edf0f3;
}

.modal-wallet-stats span{
    display:block;
    color:#8a959e;
    font-size:9px;
    margin-bottom:5px;
}

.modal-wallet-stats strong{
    color:#33495c;
    font-size:12px;
}

.modal-wallet-note{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:11px 12px;
    margin-top:8px;
    background:#f8fafc;
    border-radius:8px;
}

.modal-wallet-note span{
    color:#7f8a95;
    font-size:9px;
}

.modal-wallet-note strong{
    color:#23764e;
    font-size:9px;
}

.modal-history-link{
    display:block;
    text-align:center;
    margin-top:14px;
    padding:11px;
    border:1px solid #dfe5ea;
    border-radius:8px;
    color:#315775;
    font-size:10px;
    font-weight:700;
    text-decoration:none;
}

.modal-history-link:hover{
    border-color:#d89a27;
    color:#bd7d0d;
}

@media(max-width:1100px){

    .wallet-summary-grid{
        grid-template-columns:1fr 1fr;
    }

    .wallet-card-header{
        align-items:flex-start;
        flex-direction:column;
    }

    .wallet-controls{
        width:100%;
    }

}

@media(max-width:750px){

    .wallet-rate-banner{
        flex-wrap:wrap;
    }

    .wallet-rate-example{
        margin-left:0;
    }

    .wallet-summary-grid{
        grid-template-columns:1fr;
    }

    .wallet-controls{
        flex-wrap:wrap;
    }

    .wallet-search{
        width:100%;
    }

    .wallet-controls select{
        flex:1;
    }

    .wallet-info-grid{
        grid-template-columns:1fr;
    }

}

@media(max-width:500px){

    .wallet-rate-example{
        padding-left:10px;
    }

    .wallet-table-footer{
        gap:10px;
        flex-direction:column;
        align-items:flex-start;
    }

    .conversion-list{
        grid-template-columns:1fr;
    }

}
/* ================================
   WALLET OVERVIEW
================================ */

.wallet-hero{
    background:#102b49;
    border-radius:16px;
    padding:24px 26px;
    margin-bottom:20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    position:relative;
    overflow:hidden;
    box-shadow:0 10px 28px rgba(16,43,73,.12);
}

.wallet-hero::after{
    content:"";
    position:absolute;
    width:190px;
    height:190px;
    border:1px solid rgba(240,189,87,.16);
    border-radius:50%;
    right:-55px;
    top:-85px;
}

.wallet-hero-label{
    color:#f0bd57;
    font-size:9px;
    font-weight:800;
    letter-spacing:1.8px;
    margin-bottom:6px;
}

.wallet-hero h1{
    color:#fff;
    font-size:23px;
    font-weight:800;
    letter-spacing:-.4px;
}

.wallet-hero p{
    color:#aebdcd;
    font-size:11px;
    margin-top:5px;
    max-width:600px;
}

.wallet-hero-value{
    position:relative;
    z-index:2;
    min-width:180px;
    padding:14px 17px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:11px;
    background:rgba(255,255,255,.06);
}

.wallet-hero-value span{
    display:block;
    color:#91a4b8;
    font-size:8px;
    font-weight:700;
    letter-spacing:1.2px;
}

.wallet-hero-value strong{
    display:block;
    color:#f0bd57;
    font-size:19px;
    margin-top:4px;
}

.wallet-hero-value small{
    display:block;
    color:#aebdcd;
    font-size:8px;
    margin-top:3px;
}

.wallet-stats{
    margin-bottom:20px;
}

.wallet-stat{
    position:relative;
    overflow:hidden;
}

.wallet-stat::after{
    content:"";
    position:absolute;
    width:85px;
    height:85px;
    right:-38px;
    bottom:-42px;
    border-radius:50%;
    background:rgba(216,154,39,.06);
}

.wallet-stat.students{
    border-top:3px solid #2d73b9;
}

.wallet-stat.students .stat-icon{
    color:#2d73b9;
    background:#edf5fd;
    border-color:#d9e9f8;
}

.wallet-stat.coins{
    border-top:3px solid var(--gold);
}

.wallet-stat.coins .stat-icon{
    color:#b7791f;
    background:#fff6df;
    border-color:#f3e3bf;
}

.wallet-stat.redeemed{
    border-top:3px solid #c93b48;
}

.wallet-stat.redeemed .stat-icon{
    color:#c93b48;
    background:#fcecef;
    border-color:#f2d9de;
}

.wallet-stat.balance{
    border-top:3px solid #198754;
}

.wallet-stat.balance .stat-icon{
    color:#198754;
    background:#eaf7f0;
    border-color:#d4eddf;
}

.wallet-stat.balance .stat-value{
    color:#198754;
}

.wallet-card{
    margin-bottom:20px;
}

.wallet-header{
    min-height:78px;
}

.wallet-actions{
    display:flex;
    align-items:center;
    gap:8px;
}

.wallet-search{
    width:220px;
    height:38px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 11px;
    border:1px solid var(--border-dark);
    border-radius:9px;
    background:#fff;
}

.wallet-search i{
    color:var(--text-muted);
    font-size:11px;
}

.wallet-search input{
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    color:var(--text);
    font-size:10px;
}

.wallet-search input::placeholder{
    color:#a6afba;
}

.wallet-class-filter{
    width:120px;
}

.wallet-table-info{
    min-height:42px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
    color:var(--text-muted);
    font-size:10px;
}

.wallet-table-info strong{
    color:var(--gold);
    font-size:10px;
}

.wallet-table-wrapper{
    border:0;
    border-radius:0;
}

.wallet-table-wrapper table{
    min-width:900px;
}

.wallet-table-wrapper td strong{
    color:var(--navy);
    font-size:11px;
}

.wallet-table-wrapper td small{
    display:block;
    color:var(--text-muted);
    font-size:8px;
    margin-top:2px;
}

.wallet-table-wrapper .wallet-redeemed{
    color:var(--danger);
}

.wallet-table-wrapper .wallet-available{
    color:var(--gold);
    font-size:12px;
}

.wallet-table-wrapper .wallet-money{
    color:var(--success);
    font-size:12px;
}

.wallet-view-btn{
    min-height:30px;
    color:var(--navy);
    border-color:var(--border);
}

.wallet-view-btn:hover{
    color:#fff;
    background:var(--navy);
    border-color:var(--navy);
}

.wallet-footer{
    min-height:48px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-top:1px solid var(--border);
    color:var(--text-muted);
    font-size:9px;
}

.wallet-footer strong{
    color:var(--navy);
}

.wallet-footer span:last-child strong{
    color:var(--gold);
}

.wallet-bottom-grid{
    grid-template-columns:1.25fr .75fr;
    gap:20px;
}

.wallet-calculation-row{
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
    color:var(--text-soft);
    font-size:10px;
}

.wallet-calculation-row strong{
    color:var(--navy);
    font-size:12px;
}

.wallet-calculation-row.minus strong{
    color:var(--danger);
}

.wallet-calculation-row.result{
    margin-top:10px;
    border-top:1px solid var(--border-dark);
    border-bottom:0;
}

.wallet-calculation-row.result strong{
    color:var(--gold);
    font-size:16px;
}

.wallet-calculation-row.money-result{
    border-bottom:0;
}

.wallet-calculation-row.money-result strong{
    color:var(--success);
    font-size:18px;
}

.conversion-row{
    min-height:40px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--surface-soft);
    border:1px solid var(--border);
    border-radius:8px;
    padding:0 12px;
    margin-bottom:8px;
}

.conversion-row span{
    color:var(--text-soft);
    font-size:10px;
}

.conversion-row strong{
    color:var(--success);
    font-size:11px;
}

.wallet-modal-profile{
    display:flex;
    align-items:center;
    gap:11px;
    margin-bottom:18px;
}

.wallet-modal-profile .avatar{
    width:45px;
    height:45px;
    min-width:45px;
}

.wallet-modal-money{
    color:var(--success) !important;
}

.wallet-modal-note{
    margin-top:15px;
    padding:11px 13px;
    display:flex;
    align-items:flex-start;
    gap:9px;
    border:1px solid #e6edf2;
    border-radius:9px;
    background:#f8fafc;
    color:var(--text-muted);
    font-size:9px;
    line-height:1.5;
}

.wallet-modal-note i{
    color:var(--gold);
    margin-top:2px;
}


/* TABLET */

@media(max-width:1100px){

    .wallet-hero{
        padding:21px;
    }

    .wallet-actions{
        flex-wrap:wrap;
        justify-content:flex-end;
    }

    .wallet-search{
        width:190px;
    }

    .wallet-bottom-grid{
        grid-template-columns:1fr;
    }

}


/* MOBILE */

@media(max-width:650px){

    .wallet-hero{
        padding:19px;
        display:block;
    }

    .wallet-hero h1{
        font-size:20px;
    }

    .wallet-hero p{
        font-size:10px;
    }

    .wallet-hero-value{
        margin-top:15px;
        min-width:0;
    }

    .wallet-stats{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .wallet-stat{
        min-height:115px;
        padding:14px;
    }

    .wallet-stat .stat-value{
        font-size:20px;
    }

    .wallet-header{
        padding:16px;
    }

    .wallet-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr 105px;
        gap:8px;
    }

    .wallet-search{
        width:100%;
    }

    .wallet-class-filter{
        width:100%;
    }

    .wallet-actions .btn{
        grid-column:1 / -1;
        width:100%;
    }

    .wallet-table-info{
        padding:0 16px;
    }

    .wallet-footer{
        padding:0 16px;
    }

    .wallet-bottom-grid{
        gap:14px;
    }

}


@media(max-width:400px){

    .wallet-stats{
        grid-template-columns:1fr;
    }

    .wallet-hero h1{
        font-size:19px;
    }

    .wallet-actions{
        grid-template-columns:1fr;
    }

}
/* ================================
   COIN TRANSACTIONS
================================ */

.coin-page-hero{
    background:#102b49;
    border-radius:16px;
    padding:24px 26px;
    margin-bottom:20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    overflow:hidden;
    position:relative;
    box-shadow:0 10px 28px rgba(16,43,73,.12);
}

.coin-page-hero:after{
    content:"";
    position:absolute;
    width:190px;
    height:190px;
    border:1px solid rgba(240,189,87,.15);
    border-radius:50%;
    right:-60px;
    top:-95px;
}

.coin-page-label{
    color:#f0bd57;
    font-size:9px;
    font-weight:800;
    letter-spacing:1.7px;
    margin-bottom:6px;
}

.coin-page-hero h1{
    color:#fff;
    font-size:23px;
    font-weight:800;
}

.coin-page-hero p{
    color:#aebdcd;
    font-size:11px;
    margin-top:5px;
    max-width:620px;
}

.coin-value-box{
    position:relative;
    z-index:2;
    min-width:185px;
    padding:15px 17px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.13);
    border-radius:11px;
}

.coin-value-box span{
    display:block;
    color:#91a4b8;
    font-size:8px;
    font-weight:700;
    letter-spacing:1.2px;
}

.coin-value-box strong{
    display:block;
    color:#f0bd57;
    font-size:19px;
    margin-top:4px;
}

.coin-value-box small{
    color:#aebdcd;
    display:block;
    font-size:8px;
    margin-top:3px;
}

.coin-stats{
    margin-bottom:20px;
}

.coin-green{
    color:#198754 !important;
}

.coin-red{
    color:#c93b48 !important;
}

.coin-gold{
    color:#b7791f !important;
}

.coin-ledger-card{
    margin-bottom:20px;
}

.coin-ledger-header{
    min-height:80px;
}

.coin-ledger-actions{
    display:flex;
    align-items:center;
    gap:8px;
}

.coin-search{
    width:220px;
    height:38px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 11px;
    border:1px solid var(--border-dark);
    border-radius:9px;
    background:#fff;
}

.coin-search i{
    color:var(--text-muted);
    font-size:11px;
}

.coin-search input{
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    color:var(--text);
    font-size:10px;
}

.coin-search input::placeholder{
    color:#a6afba;
}

.coin-ledger-actions select{
    min-width:115px;
}

.coin-ledger-summary{
    min-height:42px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
    color:var(--text-muted);
    font-size:10px;
}

.coin-ledger-summary strong{
    color:var(--gold);
}

.coin-table-wrapper{
    border:0;
    border-radius:0;
}

.coin-table-wrapper table{
    min-width:1050px;
}

.coin-table-wrapper td small{
    display:block;
    color:var(--text-muted);
    font-size:8px;
    margin-top:3px;
}

.source-text{
    font-size:10px;
    color:var(--text-soft);
}

.coin-type{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 8px;
    border-radius:6px;
    font-size:8px;
    font-weight:700;
    white-space:nowrap;
}

.coin-type.earned{
    color:#198754;
    background:#eaf7f0;
}

.coin-type.redeemed{
    color:#c93b48;
    background:#fcecef;
}

.coin-type.adjustment{
    color:#a66a00;
    background:#fff6df;
}

.coin-earned{
    color:#198754 !important;
    font-size:12px !important;
}

.coin-redeemed{
    color:#c93b48 !important;
    font-size:12px !important;
}

.coin-money{
    color:#198754 !important;
    font-size:11px !important;
}

.coin-ledger-footer{
    min-height:48px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-top:1px solid var(--border);
    color:var(--text-muted);
    font-size:9px;
}

.coin-ledger-footer strong{
    color:var(--navy);
}

.coin-ledger-footer span:last-child strong{
    color:var(--gold);
}

.coin-bottom-grid{
    grid-template-columns:1.1fr .9fr;
    gap:20px;
}

.coin-flow-row{
    min-height:55px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
}

.coin-flow-row > div:first-child{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.coin-flow-row span{
    color:var(--text-muted);
    font-size:10px;
}

.coin-flow-row strong{
    font-size:14px;
}

.coin-flow-icon{
    width:34px;
    height:34px;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.earned-flow{
    color:#198754;
    background:#eaf7f0;
}

.redeemed-flow{
    color:#c93b48;
    background:#fcecef;
}

.coin-flow-total{
    margin-top:13px;
    padding:13px;
    border:1px solid #ead9b6;
    background:#fffaf0;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.coin-flow-total span{
    color:var(--text-soft);
    font-size:10px;
}

.coin-flow-total strong{
    color:var(--gold);
    font-size:14px;
}

.source-summary-row{
    min-height:42px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
}

.source-summary-row:last-child{
    border-bottom:0;
}

.source-summary-row span{
    color:var(--text-soft);
    font-size:10px;
}

.source-summary-row strong{
    color:var(--navy);
    font-size:11px;
}


/* TABLET */

@media(max-width:1100px){

    .coin-page-hero{
        padding:21px;
    }

    .coin-ledger-actions{
        flex-wrap:wrap;
        justify-content:flex-end;
    }

    .coin-search{
        width:190px;
    }

    .coin-bottom-grid{
        grid-template-columns:1fr;
    }

}


/* MOBILE */

@media(max-width:650px){

    .coin-page-hero{
        display:block;
        padding:19px;
    }

    .coin-page-hero h1{
        font-size:20px;
    }

    .coin-page-hero p{
        font-size:10px;
    }

    .coin-value-box{
        margin-top:15px;
        min-width:0;
    }

    .coin-stats{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .coin-ledger-header{
        padding:16px;
    }

    .coin-ledger-actions{
        width:100%;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .coin-search{
        width:100%;
        grid-column:1 / -1;
    }

    .coin-ledger-actions select{
        width:100%;
        min-width:0;
    }

    .coin-ledger-summary{
        padding:0 16px;
    }

    .coin-ledger-footer{
        padding:0 16px;
    }

}


@media(max-width:400px){

    .coin-stats{
        grid-template-columns:1fr;
    }

    .coin-ledger-actions{
        grid-template-columns:1fr;
    }

}
.redemption-hero{
    background:#102b49;
    border-radius:16px;
    padding:24px 26px;
    margin-bottom:20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    position:relative;
    overflow:hidden;
    box-shadow:0 10px 28px rgba(16,43,73,.12);
}

.redemption-hero:after{
    content:"";
    position:absolute;
    width:190px;
    height:190px;
    border:1px solid rgba(240,189,87,.14);
    border-radius:50%;
    right:-65px;
    top:-100px;
}

.redemption-label{
    color:#f0bd57;
    font-size:9px;
    font-weight:800;
    letter-spacing:1.7px;
    margin-bottom:6px;
}

.redemption-hero h1{
    color:#fff;
    font-size:23px;
    font-weight:800;
}

.redemption-hero p{
    color:#aebdcd;
    font-size:11px;
    margin-top:5px;
    max-width:650px;
}

.redemption-value-box{
    position:relative;
    z-index:2;
    min-width:190px;
    padding:15px 17px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.13);
    border-radius:11px;
}

.redemption-value-box span{
    display:block;
    color:#91a4b8;
    font-size:8px;
    font-weight:700;
    letter-spacing:1.2px;
}

.redemption-value-box strong{
    display:block;
    color:#f0bd57;
    font-size:19px;
    margin-top:4px;
}

.redemption-value-box small{
    display:block;
    color:#aebdcd;
    font-size:8px;
    margin-top:3px;
}

.redemption-stats{
    margin-bottom:20px;
}

.redemption-pending{
    color:#b7791f !important;
}

.redemption-approved{
    color:#198754 !important;
}

.redemption-money{
    color:#198754 !important;
}

.redemption-card{
    margin-bottom:20px;
}

.redemption-header{
    min-height:82px;
}

.redemption-filters{
    display:flex;
    align-items:center;
    gap:8px;
}

.redemption-search{
    width:220px;
    height:38px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 11px;
    background:#fff;
    border:1px solid var(--border-dark);
    border-radius:9px;
}

.redemption-search i{
    color:var(--text-muted);
    font-size:11px;
}

.redemption-search input{
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    font-size:10px;
    color:var(--text);
}

.redemption-filters select{
    min-width:115px;
}

.redemption-summary{
    min-height:42px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--border);
    color:var(--text-muted);
    font-size:10px;
}

.redemption-summary strong{
    color:var(--gold);
}

.redemption-table-wrapper{
    border:0;
    border-radius:0;
}

.redemption-table-wrapper table{
    min-width:1080px;
}

.redemption-table-wrapper td small{
    display:block;
    margin-top:3px;
    color:var(--text-muted);
    font-size:8px;
}

.redemption-type{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 8px;
    border-radius:6px;
    font-size:8px;
    font-weight:700;
    white-space:nowrap;
}

.redemption-type.cash{
    color:#1769aa;
    background:#edf6fc;
}

.redemption-type.reward{
    color:#8a5b00;
    background:#fff6df;
}

.redemption-coins{
    font-size:12px !important;
    color:var(--navy) !important;
}

.redemption-value{
    font-size:12px !important;
    color:#198754 !important;
}

.request-status{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:68px;
    padding:5px 8px;
    border-radius:6px;
    font-size:8px;
    font-weight:700;
}

.request-status.pending{
    color:#a66a00;
    background:#fff6df;
}

.request-status.approved{
    color:#198754;
    background:#eaf7f0;
}

.request-status.rejected{
    color:#c93b48;
    background:#fcecef;
}

.redemption-view-btn{
    border:1px solid #d9e0e7;
    background:#fff;
    color:var(--navy);
    padding:7px 11px;
    border-radius:7px;
    font-size:9px;
    font-weight:700;
    cursor:pointer;
    transition:.2s;
}

.redemption-view-btn:hover{
    background:#102b49;
    color:#fff;
    border-color:#102b49;
}

.redemption-footer{
    min-height:48px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-top:1px solid var(--border);
    color:var(--text-muted);
    font-size:9px;
}

.redemption-footer strong{
    color:var(--navy);
}

.redemption-footer span:last-child strong{
    color:var(--gold);
}


/* MODAL */

.redemption-modal{
    position:fixed;
    inset:0;
    z-index:3000;
    background:rgba(8,29,52,.58);
    backdrop-filter:blur(3px);
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.redemption-modal.show{
    display:flex;
}

.redemption-modal-box{
    width:100%;
    max-width:520px;
    background:#fff;
    border-radius:17px;
    padding:24px;
    position:relative;
    box-shadow:0 25px 70px rgba(0,0,0,.22);
}

.redemption-modal-close{
    position:absolute;
    right:16px;
    top:14px;
    width:31px;
    height:31px;
    border:0;
    background:#f3f5f7;
    color:#66717d;
    border-radius:8px;
    font-size:20px;
    cursor:pointer;
}

.redemption-modal-top{
    display:flex;
    align-items:center;
    gap:13px;
    padding-bottom:18px;
    border-bottom:1px solid var(--border);
}

.redemption-modal-icon{
    width:44px;
    height:44px;
    border-radius:11px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff6df;
    color:var(--gold);
    font-size:17px;
}

.redemption-modal-top span{
    color:var(--gold);
    font-size:8px;
    font-weight:800;
    letter-spacing:1.3px;
}

.redemption-modal-top h2{
    color:var(--navy);
    font-size:19px;
    margin-top:3px;
}

.redemption-modal-top p{
    color:var(--text-muted);
    font-size:9px;
    margin-top:2px;
}

.redemption-student-box{
    display:flex;
    align-items:center;
    gap:11px;
    padding:16px 0;
}

.redemption-student-box .avatar{
    flex-shrink:0;
}

.redemption-student-box strong{
    display:block;
    color:var(--navy);
    font-size:12px;
}

.redemption-student-box span{
    display:block;
    color:var(--text-muted);
    font-size:9px;
    margin-top:3px;
}

.redemption-detail-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.redemption-detail-grid > div{
    padding:12px;
    background:#f7f9fb;
    border:1px solid #edf0f3;
    border-radius:9px;
}

.redemption-detail-grid span{
    display:block;
    color:var(--text-muted);
    font-size:8px;
    margin-bottom:5px;
}

.redemption-detail-grid strong{
    display:block;
    color:var(--navy);
    font-size:11px;
}

.redemption-conversion{
    margin-top:12px;
    padding:13px;
    border:1px solid #ead9b6;
    background:#fffaf0;
    border-radius:9px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.redemption-conversion span{
    color:var(--text-soft);
    font-size:9px;
}

.redemption-conversion strong{
    color:var(--gold);
    font-size:12px;
}

.redemption-modal-actions{
    display:flex;
    gap:9px;
    margin-top:17px;
}

.redemption-modal-actions button{
    flex:1;
    height:40px;
    border-radius:8px;
    cursor:pointer;
    font-size:10px;
    font-weight:700;
}

.reject-btn{
    border:1px solid #efc8ce;
    background:#fff5f6;
    color:#c93b48;
}

.approve-btn{
    border:1px solid #198754;
    background:#198754;
    color:#fff;
}


/* RESPONSIVE */

@media(max-width:1100px){

    .redemption-hero{
        padding:21px;
    }

    .redemption-filters{
        flex-wrap:wrap;
        justify-content:flex-end;
    }

    .redemption-search{
        width:190px;
    }

}


@media(max-width:650px){

    .redemption-hero{
        display:block;
        padding:19px;
    }

    .redemption-hero h1{
        font-size:20px;
    }

    .redemption-hero p{
        font-size:10px;
    }

    .redemption-value-box{
        margin-top:15px;
        min-width:0;
    }

    .redemption-stats{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .redemption-header{
        padding:16px;
    }

    .redemption-filters{
        width:100%;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    .redemption-search{
        width:100%;
        grid-column:1 / -1;
    }

    .redemption-filters select{
        width:100%;
        min-width:0;
    }

    .redemption-summary{
        padding:0 16px;
    }

    .redemption-footer{
        padding:0 16px;
    }

    .redemption-modal{
        padding:12px;
    }

    .redemption-modal-box{
        padding:19px;
        max-height:92vh;
        overflow-y:auto;
    }

}


@media(max-width:400px){

    .redemption-stats{
        grid-template-columns:1fr;
    }

    .redemption-filters{
        grid-template-columns:1fr;
    }

}
/* ================================
   DESKTOP SIDEBAR FIX
================================ */

@media (min-width: 901px){

    .layout{
        display:flex !important;
        width:100% !important;
        min-height:100vh !important;
    }

    .sidebar{
        display:block !important;
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        bottom:0 !important;

        width:250px !important;
        min-width:250px !important;
        height:100vh !important;

        overflow-y:auto !important;
        overflow-x:hidden !important;

        z-index:1200 !important;

        transform:none !important;
        visibility:visible !important;
        opacity:1 !important;
    }

    .main{
        display:block !important;
        width:calc(100% - 250px) !important;
        min-width:0 !important;
        margin-left:250px !important;
        overflow-x:hidden !important;
    }

    .menu{
        display:block !important;
        width:100% !important;
    }

    .menu a{
        display:flex !important;
        width:calc(100% - 20px) !important;
        margin:3px 10px !important;
        box-sizing:border-box !important;
    }

    .menu-title{
        display:block !important;
    }

    .sidebar .brand{
        display:flex !important;
        visibility:visible !important;
    }

    .sidebar-overlay,
    .mobile-menu-overlay,
    .mobile-menu-bar{
        display:none !important;
    }

}


/* ================================
   DESKTOP SIDEBAR SCROLLBAR
================================ */

@media (min-width:901px){

    .sidebar::-webkit-scrollbar{
        width:5px;
    }

    .sidebar::-webkit-scrollbar-track{
        background:#081d34;
    }

    .sidebar::-webkit-scrollbar-thumb{
        background:#29435d;
        border-radius:10px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover{
        background:#d89a27;
    }

}


/* ================================
   MOBILE
================================ */

@media (max-width:900px){

    .sidebar{
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        bottom:0 !important;

        width:270px !important;
        min-width:270px !important;
        height:100vh !important;

        transform:translateX(-100%) !important;

        z-index:1200 !important;

        overflow-y:auto !important;
        overflow-x:hidden !important;
    }

    .sidebar.mobile-open{
        transform:translateX(0) !important;
    }

    .main{
        width:100% !important;
        max-width:100% !important;
        margin-left:0 !important;
    }

}
/* =========================================================
   PAYOUT + PAYMENT HISTORY SIDEBAR DESKTOP FIX
========================================================= */

@media (min-width: 901px) {

    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    .layout {
        display: flex !important;
        width: 100% !important;
        min-height: 100vh !important;
        position: relative !important;
    }

    .layout > .sidebar,
    body > .sidebar {
        display: block !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;

        width: 250px !important;
        min-width: 250px !important;
        height: 100vh !important;

        background: #081d34 !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        transform: translateX(0) !important;
        visibility: visible !important;
        opacity: 1 !important;

        z-index: 9999 !important;
    }

    .layout > .main,
    body > .main {
        display: block !important;

        width: calc(100% - 250px) !important;
        max-width: calc(100% - 250px) !important;
        min-width: 0 !important;

        margin-left: 250px !important;

        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    .sidebar .menu {
        display: block !important;
        width: 100% !important;
    }

    .sidebar .menu-title {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .sidebar .menu a {
        display: flex !important;
        align-items: center !important;

        width: calc(100% - 20px) !important;
        min-width: 0 !important;

        margin: 3px 10px !important;

        box-sizing: border-box !important;
    }

    .sidebar .brand {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-menu-bar,
    .mobile-menu-overlay,
    .sidebar-overlay {
        display: none !important;
    }

}


/* =========================================================
   MOBILE SIDEBAR
========================================================= */

@media (max-width: 900px) {

    .layout {
        width: 100% !important;
        max-width: 100% !important;
    }

    .layout > .sidebar,
    body > .sidebar {
        position: fixed !important;

        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;

        width: 270px !important;
        min-width: 270px !important;
        height: 100vh !important;

        transform: translateX(-100%) !important;

        z-index: 9999 !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .layout > .sidebar.mobile-open,
    body > .sidebar.mobile-open {
        transform: translateX(0) !important;
    }

    .layout > .main,
    body > .main {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

}
@media (min-width: 901px) {

    html,
    body {
        width: 100%;
        min-height: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .layout {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        min-height: 100vh !important;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;

        width: 250px !important;
        min-width: 250px !important;
        height: 100vh !important;

        margin: 0 !important;

        overflow-y: auto !important;
        overflow-x: hidden !important;

        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;

        z-index: 9999 !important;
    }

    .main {
        position: relative !important;

        width: calc(100% - 250px) !important;
        max-width: calc(100% - 250px) !important;

        margin-left: 250px !important;
        margin-right: 0 !important;

        min-height: 100vh !important;

        box-sizing: border-box !important;
    }

    .sidebar .brand {
        position: sticky !important;
        top: 0 !important;

        z-index: 10 !important;

        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar .menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar .menu a {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar .menu-title {
        display: block !important;
        visibility: visible !important;
    }

    .mobile-menu-bar,
    .mobile-menu-overlay,
    .sidebar-overlay {
        display: none !important;
    }
}
/* =========================================================
   MERITO AUTHORITY — FINAL SIDEBAR SYSTEM
========================================================= */

html,
body{
    width:100%;
    min-height:100%;
    margin:0;
    padding:0;
    overflow-x:hidden;
}

body{
    background:#f5f7fa;
}

/* =========================
   DESKTOP
========================= */

@media (min-width:901px){

    .sidebar{
        position:fixed !important;
        top:0 !important;
        left:0 !important;
        bottom:0 !important;

        width:250px !important;
        min-width:250px !important;
        height:100vh !important;

        margin:0 !important;
        padding:0 !important;

        display:block !important;
        visibility:visible !important;
        opacity:1 !important;

        background:#081d34 !important;

        overflow-x:hidden !important;
        overflow-y:auto !important;

        transform:none !important;

        z-index:9999 !important;
    }

    .sidebar-brand{
        position:sticky !important;
        top:0 !important;

        width:100% !important;
        min-height:72px !important;

        display:flex !important;
        align-items:center !important;

        box-sizing:border-box !important;

        background:#081d34 !important;

        z-index:20 !important;
    }

    .sidebar-brand img{
        display:block !important;
        visibility:visible !important;
        opacity:1 !important;
    }

    .sidebar-brand strong,
    .sidebar-brand span{
        visibility:visible !important;
        opacity:1 !important;
    }

    .menu{
        display:block !important;
        width:100% !important;
        visibility:visible !important;
        opacity:1 !important;

        box-sizing:border-box !important;

        padding-bottom:25px !important;
    }

    .menu-title{
        display:block !important;
        width:100% !important;
        box-sizing:border-box !important;
        visibility:visible !important;
    }

    .menu a{
        display:flex !important;
        align-items:center !important;

        width:calc(100% - 20px) !important;
        min-width:0 !important;

        margin:3px 10px !important;

        box-sizing:border-box !important;

        visibility:visible !important;
        opacity:1 !important;
    }

    .main{
        position:relative !important;

        display:block !important;

        width:calc(100% - 250px) !important;
        max-width:calc(100% - 250px) !important;

        min-width:0 !important;
        min-height:100vh !important;

        margin-left:250px !important;
        margin-right:0 !important;

        box-sizing:border-box !important;

        overflow-x:hidden !important;
    }

    .mobile-menu-bar,
    .mobile-menu-overlay,
    .sidebar-overlay,
    .sidebar-toggle{
        display:none !important;
    }

    .sidebar::-webkit-scrollbar{
        width:5px;
    }

    .sidebar::-webkit-scrollbar-track{
        background:#081d34;
    }

    .sidebar::-webkit-scrollbar-thumb{
        background:#29435d;
        border-radius:10px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover{
        background:#d89a27;
    }
}


/* =========================
   MOBILE / TABLET
========================= */

@media (max-width:900px){

    body{
        overflow-x:hidden !important;
    }

    .sidebar{
        position:fixed !important;

        top:0 !important;
        left:0 !important;
        bottom:0 !important;

        width:270px !important;
        min-width:270px !important;
        height:100vh !important;

        margin:0 !important;

        background:#081d34 !important;

        display:block !important;

        overflow-x:hidden !important;
        overflow-y:auto !important;

        transform:translateX(-100%) !important;

        visibility:visible !important;
        opacity:1 !important;

        z-index:9999 !important;

        transition:transform .25s ease !important;
    }

    .sidebar.mobile-open{
        transform:translateX(0) !important;
    }

    .sidebar-brand{
        position:sticky !important;
        top:0 !important;

        min-height:72px !important;

        display:flex !important;
        align-items:center !important;

        background:#081d34 !important;

        z-index:20 !important;
    }

    .menu{
        display:block !important;
        width:100% !important;
        padding-bottom:30px !important;
    }

    .menu-title{
        display:block !important;
    }

    .menu a{
        display:flex !important;
        align-items:center !important;

        min-height:44px !important;

        width:calc(100% - 20px) !important;

        margin:3px 10px !important;

        box-sizing:border-box !important;
    }

    .main{
        position:relative !important;

        width:100% !important;
        max-width:100% !important;

        min-width:0 !important;

        margin-left:0 !important;

        overflow-x:hidden !important;

        box-sizing:border-box !important;
    }

    .mobile-menu-bar{
        display:flex;
    }

    .mobile-menu-overlay{
        display:none;
        position:fixed;
        inset:0;

        background:rgba(8,29,52,.48);

        z-index:9998;
    }

    .mobile-menu-overlay.show{
        display:block;
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media(max-width:650px){

    .sidebar{
        width:275px !important;
        min-width:275px !important;
    }

    .main{
        width:100% !important;
        max-width:100% !important;
    }

    .topbar{
        width:100% !important;
        max-width:100% !important;

        box-sizing:border-box !important;
    }

    .page-content{
        width:100% !important;
        max-width:100% !important;

        box-sizing:border-box !important;
    }
}

/* =========================================================
   FINAL RESPONSIVE PATCH
   Unified 900px breakpoint for desktop, tablet and mobile.
========================================================= */

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.layout {
    width: 100%;
    max-width: 100%;
}

.main {
    min-width: 0;
}

/* Tablet + mobile */
@media (max-width: 900px) {
    body.menu-open {
        overflow: hidden;
    }

    .mobile-menu-bar {
        position: sticky;
        top: 0;
        z-index: 1001;
        height: 58px;
        width: 100%;
        padding: 0 14px;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 10px rgba(16,43,73,.06);
    }

    .mobile-menu-brand {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 9px;
        color: var(--navy);
        font-size: 14px;
        font-weight: 800;
        letter-spacing: .8px;
    }

    .mobile-menu-brand img {
        width: 32px;
        height: 32px;
        object-fit: contain;
        border-radius: 7px;
    }

    .mobile-menu-button {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        border: 1px solid var(--border);
        border-radius: 9px;
        background: #fff;
        color: var(--navy);
        font-size: 21px;
        line-height: 1;
    }

    .content {
        width: 100%;
        max-width: 100%;
        padding: 22px 20px 35px;
    }

    .topbar {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 72px;
        padding: 12px 20px;
        gap: 14px;
    }

    .page-title {
        min-width: 0;
        flex: 1;
    }

    .page-title h1 {
        font-size: 20px;
        line-height: 1.2;
    }

    .top-right {
        flex: 0 0 auto;
        gap: 10px;
    }

    .admin {
        padding-left: 10px;
    }

    .admin > div:last-child {
        display: none;
    }

    .stats-grid,
    .payout-stats,
    .payment-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card,
    .panel,
    .stat-card,
    .payout-stat,
    .payment-stat {
        min-width: 0;
    }

    .table-wrap,
    .table-wrapper,
    .history-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        max-width: none;
    }

    .filters,
    .history-filters {
        flex-wrap: wrap;
    }

    .search-box,
    .history-search {
        flex: 1 1 100%;
        min-width: 0;
    }

    .filters select,
    .history-filters select {
        flex: 1 1 180px;
        min-width: 0;
    }

    .payout-hero,
    .payment-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .conversion-box,
    .payment-balance {
        width: 100%;
        min-width: 0;
    }

    .section-heading,
    .history-heading {
        flex-wrap: wrap;
    }

    .sidebar-toggle {
        display: none !important;
    }
}

/* Small phones */
@media (max-width: 600px) {
    .content {
        padding: 16px 12px 28px;
    }

    .topbar {
        padding: 10px 12px;
        min-height: 64px;
    }

    .page-title h1 {
        font-size: 17px;
    }

    .page-subtitle {
        font-size: 10px;
    }

    .notification {
        width: 34px;
        height: 34px;
    }

    .admin-avatar {
        width: 34px;
        height: 34px;
    }

    .stats-grid,
    .payout-stats,
    .payment-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card,
    .payout-stat,
    .payment-stat {
        padding: 15px;
        min-height: 100px;
    }

    .content h2 {
        font-size: 20px;
    }

    .content h3 {
        font-size: 16px;
    }

    .filters,
    .history-filters {
        padding: 12px;
        gap: 8px;
    }

    .filters select,
    .history-filters select {
        flex: 1 1 100%;
        width: 100%;
    }

    .section-heading,
    .history-heading {
        padding: 16px 14px 13px;
    }

    .queue-note {
        white-space: normal;
    }

    .payout-hero,
    .payment-hero {
        padding: 20px 18px;
    }

    .payout-hero h2,
    .payment-hero h2 {
        font-size: 21px;
    }

    .modal-content,
    .modal-box {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    .action-group {
        flex-wrap: wrap;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .mobile-menu-brand span {
        font-size: 12px;
    }

    .top-right .notification {
        display: none;
    }

    .content {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===== FINAL RESPONSIVE / SIDEBAR OVERRIDE ===== */
html, body { width:100%; max-width:100%; overflow-x:hidden; }
.layout { width:100%; min-height:100vh; }
.main { min-width:0; }

@media (min-width:901px) {
  .sidebar { position:fixed !important; inset:0 auto 0 0 !important; width:250px !important; min-width:250px !important; height:100vh !important; display:block !important; transform:none !important; visibility:visible !important; opacity:1 !important; overflow-x:hidden !important; overflow-y:auto !important; z-index:1200 !important; }
  .main { width:calc(100% - 250px) !important; max-width:calc(100% - 250px) !important; margin-left:250px !important; min-width:0 !important; overflow-x:hidden !important; }
  .mobile-menu-bar, .mobile-menu-overlay { display:none !important; }
}

@media (max-width:900px) {
  body.menu-open { overflow:hidden !important; }
  .sidebar { position:fixed !important; inset:0 auto 0 0 !important; width:280px !important; min-width:280px !important; height:100vh !important; transform:translateX(-105%) !important; display:block !important; z-index:1200 !important; overflow-x:hidden !important; overflow-y:auto !important; transition:transform .25s ease !important; }
  .sidebar.mobile-open { transform:translateX(0) !important; }
  .main { width:100% !important; max-width:100% !important; margin-left:0 !important; min-width:0 !important; overflow-x:hidden !important; }
  .mobile-menu-bar { position:sticky !important; top:0 !important; z-index:1100 !important; display:flex !important; align-items:center !important; justify-content:space-between !important; width:100% !important; height:58px !important; padding:0 14px !important; background:#fff !important; border-bottom:1px solid var(--border) !important; box-shadow:0 2px 10px rgba(16,43,73,.06) !important; }
  .mobile-menu-brand { display:flex !important; align-items:center !important; gap:9px !important; color:var(--navy) !important; font-weight:800 !important; letter-spacing:.8px !important; }
  .mobile-menu-brand img { width:32px !important; height:32px !important; object-fit:contain !important; }
  .mobile-menu-button { width:40px !important; height:40px !important; border:1px solid var(--border) !important; border-radius:9px !important; background:#fff !important; color:var(--navy) !important; font-size:21px !important; line-height:1 !important; }
  .mobile-menu-overlay { display:none; position:fixed !important; inset:0 !important; background:rgba(8,29,52,.48) !important; z-index:1199 !important; }
  .mobile-menu-overlay.show { display:block !important; }
  .topbar { width:100% !important; max-width:100% !important; min-width:0 !important; box-sizing:border-box !important; }
  .content, .page-content { width:100% !important; max-width:100% !important; box-sizing:border-box !important; }
  .menu a { min-height:44px; }
  .table-wrap, .table-wrapper, .history-table-wrap, .table-responsive { max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  table { max-width:none; }
}

@media (max-width:600px) {
  .content, .page-content { padding-left:12px !important; padding-right:12px !important; }
  .topbar { padding-left:12px !important; padding-right:12px !important; }
  .top-right { gap:8px !important; }
  .admin-details, .admin-info > div:not(.admin-avatar) { display:none; }
  .stats-grid, .payout-stats, .payment-stats { grid-template-columns:1fr !important; }
  .filters, .history-filters { flex-wrap:wrap !important; }
  .filters select, .history-filters select, .search-box, .history-search { min-width:0 !important; width:100% !important; flex:1 1 100% !important; }
  .modal-content, .modal-box, .payout-modal-box, .payment-modal-box { max-width:calc(100% - 24px) !important; max-height:calc(100vh - 24px) !important; overflow-y:auto !important; }
}
