:root {
    --sm-navy: #0b2540;
    --sm-navy-2: #123a63;
    --sm-blue: #1071b8;
    --sm-orange: #fc7e27;
    --sm-orange-dark: #e0661a;
    --sm-ink: #14243a;
    --sm-muted: #64748b;
    --sm-line: #dfe6ee;
    --sm-field: #f1f5f9;
    --sm-danger: #b42318;
}

*, *::before, *::after { box-sizing: border-box; }

html, body.sm-auth { min-height: 100%; margin: 0; }

body.sm-auth {
    padding: 0;
    background:
        radial-gradient(rgba(255, 255, 255, .07) 1.5px, transparent 1.5px) 0 0 / 26px 26px,
        linear-gradient(150deg, var(--sm-navy) 0%, var(--sm-navy-2) 100%);
    color: var(--sm-ink);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.sm-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
    overflow: hidden;
}

/* Orange band behind the card */
.sm-stage::before {
    content: "";
    position: absolute;
    left: -10%;
    right: -10%;
    top: 74%;
    height: 34%;
    background: linear-gradient(100deg, var(--sm-orange), #ffa24d);
    transform: skewY(-6deg);
    opacity: .95;
}

.sm-stage > * { position: relative; z-index: 1; }

/* Receipt-style card */
.sm-ticket {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
}

.sm-ticket-head { padding: 32px 36px 24px; text-align: center; }
.sm-ticket-head img { display: block; width: 210px; max-width: 100%; margin: 0 auto 12px; }
.sm-ticket-head p { margin: 0; color: var(--sm-muted); font-size: 13px; }

.sm-tear { position: relative; height: 0; margin: 0 22px; border-top: 2px dashed #cdd7e2; }

.sm-tear::before,
.sm-tear::after {
    content: "";
    position: absolute;
    top: -15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0f3052;
}

.sm-tear::before { left: -36px; }
.sm-tear::after { right: -36px; }

.sm-ticket-body { padding: 28px 36px 32px; }

.sm-title { margin: 0 0 20px; font-size: 22px; font-weight: 700; color: var(--sm-ink); }

.sm-form { display: block; width: 100%; }

.sm-field { margin-bottom: 18px; }

.sm-field > label { display: block; margin: 0 0 6px; color: var(--sm-muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.sm-input { position: relative; }

.sm-input > .fa {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    margin-top: -8px;
    text-align: center;
    color: #8497ac;
    pointer-events: none;
    transition: color .15s;
}

.sm-ticket .sm-input .form-control {
    display: block;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 14px 0 44px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--sm-field);
    color: var(--sm-ink);
    font-size: 15px;
    box-shadow: none;
    transition: border-color .15s, background .15s;
}

.sm-ticket .sm-input.has-toggle .form-control { padding-right: 48px; }
.sm-ticket .sm-input .form-control::placeholder { color: #94a3b8; opacity: 1; }
.sm-ticket .sm-input .form-control:focus { outline: none; border-color: var(--sm-orange); background: #fff; box-shadow: none; }
.sm-input:focus-within > .fa { color: var(--sm-orange); }

.sm-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8497ac;
    cursor: pointer;
}

.sm-toggle:hover { color: var(--sm-blue); background: #e2eaf3; }

.sm-submit-wrap { position: relative; margin-top: 26px; }

.sm-ticket .sm-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: var(--sm-navy);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(11, 37, 64, .8);
    transition: background .15s, transform .15s;
}

.sm-ticket .sm-submit .fa { color: var(--sm-orange); }
.sm-ticket .sm-submit:hover { background: var(--sm-blue); color: #fff; transform: translateY(-1px); }
.sm-ticket .sm-submit:active { transform: translateY(0); }
.sm-ticket .sm-submit:focus-visible { outline: 3px solid rgba(252, 126, 39, .5); outline-offset: 2px; }
.sm-ticket .sm-submit[disabled] { opacity: .7; cursor: wait; }

.sm-ticket .loader-next { position: absolute; right: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; }

.sm-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: #fff; font-size: 13px; font-weight: 600; }
.sm-points .fa { margin-right: 8px; opacity: .9; }

.sm-copy { margin: 12px 0 0; color: rgba(255, 255, 255, .85); font-size: 12px; }

/* Validation */
.sm-ticket .text-danger,
.sm-ticket .field-validation-error { display: block; margin-top: 6px; color: var(--sm-danger) !important; font-size: 12px; text-align: left; }

.sm-ticket .validation-summary-errors {
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #f3c3bd;
    background: #fef3f2;
    color: var(--sm-danger);
    font-size: 13px;
}

.sm-ticket .validation-summary-errors ul { margin: 0; padding-left: 18px; }
.sm-ticket .input-validation-error { border-color: var(--sm-danger) !important; }

/* Other pages that reuse the layout (errors, retry) */
.sm-ticket-body h1, .sm-ticket-body h2 { color: var(--sm-ink); }
.sm-ticket-body a { color: var(--sm-blue); }

@media (max-width: 480px) {
    .sm-ticket-head { padding: 26px 24px 20px; }
    .sm-ticket-body { padding: 22px 24px 26px; }
    .sm-tear::before { left: -24px; }
    .sm-tear::after { right: -24px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
