:root {
    --ink: #12372f;
    --teal: #0b5d46;
    --teal-2: #08704f;
    --green: #19b477;
    --green-soft: #e7f8f0;
    --cream: #f6f8f4;
    --paper: #ffffff;
    --copper: #159966;
    --line: #d8e5df;
    --muted: #63736e;
    --shadow: 0 22px 60px rgba(11, 93, 70, 0.14);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: "DM Sans", sans-serif;
    color: var(--ink);
    background: var(--cream);
    font-size: 16px;
}

.app-shell {
    min-height: 100vh;
}

h1,
h2,
p {
    margin-top: 0;
}

h1,
h2 {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font-family: "Fraunces", serif;
    line-height: 1.08;
}

button,
input {
    font: inherit;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

    .eyebrow.light {
        color: #9ef0cb;
    }

.muted,
.lead {
    color: var(--muted);
}

.primary-button.rz-button {
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: var(--green);
    padding: 0 22px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(25, 180, 119, 0.22);
}

    .primary-button.rz-button:hover {
        background: #139b66;
    }

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
}

.login-visual {
    position: relative;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    padding: 48px;
    background: linear-gradient(180deg, rgba(5, 53, 38, 0.1), rgba(5, 53, 38, 0.88)), url("../images/coffee-selection.png") center/cover;
}

    .login-visual:after {
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, rgba(5, 88, 59, 0.42), transparent 62%);
        content: "";
    }

.brand-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    color: #fff;
    font-family: "Fraunces", serif;
    font-weight: 700;
}

.visual-copy {
    position: relative;
    z-index: 1;
    align-self: flex-end;
    max-width: 620px;
    color: #fff;
}

    .visual-copy h2 {
        margin-bottom: 18px;
        font-size: clamp(2.35rem, 4.2vw, 4.5rem);
        letter-spacing: -0.035em;
    }

    .visual-copy p:last-child {
        max-width: 470px;
        color: rgba(255, 255, 255, 0.82);
        font-size: 1.04rem;
        line-height: 1.65;
    }

.login-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 48px;
    background: var(--paper);
}

.form-wrap {
    width: min(430px, 100%);
}

    .form-wrap h1 {
        margin-bottom: 12px;
        font-size: clamp(2.2rem, 3.4vw, 3.35rem);
        letter-spacing: -0.035em;
    }

.login-form {
    display: grid;
    gap: 12px;
    margin-top: 32px;
}

    .login-form .rz-form-field {
        margin-top: 4px;
    }

    .login-form .rz-textbox {
        min-height: 54px;
    }

    .login-form .rz-form-field:focus-within {
        --rz-input-border-color: var(--green);
    }

    .login-form .rz-button {
        width: 100%;
        margin-top: 10px;
    }

    .login-form .rz-message {
        font-size: 0.85rem;
    }

.login-error {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff0ef;
    color: #a32f27;
    font-size: 0.9rem;
}

.selection-page {
    min-height: 100vh;
    background: radial-gradient( circle at 85% 8%, rgba(25, 180, 119, 0.11), transparent 27% ), var(--cream);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px clamp(24px, 6vw, 88px);
    border-bottom: 1px solid rgba(18, 55, 47, 0.09);
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(12px);
}

.mini-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

    .mini-brand span {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border-radius: 50%;
        background: var(--green);
        color: #fff;
        font-family: "Fraunces", serif;
        font-size: 0.8rem;
    }

.step-label {
    color: var(--muted);
    font-size: 0.86rem;
}

.selection-content {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 54px 0 64px;
}

    .selection-content > h1 {
        max-width: none;
        margin-bottom: 13px;
        font-size: clamp(2.25rem, 4vw, 3.85rem);
        letter-spacing: -0.04em;
        white-space: nowrap;
    }

.lead {
    margin-bottom: 34px;
    font-size: 1.06rem;
}

.category-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 36px 0 16px;
}

    .category-heading h2 {
        margin: 0;
        font-size: 1.55rem;
        letter-spacing: -0.02em;
    }

    .category-heading span {
        color: var(--muted);
        font-size: 0.86rem;
        font-weight: 600;
    }

