/* SmartPay Energy - Central sign-in and SSO pages (Company = smartpay only).
   Mirrors smartpay.energy and the SmartPay customer / quote apps:
   DM Sans, navy #1a3f4e, yellow #f3f08b, cream #faf4f0, pill buttons. */

:root {
    --sp-display: 'Archivo', 'Archivo Black', 'DM Sans', Arial, sans-serif;
    --sp-navy: #1a3f4e;
    --sp-navy-dark: #132e3a;
    --sp-accent: #f3f08b;
    --sp-btn-text: #f4f185;
    --sp-cream: #faf4f0;
    --sp-field: #f8f7f2;
    --sp-field-border: rgba(26, 63, 78, 0.14);
    --sp-muted: #5f6f7e;
    --sp-pink: #ffabed;
    --sp-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --sp-shadow-cta: 0 8px 20px rgba(26, 63, 78, 0.10);
    --sp-shadow-cta-hover: 0 16px 40px rgba(26, 63, 78, 0.20);
    --sp-focus-ring: 0 0 0 4px rgba(26, 63, 78, 0.12);
    --sp-error-bg: #fdecea;
    --sp-error: #a32014;
    --sp-ok-bg: #dff3e7;
    --sp-ok: #1b6b45;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    background: #ffffff;
    color: var(--sp-navy);
    font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--sp-navy); }

.sp-shell { min-height: 100vh; padding: 16px; display: flex; flex-direction: column; }

/* Hero panel: the website's petal artwork, cream on the left */
.sp-hero {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    background: var(--sp-cream) url('/images/smartpay/sign-in-hero.webp') no-repeat right center / cover;
    overflow: hidden;
    padding: 24px 32px 40px;
}
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sp-top img { height: 34px; width: auto; display: block; }
.sp-top-link {
    font-size: 15px; font-weight: 500; text-decoration: none; color: var(--sp-navy);
    background: rgba(255, 255, 255, 0.85); padding: 9px 18px; border-radius: 999px;
    transition: background .15s ease;
}
.sp-top-link:hover { background: #ffffff; }

.sp-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    align-items: center;
    gap: 48px;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 0 8px;
}

.sp-intro { max-width: 560px; }
.sp-intro .sp-headline { margin-top: 0; }
.sp-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--sp-accent); color: var(--sp-navy);
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    padding: 6px 14px; border-radius: 999px;
}
.sp-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sp-navy); }
.sp-headline {
    margin: 22px 0 0;
    font-family: var(--sp-display);
    font-size: clamp(44px, min(6vw, 10.5vh), 96px);
    line-height: .86;
    font-weight: 900;
    letter-spacing: .005em;
    text-transform: uppercase;
    color: var(--sp-navy);
}
.sp-lead { margin: 24px 0 0; font-size: 18px; line-height: 1.55; color: var(--sp-muted); max-width: 440px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.sp-chips li {
    display: inline-flex; align-items: center; gap: 8px;
    background: #ffffff; border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 500;
}
.sp-chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sp-pink); }

/* Form card */
.sp-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 36px 36px 36px;
    box-shadow: 0 24px 60px rgba(26, 63, 78, 0.10);
}
.sp-eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sp-muted); }
.sp-title {
    margin: 10px 0 0;
    font-family: var(--sp-display);
    font-size: 40px; line-height: .9; font-weight: 900; letter-spacing: .005em; text-transform: uppercase;
}
.sp-sub { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--sp-muted); }
.sp-form { margin-top: 24px; display: grid; gap: 16px; }

