/* =====================================================
   TriPing — Página de login/registro
   ===================================================== */

:root {
    --c-dark:     #023C40;
    --c-dark-h:   #035358;
    --c-mint:     #78FFD6;
    --c-cyan:     #0AD3FF;
    --c-rose:     #C3979F;
    --c-rose-h:   #b08089;
    --c-bg:       #E1FAF9;

    --c-text:     #1a2530;
    --c-muted:    #6b7280;
    --c-border:   #d1dae6;
    --c-surface:  #f8fafc;

    --c-error:    #dc2626;
    --c-success:  #16a34a;
    --c-warning:  #d97706;
    --c-info:     #0284c7;

    --rad-s:  8px;
    --rad-m:  14px;
    --rad-l:  22px;
    --shadow: 0 12px 40px rgba(2, 60, 64, 0.22);
    --t:      0.2s ease;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: url('/img/inicio.jpg') no-repeat center center / cover fixed;
    min-height: 100vh;
    color: var(--c-text);
    line-height: 1.5;
}

/* ── Overlay ────────────────────────────────────────── */
.overlay {
    min-height: 100vh;
    background: rgba(2, 60, 64, 0.70);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    gap: 28px;
}

/* ── Cabecera ───────────────────────────────────────── */
.site-header { text-align: center; color: #fff; }

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 2rem;
    margin-bottom: 6px;
}

.logo-text {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--c-mint);
}

.tagline {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

/* ── Grid principal ─────────────────────────────────── */
.main-grid {
    display: flex;
    gap: 22px;
    width: 100%;
    max-width: 860px;
    align-items: stretch;
}

/* ── Tarjetas ───────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: var(--rad-l);
    box-shadow: var(--shadow);
    flex: 1;
}

.card-auth  { padding: 30px 28px; display: flex; flex-direction: column; }
.card-guest {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(155deg, #fff 60%, #f0fffe);
}

/* ── Alertas ────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 14px;
    border-radius: var(--rad-s);
    border-left: 4px solid;
    margin-bottom: 18px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}
.alert-error   { background: #fef2f2; border-color: var(--c-error);   color: #991b1b; }
.alert-success { background: #f0fdf4; border-color: var(--c-success); color: #166534; }
.alert-info    { background: #eff6ff; border-color: var(--c-info);    color: #1e40af; }
.alert a { color: inherit; font-weight: 700; }

/* ── Pestañas ───────────────────────────────────────── */
.tabs {
    display: flex;
    background: var(--c-surface);
    border-radius: var(--rad-s);
    padding: 4px;
    gap: 4px;
    margin-bottom: 22px;
}

.tab-btn {
    flex: 1;
    padding: 9px 14px;
    background: none;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-muted);
    cursor: pointer;
    transition: background var(--t), color var(--t), box-shadow var(--t);
}
.tab-btn:hover  { background: rgba(2, 60, 64, 0.07); color: var(--c-dark); }
.tab-btn.active {
    background: #fff;
    color: var(--c-dark);
    box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

/* ── Campos de formulario ───────────────────────────── */
.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 5px;
    letter-spacing: 0.2px;
}

.field input {
    width: 100%;
    padding: 10px 13px;
    border: 2px solid var(--c-border);
    border-radius: var(--rad-s);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--c-text);
    background: var(--c-surface);
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
    outline: none;
}
.field input:focus {
    border-color: var(--c-cyan);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 211, 255, 0.18);
}
.field input::placeholder { color: #9ca3af; }

/* ── Input con botón ojo ────────────────────────────── */
.input-row {
    position: relative;
    display: flex;
    align-items: center;
}
.input-row input { padding-right: 42px; }

.eye-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--c-muted);
    border-radius: 4px;
    display: flex;
    transition: color var(--t);
}
.eye-btn:hover, .eye-btn.active { color: var(--c-dark); }
.eye-btn svg { width: 18px; height: 18px; display: block; }

