/* --- RESET & LAYOUT --- */
* {
    box-sizing: border-box;
}

body {
    background: #ffffff; /* plain white background for admin pages */
    min-height: 100vh;
    margin: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    display: flex;
}

.global-toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 9999;
    display: flex;
    width: min(460px, calc(100vw - 24px));
    flex-direction: column;
    gap: 9px;
    transform: translateX(-50%);
    pointer-events: none;
}

.global-member-toast {
    --toast-accent: #4361ee;
    --toast-soft: #eef2ff;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    align-items: start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d9e1ec;
    border-left: 4px solid var(--toast-accent);
    border-radius: 8px;
    background: linear-gradient(110deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    color: #1e293b;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    pointer-events: auto;
    animation: global-toast-enter 220ms ease-out both;
}

.global-member-toast.is-success {
    --toast-accent: #16864a;
    --toast-soft: #e7f6ed;
}

.global-member-toast.is-info {
    --toast-accent: #4361ee;
    --toast-soft: #eaf0ff;
}

.global-member-toast.is-warning {
    --toast-accent: #b87908;
    --toast-soft: #fff4db;
}

.global-member-toast.is-danger {
    --toast-accent: #c83d4d;
    --toast-soft: #fdebed;
}

.global-member-toast-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    background: var(--toast-soft);
    color: var(--toast-accent);
    font-size: 17px;
    align-self: center;
}

.global-member-toast-content {
    min-width: 0;
}

.global-member-toast-title {
    display: block;
    margin-bottom: 2px;
    color: var(--toast-accent);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
}

.global-member-toast.is-info {
    border-left-color: var(--toast-accent);
}

