:root {
    --ink: #152725;
    --muted: #63706e;
    --forest: #193f3b;
    --forest-dark: #102f2c;
    --mint: #dff2ec;
    --mint-soft: #f3faf7;
    --coral: #e57966;
    --line: #dce7e3;
    --danger: #a93636;
    --danger-bg: #fff1ef;
    --success: #236a51;
    --success-bg: #eaf8f1;
    --white: #fff;
    --shadow: 0 28px 80px rgba(20, 56, 51, .16);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #edf5f2;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at 7% 3%, rgba(229, 121, 102, .14), transparent 26rem),
        linear-gradient(145deg, #f6fbf8 0%, #e6f1ed 100%);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.login-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.ambient {
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(1px);
}

.ambient-one {
    width: 22rem;
    height: 22rem;
    right: -8rem;
    top: -8rem;
    border: 1px solid rgba(25, 63, 59, .12);
}

.ambient-two {
    width: 9rem;
    height: 9rem;
    left: 4vw;
    bottom: -3rem;
    background: rgba(229, 121, 102, .1);
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 68rem);
    min-height: 42rem;
    display: grid;
    grid-template-columns: minmax(19rem, .92fr) minmax(25rem, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: clamp(2rem, 5vw, 4rem);
    color: var(--white);
    background:
        radial-gradient(circle at 115% 0%, rgba(223, 242, 236, .2), transparent 19rem),
        linear-gradient(155deg, var(--forest) 0%, var(--forest-dark) 100%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 13rem;
    height: 13rem;
    right: -7rem;
    bottom: 10%;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.brand-lockup {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    width: fit-content;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .1);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
}

.brand-name {
    max-width: 11rem;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-copy {
    position: relative;
    z-index: 1;
    margin: 5rem 0;
}

.eyebrow {
    margin: 0 0 .8rem;
    color: var(--coral);
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.brand-copy .eyebrow {
    color: #f4b2a6;
}

.brand-copy h1 {
    max-width: 25rem;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.35rem, 5vw, 4.15rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
}

.brand-copy > p:last-child {
    max-width: 25rem;
    margin: 1.6rem 0 0;
    color: rgba(255, 255, 255, .72);
    font-size: 1rem;
    line-height: 1.7;
}

.trust-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
    line-height: 1.45;
}

.trust-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .7rem;
    background: rgba(255, 255, 255, .1);
}

.trust-icon svg {
    width: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.form-panel {
    display: grid;
    align-items: center;
    padding: clamp(2rem, 7vw, 5rem);
    background: rgba(255, 255, 255, .94);
}

.form-panel form {
    width: min(100%, 26rem);
    margin: auto;
}

.form-panel h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 500;
    letter-spacing: -.035em;
}

.form-intro {
    margin: .8rem 0 1.8rem;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.65;
}

.salon-cue,
.status-message {
    margin: 0 0 1.25rem;
    border-radius: .9rem;
    font-size: .86rem;
    line-height: 1.45;
}

.salon-cue {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem .85rem;
    color: var(--forest);
    background: var(--mint-soft);
    border: 1px solid #d5ebe3;
}

.salon-cue span:first-child {
    color: var(--coral);
    font-size: .65rem;
}

.status-message {
    padding: .8rem .95rem;
}

.status-error {
    color: var(--danger);
    background: var(--danger-bg);
    border: 1px solid #f1cbc5;
}

.status-success {
    color: var(--success);
    background: var(--success-bg);
    border: 1px solid #cbe8da;
}

.status-warning {
    color: #725515;
    background: #fff8e7;
    border: 1px solid #ead9aa;
}

.validation-summary {
    margin: 0 0 1rem;
    color: var(--danger);
    font-size: .82rem;
}

.validation-summary ul {
    margin: .4rem 0 0;
    padding-left: 1.15rem;
}

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

.field-group > label {
    display: inline-block;
    margin: 0 0 .45rem;
    color: #2d3f3c;
    font-size: .84rem;
    font-weight: 700;
}

.text-input {
    width: 100%;
    min-height: 3.25rem;
    padding: .78rem .95rem;
    color: var(--ink);
    border: 1px solid #cad9d4;
    border-radius: .85rem;
    outline: none;
    background: #fbfdfc;
    font-size: 16px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.text-input::placeholder {
    color: #91a09d;
}

.text-input:hover {
    border-color: #9dbab2;
}

.text-input:focus {
    border-color: var(--forest);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(25, 63, 59, .11);
}

.password-wrap {
    position: relative;
}

.password-input {
    padding-right: 3.2rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .25rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: #667a76;
    border: 0;
    border-radius: .65rem;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--forest);
    background: var(--mint);
    outline: none;
}

.password-toggle svg {
    width: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.field-error {
    display: block;
    margin-top: .4rem;
    color: var(--danger);
    font-size: .78rem;
}

.primary-button,
.secondary-button {
    width: 100%;
    min-height: 3.25rem;
    padding: .8rem 1rem;
    border-radius: .85rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.primary-button {
    color: var(--white);
    border: 1px solid var(--forest);
    background: var(--forest);
    box-shadow: 0 10px 24px rgba(25, 63, 59, .2);
}

.primary-button:hover {
    background: #24534e;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(25, 63, 59, .24);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.back-link:focus-visible,
.brand-lockup:focus-visible {
    outline: 3px solid rgba(229, 121, 102, .45);
    outline-offset: 3px;
}

.secondary-button {
    color: var(--forest);
    border: 1px solid #bfd1cb;
    background: var(--white);
}

.secondary-button:hover {
    background: var(--mint-soft);
}

.persistent-note {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.5;
}

.persistent-note::before {
    flex: 0 0 auto;
    width: .48rem;
    height: .48rem;
    margin-top: .3rem;
    border-radius: 50%;
    background: #61a98d;
    content: "";
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: 2rem;
    color: #556966;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    color: var(--forest);
}

.back-link svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.authenticated-state {
    text-align: center;
}

.authenticated-state .eyebrow {
    margin-top: 1rem;
}

.success-badge {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto;
    color: var(--success);
    border-radius: 50%;
    background: var(--success-bg);
    font-size: 1.35rem;
    font-weight: 900;
}

.success-badge svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.salon-cue-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--coral);
}

.salon-cue-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.6;
}

.active-identity {
    display: grid;
    gap: .2rem;
    margin: 1.25rem 0;
    padding: .95rem 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: var(--mint-soft);
    text-align: left;
}

.active-identity-label {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.active-identity strong,
.active-identity-secondary {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-identity strong {
    color: var(--ink);
    font-size: 1.05rem;
}

.active-identity-secondary {
    color: var(--muted);
    font-size: .82rem;
}

.button-stack {
    display: grid;
    gap: .75rem;
    margin-top: 1.75rem;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 780px) {
    .login-shell {
        display: block;
        padding: 0;
        background: var(--white);
    }

    .login-card {
        width: 100%;
        min-height: 100vh;
        display: block;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .brand-panel {
        min-height: 10rem;
        padding: 1.1rem 1.25rem 1.6rem;
    }

    .brand-copy {
        margin: 1.4rem 0 0;
    }

    .brand-copy h1 {
        max-width: 20rem;
        font-size: 1.9rem;
        line-height: 1.02;
    }

    .brand-copy .eyebrow {
        display: none;
    }

    .brand-copy > p:last-child,
    .trust-note {
        display: none;
    }

    .form-panel {
        min-height: calc(100vh - 10rem);
        align-items: start;
        padding: 1.8rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
        border-radius: 1.4rem 1.4rem 0 0;
        transform: translateY(-.8rem);
    }

    .form-panel form {
        width: 100%;
    }

    .form-panel h2 {
        font-size: 2rem;
    }

    .form-intro {
        margin-bottom: 1.3rem;
        line-height: 1.5;
    }

    .active-identity {
        margin: 1rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