.sp-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.sp-input-wrap { position: relative; }
.sp-input {
    width: 100%; height: 52px; padding: 0 16px;
    background: var(--sp-field); border: 1px solid var(--sp-field-border); border-radius: 12px;
    font: inherit; font-size: 16px; color: var(--sp-navy);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.sp-input::placeholder { color: #9aa6ae; }
.sp-input:focus { outline: none; background: #ffffff; border-color: var(--sp-navy); box-shadow: 0 0 0 4px rgba(26, 63, 78, 0.10); }
.sp-input.is-invalid { border-color: var(--sp-error); background: #fffafa; }
.sp-input-wrap .sp-input { padding-right: 52px; }
.sp-eye {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent;
    color: var(--sp-muted); cursor: pointer; display: grid; place-items: center;
}
.sp-eye:hover, .sp-eye:focus-visible { color: var(--sp-navy); background: rgba(26, 63, 78, 0.06); outline: none; }
.sp-eye svg { width: 20px; height: 20px; }
.sp-eye .when-shown { display: none; }
.sp-eye[aria-pressed="true"] .when-shown { display: block; }
.sp-eye[aria-pressed="true"] .when-hidden { display: none; }
.sp-field-error { margin: 6px 0 0; font-size: 13px; color: var(--sp-error); }

.sp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sp-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--sp-muted); cursor: pointer; }
.sp-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--sp-navy); cursor: pointer; }
.sp-link { font-size: 14px; font-weight: 600; color: var(--sp-navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(26, 63, 78, .35); }
.sp-link:hover { text-decoration-color: var(--sp-navy); }

/* Primary button = the quote journey's hero CTA (quote/src/styles/_quote-journey.scss
   .sp-btn--hero + .sp-btn--arrow): navy pill, white text, soft shadow that deepens on
   a 2px lift, and a pink arrow disc that slides out of the right edge on hover. */
.sp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 20px 32px; border: 1px solid transparent; border-radius: 999px;
    background: var(--sp-navy); color: #ffffff;
    font: inherit; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25;
    text-decoration: none; white-space: nowrap; cursor: pointer; overflow: hidden;
    box-shadow: var(--sp-shadow-cta);
    transition: all .3s var(--sp-ease);
}
.sp-btn:hover:not(:disabled) { background: var(--sp-navy); transform: translateY(-2px); box-shadow: var(--sp-shadow-cta-hover); }
.sp-btn:focus-visible { outline: none; box-shadow: var(--sp-focus-ring); }
.sp-btn:disabled, .sp-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.sp-btn:not(.sp-btn-ghost):not(.sp-btn-stack)::after {
    content: '';
    height: 30px; width: 0; opacity: 0; flex-shrink: 0; border-radius: 50%;
    background: var(--sp-pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a3f4e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") center / 16px no-repeat;
    transform: translateX(-8px) scale(0.6);
    transition: width .35s var(--sp-ease), opacity .25s var(--sp-ease) .05s, transform .35s var(--sp-ease);
}
.sp-btn:not(.sp-btn-ghost):not(.sp-btn-stack):hover:not(:disabled) { gap: 12px; padding-right: 28px; }
.sp-btn:not(.sp-btn-ghost):not(.sp-btn-stack):hover:not(:disabled)::after { width: 30px; opacity: 1; transform: translateX(0) scale(1); }

.sp-spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: sp-spin .8s linear infinite; flex-shrink: 0; }
.sp-btn.is-loading .sp-spinner { display: inline-block; }
@keyframes sp-spin { to { transform: rotate(360deg); } }

.sp-btn-ghost { background: transparent; color: var(--sp-navy); box-shadow: inset 0 0 0 1px var(--sp-field-border); }
.sp-btn-ghost:hover { background: var(--sp-field); color: var(--sp-navy); box-shadow: inset 0 0 0 1px var(--sp-navy); }
.sp-back { margin-top: 18px; text-align: center; }

.sp-alert { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; padding: 13px 16px; border-radius: 12px; background: var(--sp-error-bg); color: var(--sp-error); font-size: 14px; line-height: 1.5; }
.sp-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.sp-badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--sp-accent); color: var(--sp-navy); margin-bottom: 20px; }
.sp-badge.ok { background: var(--sp-ok-bg); color: var(--sp-ok); }
.sp-badge svg { width: 26px; height: 26px; }
.sp-note { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--sp-field); font-size: 14px; color: var(--sp-muted); }

