*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #ea580c;
    --primary-light: #fff7ed;
    --primary-gradient: linear-gradient(135deg, #f59e0b, #ea580c);
    --secondary: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --orange: #f97316;

    --bg: #fafaf9;
    --sidebar-bg: #1c1917;
    --sidebar-w: 290px;
    --card: #ffffff;
    --border: #e7e5e4;
    --text: #0f172a;
    --muted: #57534e;
    --radius: 6px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

html,
body {
    height: 100%;
    font-family: "Inter", sans-serif;
    font-size: 15px !important;
    color: var(--text);
    background: var(--bg);
}

/* ─── Layout ─────────────────────────────────── */
.layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.layout.sidebar-collapsed .sidebar {
    margin-left: calc(-1 * var(--sidebar-w));
}

/* ─── Sidebar ─────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: margin-left 0.2s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.brand-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.2px;
    line-height: 1.1;
}

.brand-sub {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-section {
    margin-top: 8px;
}

.sidebar-label {
    padding: 16px 20px 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    margin: 2px 12px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14.5px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
    position: relative;
    user-select: none;
    text-decoration: none;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #ffffff;
    background: var(--primary);
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    line-height: 1.4;
}

.nav-item.active .badge {
    background: var(--danger);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sf-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.sf-name {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.sf-role {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.sf-cog {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.sf-cog:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ─── Main ─────────────────────────────────── */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.topbar-breadcrumb {
    color: #4b5563;
    font-size: 12px;
    margin-left: 4px;
    font-weight: 500;
}

.search-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
    width: 220px;
}

.search-box svg {
    color: var(--muted);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    outline: none;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--muted);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    color: var(--muted);
    transition: all 0.15s;
}

.icon-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.icon-btn .dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--card);
}

.avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4361ee, #7209b7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}

.user-menu-wrapper {
    position: relative;
}

.avatar-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 240px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    padding: 10px;
    z-index: 1000;
}

.avatar-menu[x-cloak] {
    display: none !important;
}

.avatar-menu__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.avatar-btn--menu {
    width: 42px;
    height: 42px;
    font-size: 14px;
}

.avatar-menu__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.avatar-menu__email {
    font-size: 11px;
    color: var(--muted);
}

.avatar-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 8px;
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

.avatar-menu__item:hover {
    background: var(--bg);
}

.avatar-menu__item svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.avatar-menu__item--danger {
    color: var(--danger);
}

.avatar-menu__form {
    display: block;
}

/* ─── User Profile Page ─────────────────────── */
.profile-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.profile-hero__content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-hero__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4361ee, #7209b7);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-hero h2 {
    margin: 0 0 6px;
    font-size: 22px;
    color: var(--text);
}

.profile-hero p {
    margin: 0;
    color: var(--muted);
}

.profile-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.profile-cta-row {
    margin-top: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #304ddf;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f1f3ff;
}

.profile-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
}

.profile-card {
    padding: 20px;
}

.profile-card .card-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.profile-detail-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.profile-detail {
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.profile-detail__label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.profile-detail__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.account-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
}

.account-hero h2 {
    margin: 4px 0 6px;
    font-size: 22px;
    color: var(--text);
}

.account-hero p {
    margin: 0;
    color: var(--muted);
}

.account-eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--primary);
}

.account-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    padding: 18px 20px;
}

.metric-card__label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.metric-card__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.deposit-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
}

.deposit-form-card,
.history-card {
    padding: 20px;
}

.deposit-note {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7f9ff;
    border: 1px solid #e7ebf8;
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
}

.deposit-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deposit-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deposit-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.deposit-field input,
.deposit-field select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text);
    background: #f8fafc;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.deposit-field input:focus,
.deposit-field select:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-block {
    width: 100%;
    border-radius: var(--radius);
}

.history-empty {
    min-height: 220px;
    border: 1px dashed #d7dfeb;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: var(--muted);
    background: #fafcff;
}

.history-empty__icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.history-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--text);
}

.history-empty p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

.profile-form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.profile-form-stack .p-4,
.profile-form-stack .p-6 {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.profile-form-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.profile-form-panel__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.profile-form-panel__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            rgba(67, 97, 238, 0.14),
            rgba(114, 9, 183, 0.14));
    color: var(--primary);
    flex-shrink: 0;
}

.profile-form-panel__icon--accent {
    background: linear-gradient(135deg,
            rgba(6, 214, 160, 0.16),
            rgba(0, 122, 204, 0.12));
    color: #0d9488;
}

.profile-form-panel__icon svg {
    width: 20px;
    height: 20px;
}

.profile-form-panel__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.profile-form-panel__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-field-grid {
    display: grid;
    gap: 14px;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-field__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.profile-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text);
    background: #f8fafc;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.profile-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.profile-input::placeholder {
    color: #94a3b8;
}

