html {
  --form-invalid-color: #dc2626;
  --color-bg: #f4f4f5;
  --color-surface: #ffffff;
  --color-border-subtle: #e4e4e7;
  --color-primary: #eab308;
  --color-primary-dark: #ca8a04;
  --color-primary-gradient: linear-gradient(90deg, #facc15 0%, #f59e0b 100%);
  --color-brand-panel: #facc15;
  --color-text-main: #18181b;
  --color-text-muted: #71717a;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    min-height: 100vh;
    height: 100%;
    overflow: hidden;
    color: var(--color-text-main);
    background: var(--color-bg);
}

h1, h2, h3 {
    color: var(--color-text-main);
    font-size: clamp(1.6rem, 4.5vw, 2.1rem);
    letter-spacing: -0.02em;
}
/* Header and Menu (used by other pages) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.96);
    padding: 2.5% 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
}
.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--color-primary);
    margin-left: auto;
    margin-right: 1rem;
}
.menu {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}
.menu-open {
    display: flex;
}
.menu a {
    text-decoration: none;
    color: var(--color-text-main);
    font-size: clamp(0.9rem, 4vw, 1rem);
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.menu a:hover {
    background-color: rgba(234, 179, 8, 0.15);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.input-field {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    height: 48px;
    margin: 0.6rem 0 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--color-border-subtle);
    box-sizing: border-box;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 80ms ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
    transform: translateY(-0.5px);
}

.input-field::placeholder {
    color: var(--color-text-muted);
    opacity: 0.9;
}

.button {
    height: 44px;
    line-height: 44px;
    padding: 0 2.25rem;
    background: var(--color-primary-gradient);
    color: #1c1917;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    max-width: 220px;
    margin-top: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 24px rgba(234, 179, 8, 0.3);
    transform-origin: center;
    transition: transform 120ms ease-out, box-shadow 160ms ease, filter 120ms ease;
}

.button:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 14px 28px rgba(234, 179, 8, 0.35);
    filter: brightness(1.03);
}

.button:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.25);
}

/* ========== Landing: Desktop = two columns, Mobile = centered card ========== */
.landing-page {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    box-sizing: border-box;
}

/* Left panel: dark branding (desktop only) */
.landing-panel-brand {
    display: none;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    padding: clamp(2rem, 5vw, 3.5rem);
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-decor {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    user-select: none;
}

.brand-decor-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(234,179,8,0.12) 0%, transparent 70%);
    top: -120px;
    right: -100px;
}

.brand-decor-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(234,179,8,0.07) 0%, transparent 70%);
    bottom: -60px;
    left: -60px;
}

.brand-decor-3 {
    width: 100px;
    height: 100px;
    border: 1.5px solid rgba(234,179,8,0.15);
    top: 40%;
    right: 2rem;
}

.landing-panel-brand .brand-content {
    max-width: 28rem;
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    background: var(--color-primary);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.75rem;
    box-shadow: 0 8px 24px rgba(234,179,8,0.35);
}

.brand-logo-icon {
    font-size: 1.75rem;
}

.brand-name {
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.6rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.brand-tagline {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: rgba(255,255,255,0.65);
    margin: 0;
}

.brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 2.25rem;
}

.brand-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.brand-feature i {
    color: var(--color-primary);
    font-size: 0.75rem;
}

/* Right panel: form */
.landing-panel-form {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    padding-left: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-left));
    padding-right: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-right));
    padding-top: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-top));
    padding-bottom: max(clamp(0.75rem, 3vw, 1.5rem), env(safe-area-inset-bottom));
    background: var(--color-bg);
    box-sizing: border-box;
}

.buy-data {
    width: 100%;
    max-width: 26rem;
    background: var(--color-surface);
    padding: clamp(1rem, 4vw, 1.75rem);
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04), 0 20px 50px -8px rgba(0,0,0,0.12);
    border: 1px solid var(--color-border-subtle);
    text-align: left;
}

.buy-data-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

.brand-mark-mobile {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: var(--color-primary);
    color: var(--color-text-main);
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(234,179,8,0.3);
}

.buy-data-title {
    margin: 0 0 0.3rem;
    font-size: clamp(1.35rem, 4vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text-main);
}

.buy-data-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.buy-data-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.75rem;
}

.buy-data-form .field {
    margin-bottom: 0.75rem;
}

.buy-data-form .field-full {
    grid-column: 1 / -1;
}

