:root {
    --bg-color-1: #091321;
    --bg-color-2: #050a10;
    --card-bg: rgba(18, 26, 38, 0.85);
    --card-border: rgba(255, 255, 255, 0.06);
    --input-bg: #0c121d;
    --input-border: #1a2436;
    --input-focus: #4d61fc;
    --text-primary: #ffffff;
    --text-secondary: #748398;
    --text-placeholder: #4b5869;
    --btn-primary: #7c88ff;
    --btn-hover: #929dff;
    --btn-active: #6673eb;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    
    /* Sidebar Theme Variables */
    --sidebar-bg: #0b111e;
    --sidebar-border: rgba(255, 255, 255, 0.05);
    --sidebar-user-bg: rgba(12, 18, 29, 0.4);
    --sidebar-user-border: rgba(255, 255, 255, 0.03);
    --menu-item-color: var(--text-secondary);
    --menu-item-active-color: #ffffff;
    --menu-item-active-bg: rgba(77, 97, 252, 0.1);
    --menu-item-active-border: rgba(77, 97, 252, 0.2);
    --body-bg-gradient: radial-gradient(circle at 50% 0%, #112644 0%, transparent 60%),
                        radial-gradient(circle at 0% 100%, #08111e 0%, transparent 40%),
                        radial-gradient(circle at 100% 100%, #060b13 0%, transparent 40%);

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.light-theme {
    --bg-color-1: #f3f4f6;
    --bg-color-2: #f5f6f8;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --input-bg: #ffffff;
    --input-border: #e5e7eb;
    --input-focus: #4d61fc;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-placeholder: #9ca3af;
    --accent-blue: #4d61fc;
    
    --sidebar-bg: #ffffff;
    --sidebar-border: rgba(0, 0, 0, 0.06);
    --sidebar-user-bg: #f5f6f8;
    --sidebar-user-border: rgba(0, 0, 0, 0.04);
    --menu-item-color: #5e6e82;
    --menu-item-active-color: #4d61fc;
    --menu-item-active-bg: rgba(77, 97, 252, 0.08);
    --menu-item-active-border: rgba(77, 97, 252, 0.15);
    --body-bg-gradient: none;

    --btn-secondary-bg: #ffffff;
    --btn-secondary-border: #e5e7eb;
    --btn-secondary-text: #1f2937;
    --btn-secondary-hover-bg: #f9fafb;
}

body.light-theme .theme-switch {
    background-color: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .theme-btn {
    color: #9ca3af;
}

body.light-theme .theme-btn.active {
    color: #ffffff;
}

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

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

body {
    width: 100%;
    background-color: var(--bg-color-2);
    background-image: var(--body-bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

/* Background decorative blur glow */
.background-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 350px;
    background: radial-gradient(circle, rgba(77, 97, 252, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(50px);
    z-index: 0;
    pointer-events: none;
}

/* Login container & Card */
.login-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    z-index: 1;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 40px;
    padding: 48px 36px 40px 36px;
    box-shadow: 
        0 24px 64px -16px rgba(0, 0, 0, 0.7),
        0 1px 0px 0px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 136, 255, 0.4), rgba(255, 255, 255, 0.6), rgba(124, 136, 255, 0.4), transparent);
}

/* Card Header */
.card-header {
    text-align: left;
    margin-bottom: 36px;
}

.card-header h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-header p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Form Styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 16px 18px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-wrapper input::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(77, 97, 252, 0.15);
    background-color: rgba(12, 18, 29, 0.95);
}

/* Password eye toggle */
.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.hidden {
    display: none !important;
}

/* Forgot Password Link */
.forgot-password-container {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
    margin-bottom: 4px;
}

.forgot-password-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--btn-primary);
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background-color: var(--btn-primary);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 16px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(124, 136, 255, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(124, 136, 255, 0.35);
}

.submit-btn:active {
    background-color: var(--btn-active);
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(124, 136, 255, 0.15);
}

/* Button loader */
.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer Section */
.card-footer {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.support-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.support-link {
    color: var(--btn-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.support-link:hover {
    color: var(--btn-hover);
    text-decoration: underline;
}

/* Secure Badge */
.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(12, 18, 29, 0.5);
    border: 1px solid var(--input-border);
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: border-color 0.3s ease;
}

.secure-badge:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.shield-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-green);
}

/* Responsiveness */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .background-glow {
        width: 100%;
        max-width: 300px;
        height: 200px;
    }
    
    .login-card {
        padding: 36px 24px 30px 24px;
        border-radius: 32px;
    }
    
    .card-header {
        margin-bottom: 28px;
    }
    
    .card-header h1 {
        font-size: 24px;
    }
}

/* Dashboard Layout Override */
body.dashboard-body {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    flex-shrink: 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background-color: #4d61fc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--menu-item-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.menu-item a:hover {
    color: var(--menu-item-active-color);
    background-color: rgba(255, 255, 255, 0.02);
}

body.light-theme .menu-item a:hover {
    background-color: rgba(77, 97, 252, 0.04);
}

.menu-item.active a {
    color: var(--menu-item-active-color);
    background-color: var(--menu-item-active-bg);
    box-shadow: inset 0 0 0 1px var(--menu-item-active-border);
}

.menu-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

/* Sidebar Footer User Info */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
    border-top: 1px solid var(--sidebar-border);
    padding-top: 24px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--sidebar-user-bg);
    border: 1px solid var(--sidebar-user-border);
    border-radius: 16px;
    padding: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: #2a3547;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ffffff;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logout-btn-link:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Theme switch controls */
.theme-switch-container {
    display: flex;
    justify-content: center;
}

.theme-switch {
    display: flex;
    background-color: rgba(12, 18, 29, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 4px;
    width: 80px;
    position: relative;
}

.theme-btn {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    color: var(--text-secondary);
    z-index: 2;
    transition: color 0.3s ease;
}

.theme-btn.active {
    color: #ffffff;
}

.theme-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 34px;
    height: calc(100% - 8px);
    background-color: #4d61fc;
    border-radius: 16px;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme .theme-slider {
    transform: translateX(38px);
}

/* Main Dashboard Area */
.dashboard-content {
    flex: 1;
    padding: 40px 48px;
    overflow-y: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* Main Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

.header-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.academic-year {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.btn-secondary, .btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-action {
    background-color: #4d61fc;
    border: none;
    color: #ffffff;
}

.btn-action:hover {
    background-color: #6375ff;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    background-color: rgba(18, 26, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 16px 20px;
    align-items: center;
}

.search-wrapper {
    flex: 1.5;
    position: relative;
}

.search-input {
    width: 100%;
    background-color: #0b111e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px 18px 12px 42px;
    color: #ffffff;
    font-size: 14px;
    font-family: var(--font-body);
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4d61fc;
    box-shadow: 0 0 0 3px rgba(77, 97, 252, 0.15);
}

.search-wrapper svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.dropdown-wrapper {
    flex: 1;
    position: relative;
}

.filter-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: #0b111e;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px 38px 12px 18px;
    color: #ffffff;
    font-size: 14px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #4d61fc;
}

.dropdown-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-secondary);
    pointer-events: none;
}

.filter-toggle-btn {
    background-color: rgba(77, 97, 252, 0.1);
    border: 1px solid rgba(77, 97, 252, 0.2);
    color: #4d61fc;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background-color: rgba(77, 97, 252, 0.18);
}

/* Grid Layout */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
}