.profile-inline-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.profile-inline-link {
    border: none;
    background: none;
    padding: 0;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
    text-decoration: underline;
}

.profile-inline-success {
    margin-top: 6px;
    color: #0f9d58;
    font-weight: 600;
}

.profile-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.profile-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    padding: 10px 16px;
    min-height: 42px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(67, 97, 238, 0.18);
}

.profile-submit-btn:hover {
    background: #304ddf;
    color: #fff;
}

.profile-status-text {
    margin: 0;
    font-size: 13px;
    color: #0f9d58;
    font-weight: 600;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.profile-hero--compact {
    padding: 22px 24px;
}

.profile-hero__content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-hero__avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
    box-shadow: 0 12px 26px rgba(67, 97, 238, 0.2);
}

.profile-hero__avatar--accent {
    background: linear-gradient(135deg, #06d6a0 0%, #4361ee 100%);
}

.profile-hero__avatar svg {
    width: 30px;
    height: 30px;
}

.profile-hero h2 {
    margin: 3px 0 6px;
    font-size: 22px;
    color: var(--text);
}

.profile-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.account-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.profile-hero__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.account-stats {
    margin-bottom: 16px;
}

.account-stats .stat-card {
    padding: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.card-header--compact {
    padding: 18px 20px 0;
    border-bottom: none;
}

.card-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.profile-card {
    padding: 0;
}

.profile-card .card-body {
    padding: 16px 20px 20px;
}

.profile-detail-list {
    display: grid;
    gap: 12px;
}

.profile-detail {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fbfcff;
}

.profile-detail__label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}

.profile-detail__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.profile-cta-row {
    margin-bottom: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.deposit-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 15px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f4f7ff 0%, #eef4ff 100%);
    border: 1px solid #e3ebff;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 16px;
}

.deposit-note__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
}

.deposit-note__icon svg {
    width: 16px;
    height: 16px;
}

.deposit-note__number {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
}

.deposit-form {
    display: grid;
    gap: 16px;
}

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

.deposit-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 74px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
    cursor: pointer;
    transition: 0.2s ease;
}

.deposit-method:hover {
    border-color: #cfd9ff;
    background: #f7f9ff;
}

.deposit-method:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.deposit-method input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.deposit-method:has(input:checked) {
    border-color: var(--primary);
    background: #f4f7ff;
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.08);
}

.deposit-method__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.deposit-method__icon--pink {
    background: #d9045c;
}

.deposit-method__icon--orange {
    background: #fb8500;
}

.deposit-method__icon--purple {
    background: #7209b7;
}

.deposit-method strong,
.deposit-method small {
    display: block;
}

.deposit-method strong {
    color: var(--text);
    font-size: 13px;
    margin-bottom: 3px;
}

.deposit-method small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.deposit-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.deposit-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.deposit-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.deposit-field input,
.deposit-field select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    padding: 8px 14px;
    font-size: 14px;
    color: var(--text);
    background: #f8fafc;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.deposit-field input:focus,
.deposit-field select:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.deposit-field--full {
    grid-column: 1 / -1;
}

.btn-block {
    width: 100%;
    border-radius: var(--radius);
    border: 0;
    cursor: pointer;
}

.deposit-side-stack {
    display: grid;
    gap: 16px;
}

.deposit-summary-card {
    overflow: hidden;
}

.deposit-timeline {
    display: grid;
    gap: 14px;
}

.deposit-timeline__item {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    align-items: flex-start;
}

.deposit-timeline__item span {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 13px;
}

.deposit-timeline__item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 14px;
}

.deposit-timeline__item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.history-empty {
    min-height: 240px;
    border: 1px dashed #d7dfeb;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: linear-gradient(180deg, #fcfdff 0%, #f8fbff 100%);
}

.history-empty__icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.history-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--text);
}

.history-empty p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.deposit-history-list {
    display: grid;
    gap: 10px;
}

.deposit-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcff;
}

.deposit-history-item__amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.deposit-history-item__meta,
.deposit-history-item__date {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.product-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

@media (max-width: 1100px) {

    .profile-grid,
    .deposit-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-hero__content {
        width: 100%;
    }

    .profile-hero__meta {
        width: 100%;
    }

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

@media (max-width: 640px) {
    .account-stats {
        grid-template-columns: 1fr;
    }

    .deposit-methods,
    .deposit-field-grid,
    .product-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-hero__meta {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-hero__meta .btn {
        width: 100%;
    }
}

/* ─── Content ─────────────────────────────────── */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    scrollbar-gutter: stable;
}

/* ─── Stat Cards ─────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

.stat-badge.up {
    background: #e8fbf5;
    color: #06d6a0;
}

.stat-badge.down {
    background: #fee8ec;
    color: var(--danger);
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -1px;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

/* ─── Middle row ─────────────────────────────────── */
.mid-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    margin-bottom: 24px;
}

/* Chart card */
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-weight: 700;
    font-size: 14px;
}

