:root {
    --md-teal: #40e0b8;
    --md-teal-dark: #1fbf9b;
    --md-bg: #f6f7f8;
    --md-surface: #ffffff;
    --md-text: #1f2937;
    --md-muted: #6b7280;
    --md-border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Arial,
        sans-serif;
    background: var(--md-bg);
    color: var(--md-text);
}

.auth-header {
    .auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
}
}

.auth-header img {
    height: 28px;
    width: auto;
}

.auth-header .back {
     margin-left: auto;
    padding-left: 12px;
    padding-right: 12px;
    gap: 8px;

    color: var(--md-muted);
    text-decoration: none;
    font-weight: 700;
    position: relative;

    transition: color 0.2s ease;
}

/* rayita animada */
.auth-header .back::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: currentColor;
    opacity: 0.55; /* “transparente” antes */
    transition:
        width 0.25s ease,
        opacity 0.2s ease;
}

/* flecha */
.auth-header .back .back-arrow {
    display: inline-block;
    transition: transform 0.18s ease;
    opacity: 0.7;
}

/* hover */
.auth-header .back:hover {
    color: var(--md-teal-dark); /* o #36c9a6 si prefieres */
}

.auth-header .back:hover::after {
    width: 100%;
    opacity: 1;
}

.auth-header .back:hover .back-arrow {
    transform: translateX(-4px); /* se mueve a la izquierda */
    opacity: 1;
}

/* Shell */
.auth-main {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-shell {
    width: min(1060px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.auth-left {
    background:
        radial-gradient(
            1200px 400px at 10% 10%,
            rgba(64, 224, 184, 0.18),
            rgba(64, 224, 184, 0)
        ),
        linear-gradient(180deg, rgba(64, 224, 184, 0.1), rgba(255, 255, 255, 0));
    border: 1px solid var(--md-border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.auth-left h1 {
    margin: 0 0 10px;
    font-size: 32px;
    letter-spacing: -0.02em;
}
.auth-left .subtitle {
    margin: 0 0 18px;
    color: var(--md-muted);
    font-weight: 500;
}
.benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.benefits .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--md-teal);
    box-shadow: 0 0 0 4px rgba(64, 224, 184, 0.18);
}

.auth-card {
    background: var(--md-surface);
    border: 1px solid var(--md-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.auth-card h2 {
    margin: 0 0 6px;
    font-size: 24px;
}
.muted {
    margin: 0 0 18px;
    color: var(--md-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-form label span {
    display: block;
    font-size: 13px;
    color: var(--md-muted);
    margin-bottom: 6px;
    font-weight: 700;
}
.auth-form input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid var(--md-border);
    outline: none;
    background: #fff;
    font-size: 15px;
}
.auth-form input:focus {
    border-color: var(--md-teal);
    box-shadow: 0 0 0 4px rgba(64, 224, 184, 0.18);
}
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}
.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-muted);
    font-weight: 600;
    font-size: 14px;
}
.check input {
    width: 16px;
    height: 16px;
}
.link {
    color: var(--md-teal-dark);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}
.link:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 800;
    background: var(--md-teal);
    color: #f0fdf9;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}
.btn:hover {
    background: var(--md-teal-dark);
    color: white;
}
.btn.secondary {
    background: transparent;
    border: 1px solid var(--md-border);
    color: #40e0b8;
}
.btn.secondary:hover {
    border-color: var(--md-teal-dark);
    color: #349b81;
    background: #f0fdfa;
}

.divider {
    position: relative;
    text-align: center;
    margin: 10px 0;
}
.divider:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--md-border);
}
.divider span {
    position: relative;
    background: var(--md-surface);
    padding: 0 10px;
    color: var(--md-muted);
    font-weight: 800;
}

.small {
    color: var(--md-muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 920px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-left {
        order: 2;
    }
}

/* BENEFICIOS PRO */
.benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;

    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.benefit-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    background: rgba(64, 224, 184, 0.18);
    color: var(--md-teal-dark);
    flex-shrink: 0;
}

.benefit-text strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--md-text);
    margin-bottom: 2px;
}

.benefit-text span {
    font-size: 13px;
    color: var(--md-muted);
    line-height: 1.4;
}

