*{
    box-sizing:border-box;
    margin:0;
    padding:0;
    font-family:'Segoe UI', Arial, sans-serif;
}

:root{
    --cc-bg:#f3f4f6;
    --cc-panel:#ffffff;
    --cc-border:#d9dde6;
    --cc-text:#1f2937;
    --cc-soft:#6b7280;
    --cc-pink:#f7b5cd;
    --cc-pink-strong:#cf2e6c;
    --cc-shadow:0 20px 50px rgba(15,23,42,.12);

    --cc-alert-bg:#fff1f2;
    --cc-alert-border:#efc2c8;
    --cc-alert-text:#b42318;
}

html,
body{
    min-height:100%;
}

body{
    min-height:100vh;
    background:
        linear-gradient(180deg, rgba(247,181,205,.18), rgba(255,255,255,.92)),
        radial-gradient(circle at top, rgba(247,181,205,.20), rgba(17,24,39,.10) 72%);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

/* CONTENEDOR GENERAL */
.cc-auth-page{
    width:100%;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.cc-auth-stage{
    width:100%;
    max-width:420px;
    position:relative;
}

/* MENSAJE SUPERIOR */
.cc-auth-alert,
.alert-sesion,
.alert-danger,
.mensaje-sesion-cerrada{
    display:block;
    width:fit-content;
    max-width:min(92vw, 420px);
    margin:0 auto 14px auto;
    padding:10px 14px;
    border-radius:14px;
    border:1px solid var(--cc-alert-border);
    background:var(--cc-alert-bg);
    color:var(--cc-alert-text);
    text-align:center;
    font-size:14px;
    font-weight:700;
    line-height:1.35;
    box-shadow:0 8px 18px rgba(0,0,0,.05);
}

/* CARD */
.cc-auth-shell{
    width:100%;
    max-width:420px;
    background:var(--cc-panel);
    border-radius:28px;
    overflow:hidden;
    box-shadow:var(--cc-shadow);
    border:1px solid #f0d7e2;
    position:relative;
}

.cc-auth-close{
    position:absolute;
    top:14px;
    right:14px;
    width:40px;
    height:40px;
    border:none;
    background:transparent;
    color:#374151;
    font-size:26px;
    line-height:1;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    z-index:5;
}

.cc-auth-hero{
    min-height:330px;
    background:linear-gradient(180deg,#f8f8f9 0%,#f3f3f4 100%);
    border-bottom:1px solid #eceff3;
    position:relative;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    padding:46px 18px 12px;
    overflow:hidden;
}

.cc-auth-hero::before{
    content:'';
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 12% 22%, rgba(17,24,39,.05) 0 2.8%, transparent 3%),
        radial-gradient(circle at 86% 18%, rgba(17,24,39,.05) 0 2.8%, transparent 3%),
        radial-gradient(circle at 6% 34%, rgba(17,24,39,.05) 0 2.8%, transparent 3%),
        radial-gradient(circle at 94% 32%, rgba(17,24,39,.05) 0 2.8%, transparent 3%),
        linear-gradient(180deg, transparent 0 56%, rgba(0,0,0,.035) 56% 57%, transparent 57% 100%);
    pointer-events:none;
}

.cc-auth-mascot{
    width:min(225px, 74%);
    height:auto;
    object-fit:contain;
    position:relative;
    z-index:2;
    filter:drop-shadow(0 14px 24px rgba(0,0,0,.10));
}

.cc-auth-body{
    padding:22px 16px 20px;
    text-align:center;
}

.cc-auth-title{
    font-size:17px;
    line-height:1.4;
    font-weight:900;
    color:var(--cc-text);
    margin-bottom:18px;
}

.cc-auth-actions{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.cc-auth-btn{
    min-height:54px;
    border-radius:999px;
    border:1px solid var(--cc-border);
    background:#fff;
    color:var(--cc-text);
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:0 16px;
    font-weight:800;
    font-size:15px;
    box-shadow:0 2px 8px rgba(15,23,42,.04);
    transition:.22s ease;
}

.cc-auth-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 16px rgba(15,23,42,.08);
}

.cc-auth-btn.google:hover{ background:#fafafa; }
.cc-auth-btn.facebook:hover{ background:#f7fbff; }
.cc-auth-btn.email:hover{ background:#fff7fa; }

.cc-auth-icon{
    width:22px;
    height:22px;
    flex:0 0 22px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
    font-weight:900;
}

.cc-auth-icon.google{ color:#db4437; }
.cc-auth-icon.facebook{ color:#1877f2; }
.cc-auth-icon.email{ color:#374151; }

.cc-auth-terms{
    margin-top:18px;
    color:var(--cc-soft);
    font-size:11px;
    line-height:1.45;
}

.cc-auth-terms a{
    color:#6b7280;
    font-weight:700;
    text-decoration:underline;
}

@media (max-width: 520px){
    body{
        padding:0;
        background:#b9bac4;
        align-items:flex-start;
    }

    .cc-auth-page{
        padding:0;
        align-items:flex-start;
    }

    .cc-auth-stage{
        max-width:none;
        width:100%;
    }

    .cc-auth-alert,
    .alert-sesion,
    .alert-danger,
    .mensaje-sesion-cerrada{
        width:calc(100% - 28px);
        max-width:none;
        margin:14px auto 10px auto;
        font-size:13px;
        border-radius:12px;
    }

    .cc-auth-shell{
        max-width:none;
        min-height:calc(100vh - 60px);
        border-radius:26px 26px 0 0;
        border:none;
        box-shadow:none;
    }

    .cc-auth-hero{
        min-height:340px;
        padding-top:44px;
    }

    .cc-auth-body{
        padding:20px 14px 18px;
    }

    .cc-auth-title{
        font-size:16px;
    }

    .cc-auth-btn{
        min-height:52px;
        font-size:15px;
    }
}

.cc-auth-page{
    width:100%;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
}

.cc-auth-stage{
    width:100%;
    max-width:420px;
}

.cc-auth-alert{
    display:block;
    width:fit-content;
    max-width:min(92vw, 420px);
    margin:0 auto 14px auto;
    padding:10px 14px;
    border-radius:14px;
    border:1px solid #fecaca;
    background:#fef2f2;
    color:#991b1b;
    text-align:center;
    font-size:13px;
    font-weight:700;
    line-height:1.35;
    box-shadow:0 8px 18px rgba(0,0,0,.05);
    word-break:break-word;
}

.cc-auth-alert-debug{
    border:1px solid #fdba74;
    background:#fff7ed;
    color:#9a3412;
    font-size:12px;
}

@media (max-width: 520px){
    .cc-auth-page{
        padding:0;
        align-items:flex-start;
    }

    .cc-auth-stage{
        max-width:none;
        width:100%;
    }

    .cc-auth-alert{
        width:calc(100% - 28px);
        max-width:none;
        margin:14px auto 10px auto;
    }
}