:root {
    /* FollowBeat Brand Colors */
    --color-canciones: #3895dd;
    --color-canciones-hover: #56b0f6;
    --color-grupos: #f19339;
    --color-grupos-hover: #db7d26;
    --color-cursos: #96d68e;
    --color-cursos-hover: #7bc272;

    /* Modern Slate/Blue Palette */
    --primary-color: #3895dd;
    /* Bright Blue */
    --primary-hover: #2563eb;
    /* Darker Blue */
    --background-dark: #0f172a;
    /* Deep Slate */
    --surface-dark: #1e293b;
    /* Lighter Slate */
    --surface-hover: #334155;
    /* Hover Slate */
    --text-primary: #f8fafc;
    /* White-ish */
    --text-secondary: #cbd5e1;
    /* Light Gray */
    --border-color: #334155;
    /* Slate Border */
    --error-color: #ef4444;
    /* Red */
    --success-color: #10b981;
    /* Emerald */
    --warning-color: #ffc107;
    /* Amber/Yellow */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --input-bg: rgba(0, 0, 0, 0.2);

    /* Standardized Z-Index Scale */
    --z-base: 1;
    --z-sticky: 100;
    --z-drawer: 200;
    --z-navbar: 2000;
    --z-dropdown: 2100;

    /* Tiered Modals */
    --z-modal-primary: 3000;
    /* Song Viewer, standard modals */
    --z-modal-stack: 4000;
    /* Editors, Notes, sub-modals */
    --z-modal-top: 5000;
    /* Confirmation alerts, high priority */

    --z-popover: 6000;
    --z-tooltip: 7000;
    --z-max: 99999;
}

/* TinyMCE Modal Fix */
.tox-tinymce-aux {
    z-index: var(--z-modal-stack) !important;
}

/* --- Utilities --- */
.u-hidden, .d-none {
    display: none !important;
}
.max-w-1000 { max-width: 1000px; margin-left: auto; margin-right: auto; }

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

body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 100px;
    /* Space for fixed navbar (80px) + 20px margin */
}

/* Authentication Pages (Centered & Compact) */
.auth-container {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--background-dark);
}

.auth-box {
    background-color: var(--surface-dark);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    /* Centered and smaller as requested */
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.4s ease-out;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary-color);
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* reCAPTCHA responsive wrapper */
.recaptcha-wrapper {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

@media (max-width: 480px) {
    .auth-box {
        padding: 1.5rem 1rem !important;
    }

    .auth-container {
        padding: 1rem !important;
    }
}

@media (max-width: 360px) {
    .auth-box {
        padding: 1.5rem 0.5rem !important;
    }
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;

}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary:hover {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}

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

.btn-outline:hover,
.btn-outline.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-orange {
    background-color: #f59e0b;
    color: white !important;
    border: none;
}

.btn-orange:hover {
    background-color: #d97706;
    /* Darker orange */
    color: white !important;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: transform 0.2s;
    text-decoration: none !important;
    box-shadow: none !important;
}

.btn-icon:hover {
    transform: scale(1.1);
}

/* Global Header Icon Colors */
#nav-mobile-search i {
    color: #ffffff !important;
}

#nav-notifications-btn i {
    color: var(--warning-color) !important;
    font-size: 1.25rem !important;
    /* Slightly larger as requested */
}

/* Segmented Control */
.segmented-control {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.segment-btn {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.segment-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.segment-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(56, 149, 221, 0.3);
}

/* Navbar */
.navbar {
    background-color: var(--surface-dark);
    height: 80px;
    padding: 0 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-navbar);
    border-bottom: 1px solid var(--border-color);
}

/* Version PC: Ocultar accesos directos de móvil completamente */
@media (min-width: 993px) {
    .nav-mobile-shortcut {
        display: none !important;
    }
}

/* Versión móvil: se ocultan de base y JS los muestra si hay datos */
@media (max-width: 992px) {
    .nav-mobile-shortcut {
        display: none;
    }
}

/* --- User Profile Dropdown (Unified PC/Mobile) --- */
.user-profile-container {
    position: relative;
    display: block !important;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-username {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Hide username on mobile to save space */
@media (max-width: 992px) {
    .nav-username {
        display: none;
    }

    .user-profile-btn {
        padding: 4px 8px;
        gap: 6px;
    }
}

.user-profile-thumb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
}

#user-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-chevron {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.user-profile-btn[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
}

.user-submenu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--surface-dark) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-xl) !important;
    z-index: var(--z-dropdown);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.user-info-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid var(--border-color) !important;
    display: flex;
    flex-direction: column;
}

.user-submenu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    background: transparent !important;
    border: none !important;
    width: 100%;
    text-align: left;
    font-size: 0.95rem !important;
    cursor: pointer;
}

.user-submenu .dropdown-item:hover {
    background: var(--surface-hover) !important;
    color: var(--text-primary) !important;
    padding-left: 1.25rem !important;
}

.user-submenu .dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.user-submenu .dropdown-item.text-red-400 {
    color: #f87171 !important;
}

.user-submenu .dropdown-item.text-red-400 i {
    color: #f87171 !important;
}

#logout-btn-dropdown {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-brand img {
    height: 65px;
    width: auto;
    transition: height 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: var(--surface-hover);
}

.flex-col {
    display: flex !important;
    flex-direction: column !important;
}

.d-flex {
    display: flex !important;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Search Tabs */
.search-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.search-tab {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.search-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Dashboard */
.group-header {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.group-info h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.group-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.group-nav .btn.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.group-nav .btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.card {
    background-color: var(--surface-dark);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: fit-content;
}

.status-pending,
.status-propuesta {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-accepted,
.status-lista {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-aprendiendo {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-descartada {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Forms */
input,
select,
textarea {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    width: 100%;
}

select option {
    background-color: var(--surface-dark);
    color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#bio {
    min-height: 150px;
    resize: vertical;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: var(--z-modal-primary);
}

.modal-content {
    background: var(--surface-dark);
    margin: auto;

    border-radius: 16px;
    width: 95%;
    max-width: 650px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

.modal-content-sm {
    max-width: 500px;
}

.modal-content-md {
    max-width: 600px;
}

.modal-content-lg {
    max-width: 700px;
}

.modal-content-xl {
    max-width: 800px;
}

.modal-content-max {
    max-width: 850px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content-full {
    max-width: 90vw;
    height: 85vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.close-btn,
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}



@media (max-width: 911px) {

    /* Dashboard Header Mobile Adjustments */
    .profile-summary {
        flex-direction: column !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
    }

    .profile-main-info {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
    }

    .profile-main-info .profile-img-container {
        flex-shrink: 0;
        min-width: 120px;
        margin: 0;
    }

    .profile-actions-wrapper {
        width: 100%;
        display: flex !important;
        flex-direction: column;
        gap: 1.5rem !important;
    }

    .actions-primary {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .actions-secondary {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding-left: 0 !important;
        border-left: none !important;
    }

    .actions-primary .btn,
    .actions-secondary .btn {
        width: 100% !important;
        font-size: 0.85rem !important;
        padding: 0.75rem 0.5rem !important;
    }

    #teacher-panel-btn {
        grid-column: 1 / -1;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Responsive */
#mobile-nav {
    display: none;
}

/* --- Tablet View (768px - 992px) --- */
@media (min-width: 768px) and (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--surface-dark);
        flex-direction: column;
        padding: 0.5rem 1rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #mobile-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        background: rgba(30, 41, 59, 0.9);
        /* surface-dark with opacity */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.5rem 0;
        z-index: 1000;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }

    #mobile-nav.active {
        display: flex !important;
        animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #mobile-nav .nav-link {
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.2s;
    }

    #mobile-nav .nav-link:last-child {
        border-bottom: none;
    }

    #mobile-nav .nav-link:hover,
    #mobile-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.05);
        color: var(--primary-color);
        padding-left: 1.75rem;
    }

    #mobile-nav .nav-link i {
        width: 20px;
        text-align: center;
        opacity: 0.8;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .nav-brand img {
        height: 45px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        transition: all 0.2s;
        margin-left: 0.25rem;
        /* Space from profile */
    }

    .menu-toggle i {
        margin-left: 0.6rem !important;
        /* Manual centering for the bars icon */
        font-size: 1.2rem;
    }

    .menu-toggle:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-user {
        display: none;
    }

    .dashboard-grid,
    .results-grid,
    .filter-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    /* Search Tabs Responsive */
    .search-tabs {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        border-bottom: none !important;
    }

    .search-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 0.6rem 1rem !important;
        background: var(--surface-hover);
        border-radius: 8px !important;
        border: 1px solid var(--border-color);
        font-size: 0.9rem;
    }

    .search-tab.active {
        background: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }

    /* Section Headers Mobile Adjustments */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .section-header-main {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    .section-search-group {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
        align-items: center !important;
    }

    .section-search-group .search-wrapper {
        flex: 1 !important;
        max-width: none !important;
    }

    .section-header-actions {
        width: 100%;
        justify-content: space-between;
        display: flex;
        margin-top: 0.5rem;
    }

    /* Notifications Dropdown Mobile Fix */
    .notifications-dropdown {
        position: fixed !important;
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: none !important;
    }

    /* Dashboard & Profile Structural Mobile Consolidation */
    /* Dashboard & Profile Structural Tablet Refinements */
    .profile-summary {
        display: grid !important;
        grid-template-columns: 1fr 1.2fr !important;
        gap: 2rem !important;
        align-items: center !important;
        padding: 2.5rem !important;
        text-align: left !important;
    }

    .profile-main-info {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 1.5rem !important;
        width: 100% !important;
        text-align: left !important;
    }

    .profile-actions-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }

    .actions-primary {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
        width: 100% !important;
    }

    /* En Tablet, el grid de perfil puede ser de 2 columnas o 1 dependiendo de la sección */
    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .actions-secondary {
        grid-column: 1 / span 2;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
        border-left: none !important;
        border-top: 1px solid var(--border-color) !important;
        padding-left: 0 !important;
        padding-top: 2rem !important;
        width: 100% !important;
    }

    .grid-cols-2,
    .responsive-settings-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
        gap: 1rem !important;
    }

    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
        gap: 1rem !important;
    }

    /* Visibility and Teacher Mode container fixes */
    .responsive-settings-grid .bg-blue-alpha,
    .responsive-settings-grid .bg-success-alpha {
        flex-direction: row !important;
        height: auto !important;
        align-items: center !important;
        padding: 0.5rem 1rem !important;
        gap: 1rem !important;
    }

    /* Profile Edit Header Fix */
    #edit-mode-container>.card.d-flex,
    #edit-profile-section>.card.d-flex {
        flex-direction: row !important;
        align-items: center !important;
        gap: 1rem !important;
    }
}

/* --- Mobile View ( < 768px ) --- */
@media (max-width: 767px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--surface-dark);
        flex-direction: column;
        padding: 0.5rem 1rem;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #mobile-nav {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        background: rgba(30, 41, 59, 0.9);
        /* surface-dark with opacity */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.5rem 0;
        z-index: 1000;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }

    #mobile-nav.active {
        display: flex !important;
        animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #mobile-nav .nav-link {
        width: 100%;
        padding: 1rem 1.5rem;
        border-radius: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-secondary);
        font-weight: 600;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        transition: all 0.2s;
    }

    #mobile-nav .nav-link:last-child {
        border-bottom: none;
    }

    #mobile-nav .nav-link:hover,
    #mobile-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.05);
        color: var(--primary-color);
        padding-left: 1.75rem;
    }

    #mobile-nav .nav-link i {
        width: 20px;
        text-align: center;
        opacity: 0.8;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .nav-brand img {
        height: 45px;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--border-color);
        transition: all 0.2s;
        margin-left: 0.25rem;
        /* Space from profile */
    }

    .menu-toggle i {
        margin-left: 0.6rem !important;
        /* Manual centering for the bars icon */
        font-size: 1.2rem;
    }

    .menu-toggle:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.08);
    }

    .nav-user {
        display: none;
    }

    .dashboard-grid,
    .results-grid,
    .filter-grid {
        grid-template-columns: 1fr !important;
    }

    /* Search Tabs Responsive */
    .search-tabs {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        border-bottom: none !important;
    }

    .search-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 0.6rem 1rem !important;
        background: var(--surface-hover);
        border-radius: 8px !important;
        border: 1px solid var(--border-color);
        font-size: 0.9rem;
    }

    .search-tab.active {
        background: var(--primary-color) !important;
        color: white !important;
        border-color: var(--primary-color) !important;
    }

    /* Section Headers Mobile Adjustments */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .section-header-main {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }

    .section-search-group {
        width: 100% !important;
        display: flex !important;
        gap: 10px !important;
        align-items: center !important;
    }

    .section-search-group .search-wrapper {
        flex: 1 !important;
        max-width: none !important;
    }

    .section-header-actions {
        width: 100%;
        justify-content: space-between;
        display: flex;
        margin-top: 0.5rem;
    }

    /* Notifications Dropdown Mobile Fix */
    .notifications-dropdown {
        position: fixed !important;
        top: 70px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: none !important;
    }

    /* Dashboard & Profile Structural Mobile Consolidation */
    .profile-summary,
    .profile-main-info,
    .profile-actions-wrapper,
    .profile-grid {
        flex-direction: column !important;
        display: flex !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
        width: 100% !important;
        text-align: center !important;
        align-items: center !important;
    }

    .actions-secondary {
        border-left: none !important;
        border-top: 1px solid var(--border-color) !important;
        padding-left: 0 !important;
        padding-top: 1.5rem !important;
        width: 100% !important;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .responsive-settings-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 1rem !important;
    }

    /* Visibility and Teacher Mode container fixes */
    .responsive-settings-grid .bg-blue-alpha,
    .responsive-settings-grid .bg-success-alpha,
    .responsive-settings-grid .bg-blue-alpha.rounded-lg,
    .responsive-settings-grid .bg-success-alpha.rounded-lg {
        flex-direction: column !important;
        height: auto !important;
        align-items: flex-start !important;
        padding: 1rem !important;
        gap: 1rem !important;
    }

    /* Profile Edit Header Fix */
    #edit-mode-container>.card.d-flex,
    #edit-profile-section>.card.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
}