/* Card Design */
.class-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.class-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 14px 40px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(77, 97, 252, 0.2);
}

.card-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-turno {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #fff9e6;
    color: #b38600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-turno.night {
    background-color: rgba(124, 136, 255, 0.1);
    color: #7c88ff;
}

.badge-turno.afternoon {
    background-color: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.badge-serie {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 4px;
}

.card-info {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-info .info-title {
    font-size: 10px;
    color: var(--text-placeholder);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 700;
}

.card-separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.06);
    margin: 8px 0;
}

.card-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.teacher-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.teacher-photo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #2a3547;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
}

.teacher-details {
    display: flex;
    flex-direction: column;
}

.teacher-label {
    font-size: 10px;
    color: var(--text-placeholder);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.teacher-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

.students-count-wrapper {
    text-align: right;
}

.students-number {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-heading);
    line-height: 1;
}

.students-label {
    font-size: 9px;
    color: var(--text-placeholder);
    font-weight: 700;
    text-transform: uppercase;
}

/* Mobile Header & Overlay Styles */
.mobile-header {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile responsive dashboard */
@media (max-width: 900px) {
    body.dashboard-body {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 16px;
        padding: 12px 20px;
        background-color: #0b111e;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        position: sticky;
        top: 0;
        z-index: 999;
        height: 60px;
        width: 100%;
    }

    .mobile-menu-toggle {
        background: none;
        border: none;
        color: #ffffff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        border-radius: 8px;
        transition: background-color 0.2s ease, transform 0.1s ease;
    }
    
    .mobile-menu-toggle:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-brand .logo-icon {
        width: 32px;
        height: 32px;
        background-color: #4d61fc;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
    }

    .mobile-brand .logo-text {
        font-family: var(--font-heading);
        font-size: 18px;
        font-weight: 700;
        color: #ffffff;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        border-right: 1px solid var(--sidebar-border);
        border-bottom: none;
        box-shadow: 20px 0 40px rgba(0, 0, 0, 0.5);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 32px 24px;
        background-color: var(--sidebar-bg);
    }

    .sidebar.open {
        left: 0;
    }

    .logo-section {
        margin-bottom: 36px;
    }

    .sidebar-menu {
        flex-direction: column;
        overflow-x: visible;
        padding-bottom: 0;
        flex: 1;
    }

    .menu-item a {
        padding: 14px 18px;
        white-space: normal;
    }

    .sidebar-footer {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        margin-top: auto;
        padding-top: 24px;
        gap: 20px;
        border-top: 1px solid var(--sidebar-border);
    }

    .user-profile {
        padding: 0;
        flex: none;
        max-width: none;
    }

    .dashboard-content {
        padding: 24px 20px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper, .dropdown-wrapper {
        flex: none;
        width: 100%;
    }
}

/* --- Integrada Styles --- */
.integrada-stats-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px 32px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 32px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
}

.stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 700;
    color: #8b5cf6;
}