.card-body {
    padding: 20px;
}

.tab-pills {
    display: flex;
    gap: 4px;
}

.tab-pill {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.15s;
    border: none;
    background: transparent;
}

.tab-pill.active {
    background: var(--primary);
    color: #fff;
}

.tab-pill:hover:not(.active) {
    background: var(--primary-light);
    color: var(--primary);
}

/* Bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 160px;
}

.bar-group {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    flex: 1;
}

.bar {
    flex: 1;
    border-radius: 5px 5px 0 0;
    min-width: 8px;
    transition: opacity 0.15s;
}

.bar:hover {
    opacity: 0.8;
}

.chart-labels {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.chart-label {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--muted);
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.legend-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.legend-dot::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.legend-dot.students {
    color: var(--primary);
}

.legend-dot.teachers {
    color: var(--success);
}

/* Upcoming events */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg);
}

.event-date-box {
    width: 38px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}

.event-day {
    font-size: 16px;
    line-height: 1;
}

.event-month {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.event-tag {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Bottom row ─────────────────────────────────── */
.bot-row {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
}

/* Table */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: #fafbff;
}

tbody td {
    padding: 12px 16px;
    font-size: 13px;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.stu-name {
    font-weight: 600;
    font-size: 13px;
}

.stu-id {
    font-size: 11px;
    color: var(--muted);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.active {
    background: #e8fbf5;
    color: #06d6a0;
}

.status-badge.inactive {
    background: #fee8ec;
    color: var(--danger);
}

.status-badge.pending {
    background: #fff7e6;
    color: var(--warning);
}

.action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.15s;
}

.action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* Donut chart */
.donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.donut-svg {
    width: 160px;
    height: 160px;
}

.donut-legend {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.dl-label {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
}

.dl-count {
    font-size: 12px;
    font-weight: 700;
}

.dl-pct {
    font-size: 11px;
    color: var(--muted);
    margin-left: 2px;
}

/* Schedule */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.schedule-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 20px 0 16px;
}

.schedule-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 36px;
    flex-shrink: 0;
    padding: 4px 0;
}

.schedule-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.schedule-connector {
    flex: 1;
    width: 2px;
    background: var(--border);
    margin: 4px auto;
}

.schedule-content {
    flex: 1;
    padding: 4px 0 16px 4px;
}

.schedule-time {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
}

.schedule-subject {
    font-size: 13px;
    font-weight: 600;
}

.schedule-teacher {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.schedule-room {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

/* ─── Responsiveness Media Queries ─────────────────── */

/* Mobile & Tablet Styles */
@media (max-width: 992px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .mid-row,
    .bot-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    #desktopToggleBtn {
        display: none !important;
    }

    .stats-row {
        grid-template-columns: 1fr !important;
    }

    .layout {
        position: relative;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .topbar {
        padding: 0 16px;
    }

    .topbar .search-box {
        display: none;
        /* Hide topbar search on small screens to save space */
    }

    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 9px;
        background: var(--bg);
        border: 1px solid var(--border);
        cursor: pointer;
        color: var(--text);
        margin-right: 8px;
    }

    .content {
        padding: 16px;
    }

    /* Responsive Grid for Category Page */
    .responsive-grid {
        grid-template-columns: 1fr !important;
    }

    .responsive-grid>div {
        grid-column: span 12 !important;
    }
}

/* ─── Global Font Size Scaling Overrides ─────────── */
/* body {
    font-size: 16px !important;
}
.brand-name {
    font-size: 17px !important;
}
.brand-sub, .sidebar-label, .sf-role, .event-month, .schedule-room {
    font-size: 11px !important;
}
.nav-item {
    font-size: 16px !important;
}
.topbar-title {
    font-size: 18px !important;
}
.topbar-breadcrumb, .stat-label, .card-title, .search-box input, .dl-label, .dl-count {
    font-size: 14px !important;
}
tbody td, .event-name, .schedule-subject, .stu-name {
    font-size: 15px !important;
}
.event-time, .status-badge, .schedule-time, .schedule-teacher, .chart-label {
    font-size: 12px !important;
}
.stat-value {
    font-size: 28px !important;
}
input, select, textarea {
    font-size: 15px !important;
} */

/* ─── Settings Navigation ─────────────────────────── */
.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
}

.settings-nav__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.settings-nav__item:hover {
    background: var(--bg);
    border-color: var(--border);
}

.settings-nav__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-nav__icon svg {
    width: 18px;
    height: 18px;
}

.settings-nav__content {
    flex: 1;
    min-width: 0;
}

.settings-nav__content strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.settings-nav__content span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.settings-nav__arrow {
    width: 16px;
    height: 16px;
    color: var(--muted);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.settings-nav__item:hover .settings-nav__arrow {
    transform: translateX(3px);
    color: var(--primary);
}

/* ─── Profile Form Stack Spacing ─────────────────── */
.profile-form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Tighten Card Header Padding ────────────────── */
.card-header--compact {
    padding: 18px 20px 0;
    border-bottom: none;
}

/* ─── Ensure Profile Grid Gap Consistency ────────── */
.profile-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
}

/* ─── Responsive: Stack on smaller screens ───────── */
@media (max-width: 1100px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Alerts ─────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.alert--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ─── Table Empty State ──────────────────────────── */
.table-empty {
    padding: 0;
    border-bottom: none;
}

.table-empty .history-empty {
    min-height: 160px;
}

/* ─── Action Button Variants ─────────────────────── */
.action-btn--success {
    color: #06d6a0;
    border-color: #06d6a0;
}

.action-btn--success:hover {
    background: #e8fbf5;
    color: #06d6a0;
    border-color: #06d6a0;
}

.action-btn--danger {
    color: var(--danger);
    border-color: var(--danger);
}

.action-btn--danger:hover {
    background: #fee8ec;
    color: var(--danger);
    border-color: var(--danger);
}

/* ─── Card Body Zero Padding Override ─────────────── */
.card-body--flush {
    padding: 0;
}

/* ─── Stats Row Bottom Margin Helper ─────────────── */
.stats-row+.card {
    margin-top: 0;
}

select.custom-select-processed {
    display: none !important;
}

/* ─── Global Custom Select Dropdown ───────────────── */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    padding-right: 36px !important;
    cursor: pointer;
}

/* Custom Select Dropdown UI components */
.custom-select-container {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background-color: #f8fafc;
    color: #111827;
    outline: none;
    cursor: pointer;
    min-width: 120px;
    user-select: none;
    transition: border-color 0.15s, background-color 0.15s;
    height: 32px;
    box-sizing: border-box;
}

.custom-select-trigger:focus {
    background-color: #ffffff;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.custom-select-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 100%;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 4px 0;
    overflow-y: auto;
    max-height: 250px;
}

.custom-select-menu.show {
    display: block;
}

.custom-select-option {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 150ms, color 150ms;
}

.custom-select-option:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.custom-select-option.selected {
    background-color: var(--primary-light, #eff6ff);
    color: var(--primary, #2563eb);
    font-weight: 600;
}

/* Compact style for pagination and entries selects */
.custom-select-container-sm .custom-select-trigger {
    min-width: 70px;
    height: 30px;
    padding: 4px 8px;
}

.custom-select-container-sm .custom-select-menu {
    min-width: 70px;
}

.custom-select-container-sm .custom-select-option {
    padding: 6px 10px;
}

/* ─── Sidebar Submenus & Dropdowns ────────────────── */
.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-submenu {
    background: transparent;
    margin: 4px 12px 8px 30px;
    padding: 2px 0 2px 16px;
    display: none;
    border-left: 1.5px solid rgba(255, 255, 255, 0.08);
}

.nav-submenu.show {
    display: block;
}

.nav-subitem {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    margin: 2px 0;
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.nav-subitem:hover {
    color: #ffffff;
    background: transparent;
}

.nav-subitem.active {
    color: #ffffff;
    background: transparent;
    font-weight: 600;
}

.nav-subitem.active::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: #ffffff;
    border-radius: 4px;
}

.nav-subitem .nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
}

.nav-dropdown-trigger.open {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.nav-dropdown-trigger.group-active {
    color: #ffffff;
    background: var(--primary);
}

.nav-dropdown-trigger .chevron-icon {
    margin-left: auto;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    color: #64748b;
    flex-shrink: 0;
}

.nav-dropdown-trigger:hover .chevron-icon,
.nav-dropdown-trigger.open .chevron-icon,
.nav-dropdown-trigger.group-active .chevron-icon {
    color: #ffffff;
}

.nav-dropdown-trigger.open .chevron-icon {
    transform: rotate(180deg);
}

@media (max-width: 640px) {
    #realBarChart {
        gap: 12px !important;
    }

    #realBarLabels {
        font-size: 10px !important;
    }
}

/* Responsive Layout helper classes */
.shop-grid-responsive {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

@media (max-width: 992px) {
    .shop-grid-responsive {
        grid-template-columns: 1fr !important;
    }
}

.detail-grid-responsive {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
}

@media (max-width: 992px) {
    .detail-grid-responsive {
        grid-template-columns: 1fr !important;
    }
}

.cart-grid-responsive {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 32px;
}

@media (max-width: 768px) {
    .cart-grid-responsive {
        grid-template-columns: 1fr !important;
    }
}

.product-grid-responsive {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

@media (max-width: 992px) {
    .product-grid-responsive {
        grid-template-columns: 1fr !important;
    }
}