/* demo.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --accent: #2b5aff;
    --accent-hover: #1e40af;
    --danger: #ef4444;
    --success: #10b981;
    --border: rgba(0,0,0,0.08);
    --border-light: rgba(0,0,0,0.04);
    
    --orb-1: rgba(43, 90, 255, 0.25);
    --orb-2: rgba(140, 43, 255, 0.25);
    --orb-3: rgba(43, 255, 198, 0.3);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --sidebar-width: 260px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Glassmorphism Background Decorations */
.bg-orbs {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0; pointer-events: none; filter: blur(120px);
}
.orb { position: absolute; border-radius: 50%; animation: float 20s infinite ease-in-out alternate; }
.orb-1 { width: 600px; height: 600px; background: var(--orb-1); top: -10%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: var(--orb-2); bottom: -10%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 400px; height: 400px; background: var(--orb-3); top: 40%; left: 50%; animation-delay: -10s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(50px, 50px) scale(1.1); } }

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    background: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}
.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(43, 90, 255, 0.2);
}

/* Inputs */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(43, 90, 255, 0.1);
    background: #fff;
}

/* Layouts */
.login-wrapper {
    display: grid;
    grid-template-columns: 4fr 6fr; /* Proporción 40/60 */
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.login-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centrado horizontal */
    padding: 40px 10%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-light);
}

.login-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 10%;
}

.brand-logo {
    max-width: 180px;
    margin-bottom: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 380px; /* Ancho ajustado para verse más centrado */
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.phrase-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
}

.phrase-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 500px;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 10;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(30px);
}

.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.7);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    flex-shrink: 0;
}

.sidebar-logo {
    max-width: 140px;
    margin: 0 auto 40px auto;
    display: block;
}

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

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-item a i {
    font-size: 1.25rem;
}

.nav-item a:hover {
    background: rgba(0,0,0,0.03);
    color: var(--text-primary);
}

.nav-item.active a {
    background: var(--text-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-bottom {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.nav-bottom a {
    color: var(--danger);
}
.nav-bottom a:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    font-size: 1.25rem;
}

.icon-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Botones Base */
.btn-primary, .btn-outline {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(43, 90, 255, 0.2);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(43, 90, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover {
    background: rgba(43, 90, 255, 0.05);
}
.header-action-wrapper {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}
.dropdown-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dropdown-list {
    max-height: 300px;
    overflow-y: auto;
}
.dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}
.dropdown-item:hover {
    background: var(--bg-light);
}
.dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(43, 90, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.dropdown-text {
    display: flex;
    flex-direction: column;
}
.dropdown-title {
    font-size: 0.9rem;
    font-weight: 500;
}
.dropdown-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
/* Search Box */
.search-dropdown {
    width: 300px;
    padding: 16px;
}

/* Input group for select + button */
.input-group {
    display: flex;
    gap: 8px;
}
.input-group .form-control {
    flex: 1;
}
.input-group .btn-icon {
    width: 44px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.2s;
}
.input-group .btn-icon:hover {
    background: var(--accent-hover);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(43, 90, 255, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

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

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.content-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    flex: 1;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.table th {
    font-weight: 500;
    color: var(--text-secondary);
}

.table td {
    color: var(--text-primary);
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

/* Page Sections (SPA) */
.page-section {
    display: none;
    animation: fadeIn 0.3s ease;
}
.page-section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tabs System */
.tabs-nav {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 0;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Grids & Forms for specific sections */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}
.filter-select {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
}
.filter-select:focus {
    border-color: var(--accent);
}

/* Comms Cards */
.comm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.comm-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    align-items: center;
    text-align: center;
}
.comm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border-color: var(--accent);
}
.comm-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(43, 90, 255, 0.1);
    color: var(--accent);
}

/* Charts container */
.chart-container {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

/* Radio groups & Checkboxes */
.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Image Cards for Porteria */
.img-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.img-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border-color: var(--accent);
}
.img-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-light);
}
.img-card-body {
    padding: 16px;
}
.img-card-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1.05rem;
}
.img-card-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* PQRS Timeline */
.pqrs-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 20px;
}
.pqrs-timeline {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--border-light);
    margin-top: 24px;
}
.timeline-item {
    position: relative;
    margin-bottom: 24px;
}
.timeline-item:last-child {
    margin-bottom: 0;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--border-light);
}
.timeline-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 600;
    margin-bottom: 4px;
}
.timeline-content {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

/* Icons inside inputs */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon i {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary);
    font-size: 1.2rem;
}
.input-with-icon .form-control {
    padding-left: 42px;
}