.global-member-toast.is-dismissing {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.global-member-toast-message {
    margin: 0;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.global-member-toast-close {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    align-self: start;
}

.global-member-toast-close:hover {
    background: #edf1f7;
    color: #1e293b;
}

html[data-theme="dark"] .global-member-toast {
    border-color: #334155;
    background: linear-gradient(110deg, #111827 0%, #172033 100%);
    color: #e2e8f0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .global-member-toast-message {
    color: #cbd5e1;
}

html[data-theme="dark"] .global-member-toast-close {
    color: #94a3b8;
}

html[data-theme="dark"] .global-member-toast-close:hover {
    background: #263449;
    color: #f8fafc;
}

@media (max-width: 420px) {
    .global-member-toast {
        grid-template-columns: 36px minmax(0, 1fr) 28px;
        gap: 9px;
        padding: 10px;
    }

    .global-member-toast-icon {
        width: 36px;
        height: 36px;
    }
}

@keyframes global-toast-enter {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .global-member-toast {
        animation: none;
    }

    .global-member-toast.is-dismissing {
        transition: none;
    }
}

/* Admin notification styling follows the client toast's title/message hierarchy. */
.admin-alert-card,
.admin-notification-theme .alert-container .alert,
.admin-notification-theme .alert-box,
.admin-notification-theme .alert-message {
    --admin-alert-accent: #4361ee;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #d9e1ec;
    border-left: 4px solid var(--admin-alert-accent);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 400;
}

.admin-notification-theme .alert-danger,
.admin-notification-theme .alert-error,
.admin-alert-card.alert-danger,
.admin-alert-card.alert-error {
    --admin-alert-accent: #c83d4d;
    background: #fff1f2;
}

.admin-notification-theme .alert-warning,
.admin-alert-card.alert-warning {
    --admin-alert-accent: #b87908;
    background: #fff8e8;
}

.admin-notification-theme .alert-success,
.admin-alert-card.alert-success {
    --admin-alert-accent: #16864a;
    background: #edf9f1;
}

.admin-notification-theme .alert-info,
.admin-notification-theme .alert-primary,
.admin-alert-card.alert-info,
.admin-alert-card.alert-primary {
    --admin-alert-accent: #4361ee;
    background: #eef2ff;
}

.admin-alert-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 8px;
    background: #eef2ff;
    color: var(--admin-alert-accent);
    font-size: 16px;
}

.admin-alert-card.alert-danger .admin-alert-icon,
.admin-alert-card.alert-error .admin-alert-icon {
    background: #fdebed;
}

.admin-alert-card.alert-warning .admin-alert-icon {
    background: #fff4db;
}

.admin-alert-card.alert-success .admin-alert-icon {
    background: #e7f6ed;
}

.admin-alert-card.alert-info .admin-alert-icon,
.admin-alert-card.alert-primary .admin-alert-icon {
    background: #eaf0ff;
}

.admin-alert-content {
    min-width: 0;
    flex: 1;
}

.admin-alert-title,
.admin-notification-theme .custom-notification-toast .notification-title {
    display: block;
    margin: 0 0 2px;
    color: var(--admin-alert-accent, #4361ee);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.admin-alert-text,
.admin-notification-theme .custom-notification-toast .notification-message {
    display: block;
    margin: 0;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.admin-alert-card .btn-close {
    margin: 0 0 0 auto;
    padding: 0.45rem;
}

.admin-alert-close {
    align-self: flex-start;
    margin-left: auto;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.admin-alert-close:hover {
    background: #edf1f7;
    color: #1e293b;
}

.admin-notification-theme .custom-notification-toast {
    --admin-alert-accent: #4361ee;
    position: relative;
    display: block;
    padding: 14px 38px 14px 16px;
    border: 1px solid #d9e1ec !important;
    border-left: 4px solid var(--admin-alert-accent) !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18) !important;
    color: #1e293b !important;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.admin-notification-theme .custom-notification-toast.is-success {
    --admin-alert-accent: #16864a;
}

.admin-notification-theme .custom-notification-toast.is-warning {
    --admin-alert-accent: #b87908;
}

.admin-notification-theme .custom-notification-toast.is-danger,
.admin-notification-theme .custom-notification-toast.is-error {
    --admin-alert-accent: #c83d4d;
}

.admin-notification-theme .custom-notification-toast .notification-title {
    color: var(--admin-alert-accent);
}

.admin-notification-theme .custom-notification-toast .notification-message {
    text-align: left;
}

.admin-notification-theme .custom-notification-toast .swal2-close {
    position: absolute;
    top: 5px;
    right: 6px;
    color: #64748b;
    font-size: 1.25rem;
}

.admin-notification-theme .swal2-popup {
    border-left: 4px solid #4361ee;
    border-radius: 10px;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.admin-notification-theme .swal2-popup:has(.swal2-icon.swal2-error) {
    border-left-color: #c83d4d;
}

.admin-notification-theme .swal2-popup:has(.swal2-icon.swal2-warning) {
    border-left-color: #b87908;
}

.admin-notification-theme .swal2-popup:has(.swal2-icon.swal2-success) {
    border-left-color: #16864a;
}

.admin-notification-theme .swal2-title {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.admin-notification-theme .swal2-html-container {
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.4;
}

.admin-notification-theme .price-notification-text {
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 700;
}

html[data-theme="dark"] .admin-notification-theme .admin-alert-card,
html[data-theme="dark"] .admin-notification-theme .alert-container .alert,
html[data-theme="dark"] .admin-notification-theme .alert-box,
html[data-theme="dark"] .admin-notification-theme .alert-message,
html[data-theme="dark"] .admin-notification-theme .custom-notification-toast {
    border-color: #334155 !important;
    background: #172033 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .admin-notification-theme .admin-alert-text,
html[data-theme="dark"] .admin-notification-theme .custom-notification-toast .notification-message,
html[data-theme="dark"] .admin-notification-theme .swal2-html-container {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .admin-notification-theme .admin-alert-title,
html[data-theme="dark"] .admin-notification-theme .swal2-title,
html[data-theme="dark"] .admin-notification-theme .price-notification-text {
    color: #e2e8f0;
}

/* Client palette tokens to match admin blue theme */
:root {
    --client-primary: #4361ee;
    --client-primary-light: #3651d1;
    --client-gray-50: #f4f7fe;
    --client-text: #1e293b;
    --surface-border: #d9e1ec;
    --surface-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.form-control,
.modern-input,
.search-input,
.filter-input {
    border: 1px solid #bbc5d1 !important;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-layout {
    display: flex;
    width: 100%;
}

/* --- SIDEBAR DESIGN --- */
.sidebar {
    width: 280px;
    background: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.1);
    border-right: 1px solid #d9e1ec;
    z-index: 1000;
    overflow-y: auto;
}

/* UPDATED LOGO SECTION STYLES - Dako kag Transparent */
.sidebar-header {
    padding: 35px 15px;
    text-align: center;
    border-bottom: 1px solid #f8f9fa;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container-circle {
    /* Dindakuan naton ang bilog */
    width: 110px;
    height: 110px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    padding: 5px;
}

.sidebar-logo {
    width: 100%;
    height: 100%;
    max-width: 110px;
    max-height: 110px;
    object-fit: contain;
    object-position: center;
}

.fallback-icon {
    display: none;
    color: white;
    font-size: 2rem;
}

.logo-sub-header {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}

.logo-main-title {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: -0.5px;
}

/* --- SIDEBAR LINKS --- */
.sidebar-links {
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
}

.side-link {
    text-decoration: none;
    color: #6c757d;
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.side-link i {
    width: 20px;
    font-size: 1.1rem;
}

.side-link:hover {
    background: #f8f9ff;
    color: #4361ee;
}

.side-link.active {
    background: #eef2ff;
    color: #4361ee;
    border-color: #c7d6f7;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.15);
}

.sidebar-footer {
    margin-top: auto;
    padding-bottom: 20px;
}

.logout-link {
    color: #e63946;
}

.sidebar .side-link.logout-link,
.sidebar .side-link.logout-link i,
.sidebar .side-link.logout-link span {
    color: #e63946 !important;
}

.logout-link:hover {
    background: #fff1f2;
}

/* --- MAIN CONTENT WRAPPER --- */
.main-wrapper {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 40px;
}

.content-container {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-tablet-navigation,
.admin-tablet-menu-toggle,
.admin-tablet-sidebar-backdrop {
    display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
    body.admin-responsive-layout {
        display: block;
        overflow-x: hidden;
    }

    body.admin-responsive-layout.admin-tablet-menu-open {
        overflow: hidden;
    }

    body.admin-responsive-layout .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        width: min(320px, calc(100vw - 40px));
        height: calc(100vh - 56px);
        height: calc(100dvh - 56px);
        z-index: 1100;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-105%);
        transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, visibility 0s linear 320ms;
    }

    body.admin-responsive-layout .sidebar.admin-tablet-drawer-open {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
        transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, visibility 0s;
    }

    body.admin-responsive-layout .sidebar-header {
        padding-top: 54px;
    }

    body.admin-responsive-layout .main-wrapper {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 76px 24px 28px !important;
    }

    body.admin-responsive-layout .content-container {
        max-width: none;
    }

    .admin-tablet-navigation {
        position: fixed;
        z-index: 1110;
        inset: 0 0 auto;
        display: flex;
        height: 56px;
        align-items: center;
        justify-content: space-between;
        padding: 6px 18px;
        border-bottom: 1px solid #d9e1ec;
        background: #ffffff;
    }

    .admin-tablet-logo {
        display: block;
        width: 42px;
        height: 42px;
        object-fit: contain;
    }

    .admin-tablet-menu-toggle {
        display: grid;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        place-items: center;
        border: 1px solid #d9e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #1f4e79;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        font-size: 1.1rem;
        cursor: pointer;
    }

    .admin-tablet-menu-toggle:focus-visible,
    .admin-tablet-sidebar-backdrop:focus-visible {
        outline: 3px solid #3a6ea5;
        outline-offset: 3px;
    }

    .admin-tablet-sidebar-backdrop {
        position: fixed;
        z-index: 1090;
        inset: 56px 0 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        border: 0;
        background: rgba(15, 23, 42, 0.48);
        transition: opacity 240ms ease, visibility 0s linear 240ms;
    }

    .admin-tablet-sidebar-backdrop.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: opacity 240ms ease, visibility 0s;
    }

    body.admin-responsive-layout .admin-members-page .members-mobile-bar {
        display: none !important;
    }
}

html[data-theme="dark"] .admin-tablet-navigation,
html[data-theme="dark"] .admin-tablet-menu-toggle {
    border-color: var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
}

.welcome-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--client-text);
    margin: 6px 0 0 0;
}

/* --- CARDS & BUTTONS --- */
.card,
.profile-card,
.stat-card,
.room-card,
.waiting-list-card,
.modal-container,
.modal-form-side,
.modal-preview-side,
.reservations-section,
.solo-section,
.rate-card,
.status-card,
.plan-card,
.plan-comparison-card,
.plan-summary-card,
.reservation-form-card,
.room-list-card,
.booking-summary-card,
.modal-card,
.payment-method-card,
.staff-card,
.request-card,
.member-list-card,
.apps-table-card,
.report-card,
.solo-plan-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--surface-border) !important;
    box-shadow: var(--surface-shadow) !important;
}

.card {
    padding: 20px;
    margin-bottom: 16px;
}

.btn-primary {
    background: #4361ee;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.alert {
    border-radius: 12px;
    padding: 15px;
    background: #eef2ff;
    border-left: 5px solid #4361ee;
    color: #2c3e50;
    margin-bottom: 20px;
}

.profile-page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px;
    background: #ffffff;
}

.profile-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e6f0fa;
}

.profile-page-header h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #1f4e79;
    margin: 0;
    letter-spacing: -0.03em;
}

.profile-page-header .welcome-text {
    font-size: 1rem;
    font-weight: 600;
    color: #3c4756;
    margin: 6px 0 0;
}

.profile-pill {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f4e79;
    background: #e6f0fa;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #d7e7f8;
}

.profile-shell {
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 1.4fr);
    gap: 24px;
    align-items: start;
}

