:root {
            /* Paleta de Colores - Lujo Clínico Minimalista */
            --bg-color: #FAFAFA;
            --text-main: #1A1D21;
            --text-muted: #8A8D93;
            --accent-blue: #0055FF;
            --accent-blue-light: rgba(0, 85, 255, 0.1);
            --success: #00D26A;
            --danger: #FF4D4D;
            --card-bg: rgba(255, 255, 255, 0.7);
            
            /* Acabados */
            --radius-lg: 24px;
            --radius-md: 16px;
            --radius-sm: 12px;
            --radius-pill: 99px;
            --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
            --shadow-btn: 0 8px 20px rgba(0, 85, 255, 0.25);
            --glass-blur: blur(20px);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Plus Jakarta Sans', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            overflow-x: hidden;
            /* Efecto de fondo degradado suave tipo app */
            background-image: 
                radial-gradient(circle at 15% 10%, rgba(0, 85, 255, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 85% 80%, rgba(0, 85, 255, 0.05) 0%, transparent 40%);
            background-attachment: fixed;
            transition: all 0.3s ease;
        }

        /* Contenedor Principal */
        .app-container {
            max-width: 480px;
            margin: 0 auto;
            min-height: 100vh;
            position: relative;
            padding-bottom: 140px; 
            background: transparent;
            box-shadow: 0 0 50px rgba(0,0,0,0.02);
            transition: max-width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .app-container.expanded-mode {
            max-width: 1200px;
        }

        /* --- Tipografía y Utilidades --- */
        h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
        h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 16px; }
        h3 { font-size: 16px; font-weight: 600; }
        p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }
        .text-blue { color: var(--accent-blue); }
        .text-green { color: var(--success); }
        .text-red { color: var(--danger); }
        .font-bold { font-weight: 700; }
        
        /* --- Componentes UI --- */
        .header {
            padding: 32px 24px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .user-greeting p {
            font-size: 13px;
            margin-bottom: 2px;
        }

        .avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: #ddd;
            object-fit: cover;
            border: 2px solid #fff;
            box-shadow: var(--shadow-soft);
        }

        .card {
            background: var(--card-bg);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border-radius: var(--radius-lg);
            padding: 24px;
            margin: 0 24px 20px;
            box-shadow: var(--shadow-soft);
            border: 1px solid rgba(255, 255, 255, 0.8);
        }

        /* Botones */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 24px;
            border-radius: var(--radius-pill);
            border: none;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            width: 100%;
        }

        .btn:hover { transform: translateY(-1px); }
        .btn-primary { background-color: var(--accent-blue); color: white; box-shadow: var(--shadow-btn); }
        .btn-primary:active { transform: scale(0.98); box-shadow: none; }
        .btn-danger { background-color: var(--danger); color: white; box-shadow: 0 8px 20px rgba(255, 77, 77, 0.25); }
        .btn-outline { background-color: transparent; color: var(--text-main); border: 1px solid #E5E7EB; }
        .btn-outline:hover { background-color: #F3F4F6; }

        /* --- Botones Especiales del Chatbot (Elegantes y Minimalistas) --- */
        .chat-action-btn {
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 700;
            border-radius: 99px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            margin-top: 6px;
            outline: none;
            font-family: inherit;
        }
        .chat-btn-primary {
            background-color: var(--accent-blue-light);
            color: var(--accent-blue);
            border: 1px solid rgba(0, 85, 255, 0.2);
        }
        .chat-btn-primary:hover {
            background-color: var(--accent-blue);
            color: white;
            border-color: var(--accent-blue);
        }
        .chat-btn-outline {
            background-color: transparent;
            color: var(--accent-blue);
            border: 1px solid var(--accent-blue);
        }
        .chat-btn-outline:hover {
            background-color: var(--accent-blue-light);
        }
        .chat-btn-danger {
            background-color: transparent;
            color: var(--danger);
            border: 1px solid var(--danger);
        }
        .chat-btn-danger:hover {
            background-color: rgba(255, 77, 77, 0.1);
        }

        /* --- Vistas (Páginas) --- */
        .page { display: none; animation: fadeIn 0.3s ease forwards; }
        .page.active { display: block; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* --- Animaciones Extras y Feedback --- */
        @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
        @keyframes flashHighlightCard {
            0% { border-color: var(--success); box-shadow: 0 0 20px rgba(0, 210, 106, 0.5); transform: scale(1.02); }
            100% { border-color: #F3F4F6; box-shadow: 0 12px 30px rgba(0,0,0,0.06); transform: scale(1); }
        }
        .flash-highlight-card { animation: flashHighlightCard 1.5s ease-out forwards; }

        /* --- HOME MEJORADO --- */
        .quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 24px 20px; }
        .stat-box { background: linear-gradient(135deg, #ffffff 0%, #f4f7fb 100%); border-radius: var(--radius-md); padding: 20px 12px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #FFFFFF; transition: transform 0.2s ease, box-shadow 0.2s ease; }
        .stat-box:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); }
        .stat-icon-wrapper { width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
        .stat-box span { display: block; font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;}
        .stat-box strong { font-size: 15px; color: var(--text-main); }

        .security-card { text-align: center; position: relative; overflow: hidden; }
        .security-card::before { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: radial-gradient(circle, rgba(255,77,77,0.1) 0%, transparent 70%); border-radius: 50%; }
        .pin-display { font-size: 36px; letter-spacing: 12px; font-family: 'Courier New', Courier, monospace; font-weight: 800; margin: 16px auto 24px; color: var(--text-main); background: #F3F4F6; padding: 16px 20px 16px 32px; border-radius: 16px; display: inline-block; box-shadow: inset 0 2px 6px rgba(0,0,0,0.08); border: 1px solid #E5E7EB; }

        .list-item { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: #fff; border-radius: var(--radius-md); margin-bottom: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); border: 1px solid #F3F4F6; transition: transform 0.2s ease; }
        .list-item.clickable { cursor: pointer; }
        .list-item.clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 85, 255, 0.08); border-color: var(--accent-blue-light); }
        .list-item-info { display: flex; align-items: center; gap: 12px; }
        .icon-box { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }

        .client-avatar { width: 44px; height: 44px; border-radius: 50%; background-color: var(--accent-blue-light); color: var(--accent-blue); display: flex; align-items: center; justify-content: center; font-weight: bold; }
        .tag { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--bg-color); }
        .ai-suggestion { border-left: 4px solid var(--accent-blue); background: linear-gradient(90deg, var(--accent-blue-light) 0%, rgba(255,255,255,0) 100%); }

        /* --- CONFIGURACIÓN E INVENTARIO DE ZONAS --- */
        .toggle-container { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
        .switch { position: relative; display: inline-block; width: 50px; height: 28px; }
        .switch input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
        .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .slider { background-color: var(--success); }
        input:checked + .slider:before { transform: translateX(22px); }

        .form-group { margin-bottom: 16px; }
        .form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
        .form-control { width: 100%; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid #E5E7EB; background: #fff; font-size: 15px; outline: none; transition: all 0.3s ease; }
        .form-control:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px var(--accent-blue-light); }

        .segmented-control { display: flex; background: #E5E7EB; border-radius: var(--radius-md); padding: 4px; margin-bottom: 20px; }
        .segment-btn { flex: 1; text-align: center; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm); transition: 0.3s; }
        .segment-btn.active { background: #fff; color: var(--text-main); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

        .zonas-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
        .zonas-carousel { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 16px 4px; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
        .zonas-carousel::-webkit-scrollbar { height: 6px; }
        .zonas-carousel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        .zona-card { flex: 0 0 160px; scroll-snap-align: start; background: #fff; border-radius: var(--radius-sm); border: 2px solid #E5E7EB; overflow: hidden; position: relative; transition: all 0.2s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
        .zona-card.activa { border-color: var(--success); box-shadow: 0 6px 15px rgba(0, 210, 106, 0.15); }
        .zona-badge { position: absolute; top: 8px; right: 8px; background: var(--success); color: white; font-size: 9px; font-weight: bold; padding: 4px 8px; border-radius: 6px; opacity: 0; transition: opacity 0.2s; z-index: 2; }
        .zona-card.activa .zona-badge { opacity: 1; }
        .zona-img { width: 100%; height: 80px; object-fit: cover; background: #F3F4F6; }
        .zona-info { padding: 12px; }
        .zona-nombre { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
        .zona-desc { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
        .zona-controls { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #F3F4F6; padding-top: 10px; }
        .zona-controls span { font-size: 11px; font-weight: 600; color: var(--text-main); }
        
        .mini-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
        .mini-switch input { opacity: 0; width: 0; height: 0; }
        .mini-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
        .mini-slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .mini-slider { background-color: var(--success); }
        input:checked + .mini-slider:before { transform: translateX(16px); }

        /* CSS Nuevo Selector Zonas y Favoritos (FIX DE CAPAS Y FONDO BLANCO SOLIDO) */
        .custom-zone-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; transition: 0.2s; color: var(--text-main); }
        .custom-zone-item:hover { background: #F3F4F6; }
        .custom-zone-item.selected { background: var(--accent-blue-light); color: var(--accent-blue); font-weight: 700; }
        .star-btn { color: #CCC; cursor: pointer; font-size: 20px; transition: 0.2s; padding: 4px; display: flex; align-items: center; justify-content: center;}
        .star-btn.fav { color: #FF9900; }
        .star-btn:hover { transform: scale(1.1); }
        .zone-group-title { font-size: 11px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; margin: 12px 0 4px 4px; letter-spacing: 0.5px;}

        /* --- Estilos de Agenda Diaria y Horarios --- */
        .horarios-list { display: none; }
        .horarios-list.active { display: block; animation: fadeIn 0.3s ease forwards; }

        .calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
        .calendar-nav-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #F3F4F6; cursor: pointer; border: none; transition: 0.2s ease; color: var(--text-main); }
        .calendar-nav-btn:hover { background: var(--accent-blue-light); color: var(--accent-blue); }
        
        .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; text-align: center; }
        .calendar-day-header { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
        
        .calendar-day { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; font-size: 14px; font-weight: 600; color: var(--text-main); background: #fff; border: 2px solid transparent; cursor: pointer; transition: all 0.2s ease; }
        .calendar-day:hover:not(.empty) { border-color: var(--accent-blue-light); box-shadow: 0 4px 10px rgba(0,0,0,0.05); transform: scale(1.05); }
        .calendar-day.empty { background: transparent; cursor: default; }
        .calendar-day.today { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(0, 85, 255, 0.05); }
        .calendar-day.blocked { background: #E5E7EB; color: var(--text-muted); border-color: #E5E7EB; text-decoration: line-through; opacity: 0.6; }
        
        .indicator-dot { position: absolute; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; }
        .bg-green { background-color: var(--success); box-shadow: 0 0 6px rgba(0, 210, 106, 0.4); }
        .bg-yellow { background-color: #FF9900; box-shadow: 0 0 6px rgba(255, 153, 0, 0.4); }
        .bg-red { background-color: var(--danger); box-shadow: 0 0 6px rgba(255, 77, 77, 0.4); }

        .timeline-container { position: relative; padding-left: 12px; margin-top: 16px; padding-bottom: 120px; max-height: 60vh; overflow-y: auto !important; padding-right: 8px; display: block; flex-grow: 1; height: auto; -webkit-overflow-scrolling: touch; }
        .timeline-container::-webkit-scrollbar { width: 6px; }
        .timeline-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        
        .premium-timeline-card { background: #fff; border-radius: 20px; padding: 20px; margin-bottom: 16px; box-shadow: 0 12px 30px rgba(0,0,0,0.06); display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; border: 1px solid #F3F4F6; animation: fadeIn 0.3s ease forwards; }
        .premium-timeline-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent-blue); }
        .premium-delete-btn { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 77, 77, 0.1); color: var(--danger); border: none; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.2s; z-index: 10; }
        .premium-delete-btn:active { transform: scale(0.9); background: rgba(255, 77, 77, 0.2); }
        .timeline-empty { border: 2px dashed #E5E7EB; background: #F9FAFB; padding: 20px; border-radius: 20px; text-align: center; color: var(--text-muted); font-size: 14px; font-weight: 600; margin-bottom: 16px; transition: 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
        .timeline-empty:hover { border-color: var(--accent-blue-light); color: var(--accent-blue); background: var(--accent-blue-light); }

        .time-stepper { display: flex; align-items: center; gap: 16px; background: #F9FAFB; padding: 16px; border-radius: 20px; justify-content: space-between; border: 1px solid #E5E7EB; }
        .stepper-col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
        .stepper-btn { width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 1px solid #E5E7EB; font-size: 20px; font-weight: bold; color: var(--accent-blue); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); cursor: pointer; transition: 0.1s;}
        .stepper-btn:active { transform: scale(0.9); }
        .stepper-val { font-size: 28px; font-weight: 800; width: 48px; text-align: center; color: var(--text-main); }
        .ampm-toggle { padding: 14px 20px; border-radius: 16px; font-weight: 800; background: var(--accent-blue-light); color: var(--accent-blue); border: none; font-size: 18px; cursor: pointer; transition: 0.2s; height: 100%; display: flex; align-items: center; justify-content: center; flex: 1;}

        /* --- Split View Landing Page --- */
        .split-container { display: flex; flex-direction: column; gap: 24px; padding: 0 24px; }
        .device-mockup { width: 100%; max-width: 360px; height: 720px; margin: 0 auto; border: 12px solid #1A1D21; border-radius: 36px; overflow: hidden; position: relative; background: #fff; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
        
        .upload-media-box { border: 2px dashed #E5E7EB; border-radius: 16px; padding: 24px; text-align: center; background: #F9FAFB; cursor: pointer; transition: all 0.2s ease; margin-bottom: 16px; display: flex; flex-direction: column; align-items: center;}
        .upload-media-box:hover { border-color: var(--accent-blue); background: var(--accent-blue-light); color: var(--accent-blue); }
        .media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
        .media-item { aspect-ratio: 1; border-radius: 12px; background-size: cover; background-position: center; position: relative; border: 1px solid #E5E7EB; }
        .delete-media-btn { position: absolute; top: -6px; right: -6px; background: var(--danger); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

        /* Template Carousel 3D Premium */
        .template-filter { display:flex; gap:8px; margin-bottom:16px; overflow-x:auto; padding-bottom: 8px; }
        .template-filter::-webkit-scrollbar { height: 0px; }
        .tag-filter { padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: pointer; background: #F3F4F6; color: var(--text-muted); transition: 0.3s; white-space: nowrap; }
        .tag-filter.active { background: var(--text-main); color: #fff; }

        .template-carousel { display: flex; gap: 20px; overflow-x: auto; padding: 10px 10px 24px 10px; scroll-snap-type: x mandatory; perspective: 1000px; }
        .template-carousel::-webkit-scrollbar { height: 6px; }
        .template-carousel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
        
        .template-card { flex: 0 0 160px; scroll-snap-align: start; border-radius: 20px; border: 2px solid transparent; overflow: hidden; cursor: pointer; text-align: center; background: #fff; padding-bottom: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.3s; }
        .template-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
        .template-card.active { border-color: var(--accent-blue); box-shadow: 0 15px 35px rgba(0, 85, 255, 0.2); transform: translateY(-4px); }
        .template-card img { width: 100%; height: 100px; object-fit: cover; border-bottom: 1px solid #E5E7EB; margin-bottom: 8px; }
        .template-card span { font-size: 13px; font-weight: 700; color: var(--text-main); display: block; }
        .template-card small { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }

        .review-item { background: #F9FAFB; padding: 16px; border-radius: 12px; border: 1px solid #E5E7EB; margin-bottom: 12px; position: relative; }

        @media (min-width: 850px) {
            .split-container { flex-direction: row; align-items: flex-start; }
            .editor-side { flex: 1; }
            .preview-side { flex: 1; display: flex; flex-direction: column; align-items: center; position: sticky; top: 24px; }
        }

        /* --- Navegación Inferior --- */
        .bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); display: flex; justify-content: space-around; padding: 16px 12px 24px; border-top: 1px solid rgba(0,0,0,0.05); z-index: 1000; transition: max-width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .bottom-nav.expanded-mode { max-width: 1200px; }
        
        .nav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); text-decoration: none; cursor: pointer; transition: color 0.2s ease; width: 60px; }
        .nav-item i { font-size: 24px; }
        .nav-item span { font-size: 10px; font-weight: 600; text-align: center; }
        .nav-item.active { color: var(--accent-blue); }
        .nav-item.active i { fill: var(--accent-blue); font-weight: fill; }
        
        .nav-item.special { background: var(--accent-blue); color: white !important; border-radius: 50%; width: 52px; height: 52px; transform: translateY(-20px); box-shadow: 0 8px 25px rgba(0, 85, 255, 0.4); border: 6px solid #FFFFFF; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0 4px; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); flex-shrink: 0; }
        .nav-item.special i { font-size: 24px !important; color: white !important; }
        .nav-item.special span { display: none; }
        .nav-item.special.active { transform: translateY(-24px) scale(1.05); box-shadow: 0 12px 30px rgba(0, 85, 255, 0.6); }
        .nav-item.special::after { content: ''; position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; background: white; border-radius: 50%; opacity: 0.3; }

        /* Modal Generico */
        .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 2000; display: none; align-items: flex-end; justify-content: center; }
        .modal-overlay.active { display: flex; }
        .modal-content { background: #fff; width: 100%; max-width: 480px; border-radius: 32px 32px 0 0; padding: 32px 24px; animation: slideUp 0.3s ease forwards; max-height: 90vh; overflow-y: auto; box-shadow: 0 -10px 40px rgba(0,0,0,0.08); }
        @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

        /* ==================== LOGIN SCREEN ==================== */
        #screen-login {
            position: fixed;
            inset: 0;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
            background-color: var(--bg-color);
            background-image:
                radial-gradient(circle at 20% 15%, rgba(0, 85, 255, 0.11) 0%, transparent 50%),
                radial-gradient(circle at 80% 85%, rgba(0, 85, 255, 0.07) 0%, transparent 50%);
            background-attachment: fixed;
            animation: fadeIn 0.4s ease forwards;
        }

        .login-card {
            width: 100%;
            max-width: 390px;
            background: var(--card-bg);
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border-radius: var(--radius-lg);
            padding: 52px 36px 44px;
            border: 1px solid rgba(255, 255, 255, 0.95);
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.07), 0 4px 20px rgba(0, 85, 255, 0.04);
            text-align: center;
        }

        .login-brand {
            width: 84px;
            height: 84px;
            background: var(--accent-blue-light);
            border-radius: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 28px;
            box-shadow: 0 8px 28px rgba(0, 85, 255, 0.15);
            border: 1px solid rgba(0, 85, 255, 0.12);
        }

        .login-title {
            font-size: 28px;
            font-weight: 800;
            letter-spacing: -0.5px;
            color: var(--text-main);
            margin-bottom: 8px;
        }

        .login-subtitle {
            color: var(--text-muted);
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 40px;
        }

        .login-form {
            display: flex;
            flex-direction: column;
            gap: 14px;
            text-align: left;
        }

        .login-field {
            position: relative;
            display: flex;
            align-items: center;
        }

        .login-field i {
            position: absolute;
            left: 16px;
            font-size: 18px;
            color: var(--text-muted);
            pointer-events: none;
            transition: color 0.2s ease;
        }

        .login-input {
            width: 100%;
            padding: 16px 16px 16px 48px;
            border-radius: var(--radius-sm);
            border: 1.5px solid #E5E7EB;
            background: rgba(255, 255, 255, 0.85);
            font-size: 15px;
            font-family: 'Plus Jakarta Sans', sans-serif;
            outline: none;
            transition: all 0.25s ease;
            color: var(--text-main);
        }

        .login-input::placeholder { color: var(--text-muted); }

        .login-input:focus {
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 3px var(--accent-blue-light);
            background: #fff;
        }

        .login-input:focus + i,
        .login-field:focus-within i { color: var(--accent-blue); }

        .login-error {
            background: rgba(255, 77, 77, 0.07);
            color: var(--danger);
            font-size: 13px;
            font-weight: 600;
            padding: 12px 16px;
            border-radius: var(--radius-sm);
            border: 1px solid rgba(255, 77, 77, 0.18);
        }

        .login-btn {
            margin-top: 6px;
            padding: 17px;
            font-size: 15px;
            font-weight: 700;
            letter-spacing: 0.2px;
        }

        .login-btn:disabled {
            opacity: 0.65;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }

        .login-footer {
            margin-top: 36px;
            font-size: 11px;
            color: var(--text-muted);
            letter-spacing: 0.5px;
            font-weight: 500;
        }

        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }