/*
 * HitSurf / ScriptBucks Marketplace Theme
 * Shared visual language ported from the ScriptBucks storefront theme.
 */
:root {
    --sb-market-bg: #f9fafb;
    --sb-market-surface: #ffffff;
    --sb-market-border: #e5e7eb;
    --sb-market-border-soft: #eef2f7;
    --sb-market-text: #111827;
    --sb-market-muted: #6b7280;
    --sb-market-blue: #2563eb;
    --sb-market-indigo: #4f46e5;
    --sb-market-indigo-dark: #4338ca;
    --sb-market-indigo-soft: #eef2ff;
    --sb-market-success: #198754;
    --sb-market-danger: #dc3545;
    --sb-market-warning: #f59e0b;
    --sb-market-radius: 10px;
    --sb-market-shadow: 0 1px 2px rgba(15, 23, 42, .045);
    --sb-market-shadow-hover: 0 8px 20px rgba(15, 23, 42, .08);
}

html { background: var(--sb-market-bg); }
body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    background: var(--sb-market-bg) !important;
    color: var(--sb-market-text) !important;
}

/* Header — same light marketplace chrome as ScriptBucks. */
body .sb-topbar {
    min-height: 58px;
    background: rgba(255, 255, 255, .97) !important;
    border-bottom: 1px solid var(--sb-market-border) !important;
    box-shadow: var(--sb-market-shadow) !important;
    backdrop-filter: blur(12px);
}
body .sb-navbar-inner { min-height: 58px; }
body .sb-brand { color: var(--sb-market-text) !important; font-weight: 700 !important; }
body .sb-brand-mark {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border: 1px solid #c7d2fe !important;
    border-radius: 9px !important;
    background: var(--sb-market-indigo-soft) !important;
    color: var(--sb-market-indigo) !important;
    box-shadow: none !important;
}
body .sb-brand-name { color: var(--sb-market-text) !important; font-size: 15px; font-weight: 700; }
body .sb-brand-subtitle { color: #9ca3af !important; font-weight: 600 !important; }
body .sb-topbar .nav-link {
    color: var(--sb-market-muted) !important;
    font-size: 12.5px;
    font-weight: 600 !important;
    border-radius: 7px !important;
}
body .sb-topbar .nav-link:hover,
body .sb-topbar .nav-link:focus,
body .sb-topbar .nav-link.active {
    color: var(--sb-market-text) !important;
    background: #f3f4f6 !important;
}
body .sb-topbar .navbar-toggler {
    color: #6b7280 !important;
    border: 1px solid var(--sb-market-border) !important;
    background: #fff !important;
    border-radius: 8px !important;
}
body .sb-topbar .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(99, 102, 241, .12) !important; }
body .sb-topbar .navbar-toggler-icon {
    filter: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2831,41,55,.78%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
body .sb-stat-pill {
    color: #4b5563 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}
body .sb-stat-pill:hover,
body .sb-stat-pill:focus { color: var(--sb-market-indigo) !important; background: var(--sb-market-indigo-soft) !important; border-color: #c7d2fe !important; }
body .sb-account-avatar {
    background: var(--sb-market-indigo-soft) !important;
    color: var(--sb-market-indigo) !important;
    border: 1px solid #c7d2fe;
}
body .sb-premium-chip { color: #166534 !important; background: #ecfdf3 !important; border-color: #bbf7d0 !important; }
body .sb-auth-login { color: #4b5563 !important; background: #fff !important; border: 1px solid #d1d5db; }
body .sb-auth-signup { color: #fff !important; background: var(--sb-market-indigo) !important; }
body .sb-auth-signup:hover { background: var(--sb-market-indigo-dark) !important; }
body .sb-surf-button {
    border-radius: 7px !important;
    box-shadow: none !important;
    font-weight: 650 !important;
}
body .sb-nav-badge {
    background: var(--sb-market-indigo) !important;
    box-shadow: none !important;
}
body .sb-nav-badge-hot { background: var(--sb-market-success) !important; }
body .sb-dropdown-menu,
body .dropdown-menu {
    border: 1px solid var(--sb-market-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12) !important;
}
body .sb-dropdown-menu .dropdown-item,
body .dropdown-menu .dropdown-item { color: #4b5563 !important; font-weight: 600 !important; }
body .sb-dropdown-menu .dropdown-item:hover,
body .sb-dropdown-menu .dropdown-item:focus,
body .dropdown-menu .dropdown-item:hover,
body .dropdown-menu .dropdown-item:focus { color: var(--sb-market-text) !important; background: #f3f4f6 !important; }
body .sb-dropdown-header { color: #9ca3af !important; }

/* Main canvas */
body .sb-page-container { padding-top: 22px; padding-bottom: 28px; }
body .sb-page-content { color: var(--sb-market-text); }
body h1, body h2, body h3, body h4, body h5, body h6 { color: var(--sb-market-text); letter-spacing: -.02em; }
body p, body .text-muted { color: var(--sb-market-muted) !important; }
body a { color: var(--sb-market-indigo); }
body a:hover { color: var(--sb-market-indigo-dark); }

/* Standard Bootstrap 3/5-era cards/panels used throughout HitSurf. */
body .panel,
body .card,
body .thumbnail,
body .sb-imp-hero,
body .sb-imp-card,
body .sb-side-card,
body .sb-contest-box,
body .sb-offer-card,
body .sb-progress-box,
body .sb-style-card,
body .sb-coupon-form,
body .sb-settings-form,
body .sb-edit-form,
body .sb-ticket-form,
body .sb-contact-form,
body .sb-signup-form,
body .sb-reset-form,
body .sb-username-form,
body .sb-redeem-form {
    background: var(--sb-market-surface) !important;
    border: 1px solid var(--sb-market-border) !important;
    border-radius: var(--sb-market-radius) !important;
    box-shadow: var(--sb-market-shadow) !important;
}
body .panel { overflow: hidden; }
body .panel-heading,
body .card-header,
body .sb-side-card-heading {
    background: #fff !important;
    border-bottom: 1px solid var(--sb-market-border-soft) !important;
    color: var(--sb-market-text) !important;
    font-weight: 650 !important;
}
body .panel-footer,
body .card-footer {
    background: #f9fafb !important;
    border-top: 1px solid var(--sb-market-border-soft) !important;
}
body .panel-primary > .panel-heading,
body .panel-info > .panel-heading,
body .panel-success > .panel-heading,
body .panel-warning > .panel-heading,
body .panel-danger > .panel-heading {
    color: var(--sb-market-text) !important;
    background: #fff !important;
    border-color: var(--sb-market-border-soft) !important;
}
body .panel-primary { border-top: 2px solid var(--sb-market-indigo) !important; }
body .panel-success { border-top: 2px solid #22c55e !important; }
body .panel-info { border-top: 2px solid #0ea5e9 !important; }
body .panel-warning { border-top: 2px solid #f59e0b !important; }
body .panel-danger { border-top: 2px solid #ef4444 !important; }

/* Buttons */
body .btn { border-radius: 7px !important; font-weight: 600 !important; box-shadow: none !important; }
body .btn-primary {
    color: #fff !important;
    background: var(--sb-market-indigo) !important;
    border-color: var(--sb-market-indigo) !important;
}
body .btn-primary:hover,
body .btn-primary:focus,
body .btn-primary:active { background: var(--sb-market-indigo-dark) !important; border-color: var(--sb-market-indigo-dark) !important; }
body .btn-default,
body .btn-secondary,
body .btn-outline-secondary,
body .btn-outline-dark {
    color: #4b5563 !important;
    background: #fff !important;
    border-color: #d1d5db !important;
}
body .btn-default:hover,
body .btn-secondary:hover,
body .btn-outline-secondary:hover,
body .btn-outline-dark:hover { color: var(--sb-market-text) !important; background: #f3f4f6 !important; border-color: #c7cdd6 !important; }
body .btn-outline-primary { color: var(--sb-market-indigo) !important; border-color: #a5b4fc !important; background: #fff !important; }
body .btn-outline-primary:hover { color: var(--sb-market-indigo-dark) !important; border-color: #818cf8 !important; background: var(--sb-market-indigo-soft) !important; }

/* Forms */
body .form-control,
body .form-select,
body .input-group-text,
body select,
body textarea {
    border-color: #d1d5db !important;
    border-radius: 7px !important;
    background-color: #fff !important;
    color: var(--sb-market-text) !important;
    box-shadow: none !important;
}
body .form-control:focus,
body .form-select:focus,
body select:focus,
body textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .13) !important;
}
body label,
body .form-label { color: #374151 !important; font-weight: 600; }
body .help-block,
body .form-text,
body .sb-field-help { color: #9ca3af !important; }

/* Select arrows
 * Bootstrap 5 removes the browser-native arrow from .form-control via
 * appearance:none. A number of legacy HitSurf selects still use
 * class="form-control" instead of form-select, so explicitly draw the
 * same chevron for both class patterns. Keep multi-select/list boxes alone. */
body select.form-control:not([multiple]):not([size]),
body select.form-control:not([multiple])[size="1"],
body select.form-select:not([multiple]):not([size]),
body select.form-select:not([multiple])[size="1"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 2.5rem !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right .8rem center !important;
    background-size: 16px 16px !important;
}
body select.form-control:not([multiple]):not([size]):disabled,
body select.form-control:not([multiple])[size="1"]:disabled,
body select.form-select:not([multiple]):not([size]):disabled,
body select.form-select:not([multiple])[size="1"]:disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    opacity: 1;
}

/* Keep Bootstrap input groups visually connected.
 * The generic light-theme radius above uses !important, so the group
 * edge rules must be equally explicit or every child becomes a pill/card. */
body .input-group {
    flex-wrap: nowrap;
}
body .input-group > .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
body .input-group > .input-group-text + .form-control,
body .input-group > .input-group-text + .form-select {
    margin-left: -1px;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
body .input-group > .form-control:not(:last-child),
body .input-group > .form-select:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
body .input-group > .form-control + .btn,
body .input-group > .form-select + .btn,
body .input-group > .input-group-text + .btn {
    margin-left: -1px;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
body .input-group > .btn:last-child {
    border-top-right-radius: 7px !important;
    border-bottom-right-radius: 7px !important;
}
body .input-group > .form-control:focus,
body .input-group > .form-select:focus {
    position: relative;
    z-index: 3;
}
body .input-group > .btn {
    position: relative;
    z-index: 2;
}

/* Tables */
body .table,
body table { color: #374151; }
body .table > :not(caption) > * > *,
body .table th,
body .table td,
body table th,
body table td { border-color: var(--sb-market-border-soft) !important; }
body .table thead th,
body table thead th {
    background: #f9fafb !important;
    color: #6b7280 !important;
    font-size: 11px;
    font-weight: 700 !important;
    letter-spacing: .045em;
    text-transform: uppercase;
}
body .table-hover tbody tr:hover > * { background: #fafafa !important; }

/* Alerts and badges */
body .alert { border-radius: 9px !important; border-width: 1px !important; box-shadow: none !important; }
body .alert-info { color: #075985 !important; background: #f0f9ff !important; border-color: #bae6fd !important; }
body .alert-success { color: #166534 !important; background: #f0fdf4 !important; border-color: #bbf7d0 !important; }
body .alert-warning { color: #92400e !important; background: #fffbeb !important; border-color: #fde68a !important; }
body .alert-danger { color: #991b1b !important; background: #fef2f2 !important; border-color: #fecaca !important; }
body .badge,
body .label { border-radius: 999px !important; font-weight: 700 !important; }

/* HitSurf bespoke page components */
body .sb-hero,
body .sb-coupon-hero,
body .sb-contests-hero,
body .sb-imp-hero,
body .sb-daily-showcase {
    background: #fff !important;
    color: var(--sb-market-text) !important;
    border: 1px solid var(--sb-market-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--sb-market-shadow) !important;
}
body .sb-section-badge,
body .sb-status-pill,
body .sb-status-badge {
    background: var(--sb-market-indigo-soft) !important;
    color: var(--sb-market-indigo) !important;
    border-color: #c7d2fe !important;
}
body .sb-stat-icon,
body .sb-coupon-stat-icon,
body .sb-store-stat-icon,
body .sb-points-stat-icon,
body .sb-referral-stat-icon,
body .sb-empty-icon {
    background: var(--sb-market-indigo-soft) !important;
    color: var(--sb-market-indigo) !important;
    border-color: #c7d2fe !important;
    box-shadow: none !important;
}
body .sb-submit-bar,
body .sb-admin-submit-bar {
    background: #f9fafb !important;
    border-color: var(--sb-market-border) !important;
    box-shadow: none !important;
}
body .sb-pagination .page-link,
body .pagination .page-link {
    color: #4b5563 !important;
    border-color: var(--sb-market-border) !important;
}
body .sb-pagination .active .page-link,
body .pagination .active .page-link {
    color: #fff !important;
    background: var(--sb-market-indigo) !important;
    border-color: var(--sb-market-indigo) !important;
}

/* Sidebar + footer */
body .sb-sidebar-panel {
    background: #fff !important;
    border: 1px solid var(--sb-market-border) !important;
    border-radius: 10px !important;
    box-shadow: var(--sb-market-shadow) !important;
}
body .sb-sidebar-panel-header {
    background: #fff !important;
    border-bottom: 1px solid var(--sb-market-border-soft) !important;
}
body .sb-sidebar-panel-title { color: var(--sb-market-text) !important; font-weight: 650 !important; }
body .sb-sidebar-panel-title i { color: var(--sb-market-indigo) !important; }
body .sb-mini-stat { background: #f9fafb !important; border-color: var(--sb-market-border-soft) !important; border-radius: 8px !important; }
body .sb-mini-value,
body .sb-balance-value { color: var(--sb-market-text) !important; }
body .sb-mini-label,
body .sb-balance-label,
body .sb-daily-copy,
body .sb-progress-meta { color: var(--sb-market-muted) !important; }
body .sb-footer {
    background: #fff !important;
    border-top: 1px solid var(--sb-market-border) !important;
    color: var(--sb-market-muted) !important;
}
body .sb-footer a { color: #6b7280 !important; }
body .sb-footer a:hover { color: var(--sb-market-indigo) !important; }

/* Modals */
body .modal-content {
    border: 1px solid var(--sb-market-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .16) !important;
}
body .modal-header,
body .modal-footer { border-color: var(--sb-market-border-soft) !important; }

@media (max-width: 1199.98px) {
    body .sb-topbar .navbar-collapse {
        background: #fff !important;
        border: 1px solid var(--sb-market-border) !important;
        box-shadow: 0 14px 34px rgba(15, 23, 42, .12) !important;
    }
    body .sb-topbar .nav-link { color: #4b5563 !important; }
}

@media (max-width: 767.98px) {
    body .sb-page-container { padding-top: 14px; }
    body .panel,
    body .card,
    body .sb-sidebar-panel { border-radius: 9px !important; }
}


/* -------------------------------------------------------------------------
   ScriptBucks member shell: persistent LEFT navigation on authenticated pages
   ------------------------------------------------------------------------- */
body.sb-member-sidebar-layout .sb-page-container {
    max-width: 1440px;
    padding-top: 18px;
}
body.sb-member-sidebar-layout .sb-page-row {
    align-items: flex-start;
}
body .sb-member-left-col {
    position: relative;
}
body .sb-member-left {
    position: sticky;
    top: 78px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--sb-market-border);
    border-radius: 10px;
    box-shadow: var(--sb-market-shadow);
}
body .sb-member-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 15px 13px;
    border-bottom: 1px solid var(--sb-market-border-soft);
}
body .sb-member-profile-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--sb-market-indigo-soft);
    border: 1px solid #c7d2fe;
    color: var(--sb-market-indigo);
    font-size: .88rem;
    font-weight: 800;
}
body .sb-member-profile-copy {
    min-width: 0;
}
body .sb-member-profile-copy strong,
body .sb-member-profile-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body .sb-member-profile-copy strong {
    color: #111827;
    font-size: .88rem;
    font-weight: 700;
}
body .sb-member-profile-copy span {
    margin-top: 2px;
    color: #6b7280;
    font-size: .72rem;
}
body .sb-member-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 12px 8px;
    padding: 10px 11px;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    background: #f8faff;
}
body .sb-member-balance span {
    color: #6b7280;
    font-size: .72rem;
    font-weight: 650;
}
body .sb-member-balance strong,
body .sb-member-balance strong span {
    color: #111827 !important;
    font-size: .92rem;
    font-weight: 800;
}
body .sb-member-surf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 12px 12px;
    width: calc(100% - 24px);
    min-height: 38px;
}
body .sb-member-nav {
    padding: 3px 0 9px;
    border-top: 1px solid var(--sb-market-border-soft);
}
body .sb-member-nav-label {
    padding: 13px 15px 5px;
    color: #9ca3af;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
body .sb-member-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    margin: 1px 8px;
    padding: 8px 9px;
    border-radius: 7px;
    color: #5f6b7a !important;
    text-decoration: none !important;
    font-size: .82rem;
    font-weight: 600;
}
body .sb-member-nav-link > i {
    width: 18px;
    color: #8b95a5;
    font-size: .92rem;
    text-align: center;
}
body .sb-member-nav-link:hover,
body .sb-member-nav-link:focus {
    color: #111827 !important;
    background: #f3f4f6;
}
body .sb-member-nav-link.active {
    color: #3730a3 !important;
    background: #eef2ff;
}
body .sb-member-nav-link.active > i {
    color: #4f46e5;
}
body .sb-member-nav-count {
    min-width: 20px;
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: .65rem;
    font-weight: 800;
    text-align: center;
}
body .sb-member-nav-count.is-live {
    background: #ecfdf3;
    color: #166534;
}
body .sb-member-left-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--sb-market-border-soft);
    background: #fafafa;
}
body .sb-member-left-footer a {
    color: #6b7280 !important;
    text-decoration: none !important;
    font-size: .78rem;
    font-weight: 650;
}
body .sb-member-left-footer a:hover { color: #dc2626 !important; }

/* Public pages should not inherit a phantom Bootstrap 9/3-column layout. */
body.sb-public-layout .sb-page-container > .sb-page-row > :first-child {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

/* Keep the authenticated desktop top bar clean now that navigation is left-side. */
@media (min-width: 1200px) {
    body.sb-member-sidebar-layout .sb-topbar .sb-nav-group.me-auto {
        display: none !important;
    }
}

/* -------------------------------------------------------------------------
   Light-theme contrast repair
   The legacy design had several white/pale text rules intended for dark cards.
   ------------------------------------------------------------------------- */
body .text-muted,
body .small.text-muted,
body small.text-muted {
    color: #6b7280 !important;
}
body .text-secondary { color: #6b7280 !important; }
body .form-control::placeholder,
body textarea::placeholder { color: #9ca3af !important; opacity: 1; }
body .sb-auth-signup,
body .sb-auth-signup:visited,
body .sb-auth-signup span,
body .sb-auth-signup i { color: #fff !important; }
body .btn-primary,
body .btn-primary:visited,
body .btn-success,
body .btn-danger,
body .btn-info { color: #fff !important; }
body .btn-primary *,
body .btn-success *,
body .btn-danger * { color: inherit !important; }

/* Homepage: convert former dark full-width section to an intentional light section. */
body .sb-home-page .sb-section {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body .sb-home-page .sb-section-dark {
    color: #111827 !important;
    background: #f8fafc !important;
    border-top: 1px solid #eef2f7 !important;
    border-bottom: 1px solid #eef2f7 !important;
}
body .sb-home-page .sb-section-dark .sb-section-title,
body .sb-home-page .sb-section-dark h1,
body .sb-home-page .sb-section-dark h2,
body .sb-home-page .sb-section-dark h3,
body .sb-home-page .sb-final-cta h2 {
    color: #111827 !important;
}
body .sb-home-page .sb-section-dark .sb-section-copy,
body .sb-home-page .sb-section-dark p,
body .sb-home-page .sb-final-cta p {
    color: #64748b !important;
}
body .sb-home-page .sb-section-dark .sb-eyebrow,
body .sb-home-page .sb-final-cta .sb-eyebrow {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border: 1px solid #dfe3ff !important;
}
body .sb-home-page .sb-final-cta {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.05) !important;
}
body .sb-home-page .sb-final-cta:before,
body .sb-home-page .sb-final-cta:after {
    background: rgba(79,70,229,.08) !important;
}
body .sb-home-page .sb-final-cta .sb-primary-cta {
    color: #fff !important;
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    box-shadow: none !important;
}
body .sb-home-page .sb-final-cta .sb-primary-cta:hover,
body .sb-home-page .sb-final-cta .sb-primary-cta:focus {
    color: #fff !important;
    background: #4338ca !important;
    border-color: #4338ca !important;
}
body .sb-home-page .sb-final-cta .sb-secondary-cta {
    color: #374151 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
}
body .sb-home-page .sb-final-cta .sb-secondary-cta:hover,
body .sb-home-page .sb-final-cta .sb-secondary-cta:focus {
    color: #111827 !important;
    background: #f3f4f6 !important;
    border-color: #c7cdd6 !important;
}
body .sb-home-page .sb-cta-trust,
body .sb-home-page .sb-final-cta .sb-cta-trust {
    color: #6b7280 !important;
}
body .sb-home-page .sb-final-cta .sb-cta-trust i { color: #22c55e !important; }

/* Generic white cards that used legacy dark-theme helper text. */
body .sb-imp-hero p,
body .sb-imp-card p,
body .sb-side-card p,
body .sb-coupon-form p,
body .sb-settings-form p,
body .sb-edit-form p,
body .sb-ticket-form p,
body .sb-contact-form p,
body .sb-signup-form p,
body .sb-reset-form p,
body .sb-username-form p,
body .sb-redeem-form p {
    color: #64748b !important;
}

@media (max-width: 991.98px) {
    body .sb-member-left-col { display: none; }
    body.sb-member-sidebar-layout .sb-page-container > .sb-page-row > .col-lg-9 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
}

/* Light hero/card typography for components whose background is normalized to white. */
body .sb-hero,
body .sb-coupon-hero,
body .sb-contests-hero,
body .sb-imp-hero,
body .sb-daily-showcase {
    color: #111827 !important;
}
body .sb-hero h1, body .sb-hero h2, body .sb-hero h3,
body .sb-coupon-hero h1, body .sb-coupon-hero h2, body .sb-coupon-hero h3,
body .sb-contests-hero h1, body .sb-contests-hero h2, body .sb-contests-hero h3,
body .sb-imp-hero h1, body .sb-imp-hero h2, body .sb-imp-hero h3,
body .sb-daily-showcase h1, body .sb-daily-showcase h2, body .sb-daily-showcase h3 {
    color: #111827 !important;
}
body .sb-hero > p,
body .sb-coupon-hero > p,
body .sb-contests-hero p,
body .sb-imp-hero p,
body .sb-daily-showcase p {
    color: #64748b !important;
}
body .sb-contests-hero .sb-contests-kicker {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}
body .sb-contests-hero .sb-contests-auto {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}
body .sb-contests-hero .sb-contests-auto strong { color: #111827 !important; }
body .sb-contests-hero .sb-contests-auto span { color: #64748b !important; }

/* Homepage light conversion for legacy dark promo blocks. */
body .sb-home-page .sb-daily-showcase {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.05) !important;
}
body .sb-home-page .sb-daily-showcase h3 { color: #111827 !important; }
body .sb-home-page .sb-daily-showcase > p { color: #64748b !important; }
body .sb-home-page .sb-daily-list-item {
    color: #374151 !important;
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}
body .sb-home-page .sb-daily-list-item i { color: #4f46e5 !important; }
body .sb-home-page .sb-contest-box {
    color: #111827 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.05) !important;
}
body .sb-home-page .sb-contest-kicker { color: #4f46e5 !important; }
body .sb-home-page .sb-contest-box h3 { color: #111827 !important; }
body .sb-home-page .sb-contest-box p { color: #64748b !important; }
body .sb-home-page .sb-contest-rewards {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
}
body .sb-home-page .sb-contest-rewards span { color: #374151 !important; }
body .sb-home-page .sb-contest-rewards i { color: #4f46e5 !important; }

/* Public authentication polish. */
body .sb-topbar .sb-auth-btn {
    min-height: 36px;
    padding: 8px 13px !important;
    white-space: nowrap;
}
body .sb-topbar .sb-auth-login {
    color: #4b5563 !important;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
}
body .sb-topbar .sb-auth-signup,
body .sb-topbar .sb-auth-signup:hover,
body .sb-topbar .sb-auth-signup:focus {
    color: #fff !important;
    background: #4f46e5 !important;
    border: 1px solid #4f46e5 !important;
}
body .sb-topbar .sb-auth-signup:hover,
body .sb-topbar .sb-auth-signup:focus { background: #4338ca !important; border-color: #4338ca !important; }
body .sb-login-hero,
body .sb-login-panel,
body .sb-login-stat,
body .sb-signup-hero,
body .sb-signup-panel,
body .sb-signup-stat {
    border-color: #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.05) !important;
}
body .sb-login-panel-title,
body .sb-signup-panel-title { color: #111827 !important; }
body .sb-login-panel-note,
body .sb-signup-panel-note,
body .sb-submit-note,
body .sb-field-help { color: #6b7280 !important; }


/* -------------------------------------------------------------------------
   Site-wide legacy dark-surface normalization
   Several older page modules define dark gradients in page-local <style>
   blocks after this stylesheet loads. These !important rules intentionally
   normalize normal content surfaces to the ScriptBucks light marketplace
   theme while leaving functional overlays/toasts/status colors intact.
   ------------------------------------------------------------------------- */

/* Statistics / summary feature surfaces */
body .sb-global {
    color: #111827 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f7f8ff 100%) !important;
    border: 1px solid #dfe3ff !important;
    box-shadow: var(--sb-market-shadow) !important;
}
body .sb-global h1,
body .sb-global h2,
body .sb-global h3,
body .sb-global h4,
body .sb-global h5,
body .sb-global h6,
body .sb-global strong,
body .sb-global small { color: #111827 !important; }
body .sb-global p,
body .sb-global span,
body .sb-global .text-muted { color: #64748b !important; }

/* Contest listing/detail heroes */
body .sb-contests-hero,
body .sb-detail-hero {
    color: #111827 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%) !important;
    border: 1px solid #dfe3ff !important;
    border-radius: 10px !important;
    box-shadow: var(--sb-market-shadow) !important;
}
body .sb-contests-hero:after { background: rgba(79, 70, 229, .07) !important; }
body .sb-contests-hero h1,
body .sb-contests-hero h2,
body .sb-contests-hero h3,
body .sb-detail-hero h1,
body .sb-detail-hero h2,
body .sb-detail-hero h3,
body .sb-detail-hero strong { color: #111827 !important; }
body .sb-contests-hero p,
body .sb-detail-hero p { color: #64748b !important; }
body .sb-detail-tag,
body .sb-contests-kicker {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}
body .sb-detail-metric,
body .sb-contests-auto {
    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}
body .sb-detail-metric small,
body .sb-contests-auto span { color: #64748b !important; }
body .sb-contest-countdown {
    color: #111827 !important;
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 9px !important;
}
body .sb-contest-countdown small { color: #4f46e5 !important; }
body .sb-contest-countdown strong { color: #111827 !important; }

/* Points / premium package headers */
body .sb-pack-header {
    color: #111827 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%) !important;
    border-bottom: 1px solid #e5e7eb !important;
}
body .sb-pack-header h1,
body .sb-pack-header h2,
body .sb-pack-header h3,
body .sb-pack-header h4,
body .sb-pack-header strong { color: #111827 !important; }
body .sb-pack-header p,
body .sb-pack-header span,
body .sb-pack-header small { color: #64748b !important; }

/* Coupon/code presentation blocks should no longer look like dark-theme cards. */
body .sb-code-preview,
body .sb-coupon-preview-code {
    color: #312e81 !important;
    background: #f5f3ff !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}
body .sb-code-preview strong,
body .sb-coupon-preview-code strong { color: #312e81 !important; }
body .sb-code-pill {
    color: #4338ca !important;
    background: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
}

/* Homepage: remove the last large dark-theme hero/onboarding surface. */
body .sb-home-page .sb-home-hero {
    color: #111827 !important;
    background:
        radial-gradient(circle at 12% 10%, rgba(99, 102, 241, .10), transparent 30%),
        radial-gradient(circle at 85% 25%, rgba(37, 99, 235, .08), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f7f8ff 100%) !important;
    border-bottom: 1px solid #e5e7eb !important;
}
body .sb-home-page .sb-home-hero:before {
    opacity: .45 !important;
    background-image:
        linear-gradient(rgba(99,102,241,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,.045) 1px, transparent 1px) !important;
}
body .sb-home-page .sb-home-hero:after { border-color: rgba(79,70,229,.055) !important; }
body .sb-home-page .sb-home-kicker {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}
body .sb-home-page .sb-home-title,
body .sb-home-page .sb-onboarding-title,
body .sb-home-page .sb-onboarding-step strong { color: #111827 !important; }
body .sb-home-page .sb-home-title-accent { color: #4f46e5 !important; }
body .sb-home-page .sb-home-subtitle,
body .sb-home-page .sb-home-microcopy,
body .sb-home-page .sb-onboarding-copy,
body .sb-home-page .sb-onboarding-step p { color: #64748b !important; }
body .sb-home-page .sb-onboarding-card {
    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(15,23,42,.06) !important;
    backdrop-filter: none !important;
}
body .sb-home-page .sb-onboarding-number {
    color: #4f46e5 !important;
    background: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
    box-shadow: none !important;
}
body .sb-home-page .sb-onboarding-step:not(:last-of-type) .sb-onboarding-number:after {
    background: #e5e7eb !important;
}
body .sb-home-page .sb-free-badge {
    color: #166534 !important;
    background: #ecfdf3 !important;
    border-color: #bbf7d0 !important;
}
body .sb-home-page .sb-onboarding-result {
    color: #166534 !important;
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
body .sb-home-page .sb-onboarding-result strong { color: #166534 !important; }
body .sb-home-page .sb-onboarding-result span { color: #4b7a5b !important; }
body .sb-home-page .sb-onboarding-result i { color: #16a34a !important; }
body .sb-home-page .sb-home-hero .sb-primary-cta {
    color: #ffffff !important;
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    box-shadow: none !important;
}
body .sb-home-page .sb-home-hero .sb-primary-cta:hover,
body .sb-home-page .sb-home-hero .sb-primary-cta:focus {
    color: #ffffff !important;
    background: #4338ca !important;
    border-color: #4338ca !important;
}
body .sb-home-page .sb-home-hero .sb-secondary-cta,
body .sb-home-page .sb-dark-cta {
    color: #374151 !important;
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
}
body .sb-home-page .sb-home-hero .sb-secondary-cta:hover,
body .sb-home-page .sb-home-hero .sb-secondary-cta:focus,
body .sb-home-page .sb-dark-cta:hover,
body .sb-home-page .sb-dark-cta:focus {
    color: #111827 !important;
    background: #f3f4f6 !important;
    border-color: #c7cdd6 !important;
}

/* Keep normal content card corners consistent with ScriptBucks. */
body .sb-st-card,
body .sb-detail-card,
body .sb-contest-card,
body .sb-history-panel,
body .sb-pack-card {
    border-radius: 10px !important;
    border-color: #e5e7eb !important;
    box-shadow: var(--sb-market-shadow) !important;
}