.sp-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px 0; font-size: 13px; color: var(--sp-muted); }
.sp-foot a { color: var(--sp-navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sp-foot a:hover { text-decoration: underline; }

/* Desktop / laptop: the sign-in frame is exactly one screen high - no page scroll */
@media (min-width: 981px) and (min-height: 600px) {
    .sp-shell { height: 100vh; height: 100dvh; }
    .sp-hero { min-height: 0; }
    .sp-grid { min-height: 0; padding: 12px 0 0; }
}

/* Tablet: artwork stays behind the hero copy, card sits under it */
@media (max-width: 980px) {
    .sp-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 28px; }
    .sp-intro { max-width: none; }
    .sp-card { max-width: 520px; width: 100%; }
}

/* Phone: a short artwork band on top, then copy and card on cream */
@media (max-width: 640px) {
    .sp-shell { padding: 10px; }
    .sp-hero { padding: 18px 16px 24px; border-radius: 22px; background-size: auto 300px; background-position: right -120px top -40px; }
    .sp-top img { height: 28px; }
    .sp-top-link { display: none; }
    .sp-grid { padding-top: 96px; gap: 22px; }
    .sp-headline { font-size: 44px; }
    .sp-lead { font-size: 16px; margin-top: 16px; }
    .sp-chips { display: none; }
    .sp-card { padding: 28px 20px 30px; border-radius: 22px; }
    .sp-title { font-size: 32px; }
    .sp-foot { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
}

/* ------------------------------------------------------------------
   Signed-in pages (SSO products) - Pages/Shared/_SmartPayLayout
   ------------------------------------------------------------------ */
.sp-app { min-height: 100vh; padding: 16px; display: flex; flex-direction: column; gap: 16px; background: #ffffff; }
/* Bar, page and footer share one column so their edges line up. */
.sp-app > .sp-bar, .sp-app > .sp-page, .sp-app > .sp-foot { width: 100%; max-width: 1240px; margin: 0 auto; }
.sp-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 14px 12px 22px; border-radius: 22px; background: var(--sp-cream);
}
.sp-bar img { height: 30px; width: auto; display: block; }
.sp-user { display: flex; align-items: center; gap: 10px; }
.sp-user-chip {
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sp-navy);
    background: #ffffff; padding: 5px 16px 5px 5px; border-radius: 999px; font-size: 14px; font-weight: 600;
    transition: box-shadow .15s ease;
}
.sp-user-chip:hover { box-shadow: 0 6px 16px rgba(26, 63, 78, 0.12); }
.sp-avatar {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--sp-navy); color: var(--sp-btn-text); font-size: 14px; font-weight: 700;
}
.sp-user-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-signout {
    height: 42px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
    background: transparent; color: var(--sp-navy); font: inherit; font-size: 14px; font-weight: 600;
    white-space: nowrap; box-shadow: inset 0 0 0 1px var(--sp-field-border); transition: background .15s ease, box-shadow .15s ease;
}
.sp-signout:hover { background: #ffffff; box-shadow: inset 0 0 0 1px var(--sp-navy); }

.sp-page { flex: 1 1 auto; }
.sp-banner {
    position: relative; overflow: hidden; border-radius: 24px; padding: 30px 36px;
    background: var(--sp-cream) url('/images/smartpay/sign-in-hero.webp') no-repeat right center / cover;
    display: flex; flex-direction: column; justify-content: center;
}
.sp-banner .sp-headline { font-size: clamp(34px, 4vw, 54px); margin-top: 14px; }
.sp-banner .sp-lead { margin-top: 8px; font-size: 17px; }

.sp-section-title { margin: 28px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sp-muted); }
.sp-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 12px; }
.sp-product {
    display: flex; flex-direction: column; background: #ffffff; border: 1px solid rgba(26, 63, 78, 0.10);
    border-radius: 20px; padding: 14px; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.sp-product:hover { box-shadow: 0 18px 40px rgba(26, 63, 78, 0.12); transform: translateY(-2px); border-color: transparent; }
.sp-product-art { height: 96px; border-radius: 14px; background: var(--sp-cream); display: grid; place-items: center; padding: 14px 24px; }
.sp-product-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sp-product h3 { margin: 14px 4px 0; font-size: 18px; line-height: 1.25; font-weight: 700; }
.sp-product p { margin: 6px 4px 0; font-size: 14px; color: var(--sp-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-product-actions { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
.sp-product-actions .sp-btn { padding: 12px 20px; font-size: 15px; }
.sp-product-actions .sp-btn:not(.sp-btn-stack)::after { height: 26px; }
.sp-product-actions .sp-btn:not(.sp-btn-stack):hover:not(:disabled) { gap: 10px; padding-right: 16px; }
.sp-product-actions .sp-btn:not(.sp-btn-stack):hover:not(:disabled)::after { width: 26px; }
.sp-url { display: block; font-size: 11px; font-weight: 500; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sp-btn-stack { flex-direction: column; gap: 0; height: auto !important; min-height: 46px; padding: 8px 20px; }

.sp-empty { margin-top: 16px; padding: 28px; border-radius: 24px; background: var(--sp-field); color: var(--sp-muted); }
.sp-empty strong { display: block; color: var(--sp-navy); font-size: 18px; margin-bottom: 6px; }

@media (max-width: 640px) {
    .sp-app { padding: 10px; }
    .sp-bar { padding: 10px 12px; border-radius: 18px; }
    .sp-bar img { height: 24px; }
    .sp-user-name { display: none; }
    .sp-user-chip { padding: 4px; }
    .sp-signout { height: 40px; padding: 0 14px; }
    .sp-app { gap: 12px; }
    .sp-banner { padding: 96px 20px 24px; border-radius: 20px; background-size: auto 230px; background-position: right -110px top -40px; }
    .sp-banner .sp-headline { font-size: 34px; }
    .sp-products { grid-template-columns: minmax(0, 1fr); }
}
