/* SMN Feeds POS — login
   Heritage mill: one image, one action, no admin chrome. */

:root {
    --smn-forest: #12201a;
    --smn-forest-deep: #0c1512;
    --smn-leaf: #1f5c45;
    --smn-terracotta: #b03838;
    --smn-gold: #c9a24a;
    --smn-cream: #f4ede0;
    --smn-paper: #fffdf8;
    --smn-ink: #141210;
    --smn-muted: #d9d0c2;
    --smn-line: rgba(244, 237, 224, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-element: 24px;
    --space-group: 48px;
    --font-display: "Fraunces", "Palatino Linotype", Palatino, serif;
    --font-body: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
}

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

html,
body.smn-login {
    margin: 0;
    min-height: 100%;
    background: var(--smn-forest-deep);
    color: var(--smn-cream);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.smn-login {
    min-height: 100dvh;
    color-scheme: dark;
}

.smn-login-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 34vh) 1fr;
}

.smn-login-hero {
    position: relative;
    overflow: hidden;
    background: #3a2a18;
    isolation: isolate;
}

.smn-login-hero picture,
.smn-login-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 32% 45%;
}

.smn-login-hero__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, var(--smn-forest) 100%);
    pointer-events: none;
}

.smn-login-hero__copy {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 1;
    max-width: 28rem;
}

.smn-login-hero__copy h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.75rem);
    font-weight: 600;
    font-optical-sizing: auto;
    line-height: 1.12;
    color: var(--smn-cream);
    letter-spacing: -0.02em;
}

.smn-login-hero__copy p {
    margin: 10px 0 0;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: var(--smn-muted);
}

.smn-login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--smn-forest);
    padding: 32px 20px 28px;
}

.smn-login-panel__inner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.smn-login-brand {
    display: block;
    margin: 0 0 28px;
    width: 88px;
}

.smn-login-brand:focus-visible {
    outline: 2px solid var(--smn-gold);
    outline-offset: 4px;
}

.smn-login-brand img {
    display: block;
    width: 88px;
    height: auto;
}

.smn-login-heading {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--smn-cream);
    line-height: 1.2;
}

.smn-login-rule {
    width: 48px;
    height: 3px;
    margin: 0 0 32px;
    background: var(--smn-terracotta);
    border: 0;
}

.smn-field {
    margin: 0 0 20px;
}

.smn-field label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--smn-cream);
}

.smn-field__control {
    position: relative;
}

.smn-field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--smn-line);
    border-radius: var(--radius-md);
    background: var(--smn-forest-deep);
    color: var(--smn-cream);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.smn-field input#Password {
    padding-right: 44px;
}

.smn-field input:-webkit-autofill,
.smn-field input:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--smn-cream);
    caret-color: var(--smn-cream);
    box-shadow: 0 0 0 1000px var(--smn-forest-deep) inset;
    transition: background-color 9999s ease-out;
}

.smn-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--smn-cream);
    caret-color: var(--smn-cream);
    box-shadow: 0 0 0 1000px var(--smn-forest-deep) inset, 0 0 0 3px rgba(201, 162, 74, 0.28);
    transition: background-color 9999s ease-out;
}

.smn-field__toggle svg[hidden] {
    display: none;
}

.smn-field input::placeholder {
    color: #9a917f;
}

.smn-field input:hover {
    border-color: rgba(244, 237, 224, 0.32);
}

.smn-field input:focus {
    border-color: var(--smn-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.28);
}

.smn-field input[aria-invalid="true"] {
    border-color: var(--smn-terracotta);
}

.smn-field__toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--smn-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
}

.smn-field__toggle:hover,
.smn-field__toggle:focus-visible {
    color: var(--smn-cream);
}

.smn-field__toggle:focus-visible {
    outline: 2px solid var(--smn-gold);
    outline-offset: -4px;
}

.smn-field__toggle svg {
    width: 20px;
    height: 20px;
}

.smn-login-alert {
    min-height: 0;
    margin: 0 0 16px;
}

.smn-login-alert .alert {
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    line-height: 1.4;
}

.smn-login-alert .alert-danger {
    background: rgba(176, 56, 56, 0.22);
    color: #f3c7c3;
    border: 1px solid rgba(176, 56, 56, 0.45);
}

.smn-login-alert .alert-success {
    background: rgba(31, 92, 69, 0.4);
    color: #e3f0e8;
    border: 1px solid rgba(201, 162, 74, 0.35);
}

.smn-login-alert .close {
    display: none;
}

.smn-login-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--smn-cream);
    color: var(--smn-ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.smn-login-submit:hover {
    background: #fff;
}

.smn-login-submit:focus-visible {
    outline: 2px solid var(--smn-gold);
    outline-offset: 3px;
}

.smn-login-submit:disabled {
    background: rgba(244, 237, 224, 0.18);
    color: rgba(244, 237, 224, 0.72);
    cursor: not-allowed;
}

.smn-login-note {
    margin: 32px 0 0;
    font-size: 0.8125rem;
    color: var(--smn-muted);
}

@media (min-width: 768px) {
    .smn-login-panel {
        padding: 48px 40px;
    }

    .smn-login-hero__copy {
        left: 32px;
        bottom: 28px;
    }
}

@media (min-width: 960px) {
    .smn-login-shell {
        grid-template-columns: minmax(0, 1.28fr) minmax(400px, 0.72fr);
        grid-template-rows: 1fr;
    }

    .smn-login-hero {
        min-height: 100dvh;
    }

    .smn-login-hero img {
        object-position: 28% center;
    }

    .smn-login-hero__veil {
        background:
            linear-gradient(90deg, rgba(12, 21, 18, 0.18) 0%, rgba(12, 21, 18, 0.05) 45%, rgba(12, 21, 18, 0.35) 100%),
            linear-gradient(180deg, rgba(12, 21, 18, 0) 48%, rgba(12, 21, 18, 0.62) 100%);
    }

    .smn-login-hero__copy {
        display: block;
        left: 48px;
        right: 48px;
        bottom: 48px;
    }

    .smn-login-panel {
        padding: 64px 56px;
        border-left: 1px solid var(--smn-line);
    }

    .smn-login-panel__inner {
        margin: 0;
        max-width: 380px;
    }
}

@media (min-width: 1280px) {
    .smn-login-shell {
        grid-template-columns: minmax(0, 1.4fr) minmax(440px, 0.6fr);
    }

    .smn-login-hero__copy h1 {
        font-size: 3rem;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .smn-login-shell {
        grid-template-rows: 120px 1fr;
    }

    .smn-login-hero__copy h1 {
        font-size: 1.25rem;
    }

    .smn-login-panel {
        padding: 16px 20px;
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {

    .smn-field input,
    .smn-login-submit {
        transition: none;
    }
}