/* VARIABLES CSS */
:root {
    --primary: #667eea;
    --primary-dark: #0a192f;
    --secondary: #34A7C1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8f9fa;
    --lighter: #ffffff;
    --dark: #1a365d;
    --border: #e8ecf1;
    --text: #1a365d;
    --text-light: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
}

/* ====== INPUTS - TODOS BLANCOS ====== */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8ecf1 !important;
    border-radius: 10px;
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    background: #ffffff !important;
    color: #1a365d !important;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="date"]::placeholder,
input[type="time"]::placeholder,
textarea::placeholder {
    color: #cbd5e1 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
    background: white;
}

/* DATE/TIME ICONS */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.2);
    cursor: pointer;
}

/* SECTIONS - SIEMPRE BLANCAS */
.section {
    background: #ffffff !important;
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #f0f0f0 !important;
}

.section h2 {
    color: #1a365d;
    font-size: 1.8em;
    margin-bottom: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* CARDS - SIEMPRE BLANCAS */
.card {
    background: #ffffff !important;
    border: 2px solid #e8ecf1 !important;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

.card h3 {
    color: #0a192f;
    font-size: 1.3em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.card label {
    color: var(--text-light);
    font-size: 0.9em;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* FORM ROW */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-light);
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group small {
    color: #94a3b8;
    font-size: 0.85em;
    margin-top: 6px;
}

/* Campo Lugar + Botón Validar */
.location-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.location-field input {
    flex: 1;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* TOP MENU */
.top-menu {
    background: linear-gradient(135deg, #0a192f 0%, #1a365d 100%);
    backdrop-filter: blur(20px);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    gap: 20px;
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2em;
}

.menu-logo img {
    height: 28px;
    filter: brightness(1.2);
}

/* HAMBURGER BUTTON */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-btn span {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, #0a192f 0%, #1a365d 100%);
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    min-width: 240px;
    z-index: 998;
    padding: 0;
    margin: 0;
}

.dropdown-menu.active {
    max-height: 600px;
    overflow-y: auto;
    padding: 4px 0;
}

.menu-item {
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 20px;
}

.menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 2px 0;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 100px auto 40px;
    padding: 0 20px;
}

/* FOOTER */
footer {
    background: linear-gradient(135deg, #0a192f 0%, #1a365d 100%);
    color: white;
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

footer p {
    opacity: 0.9;
    font-size: 0.95em;
    margin: 8px 0;
}

footer a {
    color: white;
    text-decoration: underline;
}

/* BUTTONS */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.btn-primary-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary-large:hover {
    background: linear-gradient(135deg, #764ba2 0%, #6b4ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #6b4ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

/* ALERT */
.alert {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert.success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert.error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #7f1d1d;
}

.alert.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.alert.info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e3a8a;
}

/* CHATGPT BUTTON */
.chatgpt-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 28px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.chatgpt-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

/* RESPONSIVE */
    @media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Campo lugar + botón en mobile */
    .location-field {
        flex-direction: column;
    }
    
    .location-field input,
    .location-field button {
        width: 100% !important;
    }
    
    .section {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .section h2 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        margin-top: 90px;
    }
    
    .top-menu {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .top-menu {
        padding: 10px 12px;
    }
    
    .menu-logo {
        font-size: 1em;
    }
    
    .menu-logo img {
        height: 24px;
    }
    
    .hamburger-btn span {
        width: 20px;
        height: 2.5px;
    }
    
    .section {
        padding: 16px;
    }
    
    .section h2 {
        font-size: 1.3em;
    }
    
    .btn {
        width: 100%;
    }
    
    .btn-container {
        flex-direction: column;
    }
    
    .chatgpt-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

}
/* BOTÓN LOGOUT */
.logout-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 1.3em;
    width: 44px;
    height: 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    border-color: rgba(239, 68, 68, 0.8);
    transform: scale(1.1);
}

.logout-btn:active {
    transform: scale(0.95);
}

.orbe-input {
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
    height: 32px !important;
    padding: 4px 2px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
    background: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.orbe-input:focus {
    outline: none;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2) !important;
}

.orbe-input::-webkit-inner-spin-button,
.orbe-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 28px;
}
/* ========== SECCIONES COLAPSABLES ========== */
.collapsible-section {
    margin-bottom: 10px;
    background: transparent;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    padding: 12px 15px;
    background: linear-gradient(135deg, #1a365d 0%, #2d4a7c 100%);
    border-radius: 10px;
    margin: 0;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    background: linear-gradient(135deg, #2d4a7c 0%, #3d5a8c 100%);
}

.collapsible-header span:first-child {
    flex: 1;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.collapsible-header.expanded .collapse-icon {
    transform: rotate(90deg);
}

.collapse-hint {
    font-size: 0.8em;
    font-weight: 600;
    color: #ffffff;
    margin-left: auto;
    margin-right: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.collapse-icon {
    color: #ffffff;
    font-size: 0.9em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.collapsible-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #ffffff;
    border-radius: 0 0 10px 10px;
    margin-top: -2px;
}

.collapsible-content.collapsed {
    display: none;
}

/* ========== CONFIGURACIÓN COMPACTA ========== */
.config-compact {
    background: linear-gradient(135deg, #0a192f 0%, #1a365d 100%);
    border-radius: 10px;
    margin: 15px 0;
    overflow: hidden;
}

.config-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.config-compact-header:hover {
    background: rgba(255,255,255,0.05);
}

.config-compact-summary {
    color: #ffffff;
    font-size: 0.9em;
    font-weight: 500;
}

.config-compact-toggle {
    color: rgba(255,255,255,0.7);
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.config-compact.expanded .config-compact-toggle {
    transform: rotate(180deg);
}

.config-compact-details {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.config-compact.expanded .config-compact-details {
    display: block;
}

.config-compact-details p {
    margin: 10px 0 0;
    font-size: 0.85em;
    color: rgba(255,255,255,0.9);
}

.config-compact-details p:first-child {
    margin-top: 12px;
}

.config-compact-details .config-timezone {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8em;
    opacity: 0.75;
}
/* CHECKBOX PLANETAS */
.planeta-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.planeta-checkbox:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.planeta-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.planeta-checkbox input[type="checkbox"]:checked + span,
.planeta-checkbox:has(input:checked) {
    font-weight: 600;
    color: #0a192f;
}

/* Touch targets para mobile */
@media (max-width: 768px) {
    .collapsible-header,
    .config-compact-header {
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
}
/* Forzar estilo botón Validar Ciudad */
#btnValidarCiudad,
#btnValidarCiudadUsuario,
#btnValidarCiudadPerfil {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}