/* Notifications Dropdown Base Desktop */
.notifications-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-dark);
}

/* --- Song Viewer Modal Internal Styles --- */
.viewer-modal-content {
    width: 95%;
    max-width: 900px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.viewer-toolbar {
    padding: 0.5rem;
    background: #1a1a1a;
    display: flex;
    flex-direction: row; /* Single row by default */
    gap: 0.6rem;
    border-bottom: 1px solid #333;
    overflow-x: auto;
    align-items: center;
    justify-content: center;
}

.toolbar-row {
    display: contents; /* Items flow into the single toolbar row on PC */
}


.viewer-toolbar::-webkit-scrollbar {
    display: none;
}

.viewer-tool-group {
    display: flex;
    gap: 4px;
    border-right: 1px solid #333;
    padding-right: 0.8rem;
    align-items: center;
}

.viewer-tool-group:last-child {
    border-right: none;
}

.viewer-display-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: #121212;
    position: relative;
}

.viewer-song-display {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    white-space: pre-wrap;
    color: #e0e0e0;
    margin: 0;
    padding-bottom: 50vh;
}

/* Footer Layout */
.modal-footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-rating-stars-container {
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-avg-rating-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 5px;
}

.modal-creator-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.modal-footer-actions {
    display: flex;
    gap: 10px;
}

.modal-report-btn-style {
    font-size: 0.9rem;
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.modal-action-btn-style {
    font-size: 0.9rem;
}

/* Report Form */
.report-title-label {
    display: block;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: bold;
}

.report-reason-textarea {
    width: 100%;
    min-height: 80px;
    margin-bottom: 1rem;
}

.report-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Rhythm Modal Styles */
.rhythm-modal-box {
    max-width: 400px;
    background: #1a1a1a;
    border: 1px solid #333;
    margin: 10% auto;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

@media (max-width: 768px) {
    .rhythm-modal-box {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
        border: none;
        border-radius: 0;
    }
}

.rhythm-modal-header-box {
    padding: 1rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.rhythm-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* Premium Scrollbar for Rhythm List */
.rhythm-list-container::-webkit-scrollbar {
    width: 6px;
}

.rhythm-list-container::-webkit-scrollbar-track {
    background: transparent;
}

.rhythm-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.rhythm-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.preset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.preset-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.rhythm-footer-box {
    padding: 1.5rem;
    border-top: 1px solid #333;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.rhythm-modal-title-text {
    display: block;
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: bold;
}


.rhythm-list-empty-msg {
    color: #666;
    text-align: center;
}

.rhythm-footer-box {
    padding: 1rem;
    border-top: 1px solid #333;
    text-align: center;
}

.rhythm-new-btn-style {
    font-size: 0.8rem;
    text-decoration: none;
    color: #fff;
    display: inline-block;
}

.modal-footer.viewer-footer {
    padding: 1rem;
    border-top: 1px solid #333;
    background: #121212 !important;
    border-radius: 0 0 16px 16px;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1rem !important;
}

#modal-notation-btn {
    min-width: 65px !important;
}

.viewer-report-form {
    z-index: var(--z-modal-stack);
    display: none;
    padding: 1.5rem;
    background: #1a1a1a;
    border-top: 1px solid #333;
}

/* Z-Index Overrides for standardized scale */
.modal {
    z-index: var(--z-modal-primary);
}

.modal-content {
    z-index: calc(var(--z-modal-primary) + 1);
}

/* Interaction and Edit Modals (Stack Tier) */
#interaction-modal,
#song-form-modal {
    z-index: var(--z-modal-stack);
}

#interaction-modal .modal-content,
#song-form-modal .modal-content {
    z-index: calc(var(--z-modal-stack) + 1);
    max-height: 90vh;
    overflow-y: auto;
}

#modal-rhythm-selector {
    z-index: var(--z-modal-stack);
}

.premium-modal {
    z-index: var(--z-modal-stack) !important;
}

#confirm-removal-modal,
#global-confirm-modal,
#custom-prompt-modal,
#recurrence-choice-modal,
#class-type-modal {
    z-index: var(--z-modal-top) !important;
}

.viewer-toggle-btn {
    z-index: calc(var(--z-modal-primary) + 5);
}

.playback-fabs-left {
    z-index: calc(var(--z-modal-primary) + 5);
}

.add-to-lib-fab,
.report-fab {
    z-index: calc(var(--z-modal-primary) + 5);
}

@media (max-width: 992px) {
    .viewer-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}

/* Card removal button */
.remove-btn {
    position: absolute;
    top: 10px;
    left: 50px;
    /* To the right of the favorite star */
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ef4444;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Specific overlay for the dashboard confirmation to avoid breaking other modals */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    /* Matches project tone */
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.premium-modal-content {
    background: #1e293b;
    /* Solid slate for better contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 480px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    animation: modalPopUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopUp {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

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

.premium-modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: #ef4444;
    font-size: 1.5rem;
}

.premium-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.premium-modal-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.premium-modal-actions {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.btn-solid-danger {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
    font-weight: 700 !important;
    min-width: 140px !important;
    border-radius: 12px !important;
    padding: 0.75rem 2rem !important;
}

.btn-solid-danger:hover {
    background-color: #dc2626 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4) !important;
}

/* Reusable Structural Classes */
.loading-container {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.form-actions-split {
    display: flex;
    gap: 10px;
}

/* Base Dashboard Header Classes (Desktop) */
.profile-summary {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
}

.profile-main-info {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex: 1.5;
}

.profile-actions-wrapper {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    flex: 2;
}

.actions-primary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    flex: 1;
    min-width: 180px;
}

.actions-primary .btn {
    width: 100%;
}

.actions-secondary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
    padding-left: 2rem;
    border-left: 1px solid var(--border-color);
}

.actions-secondary .btn {
    width: 100%;
    justify-content: flex-start;
    padding-left: 1.25rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header-main {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-grow: 1;
}

.section-search-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 400px;
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Profile Page */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 911px) {
    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-img-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    cursor: pointer;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--surface-hover);
    transition: border-color 0.2s;
}

.profile-img:hover {
    border-color: var(--primary-color);
}

.profile-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-img-container:hover .profile-img-overlay {
    opacity: 1;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

#instruments-list,
#view-instruments-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

@media (max-width: 1200px) {

    #instruments-list,
    #view-instruments-list {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 992px) {

    #instruments-list,
    #view-instruments-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {

    #instruments-list,
    #view-instruments-list {
        grid-template-columns: 1fr !important;
    }
}

.instrument-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--surface-hover);
    padding: 0.6rem 0.75rem 0.6rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    box-sizing: border-box;
}

.instrument-item.is-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;

}

.instrument-item.is-primary .bg-gray-700 {
    background-color: rgba(255, 255, 255, 0.2);
}

/* New Instrument Actions & Star */
.star-btn {
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    opacity: 0.5;
    padding: 4px;
    border-radius: 50%;
    line-height: 1;
}

.star-btn:hover {
    transform: scale(1.2);
    opacity: 1;
    color: var(--warning-color);
}

.star-btn.active {
    color: #ffc107;
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.instrument-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.instrument-actions .btn-delete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-size: 0.85rem;
    color: var(--error-color) !important;
}

.instrument-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.instrument-item.is-primary .star-btn.active {
    opacity: 1;
    color: #ffc107;
    /* Keep gold color even on primary blue background */
}

.instrument-item .text-xs {
    margin-right: 8px;
    /* Spacing between level label and actions */
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.instrument-item .text-xs:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

.inline-level-select {
    background: #374151;
    /* bg-gray-700 */
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 2px 4px;
    margin-right: 8px;
    outline: none;
}

.instrument-item.is-primary .btn-delete {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

.instrument-item:hover {
    border-color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
}

.instrument-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: flex-end;
}

@media (max-width: 992px) {
    .instrument-form {
        flex-wrap: wrap;
    }

    .instrument-form .flex-grow-1,
    .instrument-form .flex-2 {
        width: 100% !important;
        flex: none !important;
    }

    .instrument-form .w-150px {
        flex-grow: 1;
    }

    .instrument-form .btn {
        flex-shrink: 0;
    }
}

.responsive-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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



/* Event Card Redesign */
.event-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--surface-dark);
    /* Ensure card background */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.event-date-box {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 65px;
    height: 65px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.event-date-day {
    font-size: 1.8rem;
    font-weight: 800;
}

.event-date-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
}

.event-details {
    flex: 1;
    min-width: 0;
    /* Prevent flex child overflow */
}

.event-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 80px;
}

.creator-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-hover);
}

.status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

