/* ============================================
   LOGIN STYLES - SISTEMA DE EMERGENCIAS
   ============================================ */

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

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

:root {
    --primary: #FF4757;
    --primary-dark: #E8354A;
    --secondary: #5F27CD;
    --success: #1DD1A1;
    --bg-dark: #0F0F23;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0F0F23 0%, #1a1a3e 50%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary), var(--success));
    bottom: -10%;
    left: -10%;
    animation-delay: -10s;
}

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

/* ============================================
   LOGIN CONTAINER
   ============================================ */

.login-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 480px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow);
    animation: slideUp 0.6s ease-out;
}

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

/* ============================================
   HEADER
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    display: inline-block;
    color: var(--primary);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

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

.header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================
   ACCESS SELECTOR
   ============================================ */

.access-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.access-btn svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.access-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.access-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.3);
}

.access-btn.active svg {
    transform: scale(1.1);
}

/* ============================================
   FORM GROUPS
   ============================================ */

.form-group {
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.form-group.hidden {
    display: none;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-group label svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================
   LOGIN BUTTON
   ============================================ */

.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.3);
    margin-top: 32px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 71, 87, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login svg {
    transition: transform 0.3s ease;
}

.btn-login:hover svg {
    transform: translateX(4px);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.footer p:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .login-container {
        padding: 36px 24px;
        margin: 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .access-selector {
        gap: 8px;
        padding: 6px;
    }

    .access-btn {
        padding: 12px 8px;
        font-size: 12px;
    }

    .access-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .access-btn span {
        font-size: 11px;
    }
}

/* ============================================
   SWEETALERT2 CUSTOM
   ============================================ */

.swal2-popup {
    background: rgba(15, 15, 35, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary) !important;
    border-radius: 16px;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 32px !important;
}
