/* =========================
   Variables globales
========================= */
:root {
    --color-primary: #2E7D32; /* Verde principal */
    --color-primary-dark: #1B5E20; /* Versión más oscura */
    --color-danger: #D32F2F;
    --color-bg: #f5f5f5;
    --color-text: #333;
    --radius: 12px;
    --spacing: 1rem;
}

/* =========================
   Reset básico
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* =========================
   Utilidades
========================= */
.hidden {
    display: none;
}

.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1rem;
    background: var(--color-bg);
    flex: 1;
}

.page--center {
    justify-content: center;
}

/* Bordes utilitarios */
.border-top {
    border-top: 1px solid #e5e5e5;
}

/* Footer */
/*footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
}*/

.footer {
    white-space: nowrap;
}

footer > div {
    font-size: 0.8rem;
    color: #777;
    text-align: center;
    padding: .5rem 0;
}

/* =========================
   Card genérica
========================= */
.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    max-width: 400px;
    width: 100%;
}

.card__title {
    font-size: 1.8rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.card__subtitle {
    font-size: 1rem;
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
}

/* =========================
   Formularios
========================= */
.form__group {
    margin-bottom: 1.2rem;
}

    .form__group label {
        display: block;
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
        color: #555;
    }

.form__input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    padding: 0.75rem;
    font-size: 1rem;
}

    .form__input:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 3px rgba(46, 125, 50, 0.3);
    }

/* Contenedor del input + icono (para contraseñas) */
.input-with-icon {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 0;
}

    .toggle-password svg {
        pointer-events: none;
    }

    .toggle-password:active svg {
        stroke: var(--color-primary);
    }

/* =========================
   Botones
========================= */
.button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

/* Botón primario (verde) */
.button--primary {
    background: var(--color-primary);
    color: white;
}

    .button--primary:hover {
        background: var(--color-primary-dark);
    }

/* Botón secundario (borde verde) */
.button--secondary {
    background: #fff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    border-radius: var(--radius);
    cursor: pointer;
}

    .button--secondary:hover {
        background: var(--color-primary);
        color: #fff;
    }

/* Estado deshabilitado */
.button:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    border: 1px solid #999;
}

#globalLoader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

html, body {
    height: 100%;
    margin: 0;
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    display: flex;
}