/* Calendar Controls */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-group .btn {
    border-radius: 20px;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-group .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    height: 34px;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.calendar-cell {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-height: 100px;
    padding: 0.5rem;
    position: relative;
    transition: all 0.2s;
}

.calendar-cell.today {
    border-color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
}

.calendar-cell:hover {
    background-color: var(--surface-hover);
}

.day-number {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

.calendar-event-dot {
    display: block;
    /* or flex */
    font-size: 0.75rem;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 4px;
    color: white;
    background-color: var(--surface-hover);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-event-dot.type-performance.is-public {
    background-color: #db7d26;
    /* Green-500 */
    color: #000;
}

.calendar-event-dot.type-performance.is-private {
    background-color: #f8b97e;
    /* Blue-500 */
    color: #000;
}

/* Fallback for performance without explicit class */
.calendar-event-dot.type-performance {
    background-color: #3895dd;
    /* Default Blue */
    color: white;
}

.calendar-event-dot.type-rehearsal {
    background-color: #ffcfa2;
    /* Gray-600 */
    color: #000;
    /* Gray-200 */
    border: 1px solid var(--border-color);
}

.calendar-event-dot.type-class {
    background-color: #80f7cf;
    /* Amber-500 (Yellow) */
    color: #000;
    /* Dark text for better contrast on yellow */
    font-weight: bold;
}

.calendar-event-dot.type-class-recurring {
    background-color: #10b981;
    /* Darker Amber */
    color: #000;
    font-weight: bold;
    border-left: 3px solid #000;
    /* Distinctive mark for recurring */
}

@media (max-width: 992px) {
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        /* Keep 7 cols but shrink */
        font-size: 0.8rem;
    }

    .calendar-cell {
        min-height: 60px;
        padding: 2px;
    }

    .calendar-event-dot {
        font-size: 0.6rem;
        height: 6px;
        width: 6px;
        padding: 0;
        border-radius: 50%;
        margin: 2px auto;
        text-indent: -9999px;
        /* Hide text on small screens if dense */
    }

    /* Alternatively, keep text but stack vertically */
    /* Alternatively, keep text but stack vertically */
}

/* Mobile Adjustments for Event Cards */
@media (max-width: 600px) {
    .event-card {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .event-date-box {
        min-width: 55px;
        height: 55px;
        padding: 0.25rem;
    }

    .event-date-day {
        font-size: 1.4rem;
    }

    .event-date-month {
        font-size: 0.65rem;
    }

    .event-title {
        font-size: 1rem;
    }

    .event-meta-row {
        flex-wrap: wrap;
        row-gap: 4px;
        font-size: 0.8rem;
    }

    .event-actions {
        min-width: 60px;
        gap: 0.25rem;
    }

    .creator-avatar {
        width: 24px;
        height: 24px;
    }

    .status-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

@media (max-width: 450px) {
    .event-card {
        flex-wrap: wrap;
    }

    .event-details {
        order: 2;
        width: calc(100% - 62.5px);
        /* 55px box + 0.75rem (12px) gap = 67px, let's use approx */
    }

    .event-actions {
        order: 3;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border-color);
        padding-top: 0.5rem;
        margin-top: 0.25rem;
        min-width: 0;
    }

    .event-date-box {
        order: 1;
    }
}

/* Mobile Adjustments for Calendar Controls */
@media (max-width: 992px) {
    .calendar-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    /* Control containers (Left: filters, Right: actions) */
    .calendar-controls>div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* Target the button groups (View Switcher and Time Filters) */
    .calendar-controls .btn-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        gap: 10px !important;
    }

    /* Select and Action Button container */
    .calendar-controls>div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    /* Hide the divider div */
    .calendar-controls>div:first-child>div:not(.btn-group) {
        display: none !important;
    }

    .calendar-controls .btn,
    .calendar-controls .form-control {
        width: 100% !important;
        margin: 0 !important;
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
    }

    #add-event-btn {
        padding: 0.5rem !important;
        font-size: 0.85rem !important;
    }
}

.song-row-hover:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- Layout & Grids (Restored) --- */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    background: var(--surface-dark);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hire-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* --- Premium Band Cards (Unified) --- */
.band-card {
    background: var(--surface-dark);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.band-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* Drop Zones */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    height: auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.drop-zone:hover {
    background: rgba(255, 255, 255, 0.05);
}

.drop-zone-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.drop-zone-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.drop-zone-preview-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    margin-top: 0.5rem;
}

.drop-zone-preview-cover {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    margin-top: 0.5rem;
}

/* Sidebar Member List Item */
.member-list-item {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.member-list-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.member-list-info {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-list-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.member-list-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.member-list-remove-btn {
    color: var(--error-color);
    border-color: var(--error-color);
    padding: 2px 6px;
    font-size: 0.7rem;
}

.member-list-remove-btn:hover {
    background: var(--error-color);
    color: white;
}

/* Posts Feed Item */
.post-item-empty {
    text-align: center;
    color: var(--text-secondary);
}

.post-item-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0.5rem;
}

.post-item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.post-item-author {
    font-size: 0.8rem;
    font-weight: 700;
}

.post-item-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.post-item-body {
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.band-cover {
    height: 140px;
    background-color: #1a1a1a;
    background-position: center;
    background-size: cover;
    position: relative;
    border-bottom: 4px solid var(--primary-color);
}

.band-profile-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--surface-dark);
    position: absolute;
    bottom: -35px;
    left: 20px;
    object-fit: cover;
    background: var(--surface-hover);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- List View Extensions --- */
.dashboard-grid.list-view {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.list-view .bandas-card {
    flex-direction: row !important;
    height: auto !important;
    align-items: center !important;
    padding: 0.75rem 1.25rem !important;
    gap: 1rem !important;
}

.list-view .bandas-card:hover {
    transform: translateX(4px) !important;
}

.list-view .bandas-card-header-cover,
.list-view .bandas-card-header-simple {
    display: none !important;
}

.list-view .bandas-card-body {
    flex-direction: row !important;
    padding: 0 !important;
    text-align: left !important;
    align-items: center !important;
    gap: 1.25rem !important;
    flex: 1 !important;
}

.list-view .bandas-card-avatar {
    width: 60px !important;
    height: 60px !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: 2px solid var(--border-color) !important;
}

.list-view .bandas-card-title {
    font-size: 1.05rem !important;
    flex: 2 !important;
    margin: 0 !important;
}

.list-view .bandas-card-subtitle {
    flex: 1.5 !important;
    margin: 0 !important;
}

.list-view .bandas-card-tags {
    display: none !important;
    /* Hide tags in compact list view */
}

.list-view .bandas-card-footer {
    display: flex !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    gap: 1.5rem !important;
    min-width: fit-content !important;
}

.list-view .bandas-card-fav,
.list-view .bandas-card-remove {
    position: static !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
}

/* Mobile adjustments for List View */
@media (max-width: 768px) {
    .list-view .bandas-card {
        flex-direction: column !important;
        padding: 1rem !important;
        align-items: flex-start !important;
    }

    .list-view .bandas-card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
    }

    .list-view .bandas-card-avatar {
        display: none !important;
    }

    .list-view .bandas-card-footer {
        width: 100% !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-top: 0.75rem !important;
        margin-top: 0.5rem !important;
    }
}

.band-content {
    padding: 2.5rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.band-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.band-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.band-genre-tag {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.band-bio {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.availability-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tag.match {
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: #ffd700;
    font-weight: bold;
}

.tag.priority-alta {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: #ef4444;
}

/* Confirmation modals and high-priority overlays */
/* Unification handled above */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: var(--z-modal-primary);
    align-items: center;
    /* Center flex */
    justify-content: center;
    /* Center flex */
}

/* Class to Force Show */
.modal.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Unification handled above */

/* Form Styles for Modals */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--surface-hover);
    color: var(--text-primary);
    font-family: inherit;
}

.modal-actions {
    text-align: right;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.share-social-link {
    flex: 1;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 5px;
    border: none !important;
    background: none !important;
    cursor: pointer;
    text-decoration: none;
}

.share-social-link:hover {
    transform: scale(1.2);
}

/* --- Premium Modal & Form Styles --- */
.premium-modal {
    background-color: #202836 !important;
    border: 1px solid #333;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(15px);
    border-radius: 12px !important;
    max-width: 700px !important;
    height: auto !important;
    max-height: 90vh !important;
}

.premium-modal .modal-header {
    background: #202836 !important;
    border-bottom: 1px solid #333;
    padding: 1rem 1.25rem !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}



/* Custom Scrollbar for Forms, Modals & Textareas */
.modal-body-scroll::-webkit-scrollbar,
.premium-form::-webkit-scrollbar,
.editor-textarea::-webkit-scrollbar {
    width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-track,
.premium-form::-webkit-scrollbar-track,
.editor-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body-scroll::-webkit-scrollbar-thumb,
.premium-form::-webkit-scrollbar-thumb,
.editor-textarea::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    /* Discreet Blue */
    border-radius: 10px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover,
.premium-form::-webkit-scrollbar-thumb:hover,
.editor-textarea::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.6);
}

.premium-form {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem !important;
    background: #202836 !important;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-title {
    font-size: 0.75rem;
    color: #4b5563;
    border-bottom: 1px solid #222;
    padding-bottom: 3px;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.form-row {
    display: flex;
    gap: 0.5rem !important;
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
    min-width: 150px;
}

.flex-2 {
    flex: 2;
    min-width: 200px;
}

.premium-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px !important;
}

.premium-form label i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.crm-stats-grid {
    grid-column: span 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-stat {
    border-left: 4px solid var(--border-color);
}

.card-stat-primary {
    border-left-color: var(--primary-color) !important;
}

.card-stat-purple {
    border-left-color: #a855f7 !important;
}

.card-stat-blue {
    border-left-color: #3895dd !important;
}

.card-stat-warning {
    border-left-color: var(--warning-color) !important;
}

.card-stat-success {
    border-left-color: var(--success-color) !important;
}

.crm-stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.crm-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.crm-stat-value.primary {
    color: var(--primary-color);
}

.crm-stat-value.success {
    color: var(--success-color);
}

.crm-stat-value.warning {
    color: var(--warning-color);
}

.crm-filters-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    background: var(--surface-hover);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.crm-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crm-filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.crm-filter-input {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.premium-modal .modal-header h2 {
    color: #fff !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    letter-spacing: -0.01em;
}

.modal-header-btns {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: var(--z-modal-stack); /* Use standardized z-index */
    transition: opacity 0.3s ease;
}

/* Hide header buttons when a submodal (rhythm selector, report form, etc.) is open */
#song-modal.submodal-open .modal-header-btns {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-header-btns .close-btn {
    position: relative !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important; /* Standardized size 32px instead of 42px */
    height: 32px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    font-size: 1.1rem !important; /* Proportional font size */
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s !important;
    top: auto !important;
    right: auto !important;
}

.modal-icon-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: none;
    width: 32px; /* Standardized size 32px instead of 42px */
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem; /* Proportional font size */
}

.modal-icon-btn:hover,
.modal-header-btns .close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    transform: scale(1.1);
}

.btn-icon-header {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer;
    line-height: 1 !important;
    padding: 0 !important;
}

.btn-icon-header:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    transform: scale(1.1);
}

/* Redefine close-btn specifically for red hover while keeping base structure */
.modal .close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #94a3b8 !important;
    font-size: 1.1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    cursor: pointer;
    line-height: 1 !important;
}

.modal .close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    transform: rotate(90deg) scale(1.1);
}

.premium-form .form-control {
    width: 100%;
    background: #202836 !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    color: #f8fafc !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease;
    outline: none !important;
}

.premium-form .form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
    background: #1e293b !important;
}

.editor-textarea {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace !important;
    min-height: 500px !important;
    line-height: 1.5;
    tab-size: 4;
    resize: vertical;
    background: #202836 !important;
    color: #e0e0e0 !important;
    border: 1px solid #222 !important;
    padding: 0.75rem !important;
    font-size: 0.9rem !important;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #202836;
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid #222;
    max-height: 160px;
    overflow-y: auto;
}

/* Form Elements */
.form-check-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(59, 130, 246, 0.05);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-top: 0.5rem;
}

.form-check-input {
    width: auto;
    height: auto;
}

.form-check-label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    cursor: pointer;
}

.form-select-sm {
    width: auto;
    padding: 10px;
    min-width: 150px;
}

/* Setlist / Library Elements */
.flex-end-gap-10 {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 0.75rem;
}

.toolbar-wrap {
    margin-top: 0.5rem;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.flex-1-min-200 {
    flex: 1;
    min-width: 200px;
}

.grid-300 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.alert-info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3895dd;
    color: #60a5fa;
    padding: 12px 20px;
    font-size: 0.85rem;
    border-left: 4px solid #3895dd;
}

.modal-content-xl {
    max-width: 900px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content-sm {
    max-width: 500px;
    padding: 20px;
}

.modal-content-md-padded {
    max-width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.flex-gap-10-my-15 {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 15px;
}

.list-scrollable {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
}

.btn-sm-padding {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.list-box-bordered {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

.flex-end-gap-10-nomargin {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Song Comments and Wall */
.empty-notes-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    opacity: 0.5;
}

.empty-notes-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-author {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--text-primary);
    margin-top: 4px;
}

.comment-delete-btn {
    color: var(--text-secondary);
    opacity: 0.5;
}

.comment-delete-btn:hover {
    opacity: 1;
}

.subcomments-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input-box {
    margin-top: 1rem;
    display: flex;
    gap: 8px;
}

.comment-input-field {
    flex: 1;
    font-size: 0.8rem;
    padding: 6px 12px;
    height: 32px;
}

.comment-submit-btn {
    font-size: 0.75rem;
    padding: 0 12px;
    height: 32px;
}

/* Subcomments */
.subcomment-item {
    font-size: 0.8rem;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.subcomment-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.subcomment-author {
    color: var(--primary-color);
    font-weight: 700;
}

.subcomment-text {
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Embed Media */
.embed-media {
    border-radius: 8px;
    margin-top: 10px;
}

.embed-img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.embed-link {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Miscellaneous Items */
.cat-delete-btn {
    color: var(--error-color);
    border: none;
    padding: 5px;
}

.cat-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.library-song-title {
    font-weight: 700;
    color: var(--text-primary);
}

.library-song-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Library Picker */
.library-picker-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.library-picker-item:hover {
    background: var(--surface-hover);
}

.library-picker-checkbox {
    width: 18px;
    height: 18px;
}

.library-picker-info {
    flex: 1;
}

/* --- Professional Category Chips --- */
.category-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
    user-select: none;
    white-space: nowrap;
}

.category-chip:hover {
    background: #252525;
    border-color: #444;
}

.category-chip input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.category-chip.active {
    background: rgba(59, 130, 245, 0.15);
    border-color: var(--primary-color);
    color: #fff;
}

#song-notes {
    min-height: 120px !important;
}

.form-actions-bar {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: #202836 !important;
    margin: 0px 10px 10px 0px;
}

.form-actions-bar .left-actions,
.form-actions-bar .right-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-danger {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

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

.delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
}

.delete-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.btn-warning {
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

.btn-warning:hover {
    background: rgba(245, 158, 11, 0.1) !important;
}

/* --- Song Viewer Modal Header Redesign --- */
.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #121212 !important;
    border-radius: 16px 16px 0 0;
    padding-right: 45px;
    position: relative;
    box-sizing: border-box;
}

.modal-header .header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-header .header-info .title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header #modal-song-title {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
}

.modal-header #modal-visibility-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.modal-header .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mobile Song Viewer Optimization */
#song-modal {
    z-index: var(--z-modal-primary) !important;
    /* Managed by standardized scale (2000) */
}

#song-modal .viewer-modal-content {
    width: 90% !important;
    max-width: 1600px;
    margin: auto;
}

/* Header Action Button (Hiding as FABs are now unified) */
#modal-header-action-btn {
    display: none !important;
}

/* Header Layout Refinement */
.modal-header-sub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.modal-artist-text {
    margin: 0;
    font-size: 0.85rem;
}

.modal-views-text {
    font-size: 0.75rem;
}

/* Search Discovery Page */
.search-main-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.search-controls-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input-group {
    position: relative;
    flex: 2;
    min-width: 250px;
}

.search-input-field-reset {
    margin-bottom: 0 !important;
}

.search-input-icon-overlay {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.search-filter-box {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0 !important;
}

.results-meta-row {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pagination-footer {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.load-more-pill {
    display: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
}

/* Navbar Specific */
.nav-content-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-link-teacher {
    color: var(--success-color) !important;
    font-weight: 600 !important;
}

.nav-separator {
    border-left: 1px solid var(--border-color);
    height: 24px;
    margin: 0 0.5rem;
}

.nav-user-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-notif-container {
    position: relative;
}

.nav-dropdown-header-custom {
    background: var(--surface-dark) !important;
}

.nav-mark-all-btn {
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    cursor: pointer !important;
}

#song-modal .modal-header {
    position: relative;
    /* For absolute centering of the action button */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
}

#theater-mode-close-btn {
    display: none;
    /* Hidden by default, shown in theater mode */
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10100;
    /* Highest priority */
    width: 50px;
    height: 50px;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50%;
    color: #fff !important;
    font-size: 1.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

#theater-mode-close-btn:hover {
    background: rgba(0, 0, 0, 0.6) !important;
    transform: scale(1.05);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    z-index: 10050;
    /* Above modal content */
    line-height: 1;
    transition: all 0.2s;
    font-size: 2rem;
}

.close-btn:hover {
    color: #fff;
}

.viewer-modal-content {
    width: 90%;
    max-width: 1600px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface-dark);
}