/* ===== Password (input + ojo) PRO ===== */

.password-wrapper {
    display: flex;
    align-items: center;

    border: 1px solid var(--md-border);
    border-radius: 10px;
    background: #fff;

    overflow: hidden; /* recorta bordes del botón */
}

/* input sin borde propio (el borde lo tiene el wrapper) */
.password-wrapper input {
    border: 0;
    outline: none;
    flex: 1;
    padding: 12px 12px;
    font-size: 15px;
    background: transparent;
}

/* focus igual que tus inputs */
.password-wrapper:focus-within {
    border-color: var(--md-teal);
    box-shadow: 0 0 0 4px rgba(64, 224, 184, 0.18);
}

/* botón ojo integrado */
.toggle-password {
    border: 0;
    background: transparent;
    cursor: pointer;

    height: 100%;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--md-muted);
}

.toggle-password:hover {
    color: var(--md-teal-dark);
    background: rgba(64, 224, 184, 0.08);
}

.toggle-password:active {
    transform: translateY(1px);
}

/* opcional: tamaño del icono */
.toggle-password .eye {
    font-size: 18px;
    line-height: 1;
}

.toggle-password {
    border: 0;
    background: transparent;
    cursor: pointer;

    height: 100%;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--md-muted);
}

.toggle-password .material-symbols-outlined {
    font-size: 20px;
    font-weight: 300;
}