.stat-txt {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background-color: var(--card-border);
}

.integrada-header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.period-toggle-group {
    display: flex;
    background-color: var(--sidebar-user-bg);
    border: 1px solid var(--sidebar-user-border);
    border-radius: 20px;
    padding: 4px;
}

.toggle-pill-btn {
    border: none;
    background: none;
    padding: 8px 20px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-heading);
}

.toggle-pill-btn.active {
    background-color: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-add-team {
    padding: 12px 20px;
    font-size: 13px;
    border-radius: 12px;
    font-family: var(--font-heading);
}

/* Team Card Design */
.team-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 14px 40px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(77, 97, 252, 0.25);
}

.team-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.team-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

/* Team colors classes */
.team-icon-box.team-amarela {
    background-color: #f59e0b;
}

.team-icon-box.team-azul {
    background-color: #3b82f6;
}

.team-icon-box.team-branca {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

body.light-theme .team-icon-box.team-branca {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.team-icon-box.team-preta {
    background-color: #111827;
}

.team-icon-box.team-rosa {
    background-color: #ec4899;
}

.team-icon-box.team-verde {
    background-color: #10b981;
}

.team-icon-box.team-vermelha {
    background-color: #ef4444;
}

.team-icon-box.team-roxa {
    background-color: #8b5cf6;
}

.team-icon-box.team-laranja {
    background-color: #f97316;
}

.team-icon-box.team-cyan {
    background-color: #06b6d4;
}

.team-details {
    display: flex;
    flex-direction: column;
}

.team-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.team-students {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.team-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.team-actions button {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 12px;
}

.team-actions .btn-secondary {
    background-color: var(--btn-secondary-bg, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--btn-secondary-border, rgba(255, 255, 255, 0.08));
    color: var(--btn-secondary-text, #ffffff);
}

.team-actions .btn-secondary:hover {
    background-color: var(--btn-secondary-hover-bg, rgba(255, 255, 255, 0.06));
}

@media (max-width: 900px) {
    .integrada-header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .integrada-stats-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }
    
    .stat-divider {
        width: 100%;
        height: 1px;
    }
}

/* Modal Backdrop & Locked Popup Card */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

/* Team Modal Styling */
.modal-card-team {
    max-width: 480px !important;
    padding: 28px !important;
    text-align: left !important;
    align-items: stretch !important;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
}

.modal-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-input {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: #4d61fc;
    background-color: rgba(255, 255, 255, 0.04);
}

.modal-select {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    width: 100%;
    box-sizing: border-box;
}

.modal-select:focus {
    border-color: #4d61fc;
    background-color: rgba(255, 255, 255, 0.04);
}

.modal-select option {
    background-color: #1e293b;
    color: #ffffff;
}

/* Color Chips Container */
.color-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.color-chip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    border: 3px solid transparent;
}

.color-chip:hover {
    transform: scale(1.15);
}

.color-chip.active {
    border-color: #ffffff !important;
    transform: scale(1.1);
}

/* Modal Switch Row */
.modal-switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px dashed var(--card-border);
    border-bottom: 1px dashed var(--card-border);
    margin-bottom: 24px;
    width: 100%;
}

.switch-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.switch-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
}

