:root { --sd-green: #4bc020; }

html, body {
    min-height: 100%;
    background: #0d1423 !important;
    color-scheme: dark;
}

.servedoor-login-shell {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(35, 59, 70, .32), transparent 52%),
        linear-gradient(155deg, #111b2c 0%, #0d1423 52%, #090f1b 100%);
    color: #f8fafc;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.servedoor-login-shell::after {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, rgba(8,12,20,.46), rgba(8,12,20,.72));
}

.servedoor-login-main {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(1.15rem, env(safe-area-inset-top)) .9rem 0;
    overflow: visible;
}

.servedoor-login-card {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    align-content: stretch;
    box-sizing: border-box;
    width: min(100%, calc(100vw - 1.8rem));
    max-width: 22rem;
    min-height: calc(100dvh - max(1.15rem, env(safe-area-inset-top)));
    min-width: 0;
    gap: clamp(.82rem, 2vh, 1.12rem);
}

.servedoor-login-brand {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    column-gap: .8rem;
    padding: .1rem .25rem 0;
}

.servedoor-login-logo { width: 3.55rem; height: 3.55rem; border-radius: .72rem; object-fit: contain; }
.servedoor-login-brand > div { min-width: 0; }
.servedoor-login-brand h1 { color: #f8fafc; font-size: clamp(1.9rem, 7.5vw, 2.2rem); font-weight: 760; letter-spacing: 0; line-height: 1; white-space: nowrap; }
.servedoor-login-brand h1 span { color: #7bdc42; }
.servedoor-login-subtitle { grid-column: 1 / -1; margin-top: .58rem; color: #aeb9c9; font-size: .78rem; font-weight: 450; line-height: 1.4; text-align: center; }
.servedoor-login-subtitle strong { color: #d8e2ed; font-weight: 650; }

.servedoor-login-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid rgba(148,163,184,.12);
    border-radius: .9rem;
    background: rgba(17,27,44,.48);
    overflow: hidden;
}
.servedoor-login-benefits div { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: .28rem; padding: .52rem .22rem; }
.servedoor-login-benefits div + div { border-left: 1px solid rgba(148,163,184,.1); }
.servedoor-login-benefits svg { width: 1rem; height: 1rem; fill: none; stroke: #7bdc42; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.servedoor-login-benefits b { color: #bdc8d6; font-size: clamp(.56rem, 2.65vw, .68rem); font-weight: 600; line-height: 1.15; text-align: center; }

.servedoor-login-form {
    padding: .86rem;
    border: 1px solid rgba(167,181,200,.17);
    border-radius: 1.15rem;
    background: rgba(17,27,44,.86);
    box-shadow: 0 8px 26px rgba(0,0,0,.12);
    backdrop-filter: blur(12px);
}
.servedoor-login-form-heading { display: grid; grid-template-columns: 2.45rem 1fr; align-items: center; gap: .65rem; margin-bottom: .82rem; }
.servedoor-login-phone-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid rgba(75,192,32,.2); border-radius: .7rem; background: rgba(75,192,32,.07); color: #7bdc42; }
.servedoor-login-phone-icon svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.servedoor-login-form-heading strong, .servedoor-login-form-heading small { display: block; }
.servedoor-login-form-heading strong { color: #f8fafc; font-size: 1rem; font-weight: 680; line-height: 1.2; }
.servedoor-login-form-heading small { margin-top: .12rem; color: #929fb1; font-size: .73rem; line-height: 1.3; }
.servedoor-login-section:not(.hidden) { display: grid; gap: .78rem; }

.servedoor-login-input-row { display: flex; min-height: 3.15rem; overflow: hidden; border: 1px solid rgba(148,163,184,.22); border-radius: .8rem; background: rgba(8,12,20,.44); transition: border-color .18s, box-shadow .18s; }
.servedoor-login-input-row:focus-within { border-color: rgba(75,192,32,.75); box-shadow: 0 0 0 3px rgba(75,192,32,.09); }
.servedoor-login-prefix {
    display: flex;
    width: 4.35rem;
    flex: 0 0 4.35rem;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-right: 1px solid rgba(148,163,184,.15);
    background: none;
    color: #dfe7ef;
    font-size: .9rem;
    font-weight: 650;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}
.servedoor-login-prefix::after { display: none !important; content: "" !important; }
.servedoor-login-input { width: 100%; min-width: 0; padding: 0 .85rem; background: transparent; color: #f8fafc; font-size: .9rem; font-weight: 550; outline: 0; }
.servedoor-login-input::placeholder { color: #6f7c8e; }

.servedoor-login-submit { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; gap: .5rem; width: 100%; border-radius: .8rem; background: #4bc020; color: #07100a; font-size: .9rem; font-weight: 750; transition: background .18s, transform .18s; }
.servedoor-login-submit:hover { background: #58cd2d; }
.servedoor-login-submit:active { transform: scale(.99); }
.servedoor-login-submit svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.servedoor-login-safe-note { display: flex; align-items: center; justify-content: center; gap: .35rem; color: #7f8c9e; font-size: .66rem; line-height: 1.2; }
.servedoor-login-safe-note svg { width: .82rem; height: .82rem; fill: none; stroke: #6ebc4d; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.servedoor-login-otp-label { color: #dce5ee; font-size: .78rem; font-weight: 650; }
.servedoor-login-otp-input { width: 100%; min-height: 3.15rem; border: 1px solid rgba(148,163,184,.22); border-radius: .8rem; background: rgba(8,12,20,.44); color: white; font-size: 1.05rem; font-weight: 700; letter-spacing: .2em; text-align: center; outline: 0; }
.servedoor-login-otp-input:focus { border-color: rgba(75,192,32,.75); box-shadow: 0 0 0 3px rgba(75,192,32,.09); }
.servedoor-login-text-btn, #resendOTPBtn { width: 100%; color: #7bdc42; font-size: .72rem; font-weight: 650; }

.servedoor-login-local-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: min(calc(100% + 1.8rem), 100vw);
    max-width: 25rem;
    align-self: stretch;
    justify-self: center;
    gap: 0;
    margin: clamp(.25rem, 1vh, .55rem) 0 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
}
.servedoor-login-local-card::before {
    position: absolute;
    inset: 8% 0 auto;
    height: 45%;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, rgba(13,20,35,0), rgba(13,20,35,.5) 55%, rgba(13,20,35,0));
    z-index: 1;
}
.servedoor-login-local-artwork {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: clamp(9rem, 28dvh, 15rem);
    height: auto;
    object-fit: cover;
    object-position: center bottom;
    opacity: .92;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.62) 18%, #000 36%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0, rgba(0,0,0,.62) 18%, #000 36%, #000 100%);
}
.servedoor-login-local-card .servedoor-login-local-signoff { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: .24rem; margin: -.12rem 0 0; padding: .18rem .75rem max(.35rem, env(safe-area-inset-bottom)); color: #7c899b; font-size: .62rem; font-weight: 600; line-height: 1.2; letter-spacing: 0; }
.servedoor-login-local-signoff span { font-size: .7rem; line-height: 1; }

@media (max-height: 680px) {
    .servedoor-login-main { padding-top: max(.72rem, env(safe-area-inset-top)); }
    .servedoor-login-card { min-height: calc(100dvh - max(.72rem, env(safe-area-inset-top))); gap: .62rem; }
    .servedoor-login-brand { grid-template-columns: auto auto; }
    .servedoor-login-logo { width: 3rem; height: 3rem; }
    .servedoor-login-brand h1 { font-size: 1.75rem; }
    .servedoor-login-subtitle { margin-top: .28rem; font-size: .72rem; }
    .servedoor-login-benefits div { padding-block: .36rem; }
    .servedoor-login-form { padding: .68rem; }
    .servedoor-login-form-heading { margin-bottom: .58rem; }
    .servedoor-login-input-row { min-height: 2.9rem; }
    .servedoor-login-submit { min-height: 2.75rem; }
    .servedoor-login-local-card { margin-top: .2rem; }
    .servedoor-login-local-artwork { min-height: clamp(7.4rem, 22dvh, 9.4rem); }
}

@media (max-width: 360px), (max-height: 620px) {
    .servedoor-login-main { padding-inline: .75rem; }
    .servedoor-login-brand { grid-template-columns: auto auto; }
    .servedoor-login-logo { width: 2.8rem; height: 2.8rem; }
    .servedoor-login-brand h1 { font-size: 1.65rem; }
    .servedoor-login-benefits b { font-size: .55rem; }
    .servedoor-login-benefits div { padding-block: .34rem; }
    .servedoor-login-form { padding: .64rem; }
    .servedoor-login-safe-note { font-size: .62rem; }
}

@media (min-width: 640px) {
    .servedoor-login-main { align-items: center; padding-block: 1.5rem; }
    .servedoor-login-card { max-width: 24rem; min-height: auto; gap: .85rem; }
    .servedoor-login-local-card { width: 100%; max-width: 24rem; }
    .servedoor-login-local-artwork { min-height: clamp(8.5rem, 20dvh, 10.5rem); }
}

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