/* =========================================================
   UI BASE - CERRO AZUL
   Reutilizable para login, recuperar, portal y módulos internos
   ========================================================= */

:root{
    --ca-primary: #1d4ed8;
    --ca-primary-dark: #1e3a8a;
    --ca-secondary: #7c3aed;
    --ca-accent: #06b6d4;
    --ca-bg-dark: #0f172a;
    --ca-text: #0f172a;
    --ca-muted: #64748b;
    --ca-border: #dbe4ee;
    --ca-white: #ffffff;
    --ca-radius-xl: 1.25rem;
    --ca-radius-2xl: 1.75rem;
    --ca-shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.16);
    --ca-shadow-input: 0 10px 25px rgba(2, 6, 23, 0.08);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body.ca-body{
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 28%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.16), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #4338ca 100%);
    overflow-x: hidden;
}

.ca-bg-shape{
    position: fixed;
    border-radius: 9999px;
    filter: blur(70px);
    opacity: 0.28;
    pointer-events: none;
    z-index: 0;
}

.ca-bg-shape-1{
    width: 220px;
    height: 220px;
    background: #38bdf8;
    top: 4%;
    left: 4%;
}

.ca-bg-shape-2{
    width: 280px;
    height: 280px;
    background: #8b5cf6;
    right: 3%;
    bottom: 6%;
}

.ca-panel-left{
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 30%);
}

.ca-badge{
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.92);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.ca-feature-card{
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07);
    border-radius: 1.25rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
    min-height: 146px;
}

.ca-feature-icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    font-size: 0.82rem;
    font-weight: 800;
    color: #e0f2fe;
}

.ca-kicker{
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ca-primary);
}

.ca-input{
    width: 100%;
    border: 1px solid var(--ca-border);
    background: #fff;
    color: var(--ca-text);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.22s ease;
    box-shadow: var(--ca-shadow-input);
    min-height: 52px;
}

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

.ca-input:focus{
    border-color: rgba(29, 78, 216, 0.45);
    box-shadow:
        0 0 0 4px rgba(59, 130, 246, 0.12),
        0 16px 35px rgba(29, 78, 216, 0.10);
    transform: translateY(-1px);
}

.ca-btn-primary,
.ca-btn-light,
.ca-btn-ghost{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border-radius: 1rem;
    padding: 0.9rem 1.2rem;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.22s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.ca-btn-primary{
    border: none;
    color: #fff;
    background: linear-gradient(135deg, var(--ca-primary) 0%, var(--ca-secondary) 100%);
    box-shadow: var(--ca-shadow-soft);
}

.ca-btn-light{
    border: 1px solid rgba(255,255,255,0.25);
    color: #0f172a;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.ca-btn-ghost{
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
}

.ca-btn-primary:hover,
.ca-btn-light:hover,
.ca-btn-ghost:hover{
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.ca-spinner{
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: rgba(255,255,255,1);
    animation: ca-spin .7s linear infinite;
}

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

.ca-alert{
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    font-size: 0.94rem;
    font-weight: 600;
}

.ca-alert-danger{
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.ca-surface{
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.10);
    border-radius: 1.75rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.18);
}

.ca-menu-card{
    display: block;
    text-decoration: none;
    border-radius: 1.5rem;
    background: rgba(255,255,255,0.95);
    color: #0f172a;
    padding: 1.25rem;
    min-height: 210px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.ca-menu-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.18);
    border-color: rgba(59, 130, 246, 0.22);
}

.ca-menu-icon{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    font-size: 1.9rem;
    background: linear-gradient(135deg, rgba(29,78,216,.10), rgba(124,58,237,.12));
    margin-bottom: 1rem;
}

.ca-menu-title{
    margin: 0;
    font-size: 1.12rem;
    font-weight: 800;
    color: #0f172a;
}

.ca-menu-text{
    margin-top: 0.55rem;
    font-size: 0.93rem;
    line-height: 1.55;
    color: #64748b;
}

@media (max-width: 1023px){
    body.ca-body{
        background:
            radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 35%),
            linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #4338ca 100%);
    }

    .ca-bg-shape-1{
        width: 160px;
        height: 160px;
    }

    .ca-bg-shape-2{
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 640px){
    .ca-input,
    .ca-btn-primary,
    .ca-btn-light,
    .ca-btn-ghost{
        border-radius: 0.95rem;
    }

    .ca-menu-card{
        min-height: 180px;
    }
}
