:root {
    --ink: #101826;
    --ink-soft: #1b2635;
    --paper: #f7f6f2;
    --paper-line: #e2ded4;
    --text: #1c2430;
    --text-muted: #6b7280;
    --text-on-ink: #ece9e2;
    --text-on-ink-muted: #8f9aa6;
    --accent: #a8752f;
    --accent-dark: #8c611f;
    --danger: #b3352a;
    --danger-bg: #fbeceb;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Work Sans', 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
}

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
}

/* -------------------- Panel de marca -------------------- */

.auth-brand {
    position: relative;
    overflow: hidden;
    background: var(--paper);
    color: var(--text);
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand__logo {
    display: block;
    align-self: center;
    /* height: 168px; */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    opacity: 0;
    animation: fadeIn 0.6s ease both;
    animation-delay: 0.05s;
}

.auth-brand__mid {
    max-width: 440px;
}

.auth-brand__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0;
    animation: fadeIn 0.6s ease both;
    animation-delay: 0.15s;
}

.auth-brand__heading {
    font-family: var(--font-display);
    font-weight: 560;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.18;
    margin: 16px 0 16px;
    opacity: 0;
    animation: fadeIn 0.6s ease both;
    animation-delay: 0.22s;
}

.auth-brand__sub {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 360px;
    opacity: 0;
    animation: fadeIn 0.6s ease both;
    animation-delay: 0.3s;
}

.auth-brand__foot {
    position: relative;
    font-size: 12.5px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* -------------------- Panel de formulario -------------------- */

.auth-panel {
    background: linear-gradient(175deg, var(--ink-soft), var(--ink) 65%);
    color: var(--text-on-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 380px;
}

.auth-form__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0;
    animation: riseIn 0.5s ease both;
    animation-delay: 0.1s;
}

.auth-form__heading {
    font-family: var(--font-display);
    font-weight: 560;
    font-size: 32px;
    margin: 10px 0 8px;
    color: var(--text-on-ink);
    opacity: 0;
    animation: riseIn 0.5s ease both;
    animation-delay: 0.17s;
}

.auth-form__sub {
    color: var(--text-on-ink-muted);
    font-size: 14.5px;
    margin-bottom: 30px;
    opacity: 0;
    animation: riseIn 0.5s ease both;
    animation-delay: 0.24s;
}

.alert {
    padding: 12px 14px;
    border-left: 3px solid var(--danger);
    background: rgba(179, 53, 42, 0.16);
    color: #ff9a8c;
    font-size: 13.5px;
    border-radius: 4px;
    margin-bottom: 22px;
}

.field {
    margin-bottom: 22px;
    opacity: 0;
    animation: riseIn 0.5s ease both;
}

.field:nth-of-type(1) { animation-delay: 0.3s; }
.field:nth-of-type(2) { animation-delay: 0.36s; }

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-on-ink);
    margin-bottom: 8px;
}

.field input {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid rgba(236, 233, 226, 0.25);
    background: transparent;
    padding: 10px 2px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-on-ink);
    border-radius: 0;
    transition: border-color 0.2s;
}

.field input::placeholder {
    color: rgba(236, 233, 226, 0.35);
}

.field input:focus {
    outline: none;
    border-bottom-color: var(--accent);
}

.auth-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    background: var(--accent);
    color: var(--ink);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    opacity: 0;
    animation: riseIn 0.5s ease both;
    animation-delay: 0.42s;
}

.auth-btn:hover {
    background: var(--accent-dark);
}

.auth-btn:active {
    transform: translateY(1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 880px) {
    .auth {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .auth-brand {
        padding: 32px 28px;
        gap: 24px;
    }

    .auth-brand__logo {
        width: 100%;
    }

    .auth-brand__sub {
        display: none;
    }

    .auth-brand__heading {
        font-size: 24px;
        margin: 12px 0 4px;
    }

    .auth-brand__foot {
        display: none;
    }

    .auth-panel {
        padding: 32px 24px 48px;
    }
}
