/* NEXUS LAUNCHER - OPEN REMEDIT STYLE (v5.0) */
:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --primary: #3b82f6;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 100px;
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top center, #1e293b, #020617);
    color: var(--text-white);
    margin: 0;
    min-height: 100vh;
    overflow-y: auto; /* Permitir scroll general si todo falla */
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- LOGIN SCREEN --- */
/* --- LOGIN SCREEN (LANDING PREMIUM v8.0) --- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #020617;
    z-index: 1000;
    overflow-y: auto;
    display: block;
    font-family: 'Inter', sans-serif;
    color: white;
}

/* Dynamic Background */
.login-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.15), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.15), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05), transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1100;
}

.nav-logo img {
    height: 32px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* Login Widget */
.login-widget {
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s;
}

.login-widget:focus-within {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

.login-widget input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    font-size: 0.85rem;
    width: 120px;
    text-align: center;
}

.login-widget button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s;
}

.login-widget button:hover {
    transform: scale(1.1);
}

/* Hero */
.hero-section {
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 6px 16px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 25px;
    display: inline-block;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 20px;
    background: linear-gradient(to right, #ffffff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Features Grid */
.features-container {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.feature-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 25px;
    text-align: left;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure uniform height */
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.5;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.5);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.feat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin: 0 0 8px;
    color: white;
}

.feature-card p {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0;
}

/* News */
.news-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 30px;
}

.section-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

.news-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: #60a5fa;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.news-title {
    font-size: 1.3rem;
    color: white;
    margin: 0 0 10px;
}

/* Footer */
.landing-footer {
    padding: 80px 0 40px;
    background: #020617;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: radial-gradient(circle at top center, rgba(15, 23, 42, 1), #020617);
    color: #64748b;
    margin-top: auto;
}

.eye-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--primary);
    /* Green effectively if primary is green */
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eye-btn:hover {
    color: white;
}

/* Clock Variables Usage */
.analog-clock {
    width: 160px;
    height: 160px;
    border: 4px solid var(--clock-border, var(--primary));
    /* Default to primary if not set */
    border-radius: 50%;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.second-hand {
    width: 2px;
    height: 45%;
    background: var(--clock-second, #facc15);
    margin-left: -1px;
}

.center-dot {
    width: 10px;
    height: 10px;
    background: var(--clock-dot, #facc15);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* --- MAIN LAYOUT --- */
/* Force solid layer for Dashboard */
#app-view.center-layout {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    background: #0f172a !important;
    z-index: 10000 !important;
    /* Top layer */
    visibility: visible !important;
    opacity: 1 !important;
}

#app-view.hidden {
    display: none !important;
    pointer-events: none;
}

#landing-page.hidden {
    display: none !important;
    z-index: -9999 !important;
}

.ambient-light {
    display: none !important;
    /* Temporarily hide to ensure visibility */
}

.center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header-logo {
    height: 40px;
}

/* --- HEADER RIGHT --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#header-client-name {
    font-size: 1.2rem;
    /* Larger as requested */
    font-weight: bold;
    color: var(--primary);
    /* Corporate color */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



.header-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.header-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.header-btn:hover {
    color: white;
}

.header-btn svg {
    width: 20px;
}

/* --- RADIO CAPSULE --- */
.radio-capsule {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 15px;
    border-radius: 50px;
    border: 1px solid var(--border);
    gap: 15px;
}

.radio-play-btn {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

.radio-select {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.85rem;
    outline: none;
    width: 140px;
}

.radio-select option {
    background: #0f172a;
}

.volume-box button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    cursor: pointer;
}

/* --- DASHBOARD GRID --- */
.dashboard-wrapper {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    height: calc(100vh - 120px); /* Forzar limite de altura */
    min-height: 0; /* Importante para flexbox */
}

/* MODULES STREAM */
.modules-stream {
    overflow-y: auto;
    padding-right: 15px;
    height: 100%; /* Ensure it fills and scrolls */
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.2rem 1rem; /* More compact */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.app-icon img {
    width: 48px; /* Slightly smaller icon */
    height: 48px;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

/* High Contrast Text */
.app-card h3 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.app-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.app-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* --- SIDEBAR --- */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
    font-size: 0.85rem;
}

.cal-day {
    padding: 5px;
    border-radius: 4px;
    color: #cbd5e1;
}

.cal-day.today {
    background: var(--primary);
    color: white;
    font-weight: bold;
}

/* Clock */
.clock-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.analog-clock {
    width: 160px;
    height: 160px;
    border: 4px solid var(--primary);
    border-radius: 50%;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    background: white;
    transform-origin: bottom center;
    border-radius: 4px;
}

.hour-hand {
    width: 4px;
    height: 30%;
    background: white;
    margin-left: -2px;
}

.min-hand {
    width: 3px;
    height: 40%;
    background: #94a3b8;
    margin-left: -1.5px;
}

.second-hand {
    width: 2px;
    height: 45%;
    background: #facc15;
    margin-left: -1px;
}

.center-dot {
    width: 10px;
    height: 10px;
    background: #facc15;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.digital-time {
    font-family: monospace;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
}

/* Client Info */
.client-card h3 {
    margin: 0;
    color: white;
    font-size: 1.2rem;
}

.client-card a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

/* --- CALENDAR WIDGET NEW STYLES --- */
.mini-cal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cal-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: bold;
}

.cal-nav-btn:hover {
    color: white;
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    margin-bottom: 10px;
}

.cal-header-day {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 2px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.cal-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cal-day.today {
    background: var(--primary);
    color: white;
    font-weight: bold;
}

.cal-day.selected {
    border: 1px solid var(--primary);
}

.cal-day.has-event::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: #facc15;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
}

.cal-day {
    position: relative;
}

/* For the dot */

.mini-cal-footer {
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

/* --- RESPONSIVE DESIGN (v9.0) --- */

/* Tablets & Small Desktops (Laptops) */
@media (max-width: 1200px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 1.5rem;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Tablets (Portrait) */
@media (max-width: 1024px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr; /* Stack Sidebar */
        overflow-y: auto;
    }
    .dashboard-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .sidebar-widget {
        flex: 1;
        min-width: 300px;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    #app-view.center-layout {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
    }
    .center-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
    }
    .header-right {
        flex-direction: column;
        width: 100%;
    }
    .header-branding {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-right: 0;
        padding-bottom: 10px;
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }
    .radio-capsule {
        width: 100%;
        justify-content: center;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    .app-card {
        padding: 1.2rem;
    }
    .app-card h3 {
        font-size: 0.95rem;
    }
    .app-card p {
        display: none; /* Hide description on small mobile to save space */
    }
    .app-icon img {
        width: 48px;
        height: 48px;
    }
}

/* Extra Small (Phones) */
@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr 1fr; /* 2 columns grid */
    }
}