@media (max-width: 992px) {
    .modal-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
        padding: 1rem !important;
        border-radius: 0;
    }

    .modal-header .header-info {
        width: 100%;
    }

    .modal-header #modal-song-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 40px);
        display: block;
        font-size: 1.1rem;
    }

    .modal-header #modal-visibility-badge {
        display: none !important;
    }

    .modal-header .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .modal-header .header-actions .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 !important;
        border-radius: 8px !important;
    }

    .modal-header .header-actions .btn:active {
        background: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
    }

    /* Premium Modal Header Mobile Fix - Specific for Student Calendar */
    .premium-modal .modal-header {
        position: relative !important;
        padding-right: 155px !important;
        /* Reserve space for buttons */
        min-height: 70px !important;
        display: flex !important;
        flex-direction: row !important;
        /* Keep horizontal so info stays left */
        justify-content: flex-start !important;
        align-items: center !important;
    }

    .premium-modal .modal-header .header-info {
        width: 100% !important;
        padding-right: 0 !important;
    }

    .premium-modal #modal-title-header {
        white-space: normal !important;
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .premium-modal #view-type-badge {
        font-size: 0.65rem !important;
        padding: 2px 6px !important;
        margin-top: 4px !important;
    }

    .premium-modal .modal-header-btns {
        position: absolute !important;
        right: 12px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        z-index: 5 !important;
    }

    #btn-notify-absence {
        font-size: 0.75rem !important;
        padding: 0 10px !important;
        height: 32px !important;
        white-space: nowrap !important;
        background: rgba(245, 158, 11, 0.1) !important;
        color: #fbbf24 !important;
        border: 1px solid rgba(245, 158, 11, 0.3) !important;
    }

    .modal-header .header-actions .btn i {
        font-size: 0.9rem;
        color: var(--primary-color);
    }


    /* Common Select Style for Toolbar */
    .tool-select {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        font-size: 0.75rem;
        padding: 4px 8px;
        border-radius: 6px;
        cursor: pointer;
        outline: none;
        transition: border-color 0.2s;
    }

    .tool-select:hover {
        border-color: var(--primary-color);
    }

    .tool-select option {
        background: #1a1a1a;
        color: #fff;
    }

    .modal-header .close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        margin: 0 !important;
    }

    #song-modal .modal-content,
    #song-form-modal .modal-content {
        width: 100% !important;
        height: 100% !important;
        height: 100vh !important;
        max-width: none !important;
        border-radius: 0 !important;
        display: flex;
        flex-direction: column;
    }

    #song-form-modal .premium-form {
        padding: 1rem !important;
        gap: 1rem !important;
    }

    #song-form-modal .form-row {
        flex-direction: column !important;
        gap: 0.4rem !important;
    }

    #song-form-modal .flex-1,
    #song-form-modal .flex-2 {
        width: 100% !important;
    }

    #song-form-modal .editor-textarea {
        min-height: 350px !important;
    }

    #song-form-modal .form-actions-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    #song-form-modal .left-actions,
    #song-form-modal .right-actions {
        flex-direction: column !important;
        width: 100% !important;
    }

    #song-form-modal .btn {
        width: 100% !important;
        justify-content: center !important;
    }

    #song-form-modal .section-title {
        font-size: 0.8rem !important;
        margin-top: 0.5rem !important;
    }

    #context-song-fields {
        padding-top: 0.75rem !important;
        margin-top: 0.75rem !important;
    }

    /* Theater Mode (Simplified View) */
    #song-modal.theater-mode .modal-header,
    #song-modal.theater-mode .toolbar,
    #song-modal.theater-mode .modal-footer {
        display: none !important;
    }

    #song-modal.theater-mode #theater-mode-close-btn {
        display: flex !important;
    }

    #song-modal.theater-mode #song-display-container {
        padding: 1rem !important;
    }
}

/* Chord Popover & Triggers */
.chord-trigger {
    cursor: pointer;
    position: relative;
    text-decoration: underline dotted rgba(255, 255, 255, 0.3);
    transition: color 0.2s, background 0.2s;
    padding: 0 2px;
    border-radius: 4px;
}

.chord-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

/* Unified Chord Popover */
.chord-popover {
    position: fixed;
    z-index: 10050;
    /* Higher than song modal (9000) */
    background: rgba(10, 15, 25, 0.99);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    width: 90%;
    max-width: 800px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -40%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.chord-popover-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10100;
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50%;
    color: #fff !important;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    line-height: 1;
}

.chord-popover-close:hover {
    background: rgba(0, 0, 0, 0.6) !important;
    transform: scale(1.05);
}

.chord-popover.visible {
    display: flex !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%);
}

.chord-popover .chord-diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

.chord-popover .chord-name {
    display: block;
    text-align: center;
    font-weight: 800;
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}


/* Floating Action Buttons - Hidden on desktop */
@media (min-width: 993px) {
    .viewer-toggle-btn,
    .autoscroll-fab,
    .metronome-fab,
    .playback-fabs-left,
    .add-to-lib-fab,
    .report-fab {
        display: none !important;
    }
}

/* Desktop styles for .viewer-toggle-btn removed (moved to hidden list) */

/* --- Song Viewer Toolbar Redesign --- */
.toolbar {
    scrollbar-width: none;
    /* Firefox */
}

.toolbar::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

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

/* Vertical Control Stack (Mobile FABs) */
.vertical-ctrl-stack {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 4px;
    border-radius: 20px;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: center;
    gap: 4px;
    /* More compact */
    min-width: 44px;
    backdrop-filter: blur(10px);
}

.vertical-ctrl-stack .tool-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0;
    transition: all 0.2s;
}

.vertical-ctrl-stack .tool-btn:active {
    background: var(--primary-color);
    transform: scale(0.9);
}

.vertical-ctrl-stack .ctrl-value {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    min-height: 18px;
    display: flex;
    align-items: center;
}


.chord-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

/* Unified Chord Popover */
.chord-popover {
    position: fixed;
    z-index: 10050;
    /* Higher than song modal (9000) */
    background: rgba(10, 15, 25, 0.99);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    width: 90%;
    max-width: 800px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -40%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.chord-popover-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10100;
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50%;
    color: #fff !important;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    line-height: 1;
}

.chord-popover-close:hover {
    background: rgba(0, 0, 0, 0.6) !important;
    transform: scale(1.05);
}

.chord-popover.visible {
    display: flex !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%);
}

.chord-popover .chord-diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    width: 100%;
}

.chord-popover .chord-name {
    display: block;
    text-align: center;
    font-weight: 800;
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}


/* Floating Action Buttons - Hidden on desktop */
@media (min-width: 993px) {
    .viewer-toggle-btn,
    .autoscroll-fab,
    .metronome-fab,
    .playback-fabs-left,
    .add-to-lib-fab,
    .report-fab {
        display: none !important;
    }
}

/* Desktop styles for .viewer-toggle-btn removed (moved to hidden list) */

/* --- Song Viewer Toolbar Redesign --- */
.viewer-toolbar {
    padding: 0.5rem 0.75rem;
    background: #1a1a1a;
    display: flex;
    flex-direction: row; /* Single row by default on desktop */
    flex-wrap: wrap;
    gap: 0.6rem;
    border-bottom: 1px solid #333;
    overflow-x: auto;
    align-items: center;
    justify-content: center;
    /* Centered content */
    scrollbar-width: none;
}

/* On desktop, treat rows as part of the same line to allow items to flow and center together */
@media (min-width: 993px) {
    .toolbar-row {
        display: contents;
    }
}

.viewer-toolbar::-webkit-scrollbar {
    display: none;
}

.viewer-tool-group {
    display: flex;
    gap: 5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.viewer-tool-group:last-child {
    border-right: none;
    padding-right: 0;
}

.tool-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    /* Smaller font */
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    /* Smaller base size */
    min-height: 32px;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

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

/* Vertical Control Stack (Mobile FABs) */
.vertical-ctrl-stack {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 4px;
    border-radius: 20px;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    flex-direction: column;
    align-items: center;
    gap: 4px;
    /* More compact */
    min-width: 44px;
    backdrop-filter: blur(10px);
}

.vertical-ctrl-stack .tool-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding: 0;
    transition: all 0.2s;
}

.vertical-ctrl-stack .tool-btn:active {
    background: var(--primary-color);
    transform: scale(0.9);
}

.vertical-ctrl-stack .ctrl-value {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    min-height: 18px;
    display: flex;
    align-items: center;
}


/* Song Viewer Toolbar Desktop Refinements */
.speed-ctrls,
.metronome-ctrls {
    display: flex;
    align-items: center;
    gap: 6px;
}

#modal-bpm,
#modal-speed-value {
    min-width: 40px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    padding: 0 6px;
    transition: all 0.2s ease !important;
}

#modal-bpm:hover,
#modal-speed-value:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.05);
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
    cursor: pointer;
}

/* Medium Screens (Tablet Horizontal) */
@media (min-width: 769px) and (max-width: 992px) {
    .viewer-toolbar {
        padding: 0.4rem 0.5rem !important;
        gap: 0.4rem !important;
    }

    .viewer-tool-group {
        padding-right: 0.4rem !important;
        gap: 4px !important;
    }

    .tool-btn {
        min-width: 30px !important;
        min-height: 30px !important;
        padding: 3px 6px !important;
        font-size: 0.8rem !important;
    }

    #modal-bpm,
    #modal-speed-value {
        min-width: 35px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
        padding: 0 4px !important;
    }

    #modal-instrument-select {
        height: 30px !important;
        padding: 0 5px !important;
        font-size: 0.8rem !important;
        min-width: 100px !important;
    }
}

/* Mobile Adjustments */

@media (max-width: 992px) {
    .viewer-toolbar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 6px !important;
        height: auto !important;
        overflow-x: hidden !important;
    }

    .toolbar-row {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        gap: 5px !important;
        flex-wrap: wrap !important;
    }

    .playback-row {
        padding-top: 0.5rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    .viewer-tool-group {
        padding: 0 !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 5px !important;
        flex: 1 1 auto !important;
        border-right: none !important;
    }

    /* Force 2 Rows: 
       Row 1: Transposition (1) + Appearance (3)
       Row 2: Playback (2)
    */
    .viewer-tool-group:nth-child(1) {
        order: 1;
        border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding-right: 6px !important;
        margin-right: 2px !important;
    }

    .viewer-tool-group:nth-child(3) {
        order: 2;
    }

    .viewer-tool-group:nth-child(2) {
        order: 3;
        width: 100% !important;
        justify-content: flex-start !important;
        padding-top: 6px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: 2px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 5px !important;
    }

    .viewer-tool-group:nth-child(2)::-webkit-scrollbar {
        display: none;
    }

    /* Ultra-compact tools (30px) */
    .viewer-toolbar .tool-btn,
    .viewer-toolbar .tool-select,
    #modal-bpm,
    #modal-speed-value {
        height: 30px !important;
        min-height: 30px !important;
        min-width: 32px !important;
        padding: 0 6px !important;
        font-size: 0.7rem !important;
    }

    #modal-instrument-select {
        min-width: 90px !important;
        font-size: 0.8rem !important;
    }

    #modal-bpm,
    #modal-speed-value {
        min-width: 30px !important;
        font-size: 0.7rem !important;
        padding: 0 4px !important;
    }

    .metronome-ctrls {
        gap: 3px !important;
    }

    .speed-ctrls {
        gap: 3px !important;
    }

    .bpm-label {
        font-size: 0.7rem !important;
        margin-left: 2px !important;
    }

    #modal-metronome-btn span {
        display: none !important;
    }

    #modal-metronome-btn {
        padding: 0 6px !important;
    }


    .tool-btn {
        padding: 8px 12px;
        font-size: 0.85rem !important;
        min-width: 44px;
        min-height: 44px;
        /* Standardize height */
    }

    #modal-instrument-select {
        height: 30px !important;
        font-size: 0.85rem !important;
        padding: 0 10px !important;
    }

    .speed-ctrls,
    .metronome-ctrls {
        display: flex !important;
        align-items: center;
        gap: 6px;
    }

    .speed-ctrls span {
        font-size: 0.85rem;
        min-width: 25px;
        text-align: center;
        color: #fff;
    }

    #modal-bpm,
    #modal-speed-value {
        min-width: 45px;
        height: 44px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #fff;
        font-size: 1.1rem;
        font-weight: 600;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 4px;
        padding: 0 8px;
    }

    .bpm-label {
        font-size: 0.7rem;
        color: #888;
        margin-left: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    #modal-metronome-btn {
        padding: 0 15px !important;
        font-size: 0.85rem !important;
    }


}

/* Manual Value Entry Modal Styling */
.manual-input-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.manual-input-content {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.manual-input-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.manual-input-field {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#manual-input-value {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    width: 140px;
    text-align: center;
    padding: 10px;
    outline: none;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    /* Hide native spin buttons */
    -moz-appearance: textfield;
    appearance: textfield;
}

#manual-input-value::-webkit-outer-spin-button,
#manual-input-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#manual-input-value:focus {
    border-color: #fff;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}

#manual-input-unit {
    font-size: 0.8rem;
    opacity: 0.6;
    color: #fff;
}

.manual-input-actions {
    display: flex;
    gap: 12px;
}

.manual-input-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

/* Interactive Labels in Toolbar */
#modal-bpm:hover,
#modal-speed-value:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.05);
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
    cursor: pointer;
}

#modal-bpm,
#modal-speed-value {
    transition: all 0.2s ease !important;
}

/* Mobile-only FABs (Hidden on PC by default) */
.viewer-toggle-btn,
.add-to-lib-fab,
.report-fab,
.playback-fabs-left {
    display: none;
}

@media (max-width: 768px) {
    .viewer-toggle-btn,
    .add-to-lib-fab,
    .report-fab {
        display: flex;
    }

    /* Playback FABs Container (Bottom Left) */
    .playback-fabs-left {
        position: absolute;
        bottom: 20px;
        left: 20px;
        display: none;
        gap: 10px;
        /* More separation */
        z-index: 1000;
        align-items: flex-end;
    }

    #song-modal.theater-mode .playback-fabs-left {
        display: flex;
    }

    .fab-with-controls {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .autoscroll-fab,
    .metronome-fab,
    .viewer-toggle-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(26, 26, 26, 0.9);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        display: flex;
        /* Replaced !important with standard flex */
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }

    .viewer-toggle-btn {
        position: absolute;
        bottom: 20px;
        right: 20px;
        z-index: 1000;
    }

    .viewer-toggle-btn:active {
        transform: scale(0.9);
    }

    .autoscroll-fab.active,
    .metronome-fab.active {
        background: var(--primary-color);
        box-shadow: 0 0 20px var(--primary-color);
        border-color: transparent;
    }

    /* Show vertical control stacks in mobile theater mode */
    #song-modal.theater-mode .vertical-ctrl-stack {
        display: flex;
    }
}

/* Floating Action Button for Toggle */
.viewer-toggle-btn:active {
    transform: scale(0.9);
}