.buy-data-form .button-cta {
    grid-column: 1 / -1;
    max-width: none;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Input with icon prefix */
.input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-wrap .input-prefix {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 0.875rem;
    pointer-events: none;
}

.input-wrap .input-field {
    padding-left: 2.75rem;
}

/* Landing form inputs */
.landing-page .input-field {
    height: 2.75rem;
    margin: 0.2em 0 0;
    padding: 0 0.75rem;
    font-size: 0.9375rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-border-subtle);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-page .input-wrap .input-field {
    padding-left: 2.75rem;
}

/* No transform on focus: prevents native select dropdown from opening in wrong place on mobile */
.landing-page .input-field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
    transform: none;
}

.landing-page select.input-field {
    appearance: auto;
    /* Ensure native dropdown can position correctly */
}

.landing-page label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #52525b;
    margin-bottom: 0.2em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.landing-page .invalid-feedback {
    margin-top: 0.2em;
    margin-bottom: 0;
    font-size: 0.75rem;
}

/* Custom dropdown (mobile): list opens directly below trigger like desktop */
.dropdown-wrap {
    position: relative;
    display: none;
}

.dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.dropdown-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.dropdown-open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 2px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-card);
    max-height: 12rem;
    overflow-y: auto;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: none;
    background: none;
    font: inherit;
    color: var(--color-text-main);
    text-align: left;
    cursor: pointer;
    transition: background 0.1s ease;
}

.dropdown-option:hover,
.dropdown-option:active {
    background: rgba(234, 179, 8, 0.12);
}

.dropdown-option:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}

.dropdown-option:last-child {
    border-radius: 0 0 0.75rem 0.75rem;
}

.dropdown-check {
    width: 1.125rem;
    opacity: 0;
    color: var(--color-primary);
}

.dropdown-check-visible {
    opacity: 1;
}

/* Desktop: show native select, hide custom dropdown */
@media (min-width: 769px) {
    .landing-page .select-native {
        display: block;
    }
    .landing-page .select-custom {
        display: none !important;
    }
}

/* Mobile: hide native select, show custom dropdown so list drops below */
@media (max-width: 768px) {
    .landing-page .select-native {
        display: none !important;
    }
    .landing-page .select-custom {
        display: block !important;
    }
    .landing-page .dropdown-wrap {
        overflow: visible;
    }
}

/* CTA button: yellow-to-orange gradient */
.button-cta {
    height: 2.75rem;
    line-height: 2.75rem;
    padding: 0 1.5rem;
    background: var(--color-primary-gradient);
    color: #1c1917;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.button-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.35);
}

.button-cta:active {
    transform: translateY(0);
}

/* Desktop: two columns */
@media (min-width: 769px) {
    .landing-page {
        grid-template-columns: 42% 1fr;
        grid-template-rows: 1fr;
    }

    .landing-panel-brand {
        display: flex;
    }

    .landing-panel-form {
        background: #f8fafc;
    }

    .buy-data {
        max-width: 22rem;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04), 0 16px 40px -8px rgba(0,0,0,0.1);
    }

    .buy-data-form {
        gap: 0 1rem;
    }

    .buy-data-form .field {
        margin-bottom: 0.85rem;
    }
}

/* Mobile: compact so everything fits without scroll, card centered vertically */
@media (max-width: 768px) {
    .landing-page {
        grid-template-rows: 1fr;
    }

    .brand-mark-mobile {
        display: flex;
    }

    .landing-panel-form {
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .buy-data {
        padding: clamp(0.85rem, 3.5vw, 1.25rem);
    }

    .buy-data-header {
        margin-bottom: 1rem;
        padding-bottom: 0.85rem;
    }

    .landing-page .input-field {
        height: 2.5rem;
    }

    .landing-page label {
        font-size: 0.75rem;
    }

    .buy-data-form .field {
        margin-bottom: 0.5rem;
    }

    .buy-data-form .button-cta {
        margin-top: 0.35rem;
        height: 2.65rem;
        line-height: 2.65rem;
    }
}

.invalid-feedback {
  margin-top: 5px;
  width: 100%;
  margin-bottom: 0.25rem;
  font-size: 87.5%;
  color: var(--form-invalid-color);
  text-align: left;
}

@media (max-width: 768px) {
    .buy-data {
        padding: clamp(0.85rem, 3vw, 1.25rem);
    }

    .input-field, .button {
        width: 100%;
    }

    body:not(:has(.landing-page)) {
        padding: 20px;
    }

    .header {
        padding: 10px 20px;
    }

    .hamburger {
        display: block;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 5%;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        z-index: 999;
        border-radius: 8px;
    }

    .menu.menu-open {
        display: flex;
    }

    .dashboard {
        flex-direction: row;
    }

    .dashboard .hamburger {
        display: none;
    }

    .sidebar {
        width: 200px;
        display: block;
    }

    .content {
        padding: 20px;
    }

    .modal-content {
        padding: 20px;
        width: 400px;
    }
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: transparent;
    padding: 5%;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.96);
    padding: 2.2rem 2.4rem 2.1rem;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 1.5rem;
}