.cal-footer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--primary);
}

.events-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    max-height: 100px;
    overflow-y: auto;
}

.events-list li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.events-list li:hover {
    color: white;
}

/* --- TASK WIDGET --- */
.task-group h4 {
    margin: 8px 0 4px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.9rem;
}

.task-item input {
    accent-color: var(--primary);
}

.empty-list {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000 !important;
    /* Above Dashboard at 10000 */
}

.modal-box {
    background: #1e293b;
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-box h3 {
    margin-top: 0;
    color: var(--primary);
}

.modal-box input,
.modal-box select {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 10px;
    color: white;
    margin-bottom: 10px;
    border-radius: 6px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.btn-pri {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-sec {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-xs {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* --- USER MANAGER MODAL STYLES --- */
.modal-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.modal-section-title {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

/* --- NEW SETTINGS & USER MANAGER STYLES (v6.0) --- */

/* Generic Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.4rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: white;
}

/* Settings Modal */
.settings-panel {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.setting-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.setting-card:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.setting-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.setting-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.setting-info h4 {
    margin: 0 0 5px 0;
    color: white;
}

.setting-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* User Manager Redesign */
.user-manager-panel {
    width: 900px;
    /* Wider for 2 columns */
    max-width: 95%;
    display: flex;
    flex-direction: column;
}

.um-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    height: 500px;
    /* Fixed height for consistency */
}

/* UM Sidebar (List) */
.um-sidebar {
    border-right: 1px solid var(--border);
    padding-right: 15px;
    display: flex;
    flex-direction: column;
}

.um-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.user-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.user-list-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.user-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-list-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.user-avatar-initial {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.user-list-info div:first-child {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-list-info div:last-child {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* UM Content (Form) */
.um-content {
    overflow-y: auto;
    padding-right: 5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
}

/* Modules Section */
.modules-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.section-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: bold;
}

.modules-grid-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.module-checkbox-card {
    position: relative;
}

.module-checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.module-card-visual {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    height: 100%;
}

.module-card-visual i {
    margin-bottom: 5px;
    color: var(--text-muted);
}

.module-card-visual span {
    font-size: 0.8rem;
}

/* Checked State */
.module-checkbox-card input:checked+.module-card-visual {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
}

.module-checkbox-card input:checked+.module-card-visual i,
.module-checkbox-card input:checked+.module-card-visual span {
    color: white;
}

.um-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.hidden {
    display: none !important;
}