.toggle-password:hover {
    color: var(--md-teal-dark);
    background: rgba(64, 224, 184, 0.08);
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 18px;
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(-16px);
    transition: all 0.28s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* 👉 cuando está activo (modo oscuro) */
.switch.active::after {
    left: unset;
    right: 0;
}

/* =========================
   DARK MODE - LOGIN
========================= */

body.dark-mode {
    background: #313b4d;
    color: #f6e7dc;
}

/* HEADER */
body.dark-mode .auth-header {
    background: #101010;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.dark-mode .auth-header .back,
body.dark-mode .auth-header .back-arrow {
    color: #8a96ac;
}

/* FONDO GENERAL */
body.dark-mode .auth-main {
    background: #303740;
}

/* CONTENEDOR CENTRAL */
body.dark-mode .auth-shell {
    background: transparent;
}

/* PANEL IZQUIERDO */
body.dark-mode .auth-left {
    background: linear-gradient(180deg, #315f67 0%, #34465d 100%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    color: #f6e7dc;
}

body.dark-mode .auth-left h1 {
    color: #f6e7dc;
}

body.dark-mode .auth-left .subtitle {
    color: #93a7ba;
}

/* TARJETAS DE BENEFICIOS */
body.dark-mode .benefit-item {
    background: #d0d6d9;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

body.dark-mode .benefit-icon {
    background: #d8f7f1;
    color: #43e4c6;
}

body.dark-mode .benefit-icon .material-symbols-outlined {
    color: #43e4c6;
}

body.dark-mode .benefit-text strong {
    color: #111827;
}

body.dark-mode .benefit-text span {
    color: #475569;
}

/* CARD LOGIN */
body.dark-mode .auth-card {
    background: #7e7878;
    color: #837d7d;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

body.dark-mode .auth-card h2 {
    color: #ffffff;
}

body.dark-mode .auth-card .muted,
body.dark-mode .auth-card label span,
body.dark-mode .auth-card .small {
    color: #e7e3e1;
}

/* INPUTS */
body.dark-mode .auth-card input {
    background: #cfd8e6;
    color: #111827;
    border: 1px solid transparent;
}

body.dark-mode .auth-card input::placeholder {
    color: #7b8797;
}

body.dark-mode .password-wrapper {
    background: transparent;
    border-color: #d2d2d2;
}

body.dark-mode .toggle-password {
    color: #dcc8bb;
}

/* CHECKBOX Y LINKS */
body.dark-mode .check span {
    color: #dcc8bb;
}

body.dark-mode .auth-card a {
    color: #18c7a6;
}

body.dark-mode .auth-card .link {
    color: #18c7a6;
    font-weight: 600;
}

/* BOTÓN ENTRAR */
body.dark-mode .btn {
    background: #43e4c6;
    color: #ffffff;
    border: none;
}

body.dark-mode .btn:hover {
    filter: brightness(1.05);
}

/* BOTÓN SECUNDARIO */
body.dark-mode .btn.secondary {
    background: transparent;
    border: 1px solid #d6d6d6;
    color: #43e4c6;
}

/* DIVIDER */
body.dark-mode .divider::before,
body.dark-mode .divider::after {
    background: #d8d8d8;
}

body.dark-mode .divider span {
    color: #252524;
    background: #eceaea;
}

/* SWITCH */
body.dark-mode .switch {
    background: #e4c44f;
}

body.dark-mode .switch span i {
    color: #8b6c00;
}

body.dark-mode .switch::after {
    background: #fffdf7;
}

header {
    position: relative;
    background: #f1f1f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;

    background: rgba(67, 228, 198, 0.9); /* color fuerte */

    box-shadow:
        0 0 8px rgba(67, 228, 198, 0.9),
        0 0 16px rgba(67, 228, 198, 0.6),
        0 0 24px rgba(67, 228, 198, 0.4);
}
.dark-mode header img {
    content: url('/src/components/modo_oscuro/assets/+divWHITE.svg'); /* Ruta de la imagen en modo oscuro */
}
/* Ajuste botón modo oscuro */
.switch {
    width: 60px;
    height: 30px;
}

.switch::after {
    width: 20px;
    height: 20px;
}

/* SWITCH COMPLETO */
.switch {
    background: #e4c44f;
    border: none;
    border-radius: 999px;
    width: 62px;
    height: 30px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    cursor: pointer;
    transition: 0.3s ease all;
    overflow: hidden;
}

.switch span {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    position: relative;
}

.switch span i {
    font-size: 14px;
    color: #a88600;
    line-height: 1;
}

.switch::after {
    content: '';
    width: 22px;
    height: 22px;
    background: #fff;
    position: absolute;
    top: 4px;
    left: 4px;
    border-radius: 50%;
    transition: 0.3s ease all;
    z-index: 1;
}

.switch.active::after {
    left: 36px;
}

.switch span:first-child i {
    font-size: 15px;
}

.switch span:last-child i {
    font-size: 13px;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.brand {
    flex-shrink: 0;
}

#switch {
    margin-left: 12px;
    margin-right: 0;
    flex-shrink: 0;
}

.forgot-password {
    color: #43e4c6; /* tu color principal */
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #2dd4bf;
    text-decoration: underline;
}

body.dark-mode .forgot-password {
    color: #8cf7e4;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

body.dark-mode .forgot-password:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body.dark-mode .btn.secondary,
body.dark-mode .btn-crear-cuenta {
    background: transparent;
    border: 2px solid #43e4c6;
    color: #43e4c6;
    font-weight: 700;
    box-shadow: 0 0 0 rgba(67, 228, 198, 0);
    transition: all 0.25s ease;
}

body.dark-mode .btn.secondary:hover,
body.dark-mode .btn-crear-cuenta:hover {
    background: rgba(67, 228, 198, 0.12);
    color: #ffffff;
    border-color: #7ff7e1;
    box-shadow: 0 0 12px rgba(67, 228, 198, 0.25);
}

/* ==========================
   MÓVIL LOGIN
========================== */
@media (max-width: 920px) {

    .auth-main {
        min-height: auto !important;
        padding: 12px !important;
        display: block !important;
    }

    .auth-shell {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .auth-card,
    .auth-left {
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
    }

    .auth-left {
        order: 2;
        padding: 18px;
    }

    .auth-card {
        order: 1;
    }

    .benefits {
        margin-bottom: 0 !important;
    }

    .auth-header {
        padding: 10px;
        flex-wrap: wrap;
    }

    .auth-header .back {
        margin-left: auto;
    }

    #switch {
        margin-left: auto !important;
        margin-right: 0 !important;
    }

    html,
    body {
        overflow-x: hidden !important;
    }
}


@media (min-width: 921px) {

    .auth-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .brand {
        flex-shrink: 0;
    }

    .auth-header .back {
        margin-left: auto;
        margin-right: 12px;
    }

    #switch {
        margin-left: 0;
        margin-right: 0;
    }
}