.switch-subtext {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.switch-control {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    transition: .3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .switch-slider {
    background-color: #4d61fc;
    border-color: rgba(77, 97, 252, 0.3);
}

input:checked + .switch-slider:before {
    transform: translateX(22px);
}

.modal-btn-primary,
.modal-btn-secondary {
    font-family: var(--font-heading);
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-btn-primary {
    background-color: #4d61fc;
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(77, 97, 252, 0.2);
}

.modal-btn-primary:hover {
    background-color: #3b50e3;
    box-shadow: 0 4px 20px rgba(77, 97, 252, 0.35);
}

.modal-btn-secondary {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.modal-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Light theme overrides */
body.light-theme .modal-btn-secondary {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

body.light-theme .modal-btn-secondary:hover {
    background-color: #f9fafb;
}

/* Modal actions vertical stack */
.modal-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.modal-btn-delete {
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background-color: rgba(239, 68, 68, 0.03);
    border-radius: 12px;
    color: #ef4444;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.modal-btn-delete:hover {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Light theme overrides for modal */
body.light-theme .modal-card-team {
    background-color: #ffffff;
    border-color: rgba(0,0,0,0.08);
}
body.light-theme .modal-input,
body.light-theme .modal-select {
    background-color: rgba(0, 0, 0, 0.01);
    border-color: rgba(0,0,0,0.08);
    color: #1f2937;
}
body.light-theme .modal-input:focus,
body.light-theme .modal-select:focus {
    border-color: #4d61fc;
    background-color: rgba(0,0,0,0.03);
}
body.light-theme .modal-select option {
    background-color: #ffffff;
    color: #1f2937;
}
body.light-theme .switch-label {
    color: #1f2937;
}
body.light-theme .switch-slider {
    background-color: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .color-chip.active {
    border-color: #1f2937 !important;
}

/* Modal contact delete button */
.modal-btn-delete-contact {
    background-color: #ff6b7d;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-btn-delete-contact:hover {
    background-color: #ff5266;
}

/* Light theme overrides for contact delete button */
body.light-theme .modal-btn-delete-contact {
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fca5a5;
}

body.light-theme .modal-btn-delete-contact:hover {
    background-color: #fca5a5;
}

/* Modal actions horizontal row */
.modal-actions-horizontal {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
}

/* Field error message styling */
.field-error-msg {
    color: #ff6b7d;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.field-error-msg.hidden {
    display: none !important;
}

/* Global mobile content padding */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 20px 16px !important;
    }
}
