:root {
        --dash-primary: var(--primary);
        --dash-surface: rgba(255, 255, 255, 0.03);
        --dash-border: var(--border-med);
        --dash-text: var(--text-1);
        --dash-text-muted: var(--text-2);
        --sidebar-w: 260px;
    }

    body.light-mode {
        --dash-surface: rgba(255, 255, 255, 0.6);
        --dash-border: #cbd5e1;
        --dash-text: #1e293b;
        --dash-text-muted: #64748b;
    }

    .dashboard-container {
        display: flex;
        width: 100%;
        min-height: 100vh;
        padding-top: 70px;
        background: var(--bg-1);
    }

    /* Sidebar Navigation */
    .dash-sidebar {
        width: var(--sidebar-w);
        border-right: 1px solid var(--dash-border);
        background: var(--dash-surface);
        backdrop-filter: blur(12px);
        display: flex;
        flex-direction: column;
        padding: 2rem 1.5rem;
        position: relative;
        z-index: 10;
        transition: all 0.3s ease;
    }

    .dash-profile-brief {
        text-align: center;
        margin-bottom: 2.5rem;
    }

    .dash-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: var(--dash-primary);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        margin: 0 auto 1rem;
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
        border: 2px solid var(--dash-surface);
        position: relative;
        overflow: hidden;
    }

    .dash-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .dash-user-name {
        font-weight: 700;
        color: var(--dash-text);
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }

    .dash-user-role {
        font-size: 0.8rem;
        color: var(--dash-primary);
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
    }

    .dash-nav {
        list-style: none;
        padding: 0;
        margin: 0;
        flex-grow: 1;
    }

    .dash-nav li {
        margin-bottom: 0.5rem;
    }

    .dash-nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-radius: 12px;
        color: var(--dash-text-muted);
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .dash-nav a i {
        font-size: 1.1rem;
        width: 24px;
        text-align: center;
        transition: transform 0.2s;
    }

    .dash-nav a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--dash-text);
    }

    body.light-mode .dash-nav a:hover {
        background: rgba(0, 0, 0, 0.04);
    }

    .dash-nav a.active {
        background: var(--dash-primary);
        color: #fff;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }

    .dash-nav a.active i {
        transform: scale(1.1);
    }

    .logout-btn {
        margin-top: auto;
        color: #ef4444 !important;
    }

    .logout-btn:hover {
        background: rgba(239, 68, 68, 0.1) !important;
    }

    /* Main Content Area */
    .dash-main {
        flex-grow: 1;
        width: 100%;
        padding: 2.5rem;
        overflow-y: auto;
        max-width: calc(100vw - var(--sidebar-w));
    }

    .dash-header {
        margin-bottom: 3rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    .dash-header h1 {
        font-size: 2rem;
        font-weight: 800;
        color: var(--dash-text);
        margin: 0;
    }

    .dash-header p {
        color: var(--dash-text-muted);
        margin: 0.5rem 0 0;
        font-size: 0.95rem;
    }

    .dash-tab {
        display: none;
        animation: slideUpFade 0.4s ease forwards;
    }

    .dash-tab.active {
        display: block;
    }

    /* Modern Form Cards */
    .dash-card {
        background: var(--dash-surface);
        border: 1px solid var(--dash-border);
        border-radius: 20px;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        margin-bottom: 2rem;
        max-width: 800px;
    }

    .dash-card-title {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--dash-text);
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--dash-border);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-group label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--dash-text-muted);
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .dash-input {
        width: 100%;
        padding: 14px 16px;
        background: rgba(0, 0, 0, 0.15);
        border: 1px solid var(--dash-border);
        border-radius: 12px;
        color: var(--dash-text);
        font-family: var(--font);
        font-size: 0.95rem;
        transition: all 0.3s ease;
    }

    body.light-mode .dash-input {
        background: rgba(255, 255, 255, 0.7);
    }

    .dash-input:focus {
        outline: none;
        border-color: var(--dash-primary);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
        background: rgba(0, 0, 0, 0.25);
    }

    body.light-mode .dash-input:focus {
        background: #fff;
    }

    select.dash-input {
        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='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 1em;
    }

    textarea.dash-input {
        min-height: 100px;
        resize: vertical;
    }

    .dash-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 24px;
        background: var(--dash-primary);
        color: #fff;
        border: none;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .dash-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }

    .dash-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    @keyframes slideUpFade {
        from {
            opacity: 0;
            transform: translateY(15px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .dash-card-instruments {
        padding: 3rem;
        max-width: 100%;
    }

    .profile-pic-container {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .profile-avatar-preview {
        width: 100px;
        height: 100px;
        margin: 0;
    }

    .profile-avatar-preview i {
        font-size: 2.5rem;
    }

    /* Mobile and Tablet Responsiveness */
    @media (max-width: 992px) {
        .dashboard-container {
            flex-direction: column;
        }

        .dash-sidebar {
            width: 100%;
            padding: 1rem;
            border-right: none;
            border-bottom: 1px solid var(--dash-border);
        }

        .dash-profile-brief {
            display: none;
        }

        .dash-nav {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            width: 100%;
            overflow-x: visible;
            padding-bottom: 0;
        }

        .dash-nav li {
            margin: 0;
            width: 100%;
        }

        .dash-nav li.has-submenu {
            grid-column: span 2;
            display: flex;
            flex-direction: column;
            gap: 8px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--dash-border);
            border-radius: 12px;
            padding: 10px;
        }

        .dash-nav li.has-submenu > a {
            pointer-events: none;
            background: transparent;
            border: none;
            box-shadow: none;
            justify-content: flex-start;
            padding: 4px 8px;
            color: var(--dash-text-muted);
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .dash-nav .submenu {
            display: grid !important;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            padding: 0 !important;
            margin: 0;
            list-style: none;
            width: 100%;
        }

        .dash-nav .submenu-arrow {
            display: none !important;
        }

        .dash-nav a {
            display: flex !important;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: var(--dash-surface);
            border: 1px solid var(--dash-border);
            border-radius: 10px;
            padding: 12px 10px;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--dash-text);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transition: all 0.25s ease;
            text-align: center;
        }

        .dash-nav a:hover, .dash-nav a.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
        }

        .logout-btn {
            margin-top: 0;
        }

        .dash-main {
            padding: 1.5rem 1rem;
            max-width: 100%;
        }

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

        .dash-card {
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border-radius: 12px;
        }

        .dash-card-instruments {
            padding: 1.5rem;
        }

        .dash-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 15px;
            margin-bottom: 2rem;
        }

        .dash-header h1 {
            font-size: 1.5rem;
        }

        .profile-pic-container {
            flex-direction: column;
            align-items: flex-start;
            gap: 1.2rem;
        }
    }

    /* ── Admin Submenu Styles ────────────────────────────────────────── */
    .dash-nav li.has-submenu {
        position: relative;
    }
    .dash-nav .submenu {
        margin-top: 5px;
        margin-bottom: 5px;
    }
    .dash-nav .submenu li {
        margin-bottom: 0.25rem;
    }
    .dash-nav .submenu li a {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    .dash-nav .submenu-arrow {
        transition: transform 0.3s ease;
    }
    .dash-nav li.open .submenu-arrow {
        transform: rotate(180deg);
    }

    /* ── Admin Table Styles ──────────────────────────────────────────── */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        margin-top: 1rem;
        border-radius: 12px;
        border: 1px solid var(--dash-border);
        background: rgba(255, 255, 255, 0.01);
    }

    .admin-table {
        width: 100%;
        border-collapse: collapse;
        text-align: left;
        font-size: 0.95rem;
    }

    .admin-table th {
        background: rgba(255, 255, 255, 0.03);
        color: var(--dash-text);
        padding: 16px 20px;
        font-weight: 600;
        border-bottom: 1px solid var(--dash-border);
    }

    .admin-table td {
        padding: 16px 20px;
        color: var(--dash-text-muted);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        vertical-align: middle;
    }

    .admin-table tr:hover td {
        background: rgba(255, 255, 255, 0.02);
        color: var(--dash-text);
    }

    body.light-mode .admin-table th {
        background: #f8fafc;
    }

    body.light-mode .admin-table tr:hover td {
        background: #f1f5f9;
    }

    /* Badges */
    .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .badge-admin {
        background: rgba(59, 130, 246, 0.1);
        color: #3b82f6;
    }

    .badge-user {
        background: rgba(168, 85, 247, 0.1);
        color: #a855f7;
    }

    .badge-success {
        background: rgba(34, 197, 94, 0.1);
        color: #22c55e;
    }

    .badge-danger {
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }
}

/* ── Full Width Cards Layout overrides ────────────────────────────── */
#tab-profile,
#tab-security,
#tab-admin-users,
#tab-admin-livesets,
#tab-admin-cache {
    width: 100% !important;
}
#tab-profile .dash-card,
#tab-security .dash-card,
#tab-admin-users .dash-card,
#tab-admin-livesets .dash-card,
#tab-admin-cache .dash-card {
    max-width: 100% !important;
    width: 100% !important;
}

/* ── Custom Pagination Styles ────────────────────────────────────── */
.page-btn {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    color: var(--dash-text);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    user-select: none;
}
.page-btn:hover:not(.disabled) {
    background: var(--dash-primary);
    color: #fff;
    border-color: var(--dash-primary);
}
.page-btn.active {
    background: var(--dash-primary);
    color: #fff;
    border-color: var(--dash-primary);
    font-weight: 600;
}
.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}