/* ── Fortaleza de contraseña ────────────────────────── */
.strength-wrap { margin-top: 7px; }

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}
.strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width 0.35s ease, background-color 0.35s ease;
}
.strength-lbl {
    font-size: 0.73rem;
    font-weight: 600;
}

/* Anchos y colores por nivel */
.w-20  { width: 20%; }
.w-40  { width: 40%; }
.w-60  { width: 60%; }
.w-80  { width: 80%; }
.w-100 { width: 100%; }

.s-danger  { background-color: var(--c-error);   color: var(--c-error);   }
.s-warning { background-color: var(--c-warning);  color: var(--c-warning); }
.s-info    { background-color: var(--c-info);     color: var(--c-info);    }
.s-success { background-color: var(--c-success);  color: var(--c-success); }

/* ── Indicador de coincidencia ──────────────────────── */
.match-lbl {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    min-height: 1.1em;
}

/* ── Botones principales ────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 18px;
    border: none;
    border-radius: var(--rad-s);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background var(--t), transform var(--t), box-shadow var(--t);
}
.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--c-dark);
    color: #fff;
    margin-bottom: 18px;
}
.btn-primary:hover {
    background: var(--c-dark-h);
    box-shadow: 0 4px 14px rgba(2, 60, 64, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--c-rose);
    color: #fff;
}
.btn-secondary:hover {
    background: var(--c-rose-h);
    box-shadow: 0 4px 14px rgba(195, 151, 159, 0.4);
    transform: translateY(-1px);
}

.btn-guest {
    background: linear-gradient(135deg, var(--c-cyan), #06b6d4);
    color: #fff;
    margin-top: auto;
    box-shadow: 0 4px 14px rgba(10, 211, 255, 0.30);
}
.btn-guest:hover {
    box-shadow: 0 6px 18px rgba(10, 211, 255, 0.45);
    transform: translateY(-2px);
}

/* ── Divisor social ─────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--c-muted);
    font-size: 0.78rem;
    font-weight: 500;
}
.divider::before,
.divider::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }

/* ── Botones sociales ───────────────────────────────── */
.social-btns { display: flex; gap: 10px; }

.btn-google {
    background: #fff;
    color: #333;
    border: 1.5px solid var(--c-border);
    width: auto;
    flex: 1;
    font-size: 0.85rem;
}
.btn-google:hover {
    background: var(--c-surface);
    border-color: #bdc5cf;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.09);
}

.btn-github {
    background: #24292e;
    color: #fff;
    flex: 1;
    font-size: 0.85rem;
}
.btn-github:hover {
    background: #1a1f23;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(36,41,46,0.35);
}

/* ── Bloque invitado ────────────────────────────────── */
.guest-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 14px;
}

.card-guest h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-dark);
    margin-bottom: 8px;
}
.card-guest p {
    font-size: 0.86rem;
    color: var(--c-muted);
    margin-bottom: 18px;
    line-height: 1.55;
}

.feature-list {
    list-style: none;
    text-align: left;
    margin: 0 0 22px;
    padding: 0;
    align-self: stretch;
}
.feature-list li {
    font-size: 0.84rem;
    color: var(--c-dark);
    font-weight: 500;
    padding: 3px 0;
}

/* ── Pie de página ──────────────────────────────────── */
.site-footer { text-align: center; }

.lang-picker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.lang-picker a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color var(--t);
}
.lang-picker a:hover { color: var(--c-mint); }
.lang-picker span    { color: rgba(255,255,255,0.30); }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 680px) {
    .main-grid {
        flex-direction: column;
        max-width: 440px;
    }
    .overlay {
        justify-content: flex-start;
        padding-top: 28px;
    }
    .social-btns { flex-direction: column; }
}

@media (max-width: 400px) {
    .card-auth, .card-guest { padding: 24px 18px; }
    .logo-text { font-size: 1.75rem; }
}
