:root {
    --auth-ink: #1c1410;
    --auth-ink-soft: #4a3f38;
    --auth-cream: #f7f2ea;
    --auth-gold: #c9a227;
    --auth-gold-light: #e8c96a;
    --auth-burgundy: #6b2c2c;
    --auth-burgundy-deep: #3d1818;
    --auth-emerald: #1f6b4a;
    --auth-border: rgba(28, 20, 16, 0.12);
    --auth-shadow: 0 24px 60px rgba(28, 20, 16, 0.14);
    --auth-radius: 14px;
    --auth-font: "DM Sans", system-ui, sans-serif;
    --auth-display: "Playfair Display", Georgia, serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-body {
    font-family: var(--auth-font);
    color: var(--auth-ink);
    background: var(--auth-cream);
    -webkit-font-smoothing: antialiased;
}

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

.auth-brand {
    position: relative;
    overflow: hidden;
    padding: 3rem clamp(2rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(61, 24, 24, 0.92), rgba(28, 20, 16, 0.88)),
        repeating-linear-gradient(
            90deg,
            #6b2c2c 0 28px,
            #c9a227 28px 56px,
            #1f6b4a 56px 84px,
            #1c1410 84px 112px
        );
}

.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(201, 162, 39, 0.25), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(31, 107, 74, 0.2), transparent 40%);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: block;
    text-decoration: none;
    color: inherit;
}

.auth-brand-tagline {
    position: relative;
    z-index: 1;
    margin: 0 0 1.5rem;
    font-size: 0.82rem;
    opacity: 0.85;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-logo-mark {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--auth-gold), var(--auth-gold-light));
    color: var(--auth-ink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.auth-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.auth-logo-text strong {
    font-family: var(--auth-display);
    font-size: clamp(1rem, 2.8vw, 1.35rem);
    font-weight: 700;
    max-width: 16rem;
    line-height: 1.25;
}

.auth-logo-text span {
    font-size: 0.82rem;
    opacity: 0.85;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-hero {
    max-width: 28rem;
    margin-top: clamp(3rem, 12vh, 6rem);
}

.auth-hero h1 {
    font-family: var(--auth-display);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    font-weight: 700;
}

.auth-hero p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.82);
}

.auth-features {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-features i {
    font-size: 1.1rem;
    color: var(--auth-gold-light);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem clamp(1.25rem, 4vw, 3rem);
}

.auth-card {
    width: min(100%, 420px);
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: calc(var(--auth-radius) + 4px);
    box-shadow: var(--auth-shadow);
    padding: clamp(1.75rem, 4vw, 2.5rem);
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-header h2 {
    font-family: var(--auth-display);
    font-size: 1.85rem;
    margin: 0 0 0.35rem;
    color: var(--auth-ink);
}

.auth-card-header p {
    margin: 0;
    color: var(--auth-ink-soft);
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.auth-alert i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.auth-alert-success {
    background: rgba(31, 107, 74, 0.1);
    color: var(--auth-emerald);
    border: 1px solid rgba(31, 107, 74, 0.2);
}

.auth-alert-error {
    background: rgba(107, 44, 44, 0.08);
    color: var(--auth-burgundy);
    border: 1px solid rgba(107, 44, 44, 0.18);
}

.auth-alert-info {
    background: rgba(201, 162, 39, 0.12);
    color: #7a5e10;
    border: 1px solid rgba(201, 162, 39, 0.25);
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--auth-ink-soft);
    margin-bottom: 0.45rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i.mdi {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-ink-soft);
    font-size: 1.15rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.75rem;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}

.auth-input.is-invalid {
    border-color: var(--auth-burgundy);
    box-shadow: 0 0 0 3px rgba(107, 44, 44, 0.12);
}

.auth-field-error {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: var(--auth-burgundy);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 0.25rem 0 1.5rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--auth-ink-soft);
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-burgundy);
}

.auth-link {
    color: var(--auth-burgundy);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--auth-gold);
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.auth-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--auth-burgundy), var(--auth-burgundy-deep));
    box-shadow: 0 12px 28px rgba(61, 24, 24, 0.28);
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(61, 24, 24, 0.32);
}

.auth-btn-secondary {
    color: var(--auth-ink);
    background: var(--auth-cream);
    border: 1px solid var(--auth-border);
}

.auth-btn-secondary:hover {
    background: #efe8dc;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-ink-soft);
}

.auth-actions-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.auth-actions-split .auth-btn {
    flex: 1 1 auto;
    min-width: 140px;
}

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .auth-hero {
        margin-top: 1.5rem;
    }

    .auth-features {
        display: none;
    }
}