@media (max-width: 768px) {

    /* Floating Action Buttons - General Mobile Styles */
    .viewer-toggle-btn,
    .add-to-lib-fab,
    .report-fab {
        display: flex;
        position: absolute;
        bottom: 20px;
        width: 44px;
        /* Slightly larger for touch */
        height: 44px;
        border-radius: 50%;
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
        z-index: 1050;
        /* Above playback FABs (1000) */
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        cursor: pointer;
        transition: transform 0.2s, background 0.3s;
        backdrop-filter: blur(10px);
    }

    /* Wrench (Rightmost) */
    .viewer-toggle-btn {
        right: 20px;
        background: rgba(59, 130, 246, 0.2);
    }

    /* Action (+, -, trash) - Centered in the group */
    .add-to-lib-fab {
        right: 74px;
        background: rgba(255, 255, 255, 0.05);
        /* Managed by JS for colors */
    }

    /* Report Flag (Leftmost of the group) */
    .report-fab {
        right: 128px;
        background: rgba(239, 68, 68, 0.2) !important;
    }

    .add-to-lib-fab:active,
    .report-fab:active,
    .viewer-toggle-btn:active {
        transform: scale(0.9);
    }

    /* Hide footer action button on mobile (user prefers the FAB) */
    .modal-footer #modal-action-btn,
    .modal-footer #modal-report-btn {
        display: none;
    }
}

/* --- Visibility Toggle Redesign --- */
.visibility-toggle-group {
    display: flex;
    gap: 8px;
    background: #202836;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #222;
}

.visibility-option {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    border: 1px solid transparent;
}

.visibility-option:hover {
    color: #999;
}

.visibility-option.active {
    background: #1a1a1a;
    color: var(--primary-color);
    border-color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.visibility-option i {
    font-size: 0.9rem;
}

/* --- Notes / Interaction Modal Redesign --- */
.notes-modal-content {
    background-color: #202836;
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
    height: 80vh;
    border: 1px solid #333;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.notes-header {
    background-color: #202836;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-header h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-color);
}

.notes-header p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notes-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #202836 !important;
}

.notes-form-container {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #222;
    background: #202836 !important;
}

#interaction-content {
    width: 100%;
    min-height: 80px;
    margin-bottom: 0.5rem;
    background: #1a1a1a !important;
    border: 1px solid #222 !important;
    border-radius: 8px;
    padding: 10px;
    color: #e0e0e0 !important;
    resize: none;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

.post-card {
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

.notes-wall {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

@media (max-width: 992px) {
    .notes-modal-content {
        max-width: 100% !important;
        width: 100% !important;
        height: 100vh !important;
        border-radius: 0;
    }
}


/* Main close button can remain visible since submodals now cover the screen correctly */
/*
#song-modal.submodal-open #modal-close {
    display: none !important;
}
*/

.u-hidden {
    display: none !important;
}

.h-auto {
    height: auto !important;
    min-height: unset !important;
}


/* Media Player Styles */
.media-player-container {
    margin: 0 auto 2rem auto;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: block;
}

.media-player-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.media-player-container iframe[src*='spotify'] {
    aspect-ratio: auto !important;
    height: 152px !important;
}

@media (min-width: 993px) {
    .media-player-container {
        width: 100%;
        max-width: 1200px;
    }
}

@media (max-width: 992px) {

    /* Ajusta el margen del contenedor de navegación */
    #teacher-nav-container {
        margin-bottom: 0.5rem !important;
    }

    /* Hace que la tarjeta de Solicitudes ocupe todo el ancho */
    .teacher-grid .card:first-child {
        margin-left: 0;
        margin-right: -1rem;
        width: calc(100% + 1.5rem);


    }

    /* Agrupamos todos los IDs que queremos que tengan dos columnas */
    #setlist-actions,
    #groups-actions,
    #classes-actions,
    .group-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    /* Hace que las tarjetas en el dashboard se estiren (como en Solicitudes) */
    /* Target only the sidebar cards (second column in desktop, stacked in mobile) */
    .dashboard-grid>div:last-child .card {
        margin-left: 0;
        margin-right: -1rem;
        width: calc(100% + 1.5rem);
    }

    /* Márgenes en cabeceras de grupo para móviles */
    #group-nav-container,
    .group-header {
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    /* CRM Stats Grid Mobile */
    .crm-stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* 'Total Cobrado' occupies full width on mobile */
    .crm-stats-grid .card-total-cobrado {
        grid-column: span 2;
    }

    /* Si hay un número impar de botones, el último ocupa todo el ancho */
    .group-nav a:last-child:nth-child(odd) {
        grid-column: span 2;
    }

    /* Y aseguramos que los botones dentro ocupen todo su espacio */
    #setlist-actions .btn,
    #groups-actions .btn,
    #classes-actions .btn,
    .group-nav .btn {
        width: 100%;
        margin: 0 !important;
        padding: 0.75rem 0.5rem !important;
        font-size: 0.85rem !important;
    }
}

.btn-teacher {
    background-color: var(--success-color);
    color: white !important;
}

.btn-teacher:hover {
    background-color: #059669;
}

/* CRM Grid & Cards */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
    margin-top: 1rem;
}

.crm-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    backdrop-filter: blur(10px);
}

.crm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

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

.crm-card-subject {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-primary);
}

.crm-card-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.crm-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.crm-card-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.crm-card-info-item i {
    width: 14px;
    color: var(--primary-color);
}

.crm-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.crm-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* Tablet: 2 columns */
@media (max-width: 1100px) {
    .crm-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 992px) {
    .crm-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
}

