html, body {
    font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
    background: #f0f2f5;
    color: #1c1e21;
}

a, .btn-link {
    color: #1877f2;
}

.btn {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    font-size: 0.94rem;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    filter: brightness(0.96);
}

.btn-primary {
    color: #fff;
    background: #1877f2;
    border: 1px solid #1877f2;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.22);
}

.btn-primary:hover {
    background: #166fe5;
    border-color: #166fe5;
}

.btn-outline-primary {
    color: #1877f2;
    border-color: #1877f2;
    background: #fff;
}

.btn-outline-primary:hover {
    background: #e7f0ff;
    border-color: #1877f2;
    color: #1877f2;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.18);
}

.content {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

h1, h2, h3, h4 {
    color: #1c1e21;
}

h1 {
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.4rem;
}

h1:focus {
    outline: none;
}

.lead {
    color: #65676b;
    max-width: 72rem;
    font-size: 1rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1877f2;
}

.surface,
.hero-panel,
.info-card,
.auction-card,
.debate-card,
.form-shell,
.stat-card,
.cta-panel,
.page-hero,
.toolbar-card,
.empty-state,
.profile-hero,
.trust-banner {
    background: #ffffff;
    border: 1px solid #e4e6eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.hero-panel,
.debate-card,
.form-shell,
.page-hero,
.toolbar-card,
.empty-state,
.profile-hero,
.trust-banner {
    padding: 1.4rem;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 1rem;
    align-items: stretch;
    background: #ffffff;
    overflow: hidden;
}

.hero-panel-home {
    position: relative;
}

.hero-panel-home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(24, 119, 242, 0.06), transparent 40%);
    pointer-events: none;
}

.hero-copy,
.hero-aside {
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hero-aside {
    background: #1877f2;
    color: rgba(255,255,255,0.92);
    border-radius: 0.65rem;
    padding: 1.2rem;
}

.hero-aside h3,
.hero-aside h4,
.hero-aside strong {
    color: white;
}

.hero-aside .lead,
.hero-aside p,
.hero-aside li {
    color: rgba(255, 255, 255, 0.88);
}

.content-section {
    margin-top: 1.5rem;
}

.listing-capacity-panel {
    padding: 1.15rem 1.25rem;
    border: 2px solid #d7dbe3;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

.listing-capacity-panel-danger {
    border: 4px solid #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.14);
    background: linear-gradient(180deg, #fff5f5 0%, #ffe3e3 100%);
}

.listing-capacity-panel-danger .section-header h2,
.listing-capacity-panel-danger .listing-capacity-message {
    color: #7a1020;
}

.listing-capacity-message {
    font-size: 1rem;
    font-weight: 600;
}

.listing-capacity-icon {
    font-size: 1.15rem;
    margin-right: 0.45rem;
    vertical-align: -0.08rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}

.profile-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(50%, 1fr));
}

.profile-card-full {
    grid-column: 1 / -1;
}

.market-grid-tight {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.85rem;
}

.info-card,
.auction-card,
.stat-card {
    padding: 1.2rem;
}

.info-card {
    background: #ffffff;
}

.form-disabled {
    border: 0;
    padding: 0;
    margin: 0;
    opacity: 0.66;
}

.stat-card {
    text-align: left;
}

.inventory-stat-card,
.inventory-card {
    border: 1px solid #e4e6eb;
}

.inventory-card-title {
    font-size: 1.3rem;
}

.stat-label {
    display: block;
    color: #65676b;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1c1e21;
}

.pill-row,
.image-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.listing-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.listing-preview-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1px solid #e4e6eb;
    border-radius: 0.75rem;
    background: #ffffff;
}

.listing-preview-thumb {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 0.5rem;
    border: 1px solid #e4e6eb;
    background: #f0f2f5;
}

.listing-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #e7f0ff;
    border: 1px solid #c2d6fb;
    color: #1877f2;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pill.warm {
    background: #fff3e0;
    border-color: #ffd180;
    color: #b75000;
}

.status-pill.success {
    background: #e6f4ea;
    border-color: #81c784;
    color: #1e7e34;
}

.diagram {
    margin-bottom: 0;
    color: #44546f;
    white-space: pre-wrap;
    font-size: 0.9rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.9rem;
    border: 1px solid #e4e6eb;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0;
}

.stats-grid dt {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #65676b;
}

.stats-grid dd {
    margin: 0.15rem 0 0;
    font-weight: 700;
    color: #1c1e21;
    font-size: 1rem;
}

.card-kicker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.card-summary {
    color: #65676b;
    margin-bottom: 0.85rem;
}

.auction-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #ffffff;
}

.media-card {
    flex-direction: row;
    align-items: flex-start;
}

.media-card-figure {
    flex: 0 0 112px;
    width: 112px;
}

.media-card-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auction-image {
    width: 112px;
    height: 112px;
    object-fit: cover;
    border-radius: 0.5rem;
    background: #f0f2f5;
    border: 1px solid #e4e6eb;
}

.auction-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem;
}

.auction-header,
.profile-header-row {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: start;
}

.auction-price {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.auction-action-row,
.checkout-actions,
.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.auction-action-row .btn {
    flex: 1 1 12rem;
}

@media (max-width: 767.98px) {
    .media-card {
        flex-direction: column;
    }

    .media-card-figure,
    .auction-image {
        width: 100%;
    }

    .auction-image {
        height: 180px;
    }
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
    gap: 0.85rem;
}

.auction-price strong {
    font-size: 1.7rem;
    color: #1c1e21;
}

.auction-meta,
.muted {
    color: #65676b;
}

.toolbar-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.my-listing-card {
    overflow: hidden;
}

.my-listing-card-image-wrap {
    margin: -1.2rem -1.2rem 0;
}

.my-listing-image-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.my-listing-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    background: #f8f9fb;
}