.coffee-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.coffee-card {
    display: block;
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(18, 55, 47, 0.1);
    border-radius: 18px;
    background: var(--paper);
    color: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 7px 22px rgba(11, 93, 70, 0.05);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

    .coffee-card:hover {
        transform: translateY(-4px);
        border-color: rgba(25, 180, 119, 0.5);
        box-shadow: var(--shadow);
    }

    .coffee-card.selected {
        border: 2px solid var(--green);
        box-shadow: 0 15px 42px rgba(25, 180, 119, 0.16);
    }

.coffee-image,
.chosen-thumb {
    display: block;
    background-repeat: no-repeat;
    background-size: 300% auto;
    background-position-y: center;
}

.coffee-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
}

.card-body {
    display: block;
    padding: 19px 20px 21px;
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

    .card-heading strong {
        display: block;
        font-family: "Fraunces", serif;
        font-size: 1.28rem;
        line-height: 1.2;
        white-space: nowrap;
    }

    .card-heading small {
        display: block;
        margin-top: 5px;
        color: var(--green);
        font-size: 0.78rem;
        font-weight: 700;
    }

.choice-dot {
    display: grid;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 2px solid #b7c8c1;
    border-radius: 50%;
}

.selected .choice-dot {
    border-color: var(--green);
}

    .selected .choice-dot span {
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: var(--green);
    }

.description {
    display: block;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.selection-actions {
    position: sticky;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-top: 36px;
    padding: 16px 18px;
    border: 1px solid rgba(18, 55, 47, 0.09);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 40px rgba(11, 93, 70, 0.12);
    backdrop-filter: blur(14px);
}

.selection-status {
    color: var(--muted);
    font-weight: 600;
}

.confirm-button.rz-button {
    min-width: 220px;
}

.rz-button:disabled {
    opacity: 0.45;
}

.thanks-page {
    display: grid;
    min-height: 100vh;
    place-content: center;
    padding: 40px 24px;
    background: radial-gradient( circle at 50% 26%, rgba(86, 224, 165, 0.16), transparent 30% ), var(--teal);
    text-align: center;
}

.thanks-card {
    width: min(570px, calc(100vw - 48px));
    padding: 48px;
    border-radius: 24px;
    background: var(--paper);
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.22);
}

.success-icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    font-size: 1.9rem;
}

.thanks-card h1 {
    margin-bottom: 12px;
    font-size: clamp(2.35rem, 5vw, 3.65rem);
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.thanks-copy {
    color: var(--muted);
    font-size: 1.04rem;
}

.chosen-coffee {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 28px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    text-align: left;
}

.chosen-thumb {
    width: 96px;
    height: 82px;
    flex: 0 0 96px;
    border-radius: 11px;
}

.chosen-coffee small,
.chosen-coffee strong {
    display: block;
}

.chosen-coffee small {
    margin-bottom: 4px;
    color: var(--muted);
}

.chosen-coffee strong {
    font-family: "Fraunces", serif;
    font-size: 1.25rem;
    white-space: nowrap;
}

.chosen-coffee p {
    margin: 4px 0 0;
    color: var(--green);
    font-size: 0.86rem;
    font-weight: 700;
}

.secondary-button.rz-button {
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}

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

.footer-note {
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.85rem;
}

.loading {
    display: grid;
    min-height: 100vh;
    place-items: center;
    color: var(--teal);
}

#blazor-error-ui {
    display: none;
}

.not-found {
    padding: 40px;
}

@media (max-width: 900px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 42vh;
        padding: 30px;
    }

    .visual-copy h2 {
        font-size: 2.8rem;
    }

    .login-panel {
        min-height: auto;
        padding: 55px 24px;
    }

    .selection-content > h1 {
        white-space: normal;
    }

    .coffee-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .selection-content {
        padding-top: 44px;
    }

    .thanks-card {
        padding: 40px 28px;
    }
}

@media (max-width: 620px) {
    .login-visual {
        min-height: 36vh;
    }

    .visual-copy p:last-child {
        display: none;
    }

    .visual-copy h2 {
        margin: 0;
        font-size: 2.25rem;
    }

    .selection-content {
        width: min(100% - 30px, 1180px);
    }

        .selection-content > h1 {
            font-size: 2.2rem;
        }

    .coffee-grid {
        grid-template-columns: 1fr;
    }

    .category-heading {
        margin-top: 30px;
    }

    .selection-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .confirm-button.rz-button {
        width: 100%;
    }

    .thanks-card {
        width: calc(100vw - 28px);
    }

        .thanks-card h1 {
            font-size: 2.4rem;
            white-space: normal;
        }

    .chosen-thumb {
        width: 82px;
        flex-basis: 82px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
