@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* ============================================
   NUXT-INSPIRED MODERN LOGIN
   Tech-Forward • Dynamic • Vibrant
   ============================================ */

:root {
    /* Nuxt Vibrant Palette */
    --bg-dark: #0a0e1a;
    --bg-darker: #050810;
    --emerald: #04d9db;
    --cyan: #00d8ff;
    --purple: #a855f7;
    --pink: #ec4899;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(0, 220, 130, 0.15);
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
    height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
    position: relative;
}

/* ============================================
   ANIMATED GRADIENT BACKGROUND
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -30%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 220, 130, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatOrb 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    left: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatOrb 25s ease-in-out infinite reverse;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 10;
}

/* ============================================
   PANEL FORMULARIO - Glassmorphism
   ============================================ */
.login-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: transparent;
    position: relative;
    width: 100%;
}

.login-wrapper {
    width: 100%;
    max-width: 480px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideInScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

/* Removed hover glow effect - static glass design */

@keyframes slideInScale {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   BRANDING - Modern Tech Badge
   ============================================ */
.brand-logo {
    margin-bottom: 2.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.2);
    border-radius: 100px;
    animation: fadeIn 0.6s ease 0.2s backwards;
}

.brand-logo::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    border-radius: 50%;
    box-shadow: 0 0 12px var(--emerald);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.brand-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================
   HEADER - Bold & Modern
   ============================================ */
.page-header {
    margin-bottom: 2.5rem;
    animation: fadeIn 0.6s ease 0.4s backwards;
}

.page-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 400;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   FORMULARIO - Glassmorphic Inputs
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.6s ease calc(0.6s + var(--delay, 0s)) backwards;
}

.form-group:nth-child(1) { --delay: 0s; }
.form-group:nth-child(2) { --delay: 0.1s; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--emerald);
    box-shadow:
        0 0 0 1px var(--emerald),
        0 0 20px rgba(0, 220, 130, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 0.6;
}

.form-control:focus ~ .input-icon {
    color: var(--emerald);
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(0, 220, 130, 0.6));
}

.input-wrapper.focused .input-icon {
    color: var(--emerald);
    opacity: 1;
}

/* ============================================
   BOTÓN - Gradient Power Button
   ============================================ */
.btn-submit {
    width: 100%;
    padding: 1.15rem 2rem;
    background: var(--emerald);
    color: var(--bg-dark);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease 0.8s backwards;
}



.btn-submit span,
.btn-submit i {
    position: relative;
    z-index: 1;
}

.btn-submit i {
    transition: transform 0.2s ease;
}

.btn-submit:active {
    transform: translateY(0) scale(0.98);
}

.btn-submit.processing {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-submit.processing span {
    opacity: 0.5;
}

/* ============================================
   MENSAJES - Modern Alerts
   ============================================ */
#mensaje_comprobacion {
    margin-top: 1.25rem;
    min-height: 24px;
}

.message-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: messageSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid;
}

.message-alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.message-alert span {
    flex: 1;
}

/* Loading state */
.message-loading {
    background: rgba(0, 220, 130, 0.15);
    border-color: rgba(0, 220, 130, 0.3);
    color: var(--emerald);
}

.message-loading i {
    animation: spin 1s linear infinite;
}

/* Success state */
.message-success {
    background: rgba(0, 220, 130, 0.2);
    border-color: var(--emerald);
    color: var(--emerald);
    box-shadow: 0 0 20px rgba(0, 220, 130, 0.2);
}

/* Error state */
.message-error {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.4);
    color: #fca5cd;
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.15);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* ============================================
   FOOTER - Minimalist
   ============================================ */
.copyright {
    margin-top: 3rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
    opacity: 0.5;
    letter-spacing: 0.02em;
    animation: fadeIn 0.6s ease 1s backwards;
}

.login-image-side {
    flex: 1.1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 4rem;
    overflow: hidden;
}