/* Notifications / Toasts */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--surface-dark);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 450px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast.active {
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-success .toast-icon {
    color: var(--success-color);
}

.toast-error .toast-icon {
    color: var(--error-color);
}

.toast-warning .toast-icon {
    color: var(--warning-color);
}

.toast-info .toast-icon {
    color: var(--primary-color);
}

.toast-content {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

.toast-close {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(120%);
    }
}

/* --- Utilities & Shared Modifiers --- */
.w-auto {
    width: auto !important;
}

.w-100 {
    width: 100% !important;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.m-0 {
    margin: 0 !important;
}

.mt-05 {
    margin-top: 0.5rem !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.mb-05 {
    margin-bottom: 0.5rem !important;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.mb-1-5 {
    margin-bottom: 1.5rem !important;
}

.mb-minus-1 {
    margin-bottom: -1rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-minus-05 {
    margin-top: -0.5rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.mt-1-5 {
    margin-top: 1.5rem !important;
}

.mt-2 {
    margin-top: 2rem !important;
}

.max-h-400 {
    max-height: 400px !important;
}

.ml-auto {
    margin-left: auto !important;
}

.mr-2-5 {
    margin-right: 2.5rem !important;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.text-center {
    text-align: center !important;
}

/* Margin and Padding */
.mt-0-25 {
    margin-top: 0.25rem !important;
}

.mt-0-5 {
    margin-top: 0.5rem !important;
}

.mt-1 {
    margin-top: 1rem !important;
}

.mt-2 {
    margin-top: 2rem !important;
}

.mt-4 {
    margin-top: 4rem !important;
}

.mb-0-25 {
    margin-bottom: 0.25rem !important;
}

.mb-0-5 {
    margin-bottom: 0.5rem !important;
}

.mb-0-75 {
    margin-bottom: 0.75rem !important;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.mb-1-5 {
    margin-bottom: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 3rem !important;
}

.mb-5 {
    margin-bottom: 5rem !important;
}

.mb-n1 {
    margin-bottom: -1rem !important;
}

.my-3 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.p-1 {
    padding: 1rem !important;
}

.p-1-5 {
    padding: 1.5rem !important;
}

.p-2 {
    padding: 2rem !important;
}

.p-0-5 {
    padding: 0.5rem !important;
}

.pt-1-5 {
    padding-top: 1.5rem !important;
}

.px-2-py-075 {
    padding: 0.75rem 2.5rem !important;
}

.px-1-py-05 {
    padding: 0.5rem 1rem !important;
}

.px-0-5-py-0-25 {
    padding: 0.25rem 0.5rem !important;
}

.mx-1 {
    margin-left: 0.25rem !important;
    margin-right: 0.25rem !important;
}

.mr-0-5 {
    margin-right: 0.5rem !important;
}

/* Layout & Flexbox */
.d-flex {
    display: flex !important;
}

.d-block {
    display: block !important;
}

.d-none {
    display: none !important;
}

.flex-col {
    flex-direction: column !important;
}

.flex-1 {
    flex: 1 !important;
}

.flex-2 {
    flex: 2 !important;
}

.flex-3 {
    flex: 3 !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

@media (max-width: 992px) {
    .premium-modal .form-actions-bar {
        flex-direction: column-reverse !important;
        padding: 1.25rem !important;
        gap: 0.75rem !important;
        background: #202836 !important;
    }

    .premium-modal .form-actions-bar .left-actions,
    .premium-modal .form-actions-bar .right-actions {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .premium-modal .form-actions-bar .btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
        justify-content: center !important;
    }

    /* Photos alignment */
    .drop-zone {
        height: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(0, 0, 0, 0.2) !important;
    }

    .drop-zone-text {
        font-size: 0.75rem !important;
    }

    .drop-zone-preview-avatar,
    .drop-zone-preview-cover {
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }
}

.gap-1 {
    gap: 1rem !important;
}

.gap-1-5 {
    gap: 1.5rem !important;
}

.align-center {
    align-items: center !important;
}

.align-start {
    align-items: flex-start !important;
}

.justify-end {
    justify-content: flex-end !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

/* Grids */
.grid-cols-1 {
    grid-template-columns: 1fr !important;
}

.grid-cols-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.grid-cols-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1rem;
}

@media (max-width: 992px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
}

.grid-auto-fill-300 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
}

.grid-span-1 {
    grid-column: span 1 !important;
}

.grid-span-2 {
    grid-column: span 2 !important;
}

.grid-span-3 {
    grid-column: span 3 !important;
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-span-full {
    grid-column: 1 / -1 !important;
}

/* Borders & Backgrounds */
.bg-dark-alpha {
    background: rgba(0, 0, 0, 0.5) !important;
}

.bg-dark-alpha-2 {
    background: rgba(0, 0, 0, 0.2) !important;
}

.bg-light-alpha {
    background: rgba(255, 255, 255, 0.03) !important;
}

.bg-surface {
    background: var(--surface-color) !important;
}

.bg-surface-light {
    background: var(--surface-light) !important;
}

.bg-success {
    background: var(--success-color) !important;
}

.bg-success-alpha {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.bg-blue-alpha {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

.bg-gradient-dark-card {
    background: linear-gradient(135deg, var(--surface-dark) 0%, #1a2233 100%) !important;
    border: 1px solid var(--border-color) !important;
}

.border-top-1 {
    border-top: 1px solid var(--border-color) !important;
}

.border-bottom-1 {
    border-bottom: 1px solid var(--border-color) !important;
}

.border-error {
    border-color: var(--error-color) !important;
}

.border-none {
    border: none !important;
}

.border-collapse {
    border-collapse: collapse !important;
}

.border-dark {
    border: 1px solid #333 !important;
}

.border-light-alpha {
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.rounded-lg {
    border-radius: 8px !important;
}

.info-box-blue {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid #3895dd !important;
    border-left: 4px solid #3895dd !important;
    color: #60a5fa !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.85rem !important;
}

.rounded-max {
    border-radius: 20px !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Typography */
.text-xs {
    font-size: 0.8rem !important;
}

.text-sm {
    font-size: 0.85rem !important;
}

.text-md {
    font-size: 0.9rem !important;
}

.text-lg {
    font-size: 1.1rem !important;
}

.text-xl {
    font-size: 1.5rem !important;
}

.text-1-8 {
    font-size: 1.8rem !important;
}

.text-2xl {
    font-size: 2rem !important;
}

.text-3xl {
    font-size: 2.2rem !important;
}

.font-normal {
    font-weight: normal !important;
}

.font-medium {
    font-weight: 500 !important;
}

.line-height-1-4 {
    line-height: 1.4 !important;
}

.font-bold {
    font-weight: 700 !important;
}

.font-extrabold {
    font-weight: 800 !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: #f59e0b !important;
}

.text-error {
    color: var(--error-color) !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-white {
    color: white !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.no-underline {
    text-decoration: none !important;
}

.white-space-pre {
    white-space: pre-wrap !important;
}

.d-block {
    display: block !important;
}

.d-none {
    display: none !important;
}

.m-0 {
    margin: 0 !important;
}

.uppercase-spaced {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.link-underline {
    color: inherit;
    text-decoration: underline;
}

/* Specific components for dashboard */
.profile-img-lg {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.cursor-pointer {
    cursor: pointer !important;
}

.opacity-70 {
    opacity: 0.7 !important;
}

.cursor-not-allowed {
    cursor: not-allowed !important;
}

.search-input-pill {
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    font-size: 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--surface-hover);
    width: 100%;
}

.search-icon-absolute {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-round-icon {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-control-pill {
    padding: 0.6rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--surface-dark);
    color: white;
    width: 100%;
}

/* Switch boxes */
.switch-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
}

.switch-box-blue {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.switch-box-green {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Small elements */
.h-1 {
    height: 1rem !important;
}

.w-100 {
    width: 100% !important;
}

.w-150px {
    width: 150px !important;
}

.h-1-5 {
    height: 1.5rem !important;
}

.h-46px {
    height: 46px !important;
}

.h-80vh {
    height: 80vh !important;
}

.h-90vh {
    height: 90vh !important;
}

.max-h-250 {
    max-height: 250px !important;
}

.max-h-300 {
    max-height: 300px !important;
}

.max-h-400 {
    max-height: 400px !important;
}

.min-h-40px {
    min-height: 40px !important;
}

.min-h-50px {
    min-height: 50px !important;
}

.min-h-60px {
    min-height: 60px !important;
}

.w-auto {
    width: auto !important;
}

.max-w-400 {
    max-width: 400px !important;
}

.h-80vh {
    height: 80vh !important;
}

.h-90vh {
    height: 90vh !important;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.w-20px {
    width: 20px !important;
}

.min-w-150 {
    min-width: 150px !important;
}

.min-w-200 {
    min-width: 200px !important;
}

.min-w-250 {
    min-width: 250px !important;
}

.max-w-400 {
    max-width: 400px !important;
}

.max-w-500 {
    max-width: 500px !important;
}

.max-w-600 {
    max-width: 600px !important;
}

.max-w-800 {
    max-width: 800px !important;
}

.max-w-900 {
    max-width: 900px !important;
}

.max-w-1000 {
    max-width: 1000px !important;
}

.max-w-1200 {
    max-width: 1200px !important;
}

.max-h-300 {
    max-height: 300px !important;
}

.overflow-y-auto {
    overflow-y: auto !important;
}

.tracking-5 {
    letter-spacing: 5px !important;
}

.color-picker-input {
    width: 50px;
    height: 40px;
    padding: 0;
    border: none;
    cursor: pointer;
}

/* Admin and Reports */
.status-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    vertical-align: middle;
}

.status-color-text {
    font-family: monospace;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.report-note {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px dashed var(--border-color);
}

.btn-danger-bg {
    background: #ef4444 !important;
    color: white !important;
}

.hero-icon-bg {
    position: absolute !important;
    right: -10px !important;
    top: 50% !important;
    font-size: 8rem !important;
    opacity: 0.3 !important;
    transform: rotate(-15deg) !important;
}

/* Event Badges */
.badge-public {
    background: #10b981;
    color: white;
}

.badge-private {
    background: #3895dd;
    color: white;
}

.badge-class {
    background: #f59e0b;
    color: black;
    font-weight: bold;
}

.badge-class-recurring {
    background: #d97706;
    /* Darker amber */
    color: black;
    font-weight: bold;
    border-left: 3px solid #000;
}

.badge-internal {
    background: #4b5563;
    color: white;
}

/* Featured Songs UI in Admin */
.song-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(56, 149, 221, 0.12);
    border: 1px solid rgba(56, 149, 221, 0.25);
    color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.song-tag:hover {
    background: rgba(56, 149, 221, 0.2);
    border-color: rgba(56, 149, 221, 0.4);
    transform: translateY(-1px);
}

.song-tag i {
    font-size: 0.8rem;
    opacity: 0.6;
    transition: color 0.2s, opacity 0.2s;
    padding: 2px;
}

.song-tag i:hover {
    opacity: 1;
    color: #ef4444;
}

/* Blog Card Media Indicators */
.blog-card-media-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.blog-card-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.1rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.5);
}

.blog-card:hover .blog-card-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

.blog-card-img {
    transition: transform 0.5s ease;
}

/* Chat Messages */
.chat-msg-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
}

.chat-msg-row.is-me {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-sender {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.chat-sender.is-me {
    color: var(--primary-color);
}

.chat-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.chat-bubble {
    background: var(--surface-dark);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    word-break: break-all;
}

.chat-bubble.is-me {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
}

/* Calendar Event View */
.view-mode-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.notes-wall-dark {
    max-height: 250px;
    background: rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.event-view-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 800;
}

.view-field-dark {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.view-description-box {
    min-height: 60px;
    white-space: pre-wrap;
    padding: 10px;
    align-items: flex-start;
}

.view-setlist-box {
    padding: 0.5rem;
    min-height: 50px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}

.event-edit-body {
    flex: 1;
    overflow-y: auto;
}

.recurrence-until-box {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.mt-0-5 {
    margin-top: 0.5rem !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--error-color) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.font-bold {
    font-weight: 700 !important;
}

.text-strike {
    text-decoration: line-through !important;
}

.text-capitalize {
    text-transform: capitalize !important;
}

.text-sm {
    font-size: 0.85rem !important;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-lg {
    padding: 0.75rem 2rem !important;
}

.text-error-box {
    text-align: center;
    padding: 2rem;
    color: var(--error-color);
}

.text-muted-box {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner-box {
    text-align: center;
    padding: 2rem;
}

/* --- Table History Styles --- */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table th {
    border-bottom: 2px solid var(--border-color);
    text-align: left;
    color: var(--text-secondary);
    padding: 10px;
}

.history-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.history-table tr.deleted {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.1);
}

/* --- Student Card Details --- */
.student-card-grid {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, border-color 0.2s;
}

.student-card-grid:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.student-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.student-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.student-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.student-card-info {
    flex-grow: 1;
}

.student-card-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.student-card-location {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.student-card-location i {
    font-size: 0.7rem;
}

.student-card-badge-btn {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
}

.student-card-course-box {
    background: var(--surface-dark);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.student-card-course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-card-course-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.student-card-course-name {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 4px;
    font-size: 1rem;
}

.student-card-course-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
}

.student-card-no-course {
    color: var(--text-secondary);
    font-style: italic;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.student-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-card-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.student-card-revenue {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
}

.student-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: white;
}

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

.btn-outline-danger:hover {
    background: var(--error-color);
    color: white;
}

/* --- Dashboard & CRM Shared Layout --- */
.stats-overview-card {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stats-title-block {
    padding-top: 0.2rem;
}

.stats-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.stats-subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stats-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.stats-filters-icon {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0 0.3rem;
}

.stats-filter-input {
    padding: 0.4rem;
    font-size: 0.85rem;
    width: auto;
    background: var(--surface-dark);
}

.stats-date-range {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stats-date-separator {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.stats-filter-btn {
    padding: 0.45rem 1rem;
}

.crm-stats.no-margin {
    margin-bottom: 0;
}

.stat-card.transparent {
    background: transparent;
    border: none;
    padding: 0;
}

.student-list-container {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
}

.search-wrapper {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input-with-icon {
    padding-left: 2.8rem;
    width: 100%;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.loading-text {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Modals & Layout Adjustments */
.modal-title-sm {
    margin-bottom: 0.5rem;
}

.modal-title-md {
    margin-bottom: 1rem;
}

.modal-subtitle {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.modal-subtitle-lg {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.enrollment-list-box {
    margin-bottom: 1.5rem;
    background: var(--surface-dark);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.modal-actions-bar {
    margin-top: 2rem;
    display: flex;
    gap: 10px;
}

.modal-content-sm {
    max-width: 600px;
}

.history-list-box {
    max-height: 400px;
    overflow-y: auto;
}

.text-right-mt-1h {
    margin-top: 1.5rem;
    text-align: right;
}

/* --- Teacher CRM specific styles --- */
.crm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-bar {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
}

.student-item {
    display: grid;
    grid-template-columns: 50px 1.5fr 1fr 1fr 100px auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: transform 0.2s;
}

.student-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.badge-type {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.class-tag-link {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.class-tag-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

@media (max-width: 992px) {
    .student-item {
        grid-template-columns: 40px 1fr auto;
    }

    .hide-mobile {
        display: none;
    }
}

/* --- Hero Cards & Transitions --- */
.library-hero-card {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    overflow: hidden;
    position: relative;
}

.hero-icon-bg {
    position: absolute;
    right: -10px;
    top: 50%;
    margin-top: -4rem;
    line-height: 1;
    font-size: 8rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
}

.px-2 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.py-075 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

/* --- Premium Page Header (Unified) --- */
.premium-page-header {
    background: linear-gradient(135deg, var(--surface-dark) 0%, #1a2233 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 2rem 2rem !important;
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
}

/* --- Unified Bandas-UI Cards --- */
.bandas-card {
    background-color: var(--surface-dark);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.bandas-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.bandas-card-header-cover {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.bandas-card-header-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
}

.bandas-card-header-simple {
    height: 60px;
    background: var(--surface-dark);
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bandas-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
}

.bandas-card-fav {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
}

.bandas-card-fav:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.bandas-card-fav.active {
    color: var(--warning-color);
}

.bandas-card-remove {
    position: absolute;
    top: 10px;
    left: 48px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #ef4444;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bandas-card-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.bandas-card-body {
    padding: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.bandas-card-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid var(--surface-dark);
    background: var(--surface-dark);
    object-fit: cover;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-top: -80px;
}

.bandas-card-avatar-song {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bandas-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.bandas-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 4px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.bandas-card-footer {
    padding: 0.5rem 1rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.bandas-card-tags {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.tag-sm {
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 4px;
    background: var(--surface-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

button.btn-outline.tag-sm:hover:not(.active) {
    background-color: rgba(56, 149, 221, 0.15);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* Grids Fix */
.songs-grid,
.results-grid {
    display: grid !important;
    gap: 1.5rem !important;
}

/* --- View Toggle UI --- */
.view-toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* Force card view and hide toggle on mobile */
@media (max-width: 768px) {
    .view-toggle-group,
    .view-toggle,
    #view-toggle {
        display: none !important;
    }
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.dashboard-grid {
    transition: all 0.3s ease;
}

/* --- Search Result Cards (Teachers & Musicians) --- */
.result-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.result-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

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

.result-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 1rem;
}

/* --- Global Theme Overrides --- */
.theme-songs {
    --primary-color: var(--color-canciones);
    --primary-hover: var(--color-canciones-hover);
}

.theme-groups {
    --primary-color: var(--color-grupos);
    --primary-hover: var(--color-grupos-hover);
}

.theme-courses {
    --primary-color: var(--color-cursos);
    --primary-hover: var(--color-cursos-hover);
}

/* --- SEO Templates Custom Styles --- */
.seo-artist-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.seo-artist-desc {
    white-space: pre-wrap;
    text-align: left;
    width: 100%;
}

.bandas-card-body.seo-card-pt {
    padding-top: 2rem;
}

.bandas-card-avatar.seo-avatar-static {
    position: static;
    margin: 0 auto 1rem auto;
    width: 80px;
    height: 80px;
}

.seo-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* --- SEO Rich Text --- */
.seo-rich-text {
    max-width: 100%;
    width: 100%;
}

.seo-rich-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.seo-rich-text h1,
.seo-rich-text h2,
.seo-rich-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.seo-rich-text ul,
.seo-rich-text ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.seo-rich-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.seo-rich-text a:hover {
    text-decoration: underline;
}

/* --- Instrument Badges --- */
.instrument-badge {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    margin-right: 8px;
    margin-bottom: 8px;
}

.instrument-badge.is-primary {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* --- EPK & Presentation Shared Styles --- */
.epk-header {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: var(--surface-dark);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

.profile-pic-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.band-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.band-genre {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.info-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 20px;
    white-space: pre-wrap;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.location-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-icons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* Tabs Navigation */
.tabs-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

/* Media Grid */
.media-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem 0 !important;
    padding: 0 !important;
    align-items: start;
}

.media-grid img,
.video-wrapper,
.audio-wrapper {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-dark);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: block;
}

.tab-content {
    width: 100% !important;
    display: none;
    animation: fadeIn 0.3s ease;
}

.media-grid img {
    object-fit: cover;
    cursor: zoom-in;
}

.media-grid>*:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

/* Responsive Embeds */
.video-wrapper iframe,
.audio-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: var(--z-max);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
}

#lightbox-img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.close-lightbox:hover {
    color: #bbb;
}

.prev-lightbox,
.next-lightbox {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.next-lightbox {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-lightbox {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.prev-lightbox:hover,
.next-lightbox:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 1200px) {
    .media-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .band-name {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .lightbox-content {
        height: 60vh;
    }

    .prev-lightbox,
    .next-lightbox {
        font-size: 20px;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .epk-header {
        height: 300px;
    }

    .band-name {
        font-size: 1.8rem;
        padding: 0 10px;
        word-wrap: break-word;
    }

    .profile-pic-large {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }

    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        width: calc(100% + 40px);
    }

    .tab-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .media-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* --- Notifications Styles --- */
.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
    border-radius: 0;
}

.notification-item:hover {
    background: var(--surface-hover);
}

.notification-item.unread {
    background: var(--surface-dark);
    border-left: 3px solid var(--primary-color);
}

.notification-item.read {
    background: var(--background-dark);
}

.notification-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--accent-color);
}

.notification-content-wrapper {
    flex-grow: 1;
}

.notification-text {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notification-item.unread .notification-text {
    color: var(--text-primary);
    font-weight: bold;
}

.notification-item.read .notification-text {
    color: var(--text-secondary);
}

.notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.notification-empty {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 12px;
    background: var(--surface-dark);
    cursor: default;
}

.notification-view-all {
    display: block;
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    background: var(--surface-light);
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    border-radius: 0 0 8px 8px;
}

.notification-view-all:hover {
    background: var(--surface-hover);
    color: var(--primary-hover);
}

.nav-notifications-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--error-color);
    /* Matches bg-danger roughly, or use a specific red */
    color: white;
    border: 2px solid var(--surface-color);
    padding: 2px 5px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

.nav-home-mobile,
.nav-mobile-shortcut,
.user-profile-container {
    display: none;
}

.user-profile-thumb {
    position: relative;
    cursor: pointer;
}

/* Hide specific mobile shortcuts from top bar unless they are Home/Search */
@media (max-width: 992px) {
    .nav-notifications-badge {

        top: 0px;
        right: 2px;

    }

    #nav-mobile-repertoire,
    #nav-mobile-groups,
    #nav-mobile-courses,
    #admin-link {
        display: none !important;
    }

    .user-profile-container {
        display: block !important;
    }


    /* Ensure the bell icon is visible on mobile footer/header as per user preference */
    #nav-notifications {
        display: block !important;
    }
}

/* Specific visibility for mobile-only items: hide them on desktop */
@media (min-width: 993px) {
    .nav-mobile-only {
        display: none !important;
    }
}

/* --- Chord Library Modal & Grid --- */
.chord-library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    font-weight: 700;
}

.instrument-selector {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instrument-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.instrument-btn.active {
    background: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.root-selector {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    max-width: 500px;
}

.root-selector::-webkit-scrollbar {
    height: 4px;
}

.root-selector::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.root-selector::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.2s;
}

.root-selector::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.root-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.root-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.root-btn.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 700;
}

.chord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.chord-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
}

.chord-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}


.chord-card .chord-name {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.chord-card .chord-diagram-container {
    width: 100%;
    display: flex;
    justify-content: center;
    transform: scale(1);
    transition: transform 0.4s;
}

.chord-card:hover .chord-diagram-container {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .chord-library-filters {
        padding: 1rem;
        gap: 1rem;
    }

    .chord-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    :root {
        --nav-mobile-primary: #3895dd;
        --nav-mobile-groups: #f19339;
        --nav-mobile-courses: #96d68e;
        --nav-mobile-repertoire: #f59e0b;
    }
}

/* Consolidated Mobile Responsive Fixes (Final Overrides) */
@media (max-width: 992px) {
    .navbar {
        height: auto !important;
        padding: 0.5rem 1.25rem !important;
    }

    .nav-links {
        display: none !important;
    }

    .nav-links.active {
        display: flex !important;
    }

    .menu-toggle {
        display: block !important;
        order: 10 !important;
        margin-left: 0.5rem !important;
    }

    .nav-user {
        display: flex !important;
        gap: 0.25rem !important;
        margin-right: 0 !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex: 1 !important;
    }

    .nav-mobile-shortcut {
        display: flex !important;
        color: var(--text-primary) !important;
        width: 34px !important;
        height: 34px !important;
        border-radius: 10px !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.1rem !important;
        transition: background 0.2s !important;
        text-decoration: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    .nav-mobile-shortcut:active {
        background: rgba(255, 255, 255, 0.1) !important;
    }


    .nav-mobile-shortcut[title="Mis Grupos"] i {
        color: var(--nav-mobile-groups) !important;
    }

    .nav-mobile-shortcut[title="Mis Cursos"] i {
        color: var(--nav-mobile-courses) !important;
    }

    .nav-mobile-shortcut[title="Mi Repertorio"] i {
        color: var(--nav-mobile-repertoire) !important;
    }

    .nav-user-desktop {
        display: none !important;
    }

    .dropdown-divider {
        height: 1px !important;
        background: var(--border-color) !important;
        margin: 0.25rem 0 !important;
    }

    .nav-user .header-btn {
        width: 34px !important;
        height: 34px !important;
        text-decoration: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    .profile-summary,
    .profile-main-info,
    .profile-actions-wrapper,
    .profile-grid {
        flex-direction: column !important;
        display: flex !important;
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        padding: 1rem !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: 1rem;
    }

    .profile-sidebar {
        margin-bottom: 2rem !important;
        width: 100% !important;
    }

    .actions-secondary {
        border-left: none !important;
        border-top: 1px solid var(--border-color) !important;
        padding-left: 0 !important;
        padding-top: 1.5rem !important;
        width: 100% !important;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .responsive-settings-grid {
        grid-template-columns: 1fr !important;
        display: grid !important;
        gap: 1rem !important;
    }

    .responsive-settings-grid .bg-blue-alpha,
    .responsive-settings-grid .bg-success-alpha {
        flex-direction: column !important;
        height: auto !important;
        align-items: flex-start !important;
        padding: 1rem !important;
        gap: 1rem !important;
    }

    #edit-mode-container>.card.d-flex,
    #edit-profile-section>.card.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
}

.hover-bg-surface:hover {
    background-color: var(--surface-hover) !important;
}

.song-item {
    transition: transform 0.2s, border-color 0.2s;
    border: 1px solid var(--border-color);
}

.song-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

/* --- Admin Panel Redesign Styles --- */
.admin-nav-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    margin-top: 1.5rem;
}

.admin-nav-group {
    flex: 1;
    min-width: 300px;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.admin-nav-group:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.admin-nav-group-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.9;
}

.admin-nav-group-title i {
    font-size: 1rem;
}

.admin-nav-group .nav-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    border-bottom: none;
    padding: 0;
}

.admin-nav-group .nav-tab-btn {
    width: 100%;
    margin: 0 !important;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.admin-nav-group .nav-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-nav-group .nav-tab-btn i {
    width: 18px;
    text-align: center;
    margin-right: 10px;
    font-size: 0.95rem;
    opacity: 0.8;
}

.admin-nav-group .nav-tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), #2563eb) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px -4px rgba(59, 130, 246, 0.5);
}

@media (max-width: 992px) {
    .admin-nav-group {
        min-width: 100%;
    }
}

@media (max-width: 576px) {
    .admin-nav-group .nav-tabs {
        grid-template-columns: 1fr !important;
    }
}

/* --- Premium Admin Header & View Selector --- */
.admin-header-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 2.5rem !important;
    margin-bottom: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.admin-profile-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-avatar-glow {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 0 20px rgba(56, 149, 221, 0.3);
}

.view-selector-tabs {
    display: flex;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 16px;
    width: fit-content;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-btn i {
    font-size: 1.1rem;
    opacity: 0.7;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(56, 149, 221, 0.4);
}

.view-btn.active i {
    opacity: 1;
}

/* Sub-nav tabs (Second level) */
.sub-nav-container {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    display: none;
}

.sub-nav-container.active {
    display: block;
    animation: slideUpFade 0.4s forwards;
}

.sub-tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sub-tab-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.sub-tab-btn.active {
    background: rgba(56, 149, 221, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
}

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

/* --- Premium Moderation Cards --- */
.premium-moderation-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.5));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.premium-moderation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.3s;
}

.premium-moderation-card.is-warning {
    background: linear-gradient(145deg, rgba(255, 193, 7, 0.03), rgba(15, 23, 42, 0.5));
}

.premium-moderation-card.is-warning::before {
    background: var(--warning-color);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.premium-moderation-card.is-danger {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.03), rgba(15, 23, 42, 0.5));
}

.premium-moderation-card.is-danger::before {
    background: var(--error-color);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.premium-moderation-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(145deg, rgba(45, 55, 75, 0.5), rgba(30, 41, 59, 0.6));
}

.mod-card-info {
    flex: 1;
}

.mod-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mod-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.mod-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.mod-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 20px;
}

.mod-meta-item i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.mod-card-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.report-reason-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.mod-empty-state {
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin: 1rem 0;
}

.mod-empty-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    display: block;
}

.mod-empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.mod-empty-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

.moderation-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.moderation-section-title h2 {
    margin: 0;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.moderation-badge {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.moderation-badge.is-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

@media (max-width: 768px) {
    .premium-moderation-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }
    
    .mod-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .view-selector-tabs {
        width: 100%;
        flex-direction: column;
    }

    .view-btn {
        width: 100%;
        justify-content: center;
    }

    .admin-profile-info {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Unified Search UI (Premium Addons) --- */
.search-pill-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-pill {
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: var(--surface-dark);
    color: white;
    width: 250px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-input-pill:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-light);
    box-shadow: 0 0 0 4px rgba(56, 149, 221, 0.1);
}

.search-icon {
    position: absolute !important;
    left: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--text-secondary);
    pointer-events: none;
}

/* --- SEO Specific Enhancements (Final Fix) --- */
.seo-tabs-container {
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.seo-tabs-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.seo-tab-btn {
    padding: 10px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seo-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
}

.seo-tab-btn.active {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.results-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 1.5rem !important;
}

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


/* --- Admin Page Mobile Fixes --- */
.admin-page .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100000 !important;
    background: #0f172a !important;
    /* Force Navy background */
    display: flex !important;
    height: 70px !important;
    align-items: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.admin-page .nav-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1.25rem !important;
}

.admin-page #mobile-nav.active {
    z-index: 100001 !important;
}

@media (max-width: 992px) {
    .admin-page .nav-user {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        gap: 0.75rem !important;
    }

    .admin-page .menu-toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-left: 0.5rem !important;
    }

    .admin-page .nav-mobile-shortcut[id="nav-mobile-search"],
    .admin-page .nav-mobile-shortcut[id="nav-mobile-groups"],
    .admin-page .nav-mobile-shortcut[id="nav-mobile-courses"] {
        display: none !important;
    }
}

.admin-page .admin-header-card {
    margin-top: 3.5rem !important;
    /* Increased to avoid fixed navbar */
}


/* Admin action buttons grid */
.btn-xs {
    padding: 0px 4px !important;
    font-size: 0.7rem !important;
    border-radius: 4px !important;
    height: 28px !important;
    min-width: 32px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.admin-actions-grid {
    display: inline-grid !important;
    grid-template-columns: repeat(2, 36px);
    gap: 4px;
    width: fit-content;
    justify-content: end;
}

/* === Extracted from dashboard.html === */
.profile-img-container {
    margin: 0 auto;
}

.results-grid {
    margin-top: 1rem;
}

/* === Extracted from components/footer.html === */
.main-footer {
    background: var(--surface-color);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-nav-groups {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.footer-logo {
    height: 24px;
    filter: grayscale(1) opacity(0.7);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-nav-groups {
        align-items: center;
    }

    .footer-links {
        justify-content: center;
        gap: 1rem;
    }
}


/* === Extracted from metronomo.html === */
.sequencer-container {
    background: var(--surface-dark);
    border-radius: 12px;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.transport-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bpm-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-hover);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.bpm-slider {
    width: 150px;
    accent-color: var(--primary-color);
}

.grid-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.grid-container::-webkit-scrollbar {
    display: none;
}

.track-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.track-label {
    width: 80px;
    font-weight: 600;
    color: var(--text-secondary);
}

.step-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.1s;
    flex-shrink: 0;
}

.step-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.step-btn.current {
    border-color: var(--success-color);
    transform: scale(1.1);
}

.beat-marker {
    background: rgba(255, 255, 255, 0.1);
}

.presets-list {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Hide song viewer controls when submodal is open */
#song-viewer-modal.submodal-open > .modal-content > .close-btn,
#song-viewer-modal.submodal-open .add-to-lib-fab,
#song-viewer-modal.submodal-open .tuning-fab,
#song-viewer-modal.submodal-open .fab-play {
    display: none !important;
}

.preset-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--surface-hover);
    margin-bottom: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
}

.preset-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.preset-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.preset-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.preset-action-btn:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.preset-action-btn.delete-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-btn.active {
    color: #ffc107;
}


/* === Extracted from admin.html === */
.sortable-ghost {
    opacity: 0.4;
    background: var(--surface-light) !important;
    border: 2px dashed var(--primary-color) !important;
}

.sortable-chosen {
    background: var(--surface-light) !important;
}

.handle {
    cursor: grab;
    padding: 0.5rem;
    margin-right: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.handle:active {
    cursor: grabbing;
}

.handle:hover {
    color: var(--primary-color);
}

.accordion-header.dragging {
    background: var(--surface-light);
}

/* Force Navbar visibility fixed for Admin */
.admin-page .navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    /* Force Viewport Width */
    z-index: 200000 !important;
    background: #0f172a !important;
    display: flex !important;
    height: 70px !important;
    align-items: center !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

body.admin-page {
    overflow-x: hidden !important;
    /* Prevent horizontal scroll on body */
    width: 100vw !important;
    position: relative;
    /* Navbar 80px + 20px margin */
    padding-top: 100px !important;
}

.admin-page #navbar-container {
    height: 0;
    display: block;
}

/* PC Specific Card Margin & Button Fix */
.admin-page .admin-header-card {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
}

.admin-page .view-selector-tabs {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.5rem !important;
    /* Increased gap to prevent overlap */
    width: fit-content !important;
    flex-wrap: nowrap !important;
}

.admin-page .view-btn {
    flex: 0 0 auto !important;
    /* Force no-shrink */
    min-width: max-content !important;
    /* Ensure text fits */
    white-space: nowrap !important;
    padding: 0.75rem 1.5rem !important;
}

.admin-page .nav-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

.admin-page .overflow-x-auto {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.admin-page .nav-brand {
    flex-shrink: 0 !important;
}

.admin-page .nav-user {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    gap: 0.75rem !important;
    margin-left: auto !important;
}

.admin-page .menu-toggle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    margin-left: 0.5rem !important;
}

/* Prevent search icons from floating weirdly on mobile */
@media (max-width: 768px) {
    .admin-page .search-container-relative {
        display: flex !important;
        align-items: center !important;
        padding-left: 0.5rem !important;
    }
}

/* --- Admin View Selector Fix (Overlap) --- */
@media (max-width: 992px) {
    .admin-page .view-selector-tabs {
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        padding: 0.75rem !important;
        background: rgba(0, 0, 0, 0.4) !important;
    }

    .admin-page .view-btn {
        flex: 1 1 calc(33% - 0.5rem) !important;
        min-width: 110px !important;
        padding: 0.6rem 0.5rem !important;
        font-size: 0.85rem !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    /* Sub-nav tabs overlap fix */
    .admin-page .sub-nav-container.active {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.4rem !important;
        padding: 0.5rem !important;
    }

    .admin-page .sub-tab-btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.85rem !important;
    }

    .admin-page .admin-header-card {
        margin-top: 85px !important;
        /* Navbar 70px + 15px gap */
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    body.admin-page {
        padding-top: 0 !important;
        /* Let card margin handle it on mobile */
    }

    .admin-page #navbar-container {
        height: 0 !important;
    }

    .admin-page .admin-profile-info {
        margin-bottom: 1rem !important;
        gap: 1rem !important;
    }

    .admin-page .admin-avatar-glow {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.2rem !important;
    }

    .admin-page h1.text-3xl {
        font-size: 1.5rem !important;
    }

    .admin-page .view-selector-tabs {
        width: 100% !important;
    }
}

/* Scoped CMS Form Fixes */
.premium-form .form-group input[type="checkbox"] {
    width: auto !important;
    margin-right: 0.5rem !important;
    cursor: pointer;
}

.gap-05 {
    gap: 0.5rem !important;
}

.publication-status-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
    cursor: pointer;
    width: fit-content !important;
}

/* SEO Modal Specific Layout Fixes */
#seo-modal.modal {
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 10000 !important;
}

#seo-modal[style*="display: flex"],
#seo-modal[style*="display: block"] {
    display: flex !important;
}

#seo-modal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    margin: auto !important;
    width: 95% !important;
    max-width: 1000px !important;
    height: 90vh !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6) !important;
    position: relative !important;
}

#seo-modal .modal-header {
    flex-shrink: 0 !important;
}

#seo-modal .modal-footer {
    flex-shrink: 0 !important;
    width: 100% !important;
    margin-top: auto !important;
    background: var(--surface) !important;
    padding: 1.5rem !important;
    border-top: 1px solid var(--border-color) !important;
    z-index: 10 !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
}

#seo-modal .modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
    width: 100% !important;
    min-height: 0 !important;
}

#seo-form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
}


/* === Extracted from afinador.html === */
.tuner-container {
    background: var(--surface-dark);
    border-radius: 16px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.tuner-display {
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.note-display {
    font-size: 8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transition: color 0.2s, text-shadow 0.2s;
}

.note-display.in-tune {
    color: var(--success-color);
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.meter-container {
    width: 100%;
    height: 60px;
    position: relative;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.meter-needle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    z-index: 2;
}

.meter-needle.in-tune {
    background: var(--success-color);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.meter-center {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--text-secondary);
    opacity: 0.3;
    transform: translateX(-50%);
}

.meter-scale {
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

.frequency-display {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-top: 1rem;
}

.tuner-status {
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    min-height: 1.5rem;
}

.tuner-status.too-low {
    color: #f87171;
}

.tuner-status.too-high {
    color: #f87171;
}

.tuner-status.perfect {
    color: var(--success-color);
}

#start-btn {
    margin-top: 2rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
}

.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    filter: blur(100px);
    opacity: 0.1;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: background 0.5s;
}

.ambient-glow.in-tune {
    background: var(--success-color);
    opacity: 0.2;
}

/* === Extracted from blog.html === */
.blog-hero {
    padding: 4rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--surface-dark) 0%, #1a1a1a 100%);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.search-container-blog {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-container-blog input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 3.5rem;
    background: var(--surface-hover);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-container-blog input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
    outline: none;
}

.search-container-blog i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
    margin-bottom: 5rem;
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

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

    .blog-hero h1 {
        font-size: 2.2rem;
    }
}

.blog-card {
    background: var(--surface-dark);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.blog-card-media-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #000;
    border-bottom: 1px solid var(--border-color);
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

.blog-card-media-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.blog-gallery-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.blog-gallery {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    border-radius: 20px;
}

.blog-gallery::-webkit-scrollbar {
    display: none;
}

.blog-gallery img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    pointer-events: none;
    z-index: 5;
}

.gallery-nav button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    font-size: 0.8rem;
}

.gallery-nav button:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    z-index: 5;
}

/* .dot styles added in articulo.html below */
.blog-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 1.2rem;
    opacity: 0.9;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    pointer-events: none;
    z-index: 8;
}

.blog-card:hover .blog-card-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.blog-categories-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.category-pill {
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.category-pill:hover {
    border-color: var(--primary-color);
    color: white;
    background: rgba(255, 193, 7, 0.1);
}

.category-pill.active {
    background: var(--primary-color);
    color: black;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.blog-card-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-card-summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.blog-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 5rem 0;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* === Extracted from articulo.html === */
.article-header {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    text-align: left;
}

.article-header-info {
    flex: 1;
}

.article-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.media-container {
    flex: 0 0 350px;
    max-width: 100%;
}

.media-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.article-cover-container {
    width: 100%;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.article-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    background: var(--surface-dark);
    padding: 3.5rem;
    border-radius: 20px;
    line-height: 1.8;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
}

.article-content h2,
.article-content h3 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    border-radius: 12px;
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

.article-content iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: none;
    margin: 2rem 0;
}

.article-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .article-header {
        flex-direction: column;
        text-align: center;
    }

    .article-meta {
        justify-content: center;
    }

    .media-container {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 991px) {

    .article-cover-container,
    .video-cover-wrapper,
    .blog-gallery-wrapper {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }

    .article-cover-container {
        height: 250px;
    }

    .article-content {
        padding: 1.5rem;
        margin-top: 1rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

/* Blog media styles from articulo */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 10px var(--primary-color);
}

@media (max-width: 768px) {
    .blog-gallery img {
        height: 300px;
    }
}

.video-cover-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.video-cover-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* === Extracted from my-classes.html === */
@media (max-width: 768px) {
    .mobile-filters-stack {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .mobile-filters-stack>div {
        min-width: 100% !important;
    }

    .mobile-actions-center {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        justify-content: flex-end !important;
        width: 100% !important;
    }

    .mobile-actions-center .btn {
        width: auto !important;
        min-width: 50px !important;
        padding: 0 1rem !important;
        height: 50px !important;
    }

    .mobile-actions-center .btn span {
        display: none !important;
    }

    .search-filters-card {
        padding: 1.25rem !important;
    }
}


/* === Extracted from my-groups.html === */
@media (max-width: 768px) {
    .theme-groups .mobile-filters-stack {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .theme-groups .mobile-filters-stack>div {
        min-width: 100% !important;
    }

    .theme-groups .mobile-actions-center {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .theme-groups .mobile-actions-center .btn {
        width: 100% !important;
        padding: 0 !important;
        height: 50px !important;
    }

    .theme-groups .mobile-actions-center .btn span {
        display: none !important;
    }

    .theme-groups .search-filters-card {
        padding: 1.25rem !important;
    }
}

/* === Extracted from mi-libreria.html === */
@media (max-width: 768px) {
    .theme-songs .mobile-filters-stack {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .theme-songs .mobile-filters-stack>div {
        min-width: 100% !important;
    }

    .theme-songs .mobile-actions-center {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.75rem !important;
        justify-content: flex-end !important;
        width: 100% !important;
        flex-wrap: wrap;
    }

    .theme-songs .mobile-actions-center .btn {
        width: auto !important;
        min-width: 48px !important;
        padding: 0 1rem !important;
        height: 48px !important;
    }

    .theme-songs .mobile-actions-center .btn span {
        display: none !important;
    }

    .theme-songs .search-filters-card {
        padding: 1.25rem !important;
    }

    .theme-songs #category-filters {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .theme-songs #category-filters-container {
        overflow-x: visible !important;
        flex-wrap: wrap !important;
    }
}

/* === Extracted from profesor.html === */
.teacher-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .teacher-grid {
        grid-template-columns: 1fr !important;
        margin-top: 0.5rem;
    }
}

.class-card {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.class-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.class-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.btn-teacher {
    background-color: var(--success-color);
    color: white !important;
}

.btn-teacher:hover {
    background-color: #059669;
}

/* === Extracted from buscar-canciones.html === */
.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
}

.giant-search-bar {
    width: 100%;
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    border-radius: 50px;
    color: white;
    font-size: 1.25rem;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.giant-search-bar:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.result-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s, border-color 0.2s;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    background: var(--surface-hover);
}

.song-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.song-info p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.group-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Note: styles for blog-gallery and article-cover were already added previously, skipping exact duplicates from buscar-canciones. */



.seo-container {
    width: 100%;
    max-width: 1200px !important;
    margin: 0 auto;
    display: block;
}


/* === Extracted from SEO templates === */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    background: var(--surface-dark);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.results-count-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-05 {
    gap: 0.5rem;
}


/* === Extracted from teacher-nav.html === */

@media (max-width: 768px) {
    .teacher-unified-header {
        padding: 1.5rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.25rem !important;
    }

    .teacher-nav {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }

    .teacher-nav .btn {
        width: 100% !important;
        margin: 0 !important;
        padding: 0.75rem 0.5rem !important;
        justify-content: center !important;
        font-size: 0.9rem !important;
        display: flex !important;
        align-items: center !important;
    }

    .teacher-nav #nav-create-class-btn {
        grid-column: span 1 !important;
        /* Adjust if you want it full width or half */
    }

    .teacher-profile-mini {
        width: 100%;
    }
}


/* === Extracted from legal.html === */

.legal-content {
    background: var(--surface-dark);
    padding: 3rem;
    border-radius: 16px;
    margin-top: 2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.legal-content h1 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    display: inline-block;
}

.legal-content h2,
.legal-content h3 {
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content p {
    margin-bottom: 1.5rem;
}

.legal-content iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: none;
    margin: 2rem 0;
}



/* === Extracted from presentation.html === */

* {
    box-sizing: border-box;
}

body.presentation-page {
    background-color: #0f172a;
    /* Dark background as requested */
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0 !important;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Hero / Header Section */
.epk-header {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #1e293b;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

.profile-pic-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #3b82f6;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.band-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.band-genre {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* Info Section (Bio & Location) */
.info-section {
    max-width: 1400px;
    /* Increased width */
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 20px;
    white-space: pre-wrap;
    max-width: 900px;
    /* Limit text width for readability */
    margin-left: auto;
    margin-right: auto;
}

.location-text {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-icons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-3px);
    border-color: #3b82f6;
}

/* Tabs Navigation */
.tabs-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #334155;
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: #e2e8f0;
}

.tab-btn.active {
    color: #3b82f6;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3b82f6;
    border-radius: 3px 3px 0 0;
}

/* Tab Content Areas */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Consistent Grid System (Aggressive Force) */
.media-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.5rem 0 !important;
    padding: 0 !important;
    align-items: start;
}

/* Unified Grid Item Format (Panoramic 16:9) */
.media-grid img,
.video-wrapper,
.audio-wrapper {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 12px;
    overflow: hidden;
    background: #1e293b;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: block;
}

.tab-content {
    width: 100% !important;
    display: none;
    animation: fadeIn 0.3s ease;
}

.media-grid img {
    object-fit: cover;
    cursor: zoom-in;
}

.media-grid>*:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    z-index: 10;
}

/* Responsive Embeds */
.video-wrapper iframe,
.audio-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.footer {
    text-align: center;
    padding: 40px;
    color: #475569;
    font-size: 0.9rem;
    border-top: 1px solid #1e293b;
    margin-top: 50px;
}

.create-btn-container {
    margin-top: 20px;
}

.btn-create {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-create:hover {
    border-color: #94a3b8;
    color: #fff;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
}

#lightbox-img {
    max-width: 90%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.prev-lightbox,
.next-lightbox {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.next-lightbox {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-lightbox {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.prev-lightbox:hover,
.next-lightbox:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
    .media-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .band-name {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .lightbox-content {
        height: 60vh;
    }

    .prev-lightbox,
    .next-lightbox {
        font-size: 20px;
        padding: 10px;
    }
}

@media (max-width: 600px) {
    .epk-header {
        height: 300px;
    }

    .band-name {
        font-size: 1.8rem;
        padding: 0 10px;
        word-wrap: break-word;
        /* Prevent long names from overflowing */
    }

    .profile-pic-large {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }

    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        margin-left: -20px;
        /* Offset parent padding for full bleed scroll */
        margin-right: -20px;
        padding-left: 20px;
        /* Restore visual padding */
        padding-right: 20px;
        width: calc(100% + 40px);
    }

    .tab-btn {
        padding: 8px 10px;
        /* Reduced padding */
        font-size: 0.85rem;
        /* Reduced font size */
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Photos/Grid Items */
    .media-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Form to 1 column */
    .form-row {
        grid-template-columns: 1fr !important;
    }

    /* Increased Safety Margins/Padding */
    .tabs-container {
        padding: 0 10px;
        width: 100%;
        overflow-x: hidden;
        /* Local overflow prevention */
    }

    .info-section {
        padding: 40px 10px;
    }

    .header-content {
        padding: 0 10px;
        width: 100%;
    }

    .footer {
        padding: 40px 10px;
    }

    #tab-contact .card {
        padding: 1rem !important;
    }
}


/* === Extracted from course-presentation.html === */

* {
    box-sizing: border-box;
}

body.course-presentation-page {
    background-color: #0f172a;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0 !important;
    overflow-x: hidden;
}

/* Header Section */
.epk-header.theme-courses {
    position: relative;
    width: 100%;
    height: 550px;
    background-color: #1e293b;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

.profile-pic-large.theme-courses {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--color-cursos, #a855f7);
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.band-name {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.band-genre {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 20px;
}

.cards-container {
    width: 95%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.presentation-card.theme-courses {
    background: #1e293b;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
    animation: fadeIn 0.4s ease forwards;
}

.presentation-card h2 {
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--color-cursos, #a855f7);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bio-text.theme-courses {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
    white-space: pre-wrap;
}

.location-text.theme-courses {
    color: #94a3b8;
    font-size: 1rem;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icons-container {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 1.2rem;
    transition: all 0.3s;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon-link:hover {
    background: var(--color-cursos, #a855f7);
    color: white;
    transform: translateY(-3px);
    border-color: var(--color-cursos, #a855f7);
}

/* Video Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@media (max-width: 600px) {
    .epk-header.theme-courses {
        height: 300px;
    }

    .band-name {
        font-size: 2rem;
    }

    .profile-pic-large.theme-courses {
        width: 100px;
        height: 100px;
    }

    .presentation-card.theme-courses {
        padding: 20px;
    }
}

#admin-info:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}


/* --- EXTRACTED INLINE UTILITIES --- */
.mr-1 {
    margin-right: 4px !important;
}

.mr-2 {
    margin-right: 10px !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.m-0 {
    margin: 0 !important;
}

.flex-1 {
    flex: 1 !important;
}

.w-100 {
    width: 100% !important;
}

.h-45px {
    height: 45px !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.gap-1 {
    gap: 1rem !important;
}

.modal-flex-col {
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
}

.modal-footer {
    display: flex !important;
    justify-content: flex-end;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
    background: var(--surface-dark) !important;
    border-top: 1px solid var(--border-color) !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.modal-body-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.modal-body-scroll {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
}

.flex-wrap-gap-1 {
    display: flex !important;
    gap: 1rem !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.divider-vertical {
    width: 1px !important;
    height: 24px !important;
    background: var(--border-color) !important;
}

.flex-between-mb-1 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 1rem !important;
}

.heading-xl-mb-1 {
    font-size: 1.8rem !important;
    color: var(--text-primary) !important;
    margin-bottom: 1rem !important;
    font-weight: 800 !important;
}

.text-primary-bold {
    color: var(--primary-color) !important;
    font-weight: bold !important;
}

/* Song Search Badges */
.badge-owner,
.badge-member {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-owner {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-member {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