.profile-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #d9e1ec;
}

.profile-card h2,
.profile-card h3 {
    color: #1f4e79;
    margin-bottom: 18px;
    font-size: 1.2rem;
    font-weight: 700;
}

.profile-card .form-label {
    font-weight: 600;
    color: #515d6f;
    margin-bottom: 8px;
    display: block;
}

.profile-card .form-control {
    border-radius: 8px;
    border: 1px solid #bbc5d1;
    padding: 11px 12px;
    font-size: 0.95rem;
    color: #333333;
    background: #f8fbff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-card .form-control:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12);
    outline: none;
}

.profile-card .btn-primary {
    min-width: 160px;
    background: linear-gradient(135deg, #1f4e79, #3a6ea5);
    border: none;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-card .btn-primary:hover {
    background: linear-gradient(135deg, #3a6ea5, #1f4e79);
    transform: translateY(-1px);
}

.profile-card .text-danger {
    font-size: 0.9rem;
    margin-top: 4px;
    color: #dc3545;
}

.profile-summary {
    background: linear-gradient(135deg, #1f4e79, #3a6ea5);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 240px;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 6px 16px rgba(31, 78, 121, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-summary h2 {
    color: white;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.profile-summary .summary-label {
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.profile-summary .summary-value {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.profile-summary-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.92);
}

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

    .profile-shell {
        grid-template-columns: 1fr;
    }
}
    
    /* =========================================
   THEME TOGGLE - ICON ONLY
   ========================================= */

.theme-toggle-wrapper {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px;
}

.theme-toggle-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #ffffff;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.theme-toggle-btn:hover {
    transform: rotate(12deg);
    background: #f8f9ff;
    color: #4361ee;
    border-color: #a5b4fc;
}

.theme-toggle-btn i {
    font-size: 1rem;
}


/* =========================================
   DARK MODE
   ========================================= */

html[data-theme="dark"] {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-theme="dark"] body {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-theme="dark"] .sidebar {
    background: #111827;
    border-right-color: #1f2937;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .sidebar-header {
    border-bottom-color: #1f2937;
}

html[data-theme="dark"] .logo-main-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .logo-sub-header {
    color: #94a3b8;
}

html[data-theme="dark"] .side-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .side-link:hover {
    background: #1e293b;
    color: #93c5fd;
}

html[data-theme="dark"] .side-link.active {
    background: #1e293b;
    color: #93c5fd;
    border-color: #334155;
}

html[data-theme="dark"] .sidebar .side-link.logout-link,
html[data-theme="dark"] .sidebar .logout-link i,
html[data-theme="dark"] .sidebar .logout-link span {
    color: #fca5a5 !important;
}

html[data-theme="dark"] .sidebar .side-link.logout-link:hover,
html[data-theme="dark"] .sidebar .side-link.logout-link:focus-visible,
html[data-theme="dark"] .sidebar .logout-link:hover i,
html[data-theme="dark"] .sidebar .logout-link:focus-visible i,
html[data-theme="dark"] .sidebar .logout-link:hover span,
html[data-theme="dark"] .sidebar .logout-link:focus-visible span {
    background: #7f1d1d;
    color: #fee2e2 !important;
    border-color: #991b1b;
}

html[data-theme="dark"] .sidebar .side-link.logout-link {
    background: rgba(127, 29, 29, 0.2);
}

html[data-theme="dark"] .theme-toggle-btn {
    background: #111827;
    border-color: #475569;
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

html[data-theme="dark"] .theme-toggle-btn:hover {
    background: #1e293b;
    border-color: #64748b;
    color: #facc15;
}

html[data-theme="dark"] .main-wrapper {
    background: #0f172a;
}

html[data-theme="dark"] .content-container {
    color: #e2e8f0;
}

/* =========================================
   GLOBAL DARK MODE - SHARED ADMIN UI
   ========================================= */

/* Main page areas */
html[data-theme="dark"] body {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-theme="dark"] .main-wrapper {
    background: #0f172a;
    color: #e2e8f0;
}

html[data-theme="dark"] .content-container {
    color: #e2e8f0;
}

/* Shared white cards / panels */
html[data-theme="dark"] .card,
html[data-theme="dark"] .card-body,
html[data-theme="dark"] .reservations-section,
html[data-theme="dark"] .solo-section,
html[data-theme="dark"] .rate-card,
html[data-theme="dark"] .status-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .payment-method-card,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .member-list-card,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .reservations-container,
html[data-theme="dark"] .members-main-wrapper {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22) !important;
}

/* Titles */
html[data-theme="dark"] .dashboard-header h1,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .reservations-title,
html[data-theme="dark"] .payment-settings-title,
html[data-theme="dark"] .reports-title,
html[data-theme="dark"] .staff-title,
html[data-theme="dark"] .card-title {
    color: #f8fafc;
}

/* General text */
html[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

html[data-theme="dark"] .section-subtext,
html[data-theme="dark"] .section-description,
html[data-theme="dark"] .detail-text {
    color: #cbd5e1;
}

html[data-theme="dark"] .form-label {
    color: #e2e8f0;
}

/* Forms */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .modern-input,
html[data-theme="dark"] .modern-select,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .form-textarea,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .filter-input,
html[data-theme="dark"] .list-search-box input,
html[data-theme="dark"] .search-box input {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .search-input::placeholder {
    color: #94a3b8;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background: #1e293b;
    color: #f8fafc;
    border-color: #60a5fa;
}

/* Tables */
html[data-theme="dark"] .table {
    color: #e2e8f0;
    background: #1e293b;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .custom-table thead th,
html[data-theme="dark"] .staff-table thead th {
    background: #172033;
    color: #f8fafc;
    border-color: #334155;
}

html[data-theme="dark"] .table tbody td,
html[data-theme="dark"] .custom-table tbody td,
html[data-theme="dark"] .staff-table tbody td,
html[data-theme="dark"] .records-table tbody td,
html[data-theme="dark"] .attendance-table tbody td {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

/* Table wrappers */
html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .spreadsheet-table,
html[data-theme="dark"] .summary-table {
    color: #e2e8f0;
}

/* Tabs */
html[data-theme="dark"] .tabs-nav {
    border-bottom-color: #334155;
}

html[data-theme="dark"] .tab-btn {
    color: #cbd5e1;
}

html[data-theme="dark"] .tab-btn.active {
    color: #93c5fd;
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .member-tabs .nav-link {
    color: #cbd5e1;
}

html[data-theme="dark"] .member-tabs .nav-link.active {
    color: #93c5fd;
    background: #1e293b;
    border-color: #334155;
}

/* Modals */
html[data-theme="dark"] .modal-container,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .modal-form-side,
html[data-theme="dark"] .modal-preview-side,
html[data-theme="dark"] .receipt-modal-content {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
    border-color: #334155;
}

/* Common reservation/member/report page surfaces */
html[data-theme="dark"] .reservation-page-admin-thq-group42-elm,
html[data-theme="dark"] .reservation-page-admin-thq-reservation-form-elm,
html[data-theme="dark"] .reservation-page-admin-thq-reservation-details-elm,
html[data-theme="dark"] .summary-details-list {
    color: #e2e8f0;
}

/* Common borders/dividers */
html[data-theme="dark"] hr,
html[data-theme="dark"] .waiting-header,
html[data-theme="dark"] .section-header {
    border-color: #334155 !important;
}

/* =========================================================
   MEMBER SIDE - DARK MODE
   ========================================================= */

html[data-theme="dark"] .dashboard-wrapper,
html[data-theme="dark"] .timelog-wrapper,
html[data-theme="dark"] .rooms-container,
html[data-theme="dark"] .profile-page-shell,
html[data-theme="dark"] .solo-page {
    background: #0f172a;
    color: #e2e8f0;
}

/* Member cards / panels */
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .profile-summary,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .solo-plan-card,
html[data-theme="dark"] .membership-status-card,
html[data-theme="dark"] .log-stat-card,
html[data-theme="dark"] .control-container,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .room-list-card,
html[data-theme="dark"] .reservation-form-card,
html[data-theme="dark"] .booking-summary-card,
html[data-theme="dark"] .payment-info-panel,
html[data-theme="dark"] .plan-comparison-card,
html[data-theme="dark"] .plan-summary-card,
html[data-theme="dark"] .modal-card {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

/* Headers / titles */
html[data-theme="dark"] .dashboard-header h1,
html[data-theme="dark"] .welcome-text,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .profile-page-header h1,
html[data-theme="dark"] .solo-header h2,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .stat-number,
html[data-theme="dark"] .info-label,
html[data-theme="dark"] .info-value,
html[data-theme="dark"] .history-item .label,
html[data-theme="dark"] .history-item .value {
    color: #e2e8f0;
}

/* General member text */
html[data-theme="dark"] .dashboard-wrapper p,
html[data-theme="dark"] .timelog-wrapper p,
html[data-theme="dark"] .rooms-container p,
html[data-theme="dark"] .profile-page-shell p,
html[data-theme="dark"] .solo-page p {
    color: #cbd5e1;
}

html[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

/* Forms */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .modern-input,
html[data-theme="dark"] .modern-select,
html[data-theme="dark"] .profile-card .form-control,
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] #reservationSearch,
html[data-theme="dark"] #dashboardSearch,
html[data-theme="dark"] #filter-date,
html[data-theme="dark"] #filter-status,
html[data-theme="dark"] .filter-group select {
    background: #0f172a;
    color: #e2e8f0;
    border-color: #475569;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .search-box input::placeholder {
    color: #64748b;
}

html[data-theme="dark"] .form-label-modern,
html[data-theme="dark"] .profile-card .form-label {
    color: #cbd5e1;
}

/* Tables */
html[data-theme="dark"] .modern-table,
html[data-theme="dark"] .attendance-table,
html[data-theme="dark"] .booking-table,
html[data-theme="dark"] .plan-table {
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .modern-table th,
html[data-theme="dark"] .modern-table td,
html[data-theme="dark"] .attendance-table th,
html[data-theme="dark"] .attendance-table td,
html[data-theme="dark"] .booking-table th,
html[data-theme="dark"] .booking-table td,
html[data-theme="dark"] .plan-table th,
html[data-theme="dark"] .plan-table td {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-theme="dark"] .table-responsive {
    background: #1e293b;
}

/* History items */
html[data-theme="dark"] .history-item {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

/* Notifications */
html[data-theme="dark"] .dashboard-notifications {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

/* Modals */
html[data-theme="dark"] .payment-modal-overlay,
html[data-theme="dark"] .custom-modal {
    background: rgba(0, 0, 0, 0.65);
}

html[data-theme="dark"] .payment-modal-content,
html[data-theme="dark"] .custom-modal .modal-content,
html[data-theme="dark"] .modal-card {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

html[data-theme="dark"] .modal-payment-details,
html[data-theme="dark"] .modal-actions {
    color: #e2e8f0;
}

/* Preserve modal text hierarchy */
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer {
    color: #e2e8f0;
    border-color: #334155;
}

/* Common borders / dividers */
html[data-theme="dark"] .dashboard-wrapper hr,
html[data-theme="dark"] .timelog-wrapper hr,
html[data-theme="dark"] .rooms-container hr,
html[data-theme="dark"] .profile-page-shell hr,
html[data-theme="dark"] .solo-page hr {
    border-color: #334155;
}

/* Room / reservation areas */
html[data-theme="dark"] .room-list-card,
html[data-theme="dark"] .reservation-form-card,
html[data-theme="dark"] .booking-summary-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Profile */
html[data-theme="dark"] .profile-page-shell {
    color: #e2e8f0;
}

html[data-theme="dark"] .profile-summary {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Timelog */
html[data-theme="dark"] .log-stat-card,
html[data-theme="dark"] .control-container,
html[data-theme="dark"] .history-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Solo Plans */
html[data-theme="dark"] .solo-plan-card,
html[data-theme="dark"] .membership-status-card,
html[data-theme="dark"] .plan-comparison-card,
html[data-theme="dark"] .plan-summary-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Keep membership/session colors intact */
html[data-theme="dark"] #membershipCard {
    color: #e2e8f0;
}

/* Accessible dark theme refinements */
html[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-blue-hover: #60a5fa;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .main-wrapper {
    background: var(--bg-main) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .sidebar {
    background: var(--bg-sidebar) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .room-card,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .reservations-container,
html[data-theme="dark"] .members-main-wrapper,
html[data-theme="dark"] .staff-container,
html[data-theme="dark"] .reports-container,
html[data-theme="dark"] .payment-settings-wrapper,
html[data-theme="dark"] .solo-apps-container,
html[data-theme="dark"] .addons-section,
html[data-theme="dark"] .apps-table-card,
html[data-theme="dark"] .addon-item:not(.selected),
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .profile-summary,
html[data-theme="dark"] .solo-plan-card,
html[data-theme="dark"] .membership-status-card,
html[data-theme="dark"] .log-stat-card,
html[data-theme="dark"] .control-container,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .room-list-card,
html[data-theme="dark"] .rooms-sidebar,
html[data-theme="dark"] .room-item,
html[data-theme="dark"] .reservation-form-card,
html[data-theme="dark"] .booking-summary-card,
html[data-theme="dark"] .payment-info-panel,
html[data-theme="dark"] .payment-method-card,
html[data-theme="dark"] .plan-comparison-card,
html[data-theme="dark"] .plan-comparison-header,
html[data-theme="dark"] .plan-summary-card,
html[data-theme="dark"] .status-card,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .member-list-card,
html[data-theme="dark"] .member-card,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .rate-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .active-plan-card,
html[data-theme="dark"] .membership-card,
html[data-theme="dark"] .waiting-list-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .session-monitor,
html[data-theme="dark"] .recent-logs-section,
html[data-theme="dark"] .attendance-records-container,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-container,
html[data-theme="dark"] .modal-form-side,
html[data-theme="dark"] .modal-preview-side,
html[data-theme="dark"] .receipt-modal-content,
html[data-theme="dark"] .payment-modal-content,
html[data-theme="dark"] .custom-modal .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .accordion-item,
html[data-theme="dark"] .reservation-page-admin-thq-group42-elm,
html[data-theme="dark"] .reservation-page-admin-thq-reservation-form-elm,
html[data-theme="dark"] .reservation-page-admin-thq-reservation-details-elm {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .room-card,
html[data-theme="dark"] .usage-card,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] .profile-card,
html[data-theme="dark"] .profile-summary,
html[data-theme="dark"] .solo-plan-card,
html[data-theme="dark"] .membership-status-card,
html[data-theme="dark"] .log-stat-card,
html[data-theme="dark"] .history-card,
html[data-theme="dark"] .room-list-card,
html[data-theme="dark"] .reservation-form-card,
html[data-theme="dark"] .booking-summary-card,
html[data-theme="dark"] .payment-info-panel,
html[data-theme="dark"] .payment-method-card,
html[data-theme="dark"] .plan-comparison-card,
html[data-theme="dark"] .plan-summary-card,
html[data-theme="dark"] .status-card,
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .member-list-card,
html[data-theme="dark"] .member-card,
html[data-theme="dark"] .staff-card,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .rate-card,
html[data-theme="dark"] .plan-card,
html[data-theme="dark"] .active-plan-card,
html[data-theme="dark"] .membership-card,
html[data-theme="dark"] .waiting-list-card,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .apps-table-card,
html[data-theme="dark"] .addon-item:not(.selected),
html[data-theme="dark"] .modal-card {
    border: 1px solid var(--border-color) !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .stat-number,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .members-page-header,
html[data-theme="dark"] .members-tabs-container,
html[data-theme="dark"] .staff-title,
html[data-theme="dark"] .reports-title,
html[data-theme="dark"] .payment-settings-title,
html[data-theme="dark"] .apps-header,
html[data-theme="dark"] .solo-header,
html[data-theme="dark"] .reservation-page-admin-thq-text-elm13,
html[data-theme="dark"] .reservation-page-admin-thq-text-elm31 {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-primary,
html[data-theme="dark"] .text-blue,
html[data-theme="dark"] a:not(.btn) {
    color: var(--accent-blue) !important;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .label-text,
html[data-theme="dark"] small,
html[data-theme="dark"] .card-subtitle,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .info-label,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .payment-settings-subtitle,
html[data-theme="dark"] .staff-subtitle,
html[data-theme="dark"] .section-subtext,
html[data-theme="dark"] .section-description,
html[data-theme="dark"] .detail-text,
html[data-theme="dark"] .column-title,
html[data-theme="dark"] .customer-name,
html[data-theme="dark"] .plan-name,
html[data-theme="dark"] .member-sub-info,
html[data-theme="dark"] .member-header-plan,
html[data-theme="dark"] .addon-description,
html[data-theme="dark"] .stat-desc,
html[data-theme="dark"] .status-muted,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-label-modern,
html[data-theme="dark"] .form-group label {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] select option {
    color: var(--text-muted) !important;
}

html[data-theme="dark"] .text-secondary,
html[data-theme="dark"] .info-value,
html[data-theme="dark"] td {
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .bg-primary,
html[data-theme="dark"] .card-primary-custom {
    background: #1e3a5f !important;
    border: 1px solid #2563eb !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] table,
html[data-theme="dark"] .table,
html[data-theme="dark"] .custom-table,
html[data-theme="dark"] .apps-table,
html[data-theme="dark"] .modern-table,
html[data-theme="dark"] .attendance-table,
html[data-theme="dark"] .booking-table,
html[data-theme="dark"] .plan-table {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] table th,
html[data-theme="dark"] .table th {
    background: var(--bg-main) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] table td,
html[data-theme="dark"] .table td {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] .table-responsive,
html[data-theme="dark"] .table-wrapper,
html[data-theme="dark"] .attendance-table-wrapper,
html[data-theme="dark"] .spreadsheet-table,
html[data-theme="dark"] .summary-table {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

html[data-theme="dark"] .alert-success,
html[data-theme="dark"] .alert-message.alert-success {
    background: #14532d !important;
    border-color: #22c55e !important;
    color: #dcfce7 !important;
}

html[data-theme="dark"] .alert-warning {
    background: #713f12 !important;
    border-color: #f59e0b !important;
    color: #fef3c7 !important;
}

html[data-theme="dark"] .alert-danger,
html[data-theme="dark"] .alert-message.alert-danger {
    background: #7f1d1d !important;
    border-color: #ef4444 !important;
    color: #fee2e2 !important;
}

html[data-theme="dark"] .alert-info {
    background: #164e63 !important;
    border-color: #22d3ee !important;
    color: #cffafe !important;
}

html[data-theme="dark"] .badge-secondary,
html[data-theme="dark"] .badge-dark,
html[data-theme="dark"] .status-badge-ended,
html[data-theme="dark"] .badge-ended {
    background: var(--border-color) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] :focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Responsive profile page layout */
.profile-mobile-bar,
.profile-sidebar-backdrop {
    display: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
    body:has(.profile-page-shell) .sidebar {
        width: 76px;
    }

    body:has(.profile-page-shell) .sidebar-header {
        padding: 18px 8px;
    }

    body:has(.profile-page-shell) .logo-wrapper {
        flex-direction: column;
    }

    body:has(.profile-page-shell) .logo-container-circle {
        width: 48px;
        height: 48px;
        margin: 0;
        padding: 3px;
    }

    body:has(.profile-page-shell) .logo-text-group {
        display: none;
    }

    body:has(.profile-page-shell) .theme-toggle-wrapper {
        justify-content: center;
        padding: 10px 0;
    }

    body:has(.profile-page-shell) .sidebar-links {
        padding: 14px 7px;
        gap: 8px;
    }

    body:has(.profile-page-shell) .side-link {
        justify-content: center;
        gap: 0;
        padding: 12px 4px;
        font-size: 0;
    }

    body:has(.profile-page-shell) .side-link i {
        width: auto;
        flex: 0 0 auto;
        font-size: 1.1rem;
    }

    body:has(.profile-page-shell) .side-link .badge {
        display: none;
    }

    body:has(.profile-page-shell) .main-wrapper {
        width: calc(100% - 76px);
        margin-left: 76px;
        padding: 28px 24px;
    }

    body:has(.profile-page-shell) .content-container {
        max-width: none;
    }

    .profile-page-shell {
        max-width: none;
        padding: 24px;
    }

    .profile-page-header {
        flex-direction: row;
        align-items: center;
    }

    .profile-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
}

@media (max-width: 767px) {
    body:has(.profile-page-shell) {
        display: block;
        overflow-x: hidden;
    }

    body:has(.profile-page-shell).profile-menu-open {
        overflow: hidden;
    }

    body:has(.profile-page-shell) .sidebar {
        top: 56px;
        width: min(320px, calc(100vw - 40px));
        height: calc(100dvh - 56px);
        z-index: 1100;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-105%);
        transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, visibility 0s linear 320ms;
    }

    body:has(.profile-page-shell) .sidebar.profile-drawer-open {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
        transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease, visibility 0s;
    }

    body:has(.profile-page-shell) .main-wrapper {
        width: 100%;
        margin-left: 0;
        padding: 76px 16px 24px;
    }

    body:has(.profile-page-shell) .content-container {
        max-width: none;
    }

    .profile-page-shell {
        max-width: none;
        padding: 0;
    }

    .profile-mobile-bar {
        position: fixed;
        z-index: 1110;
        inset: 0 0 auto;
        display: flex;
        height: 56px;
        align-items: center;
        justify-content: space-between;
        padding: 6px 14px;
        background: #ffffff;
        border-bottom: 1px solid #d9e1ec;
    }

    .profile-mobile-logo {
        display: block;
        width: 42px;
        height: 42px;
        object-fit: contain;
    }

    .profile-menu-toggle {
        display: grid;
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        place-items: center;
        border: 1px solid #d9e1ec;
        border-radius: 10px;
        background: #ffffff;
        color: #1f4e79;
        font-size: 1.1rem;
        cursor: pointer;
    }

    .profile-sidebar-backdrop {
        position: fixed;
        z-index: 1090;
        inset: 56px 0 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        border: 0;
        background: rgba(0, 0, 0, 0.48);
        transition: opacity 240ms ease, visibility 0s linear 240ms;
    }

    .profile-sidebar-backdrop.is-visible {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition: opacity 240ms ease, visibility 0s;
    }

    .profile-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
        padding-bottom: 14px;
    }

    .profile-page-header h1 {
        font-size: 1.6rem;
    }

    .profile-page-header .welcome-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .profile-pill {
        align-self: flex-start;
    }

    .profile-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .profile-card {
        min-width: 0;
        padding: 18px;
    }

    .profile-summary {
        min-height: 0;
    }

    .profile-card form,
    .profile-card .mb-3,
    .profile-card .position-relative,
    .profile-card .form-control {
        width: 100%;
        min-width: 0;
    }

    .profile-card .form-control {
        min-height: 44px;
    }

    .profile-card .btn-primary {
        width: 100%;
        min-height: 44px;
    }
}

@media (max-width: 420px) {
    body:has(.profile-page-shell) .main-wrapper {
        padding-right: 12px;
        padding-left: 12px;
    }

    .profile-page-header h1 {
        font-size: 1.45rem;
    }

    .profile-card {
        padding: 16px;
    }

    .profile-summary .summary-value {
        overflow-wrap: anywhere;
    }
}

html[data-theme="dark"] .profile-mobile-bar {
    background: var(--bg-card);
    border-color: var(--border-color);
}

html[data-theme="dark"] .profile-menu-toggle {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
    body:has(.profile-page-shell) .sidebar,
    .profile-sidebar-backdrop {
        transition-duration: 0.01ms;
        transition-delay: 0s;
    }
}

@media (max-width: 767px) {
    .profile-mobile-bar {
        background: #ffffff;
        border-bottom: 1px solid #d9e1ec;
        box-shadow: none;
    }

    .profile-menu-toggle {
        border: 1px solid #d9e1ec;
        background: #ffffff;
        color: #1f4e79;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        outline: none;
    }

    .profile-menu-toggle:focus-visible {
        outline: 2px solid #1f4e79;
        outline-offset: 2px;
    }
}

html[data-theme="dark"] .profile-mobile-bar,
html[data-theme="dark"] .profile-menu-toggle {
    border-color: var(--border-color);
    background: var(--bg-card);
    color: var(--accent-blue);
}

html[data-theme="dark"] .profile-page-shell .profile-card,
html[data-theme="dark"] .profile-page-shell .profile-summary {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22) !important;
}

@media (max-width: 1023px) {
    .global-toast-container {
        top: calc(env(safe-area-inset-top, 0px) + 64px);
        left: 8px;
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
        transform: none;
    }

    .global-member-toast {
        grid-template-columns: 32px minmax(0, 1fr) 28px;
        gap: 8px;
        width: 100%;
        padding: 10px;
    }

    .global-member-toast-icon {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .global-member-toast-content,
    .global-member-toast-title,
    .global-member-toast-message {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .global-member-toast-title {
        font-size: 0.8125rem;
    }

    .global-member-toast-message {
        font-size: 0.75rem;
    }

    .swal2-container.swal2-top-end {
        top: calc(env(safe-area-inset-top, 0px) + 64px) !important;
        right: 8px !important;
        bottom: auto !important;
        left: 8px !important;
        width: auto !important;
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
        padding: 0 !important;
    }

    .swal2-container.swal2-top-end .swal2-popup.swal2-toast {
        width: min(460px, 100%) !important;
        max-width: 100% !important;
        margin: 0 0 0 auto !important;
        box-sizing: border-box;
    }

    .swal2-container.swal2-top-end .swal2-title,
    .swal2-container.swal2-top-end .swal2-html-container {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}