/* ==============================================================================
   PUENTE COMUNAL - ESTILOS OFICIALES DE ACCESO Y PORTAL
   Identidad: Azul Puente (#0284c7), Verde Comunidad (#16a34a), Sol Cálido (#f59e0b)
   Tipografía: Outfit & Inter
   ============================================================================== */

/* Global Reset & Base Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #021a11 0%, #053323 50%, #0c422f 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Subtle Animated Ambient Glow */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(46, 204, 113, 0.10) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* Layout Container */
.container {
    width: 100%;
    max-width: 1260px;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Left Column: Brand Section */
.brand-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-circle {
    width: 62px;
    height: 62px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.3);
    overflow: hidden;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-white {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

.app-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.hero-content {
    margin-top: 5px;
}

.hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.text-highlight {
    color: #2ecc71;
    background: linear-gradient(120deg, #2ecc71, #27ae60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 16px;
    line-height: 1.65;
    color: #a3c4b9;
    font-weight: 400;
    max-width: 600px;
}

/* Citizen Portal Quick Access Banner */
.citizen-quick-banner {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, border-color 0.2s;
}

.citizen-quick-banner:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
}

.citizen-quick-text {
    font-size: 14px;
    color: #f1f5f9;
}

.citizen-quick-text strong {
    color: #ffffff;
    display: block;
    margin-bottom: 2px;
}

.btn-citizen-action {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-citizen-action:hover {
    background: #0369a1;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 5px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.feature-icon-container {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.feature-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.35;
}

/* Right Column: Auth Section */
.auth-section {
    display: flex;
    justify-content: flex-end;
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    color: #1e293b;
    width: 100%;
    max-width: 430px;
    border-radius: 22px;
    padding: 36px 30px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card-logo-container {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.card-logo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.3px;
}

.card-subtitle {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Alert Banner */
.alert-banner {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 15px;
}

.alert-text {
    font-size: 13px;
    color: #b91c1c;
    font-weight: 500;
    line-height: 1.4;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.form-input {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-submit {
    background: linear-gradient(135deg, var(--color-primary, #15803d) 0%, var(--color-primary-hover, #16a34a) 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.3);
    margin-top: 4px;
    font-family: inherit;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(21, 128, 61, 0.4);
}

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

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider:not(:empty)::before {
    margin-right: 12px;
}

.divider:not(:empty)::after {
    margin-left: 12px;
}

/* Botón Oficial ClaveÚnica (Gobierno Digital de Chile) */
.btn-clave-unica {
    background-color: #0F69B4;
    color: #ffffff;
    border: 1px solid #0F69B4;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(15, 105, 180, 0.25);
    font-family: inherit;
}

.btn-clave-unica:hover {
    background-color: #0b4d84;
    border-color: #0b4d84;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 105, 180, 0.35);
}

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

.btn-clave-unica svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Footer Info */
.portal-footer-tag {
    text-align: center;
    font-size: 11.5px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}

/* Responsive Queries */
@media (max-width: 980px) {
    .container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 30px 20px;
    }
    
    .brand-section {
        align-items: center;
        text-align: center;
    }
    
    .logo-container {
        justify-content: center;
    }

    .hero-description {
        margin: 0 auto;
    }
    
    .features-grid {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .citizen-quick-banner {
        flex-direction: column;
        text-align: center;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .auth-section {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .hero-title {
        font-size: 32px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 26px 20px;
    }
}