.login-card a {
    display: block;
    margin-top: 1rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

@media (max-width: 768px) {
    .login-card {
        padding: 1.5rem;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .input-field {
        font-size: 1rem;
        padding: 0 0.8rem;
    }

    .button {
        font-size: 1rem;
        padding: 0 1.5rem;
    }

    .login-card h2 {
        font-size: 1.5rem;
    }
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    text-align: center;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.signup-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 5%;
    background-color: transparent;
}

.signup-card {
    background-color: rgba(255, 255, 255, 0.96);
    padding: 2.2rem 2.4rem 2.1rem;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    max-width: 400px;
    width: 100%;
}

.signup-card h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #333;
}

@media (max-width: 768px) {
    .signup-card {
        padding: 1.5rem;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .signup-card h2 {
        font-size: 1.5rem;
    }

    .input-field, .button {
        font-size: 1rem;
    }
}

label {
    display: block;
    text-align: left;
    color: var(--color-text-muted); /* faint but readable */
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── OTP view ──────────────────────────────────────────────────────── */
.otp-view {
    text-align: center;
    padding: 0.25rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.otp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.3rem 0;
    margin-bottom: 1.5rem;
    transition: color 0.15s ease;
    align-self: flex-start;
}

.otp-back:hover {
    color: var(--color-text-main);
}

.otp-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: var(--color-primary);
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.32);
}

.otp-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.otp-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0 0 1.75rem;
}

.otp-subtitle strong {
    color: var(--color-text-main);
    font-weight: 600;
}

.otp-input-wrap {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.otp-digit {
    width: 2.75rem;
    height: 3.25rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: inherit;
    border: 1.5px solid var(--color-border-subtle);
    border-radius: 0.625rem;
    background: #f9fafb;
    color: var(--color-text-main);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    caret-color: var(--color-primary);
    -moz-appearance: textfield;
}

.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.otp-digit:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2);
    background: #ffffff;
}

.otp-verify-btn {
    width: 100%;
    height: 2.75rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--color-primary-gradient);
    color: #1c1917;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.3);
    margin-bottom: 1.1rem;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.otp-verify-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.38);
}

.otp-verify-btn:active {
    transform: translateY(0);
}

.otp-verify-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .otp-digit {
        width: 2.4rem;
        height: 2.9rem;
        font-size: 1.2rem;
        border-radius: 0.5rem;
    }

    .otp-input-wrap {
        gap: 0.375rem;
    }
}

/* ── Inline API error banner ───────────────────────────────────── */
.api-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 0.75rem;
    padding: 0.65rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.45;
    width: 100%;
    box-sizing: border-box;
}

.api-error-banner i {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #dc2626;
    font-size: 0.875rem;
}

/* ── Button loading spinner ────────────────────────────────────── */
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(28, 25, 23, 0.25);
    border-top-color: #1c1917;
    border-radius: 50%;
    display: inline-block;
    animation: btn-spin 0.65s linear infinite;
    flex-shrink: 0;
}

.button-cta:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Pending view ───────────────────────────────────────────────── */
.pending-view {
    text-align: center;
    padding: 0.25rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pending-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #fef9c3;
    color: #ca8a04;
    box-shadow: 0 0 0 6px rgba(202, 138, 4, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.35rem;
}

.pending-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

.pending-subtitle {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 1.4rem;
    line-height: 1.6;
    max-width: 22rem;
}

.pending-view .button-cta {
    width: 100%;
    margin-top: 0;
}

.pending-view .api-error-banner {
    width: 100%;
    margin-bottom: 1rem;
    text-align: left;
}

.pending-buy-again {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.3rem 0;
    margin-top: 0.75rem;
    transition: color 0.15s ease;
}

.pending-buy-again:hover {
    color: var(--color-text-main);
}

.pending-buy-again:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Result view ────────────────────────────────────────────────── */
.result-view {
    text-align: center;
    padding: 0.5rem 0;
}

.result-icon {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.4rem;
}

.result-icon-success {
    background: #dcfce7;
    color: #16a34a;
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.1);
}

.result-icon-error {
    background: #fee2e2;
    color: #dc2626;
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.1);
}

.result-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

.result-message {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 1.4rem;
    line-height: 1.6;
}

.result-details {
    background: #f9fafb;
    border: 1px solid var(--color-border-subtle);
    border-radius: 0.875rem;
    padding: 0.25rem 1rem;
    margin-bottom: 1.4rem;
    text-align: left;
}

.result-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-border-subtle);
}

.result-detail-row:last-child {
    border-bottom: none;
}

.result-detail-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-detail-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-main);
}