.my-listing-card .auction-header {
    align-items: flex-start;
}

.my-listing-card .pill-row {
    max-width: 100%;
}

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(17, 24, 39, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-image {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    background: #ffffff;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.toolbar-card-stack {
    display: block;
}

.toolbar-search-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(2, minmax(160px, 1fr));
    gap: 0.65rem;
}

.empty-state {
    text-align: center;
}

.empty-state-compact {
    padding: 0.9rem 1rem;
}

.split-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    gap: 0.85rem;
}

.listing-detail-hero-image {
    width: 100%;
    height: 420px;
    object-fit: contain;
    border-radius: 0.75rem;
    border: 1px solid #e4e6eb;
    background: #f8f9fb;
}

.listing-detail-thumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.listing-detail-thumb-button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0.65rem;
    background: transparent;
    overflow: hidden;
}

.listing-detail-thumb-button.active {
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.14);
}

.listing-detail-thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    display: block;
    background: #f0f2f5;
}

.checklist,
.timeline-list,
.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li,
.timeline-list li,
.clean-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #e4e6eb;
    color: #44546f;
}

.checklist li:last-child,
.timeline-list li:last-child,
.clean-list li:last-child {
    border-bottom: none;
}

.timeline-step {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.75rem;
    align-items: start;
}

.timeline-step .step-badge {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    background: #1877f2;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.28);
}

.profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(210px, 0.7fr);
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.notice-strip {
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    background: #e7f0ff;
    border: 1px solid #c2d6fb;
    color: #1877f2;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.highlight-number {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.form-shell {
    padding: 1.5rem;
}

.form-shell .info-card {
    background: #ffffff;
}

.form-label {
    font-weight: 600;
    color: #1c1e21;
}

.form-control,
.form-select,
.form-check-input {
    background-color: #fff;
    border-color: #ced0d4;
    color: #1c1e21;
    border-radius: 0.5rem;
}

.form-control::placeholder {
    color: #8a9bbf;
}

.alert-dark {
    background-color: #e7f0ff;
    color: #1877f2;
    border-color: #c2d6fb;
}

.alert-danger,
.alert-success {
    border-radius: 0.6rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #d13b3b;
}

.auth-grid {
    align-items: stretch;
}

.auth-primary-card {
    position: relative;
    overflow: hidden;
}

.auth-primary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 0.35rem;
    background: linear-gradient(90deg, #1877f2, #46a0ff);
}

.auth-form-stack {
    display: grid;
    gap: 1rem;
}

.auth-hero-aside {
    align-self: stretch;
}

.auth-inline-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-inline-link:hover {
    text-decoration: underline;
}

.auth-feature-list {
    display: grid;
    gap: 0.85rem;
}

.auth-feature-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border: 1px solid #e4e6eb;
    border-radius: 0.7rem;
    background: #f8faff;
}

.auth-feature-item strong {
    color: #1c1e21;
}

.auth-feature-item span,
.auth-password-rules {
    color: #65676b;
}

.auth-password-rules {
    padding: 0.9rem 1rem;
    border-radius: 0.7rem;
    background: #f8faff;
    border: 1px solid #d9e5fb;
    font-size: 0.94rem;
}

.auth-support-panel {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #d9e5fb;
    background: #f8faff;
}

.auth-confirm-state {
    display: grid;
    gap: 1rem;
    justify-items: center;
}

.auth-confirm-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
}

.auth-confirm-icon-success {
    background: #e9f8ef;
    color: #1e8e4a;
}

.auth-confirm-icon-failure {
    background: #fff1f1;
    color: #d13b3b;
}

.blazor-error-boundary {
    background: #7b1d1d;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.content-shell {
    max-width: 1280px;
    margin: 0 auto;
}

.business-subtitle {
    font-size: 0.92rem;
    color: #65676b;
}

.inventory-group {
    margin-bottom: 1.75rem;
}

.cta-panel {
    background: #ffffff;
}

@media (max-width: 991.98px) {
    .page-hero,
    .split-panel,
    .checkout-layout,
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-card-grid {
        grid-template-columns: 1fr;
    }

    .listing-detail-hero-image {
        height: 320px;
    }
}

/* Wallet balance display in nav */
.wallet-balance-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    color: #e2f0ff;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0.75rem;
}

.wallet-balance-amount {
    color: #ffffff;
    font-weight: 700;
}

/* Verification badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #e6f4ea;
    border: 1px solid #81c784;
    color: #1e7e34;
    font-size: 0.78rem;
    font-weight: 700;
}

.unverified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #fff3e0;
    border: 1px solid #ffd180;
    color: #b75000;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Dashboard / balance card */
.balance-panel {
    background: #1877f2;
    color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.2rem;
}

.balance-panel .balance-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.82;
    margin-bottom: 0.25rem;
}

.balance-panel .balance-amount {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

.balance-panel .balance-sub {
    font-size: 0.85rem;
    opacity: 0.82;
    margin-top: 0.25rem;
}

.balance-panel .balance-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.balance-panel .balance-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 991.98px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hero-panel,
    .page-hero,
    .split-panel,
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .toolbar-card,
    .auction-header,
    .profile-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-search-grid {
        grid-template-columns: 1fr;
    }
}