/* Shortcut Cards (General Section) */
.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.shortcut-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}
.shortcut-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border-color: var(--accent);
}
.shortcut-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
}

/* Color Variants for Shortcuts */
.sc-blue { background: rgba(43, 90, 255, 0.1); color: #2b5aff; }
.sc-green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.sc-purple { background: rgba(140, 43, 255, 0.1); color: #8c2bff; }
.sc-orange { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.sc-red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.sc-teal { background: rgba(20, 184, 166, 0.1); color: #14b8a6; }
.sc-pink { background: rgba(236, 72, 153, 0.1); color: #ec4899; }

/* Tools / Integrations Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.tool-card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    cursor: pointer;
    background: var(--bg-light);
}
.tool-card:hover {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.tool-info {
    display: flex;
    flex-direction: column;
}
.tool-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.tool-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* =========================================
   RESPONSIVE DESIGN (Media Queries)
========================================= */

@media (max-width: 1200px) {
    .form-grid, .stats-grid, .comm-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    #sec-reportes .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .login-wrapper {
        grid-template-columns: 1fr;
    }
    .login-right {
        display: none;
    }
    .dashboard-container {
        grid-template-columns: 80px 1fr;
    }
    .sidebar {
        position: fixed;
        left: -100%;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s;
        padding: 20px 10px;
    }
    .sidebar.active {
        left: 0;
    }
    .sidebar .logo-container img {
        width: 40px;
    }
    .nav-item a {
        justify-content: center;
        padding: 12px;
    }
    .nav-item a i {
        margin: 0;
        font-size: 1.5rem;
    }
    .nav-item a span, .nav-item a text {
        display: none;
    }
    /* El texto suelto dentro del 'a' que no está en un span */
    .nav-item a {
        font-size: 0; 
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    /* Transformar Sidebar en Bottom Navigation para Móviles */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--border-light);
        z-index: 1000;
        overflow: visible;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .sidebar .logo-container, .nav-bottom {
        display: none;
    }
    
    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        align-items: center;
        gap: 0;
        padding: 0;
    }
    
    .nav-item {
        margin: 0;
        flex: 1;
    }
    
    .nav-item a {
        padding: 10px;
        border-radius: 0;
        background: transparent !important;
        flex-direction: column;
        gap: 4px;
        color: var(--text-secondary);
    }
    
    .nav-item a.active {
        color: var(--accent);
    }
    
    .nav-item a i {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding-bottom: 80px; /* Espacio para el bottom nav */
    }

    .header-bar {
        padding: 15px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .form-grid, .stats-grid, .comm-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-bar .filter-select, .filter-bar .btn-primary, .filter-bar .btn-outline {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Modal y Loader */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1; pointer-events: auto;
}
.modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    width: 100%; max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: var(--text-secondary);
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 3000;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease;
}
.loader-overlay.active {
    opacity: 1; pointer-events: auto;
}
.loader-logo {
    width: 140px;
    margin-bottom: 40px;
    animation: pulse 2s infinite ease-in-out;
}
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loader-text {
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 1px;
}
@keyframes pulse { 
    0% { transform: scale(0.95); opacity: 0.8; } 
    50% { transform: scale(1.05); opacity: 1; } 
    100% { transform: scale(0.95); opacity: 0.8; } 
}
@keyframes spin { 
    to { transform: rotate(360deg); } 
}
