/* ===========================
   Cantera Digital — Login CSS (PHP Puro)
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --verde-oscuro: #1a4731;
    --verde-medio: #2d7a4f;
    --verde-claro: #3cab6e;
    --gris-borde: #e5e7eb;
    --gris-texto: #6b7280;
    --blanco: #ffffff;
    --rojo: #dc2626;
    --radius: 12px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--blanco);
    min-height: 100vh;
}

/* Página de login */
.cd-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    position: relative;
}

/* Contenedor principal */
.cd-login-wrap {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.cd-login-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* Logo */
.cd-login-logo {
    text-align: center;
}

.cd-login-logo img {
    max-width: 200px;
    height: auto;
}

/* Card */
.cd-login-card {
    background: var(--blanco);
    border-radius: 24px;
    padding: 36px 32px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gris-borde);
}

.cd-login-card__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--verde-oscuro);
    margin-bottom: 8px;
    text-align: center;
}

.cd-login-card__sub {
    font-size: 14px;
    color: var(--gris-texto);
    text-align: center;
    margin-bottom: 28px;
}

/* Formulario */
.cd-login-form {
    width: 100%;
}

.cd-form-group {
    margin-bottom: 20px;
}

.cd-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--verde-oscuro);
    margin-bottom: 6px;
}

.cd-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gris-borde);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    transition: all 0.2s;
    background: var(--blanco);
}

.cd-form-group input:focus {
    outline: none;
    border-color: var(--verde-medio);
    box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.1);
}

/* Botón */
.cd-btn {
    display: inline-block;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cd-btn--primary {
    background: var(--verde-medio);
    color: white;
}

.cd-btn--primary:hover {
    background: var(--verde-oscuro);
    box-shadow: 0 2px 8px rgba(26, 71, 49, 0.25);
}

/* Alertas */
.cd-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}

.cd-alert--error {
    background: #fee2e2;
    color: var(--rojo);
    border: 1px solid #fecaca;
}

.cd-alert--success {
    background: var(--verde-suave);
    color: var(--verde-oscuro);
    border: 1px solid var(--verde-claro);
}

/* Campo de contraseña con ojito para mostrar/ocultar */
.cd-password-wrap {
    position: relative;
}

.cd-password-wrap input {
    padding-right: 44px !important;
}

.cd-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.cd-password-toggle:hover {
    opacity: 0.9;
}

.cd-password-toggle--activo {
    opacity: 1;
}

/* Link "olvidé mi contraseña" */
.cd-login-olvide {
    display: block;
    text-align: right;
    font-size: 13px;
    color: var(--gris-texto);
    text-decoration: none;
    margin: -10px 0 20px;
}

.cd-login-olvide:hover {
    color: var(--verde-medio);
    text-decoration: underline;
}

/* Footer */
.cd-login-footer {
    color: var(--gris-texto);
    font-size: 12px;
    text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
    .cd-login-card {
        padding: 28px 20px;
        border-radius: 20px;
    }
    
    .cd-login-card__title {
        font-size: 20px;
    }
}