.image-overlay {
    position: relative;
    z-index: 2;
    max-width: 560px;
    animation: fadeInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.hero-text::before {
    content: 'SISTEMA MUNICIPAL DE GEOLOCALIZACIÓN';
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 0.5rem 1rem;
    background: rgba(0, 220, 130, 0.1);
    border: 1px solid rgba(0, 220, 130, 0.2);
    border-radius: 100px;
    color: var(--emerald);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    position: relative;
}

.hero-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
    margin-top: 1.5rem;
    border-radius: 100px;
    box-shadow: 0 0 20px var(--emerald);
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-weight: 400;
}

/* ============================================
   ELEMENTOS DECORATIVOS - Dynamic Particles
   ============================================ */
.animated-map-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

.map-markers {
    position: absolute;
    width: 100%;
    height: 100%;
}

.marker {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--emerald);
    border-radius: 50%;
    opacity: 0.3;
    box-shadow: 0 0 10px currentColor;
    animation: particleFloat 8s ease-in-out infinite;
}

.marker:nth-child(even) {
    background: var(--cyan);
}

.marker:nth-child(3n) {
    background: var(--purple);
}

.marker:nth-child(1) { animation-delay: 0s; animation-duration: 10s; }
.marker:nth-child(2) { animation-delay: 1.5s; animation-duration: 12s; }
.marker:nth-child(3) { animation-delay: 3s; animation-duration: 9s; }
.marker:nth-child(4) { animation-delay: 4.5s; animation-duration: 11s; }
.marker:nth-child(5) { animation-delay: 6s; animation-duration: 13s; }
.marker:nth-child(6) { animation-delay: 7.5s; animation-duration: 10s; }
.marker:nth-child(7) { animation-delay: 2s; animation-duration: 14s; }
.marker:nth-child(8) { animation-delay: 5s; animation-duration: 12s; }

@keyframes particleFloat {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
        opacity: 0.2;
    }
    25% {
        transform: translate(-50%, -50%) translateY(-30px) translateX(20px) scale(1.2);
        opacity: 0.4;
    }
    50% {
        transform: translate(-50%, -50%) translateY(-50px) translateX(-10px) scale(0.8);
        opacity: 0.3;
    }
    75% {
        transform: translate(-50%, -50%) translateY(-20px) translateX(-20px) scale(1.1);
        opacity: 0.35;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .login-image-side {
        display: none;
    }

    .login-form-side {
        padding: 3rem 2rem;
    }

    .login-wrapper {
        max-width: 540px;
    }

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

@media (max-width: 768px) {
    .login-wrapper {
        padding: 2.5rem;
        border-radius: 20px;
    }

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

    .brand-logo {
        margin-bottom: 2rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 480px) {
    .login-form-side {
        padding: 2rem 1.25rem;
    }

    .login-wrapper {
        padding: 2rem;
        border-radius: 16px;
    }

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

    .hero-title {
        font-size: 3rem;
    }

    .btn-submit {
        margin-top: 1.5rem;
        padding: 1rem 1.5rem;
    }

    .copyright {
        margin-top: 2.5rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.form-control:focus-visible,
.btn-submit:focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 4px;
}

/* ============================================
   UTILITIES
   ============================================ */
.input-wrapper.focused .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--emerald);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Selection */
::selection {
    background: rgba(0, 220, 130, 0.3);
    color: var(--text-primary);
}

/* Ripple effect removed - caused button scaling issues */

/* Enhanced glassmorphism on scroll */
@supports (backdrop-filter: blur(20px)) {
    .login-wrapper {
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
    }
}

/* Loading state animations */
.btn-submit.processing::after {
    content: '';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(10, 14, 26, 0.3);
    border-top-color: var(--bg-dark);
    border-radius: 50%;
    animation: spinButton 0.7s linear infinite;
}

@keyframes spinButton {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ============================================
   CLEAN STANDARD CURSORS
   ============================================ */
.btn-submit,
.form-control,
a {
    cursor: pointer;
}

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Removed brightness filter - cleaner hover states */

/* Stagger animations for form elements */
.form-group:nth-child(1) {
    animation-delay: 0.6s;
}

.form-group:nth-child(2) {
    animation-delay: 0.7s;
}
