* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #ede9fe;
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f3f4f6;
    --border: #e5e7eb;
    --text-dark: #111827;
    --text-light: #6b7280;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    border-bottom: 2px solid var(--primary-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
    gap: 2rem;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-brand h1 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin: 0;
}

.nav-brand .tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-center {
    flex: 1;
}

.search-bar-nav {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    transition: border-color 0.3s;
}

.search-bar-nav:focus-within {
    border-color: var(--primary);
}

.search-bar-nav input {
    flex: 1;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    background: none;
}

.search-bar-nav input:focus {
    outline: none;
}

.search-btn-nav {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem 0.75rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    flex-shrink: 0;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 2px;
}

.btn-primary-nav {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.4rem;
    border-radius: 0.4rem;
    font-weight: 600;
}

.btn-primary-nav:hover {
    background: var(--primary-dark);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* ==================== HERO ==================== */
.hero-split {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0e7fe 100%);
    padding: 5rem 0;
    text-align: center;
}

.hero-split h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-split > .container > p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-ctas {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
    align-items: center;
}

.cta-group {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-group h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-divider {
    color: var(--text-light);
    font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-primary-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-secondary-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ==================== BUYER DEMAND BOARD ==================== */
.buyer-demand {
    padding: 4rem 0;
    background: #f9fafb;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.demand-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--border);
    background: white;
    color: var(--text-dark);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.demand-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.demand-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
}

.demand-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
    transform: translateY(-4px);
}

.demand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.demand-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    flex: 1;
}

.demand-urgency {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.demand-meta {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.demand-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.demand-description {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.demand-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.demand-posted {
    font-size: 0.85rem;
    color: var(--text-light);
}

.cta-center {
    text-align: center;
}

/* ==================== SELL INVENTORY ==================== */
.sell-inventory {
    padding: 4rem 0;
    background: white;
}

.inventory-listing-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

.listing-preview-panel,
.listing-form-panel {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.listing-preview-panel h3,
.listing-form-panel h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.listing-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.listing-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.listing-item h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.listing-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==================== FORM ==================== */
.inventory-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.4rem;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin: 0;
}

/* ==================== HOW IT WORKS ==================== */
.how-it-works {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-light), #f0e7fe);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    font-weight: 800;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.step-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1rem;
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.step p {
    color: var(--text-light);
}

.step p strong {
    color: var(--text-dark);
}

/* ==================== TRUST ==================== */
.trust-section {
    padding: 4rem 0;
    background: white;
}

.trust-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    font-weight: 800;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.trust-card {
    background: linear-gradient(135deg, var(--primary-light), white);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid var(--border);
}

.trust-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.trust-card h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.trust-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==================== PRICING ==================== */
.pricing {
    padding: 4rem 0;
    background: #f9fafb;
}

.pricing h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    font-weight: 800;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.pricing-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.15);
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.2);
}

.pricing-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.pricing-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.pricing-features li {
    padding: 0.6rem 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.pricing-features li:before {
    content: "✓ ";
    color: var(--success);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* ==================== CTA FINAL ==================== */
.cta-final {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-final h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.cta-final > .container > p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-secondary-large {
    background: white;
    color: var(--primary);
    border: none;
}

.btn-secondary-large:hover {
    background: var(--primary-light);
}

.cta-note {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-col p {
    color: #d1d5db;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    color: #9ca3af;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 20px;
    }

    .nav-center {
        order: 3;
        width: 100%;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        flex-direction: column;
        order: 4;
        width: 100%;
        gap: 0.5rem;
    }

    .hamburger {
        display: flex;
        order: 2;
    }

    .hero-split h2 {
        font-size: 2rem;
    }

    .hero-ctas {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .cta-divider {
        display: none;
    }

    .demand-board {
        grid-template-columns: 1fr;
    }

    .inventory-listing-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-primary-large,
    .btn-secondary-large {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.5rem;
    }

    .hero-split h2 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== QUICK ACCESS ICON GRID ==================== */
.quick-access {
    padding: 4rem 0;
    background: #fff;
}

.qa-heading {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.qa-card {
    position: relative;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 0.9rem;
    padding: 2rem;
    text-decoration: none;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qa-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.15);
}

.qa-card.highlight {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light), #fff);
}

.qa-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qa-icon {
    font-size: 2.75rem;
    line-height: 1;
}

.qa-card h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 700;
}

.qa-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    flex: 1;
}

.qa-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ==================== STATS STRIP ==================== */
.stats-strip {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 2.5rem 0;
}

.stats-strip .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat {
    color: #fff;
    display: flex;
    flex-direction: column;
}

.stat-num, .stat-prefix, .stat-suffix {
    font-size: 2.4rem;
    font-weight: 800;
    display: inline;
}

.stat-prefix, .stat-suffix { font-size: 1.8rem; }

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0e7fe 100%);
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 700px;
    margin-bottom: 1.25rem;
}

.page-body {
    padding: 3rem 0;
    min-height: 50vh;
}

/* ==================== BOARD TOOLBAR ==================== */
.board-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sort-select {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    background: #fff;
    cursor: pointer;
}

.sort-select:focus { outline: none; border-color: var(--primary); }

.demand-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.55rem 1.25rem;
    border: 2px solid var(--border);
    background: #fff;
    color: var(--text-dark);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* ==================== DEMAND BOARD ==================== */
.demand-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.demand-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.25s;
}

.demand-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
    transform: translateY(-4px);
}

.demand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.demand-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.demand-urgency {
    padding: 0.25rem 0.7rem;
    border-radius: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.urgency-urgent { background: #fef2f2; color: #dc2626; }
.urgency-high { background: #fff7ed; color: #ea580c; }
.urgency-normal { background: #eff6ff; color: #2563eb; }

.demand-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.demand-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
}

.demand-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.demand-posted { font-size: 0.85rem; color: var(--text-light); }

/* ==================== MARKETPLACE ==================== */
.marketplace-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.filter-sidebar {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.filter-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.filter-block h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.filter-block label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
}

.results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.25s;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
    transform: translateY(-4px);
}

.product-img {
    height: 130px;
    background: linear-gradient(135deg, var(--primary-light), #f0e7fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-body { padding: 1rem; }

.product-cat {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.product-body h3 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-spec {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.price-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

.sale-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 0.3rem;
}

.sale-badge.auction { background: #fff7ed; color: #ea580c; }
.sale-badge.buy { background: #ecfdf5; color: #059669; }

/* ==================== SELL PAGE ==================== */
.inventory-listing-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2rem;
}

.listing-preview-panel, .listing-form-panel {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.listing-preview-panel h3, .listing-form-panel h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.listing-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.listing-item {
    background: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.listing-item h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.listing-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

.matching-demands {
    background: #fff;
    border: 2px dashed var(--primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.matching-demands h4 {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.matching-demands .hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.mini-demand {
    background: #f9fafb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mini-demand strong {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.mini-demand-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.urgency-text { font-weight: 700; }
.urgency-text.urgency-urgent { color: #dc2626; }
.urgency-text.urgency-high { color: #ea580c; }
.urgency-text.urgency-normal { color: #2563eb; }

/* ==================== FORM (shared) ==================== */
.inventory-form, .modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group { display: flex; flex-direction: column; }

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 0.7rem;
    border: 2px solid var(--border);
    border-radius: 0.4rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.25s;
}

.form-group textarea { min-height: 80px; resize: vertical; }

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.radio-group { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    margin: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
    background: #fff;
    border-radius: 0.9rem;
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 { font-size: 1.4rem; color: var(--text-dark); }

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

/* ==================== DASHBOARD ==================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.kpi-label { font-size: 0.85rem; color: var(--text-light); }
.kpi-value { font-size: 2rem; font-weight: 800; color: var(--text-dark); }
.kpi-trend { font-size: 0.8rem; color: var(--text-light); }
.kpi-trend.up { color: var(--success); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
}

.dash-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.dash-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.dash-panel-head h3 { font-size: 1.2rem; color: var(--text-dark); }

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th {
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0.6rem 0.5rem;
    border-bottom: 2px solid var(--border);
}

.dash-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-dark);
}

.status-pill {
    padding: 0.2rem 0.7rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-pill.live { background: #ecfdf5; color: #059669; }
.status-pill.auction { background: #fff7ed; color: #ea580c; }
.status-pill.sold { background: #f3f4f6; color: #6b7280; }

/* ==================== BIDDING ==================== */
.bidding-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.active-auctions, .bid-card {
    background: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.active-auctions h3, .bid-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.auction-list { display: flex; flex-direction: column; gap: 1rem; max-height: 600px; overflow-y: auto; }

.auction-card {
    background: #f9fafb;
    padding: 1.25rem;
    border: 2px solid transparent;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: all 0.25s;
}

.auction-card:hover, .auction-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.auction-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.auction-card-header h4 { font-size: 1.05rem; color: var(--text-dark); }

.auction-status {
    background: var(--success);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.auction-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.auction-info-item { display: flex; flex-direction: column; }
.auction-info-item .label { font-size: 0.75rem; color: var(--text-light); }
.auction-info-item .value { font-weight: 700; color: var(--text-dark); }

.bid-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.bid-stat { display: flex; justify-content: space-between; align-items: center; }
.bid-stat .label { color: var(--text-light); font-size: 0.9rem; }
.bid-stat .value { font-size: 1.2rem; font-weight: 800; color: var(--primary); }

.bid-input-section { margin-bottom: 2rem; }
.bid-input-section label { display: block; font-weight: 600; margin-bottom: 0.75rem; }

.bid-input-group {
    display: flex;
    align-items: center;
    background: var(--primary-light);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.bid-input-group .currency { padding: 0.75rem 1rem; font-weight: 700; }
.bid-input-group input { flex: 1; border: none; background: none; padding: 0.75rem; font-size: 1rem; }
.bid-input-group input:focus { outline: none; }

.bid-history { background: #f9fafb; padding: 1.5rem; border-radius: 0.5rem; }
.bid-history h4 { font-size: 1rem; color: var(--text-dark); margin-bottom: 1rem; }
.history-list { max-height: 200px; overflow-y: auto; }

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.history-item .bidder { color: var(--text-dark); font-weight: 500; }
.history-item .amount { color: var(--primary); font-weight: 700; }
.history-item .time { color: var(--text-light); font-size: 0.8rem; }
.no-data { color: var(--text-light); text-align: center; padding: 1rem; }

/* ==================== AUTH ==================== */
.auth-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0e7fe 100%);
}

.auth-card {
    background: #fff;
    border-radius: 0.9rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
}

.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: #f9fafb;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s;
}

.auth-tab.active { background: #fff; color: var(--primary); border-bottom: 3px solid var(--primary); }

.auth-form { padding: 2rem; }
.auth-form h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text-dark); }

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.remember { display: flex; align-items: center; gap: 0.4rem; color: var(--text-light); }

/* ==================== RESPONSIVE (new components) ==================== */
@media (max-width: 900px) {
    .marketplace-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .bidding-layout { grid-template-columns: 1fr; }
    .inventory-listing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stats-strip .container { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .demand-board { grid-template-columns: 1fr; }
    .board-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .qa-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.6rem; }
    .dash-table { font-size: 0.8rem; }
}

/* ==================== PRODUCT DETAIL ==================== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2.5rem;
    align-items: start;
}

.pd-history-panel { grid-column: 1 / -1; }

.pd-gallery { position: sticky; top: 100px; }

.pd-image {
    background: linear-gradient(135deg, var(--primary-light), #f0e7fe);
    border-radius: 0.9rem;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7rem;
}

.pd-thumbs { display: flex; gap: 0.75rem; margin-top: 1rem; }

.pd-thumb {
    width: 70px;
    height: 70px;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: #f9fafb;
    cursor: pointer;
}

.pd-thumb.active { border-color: var(--primary); }

.pd-info h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0.5rem 0 0.75rem;
}

.pd-seller {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.pd-seller-name { font-weight: 700; color: var(--text-dark); }
.pd-rating { color: #f59e0b; font-weight: 700; }

.pd-price-box {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.pd-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin: 0.25rem 0;
}

.pd-unit { font-size: 1rem; color: var(--text-light); font-weight: 600; }
.pd-total { font-size: 0.9rem; color: var(--text-light); }

.pd-specs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pd-spec {
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.pd-spec .label { font-size: 0.7rem; text-transform: uppercase; color: var(--text-light); }
.pd-spec .value { font-weight: 700; color: var(--text-dark); font-size: 0.95rem; }

.pd-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.pd-actions { display: flex; gap: 1rem; }

.pd-history-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.75rem;
    margin-top: 0.5rem;
}

.pd-history-panel h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 1.25rem; }

.pd-history-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ==================== RESPOND BANNER ==================== */
.respond-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary-light), #fff);
    border: 2px solid var(--primary);
    border-radius: 0.6rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.respond-banner-icon { font-size: 1.75rem; }
.respond-banner strong { color: var(--text-dark); font-size: 0.95rem; }
.respond-banner p { color: var(--text-light); font-size: 0.85rem; margin: 0.2rem 0 0; }

.respond-banner-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; }
    .pd-gallery { position: static; }
    .pd-image { height: 280px; font-size: 5rem; }
}

@media (max-width: 480px) {
    .pd-specs { grid-template-columns: repeat(2, 1fr); }
    .pd-actions { flex-direction: column; }
}

/* ==================== ARTICLE (about/legal) ==================== */
.article { max-width: 760px; }
.article h2 { font-size: 1.5rem; color: var(--text-dark); margin: 2rem 0 0.75rem; }
.article h2:first-child { margin-top: 0; }
.article p { color: var(--text-light); line-height: 1.8; margin-bottom: 1rem; }
.link-list { list-style: none; margin: 0.5rem 0 1rem; }
.link-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.link-list a { color: var(--primary); text-decoration: none; font-weight: 600; }
.link-list a:hover { text-decoration: underline; }

/* ==================== CONTACT ==================== */
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem; align-items: start; }
.contact-info { background: #f9fafb; border: 1px solid var(--border); border-radius: 0.75rem; padding: 2rem; }
.contact-info h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 1.5rem; }
.contact-item { display: flex; gap: 1rem; align-items: start; margin-bottom: 1.5rem; }
.contact-icon { font-size: 1.5rem; }
.contact-item strong { color: var(--text-dark); display: block; }
.contact-item p { color: var(--text-light); font-size: 0.9rem; margin: 0.2rem 0 0; }
.contact-form-wrap { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 2rem; }
.contact-form-wrap h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 1.5rem; }

/* ==================== CHECKOUT ==================== */
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; }
.checkout-form-panel { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 2rem; }
.checkout-form-panel h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 1rem; }
.demo-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    border-radius: 0.5rem;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.checkout-summary { background: #f9fafb; border: 1px solid var(--border); border-radius: 0.75rem; padding: 2rem; position: sticky; top: 100px; }
.checkout-summary h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 1.25rem; }
.co-item-row { display: flex; justify-content: space-between; padding: 0.6rem 0; font-size: 0.95rem; color: var(--text-light); border-bottom: 1px solid var(--border); }
.co-item-row.total { border-bottom: none; border-top: 2px solid var(--border); margin-top: 0.5rem; padding-top: 1rem; font-weight: 800; font-size: 1.2rem; color: var(--text-dark); }
.checkout-trust { margin-top: 1.5rem; }
.checkout-trust p { font-size: 0.9rem; color: var(--text-light); padding: 0.35rem 0; }
.co-fee-breakdown { background: #f3f4f6; border-radius: 0.5rem; padding: 0.25rem 0.75rem; margin: 0.75rem 0; }
.co-item-row.small { font-size: 0.85rem; padding: 0.4rem 0; border-bottom: 1px dashed var(--border); }
.co-item-row.small:last-child { border-bottom: none; }
.co-fee-note { font-size: 0.8rem; color: var(--text-light); margin-top: 1rem; line-height: 1.5; }
.co-fee-note a { color: var(--primary); }
.muted { color: var(--text-light); font-size: 0.85em; font-weight: 400; }

/* ==================== FEE TIER GRAPHIC (pricing.html) ==================== */
.fee-structure-card { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 2rem; margin-top: 2.5rem; }
.fee-structure-card h2 { font-size: 1.4rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.fee-structure-card > p { color: var(--text-light); margin-bottom: 1.75rem; }
.fee-tier-bars { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.75rem; }
.fee-tier-row { display: grid; grid-template-columns: 200px 1fr 70px; align-items: center; gap: 1rem; }
.fee-tier-label { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.fee-tier-track { background: #f1f2f6; border-radius: 6px; height: 28px; overflow: hidden; position: relative; }
.fee-tier-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 0.6rem; color: #fff; font-size: 0.75rem; font-weight: 700; transition: width 0.6s ease; }
.fee-tier-row:nth-child(1) .fee-tier-fill { background: linear-gradient(90deg, #667eea, #764ba2); width: 100%; }
.fee-tier-row:nth-child(2) .fee-tier-fill { background: linear-gradient(90deg, #667eea, #764ba2); width: 75%; }
.fee-tier-row:nth-child(3) .fee-tier-fill { background: linear-gradient(90deg, #667eea, #764ba2); width: 50%; }
.fee-tier-rate { font-weight: 800; color: var(--text-dark); text-align: right; font-size: 1.05rem; }
.fee-calc-example { background: #f9fafb; border-radius: 0.5rem; padding: 1.25rem 1.5rem; font-size: 0.9rem; color: var(--text-light); }
.fee-calc-example strong { color: var(--text-dark); }
.fee-calc-example .fee-calc-row { display: flex; justify-content: space-between; padding: 0.3rem 0; }

/* ==================== ADMIN CONSOLE ==================== */
.admin-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.admin-revenue-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.admin-revenue-banner #adminFeeRevenue { font-size: 1.1rem; }
.admin-section { margin-bottom: 2.5rem; }
.admin-section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.admin-section-head h3 { font-size: 1.2rem; color: var(--text-dark); }
.admin-count { background: var(--primary); color: #fff; border-radius: 1rem; padding: 0.1rem 0.6rem; font-size: 0.8rem; margin-left: 0.4rem; }
.admin-section-actions { display: flex; gap: 0.5rem; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.5rem; }
.admin-table { width: 100%; background: #fff; }
.admin-table td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
}

/* ==================== AUTH STATE NAV ==================== */
.nav-account { display: flex; align-items: center; gap: 0.75rem; }
.nav-user { font-weight: 700; color: var(--primary-dark); background: var(--primary-light); padding: 0.3rem 0.7rem; border-radius: 1rem; font-size: 0.85rem; }
.nav-admin-link { color: var(--primary) !important; font-weight: 700; }
.auth-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 0.75rem 1rem; border-radius: 0.5rem; margin: 0 2rem; font-size: 0.9rem; }

/* ==================== REVIEWS (product page) ==================== */
.reviews-section { grid-column: 1 / -1; background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.75rem; margin-top: 1.5rem; }
.reviews-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.reviews-head h3 { font-size: 1.2rem; color: var(--text-dark); }
.reviews-summary { display: flex; align-items: center; gap: 0.6rem; }
.rev-avg { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.rev-stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; }
.rev-count { color: var(--text-light); font-size: 0.9rem; }
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }
.review-item { border: 1px solid var(--border); border-radius: 0.6rem; padding: 1rem 1.25rem; }
.review-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.review-author { font-weight: 700; color: var(--text-dark); }
.review-stars { color: #f59e0b; letter-spacing: 2px; }
.review-text { color: var(--text-dark); line-height: 1.6; margin-bottom: 0.4rem; }
.review-date { color: var(--text-light); font-size: 0.8rem; }
.review-form-wrap { margin-bottom: 1.5rem; }
.review-form { background: #f9fafb; border: 1px solid var(--border); border-radius: 0.6rem; padding: 1.25rem; }
.review-form h4 { font-size: 1.05rem; color: var(--text-dark); margin-bottom: 0.75rem; }
.review-form textarea { width: 100%; min-height: 80px; padding: 0.7rem; border: 2px solid var(--border); border-radius: 0.4rem; font-family: inherit; font-size: 0.95rem; margin-bottom: 0.75rem; resize: vertical; }
.review-form textarea:focus { outline: none; border-color: var(--primary); }
.star-input { font-size: 1.6rem; color: #f59e0b; margin-bottom: 0.5rem; cursor: pointer; }
.star-input .star { cursor: pointer; transition: transform 0.1s; }
.star-input .star:hover { transform: scale(1.15); }
.review-note { font-size: 0.8rem; color: var(--text-light); margin-top: 0.5rem; }
.review-login-prompt { background: var(--primary-light); border-radius: 0.5rem; padding: 1rem 1.25rem; color: var(--text-dark); }
.review-submitted { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; border-radius: 0.5rem; padding: 1rem 1.25rem; font-weight: 600; }

/* ==================== ADMIN TABS & PANES ==================== */
.admin-tabs { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; padding-bottom: 0.5rem; }
.admin-tab { background: none; border: none; padding: 0.6rem 1rem; font-size: 0.95rem; font-weight: 600; color: var(--text-light); cursor: pointer; border-radius: 0.5rem; }
.admin-tab.active { background: var(--primary-light); color: var(--primary); }
.review-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* ---- review moderation cards ---- */
.mod-review { display: flex; justify-content: space-between; gap: 1rem; border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 0.6rem; padding: 1.25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.mod-review.status-pending { border-left-color: #f59e0b; background: #fffbeb; }
.mod-review.status-approved { border-left-color: var(--success); }
.mod-review.status-rejected { border-left-color: var(--danger); opacity: 0.7; }
.mod-review-main { flex: 1; min-width: 240px; }
.mod-review-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.mod-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0.15rem 0.6rem; border-radius: 1rem; }
.mod-pending { background: #fef3c7; color: #92400e; }
.mod-approved { background: #d1fae5; color: #065f46; }
.mod-rejected { background: #fee2e2; color: #991b1b; }
.mod-actions { display: flex; flex-direction: column; gap: 0.4rem; align-items: stretch; }
.btn-mod { border: none; border-radius: 0.4rem; padding: 0.4rem 0.9rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-mod.approve { background: #d1fae5; color: #065f46; }
.btn-mod.reject { background: #fef3c7; color: #92400e; }
.btn-mod.delete { background: #fee2e2; color: #991b1b; }
.btn-mod:hover { filter: brightness(0.95); }

/* ---- auction control rows ---- */
.admin-auction-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 1px solid var(--border); border-radius: 0.6rem; padding: 1rem 1.25rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.aa-info { display: flex; flex-direction: column; }
.aa-info strong { color: var(--text-dark); }
.aa-info span { color: var(--text-light); font-size: 0.85rem; }
.aa-controls { display: flex; align-items: center; gap: 0.5rem; }
.aa-controls input { padding: 0.4rem; border: 2px solid var(--border); border-radius: 0.4rem; }

/* ==================== ADMIN LISTINGS MGMT ==================== */
.listings-mgmt { display: grid; grid-template-columns: 360px 1fr; gap: 2rem; align-items: start; }
.admin-listing-form { background: #f9fafb; border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.5rem; }
.admin-listing-form h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 1rem; }
.admin-listing-form .form-group { margin-bottom: 0.9rem; }
.listings-table-wrap h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 1rem; }
@media (max-width: 900px) { .listings-mgmt { grid-template-columns: 1fr; } }

/* ==================== ACCOUNT DROPDOWN (navbar) ==================== */
.nav-account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 0.4rem; background: none; border: none; cursor: pointer; padding: 0.2rem; }
.account-avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.5px; }
.account-avatar.lg { width: 48px; height: 48px; font-size: 1rem; }
.account-avatar.xl { width: 72px; height: 72px; font-size: 1.6rem; }
.account-caret { color: var(--text-light); font-size: 0.7rem; }
.account-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 260px; background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; box-shadow: 0 12px 32px rgba(0,0,0,0.15); padding: 0.5rem; display: none; z-index: 1200; }
.account-menu.open { display: block; }
.account-menu-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.account-menu-id { overflow: hidden; }
.account-menu-id strong { display: block; color: var(--text-dark); font-size: 0.95rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.account-menu-id span { color: var(--text-light); font-size: 0.8rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: block; }
.account-menu-list { display: flex; flex-direction: column; }
.account-menu-item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 0.6rem 0.75rem; border-radius: 0.5rem; color: var(--text-dark); text-decoration: none; font-size: 0.92rem; cursor: pointer; font-family: inherit; }
.account-menu-item:hover { background: var(--primary-light); color: var(--primary); }
.account-menu-item.signout { border-top: 1px solid var(--border); margin-top: 0.5rem; color: var(--danger); font-weight: 600; }
.account-menu-item.signout:hover { background: #fef2f2; color: var(--danger); }

/* ==================== ACCOUNT PAGE ==================== */
.account-layout { display: grid; grid-template-columns: 230px 1fr; gap: 2rem; align-items: start; }
.account-nav { display: flex; flex-direction: column; gap: 0.25rem; background: #f9fafb; border: 1px solid var(--border); border-radius: 0.75rem; padding: 0.75rem; position: sticky; top: 100px; }
.account-nav-item { text-align: left; background: none; border: none; padding: 0.7rem 0.9rem; border-radius: 0.5rem; font-size: 0.95rem; color: var(--text-dark); cursor: pointer; font-family: inherit; }
.account-nav-item:hover { background: var(--primary-light); }
.account-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.account-nav-item.signout { color: var(--danger); margin-top: 0.5rem; border-top: 1px solid var(--border); }
.account-card { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 2rem; }
.account-card h2 { font-size: 1.3rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.account-profile-head { display: flex; align-items: center; gap: 1.25rem; }
.account-profile-head h2 { margin: 0; }
.verified-badge { display: inline-block; background: #ecfdf5; color: #047857; font-size: 0.75rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 1rem; margin-top: 0.3rem; }
.form-inline-msg { margin-left: 0.75rem; font-size: 0.9rem; font-weight: 600; }
.form-inline-msg.ok { color: var(--success); }
.form-inline-msg.err { color: var(--danger); }
.bank-info-display { background: #e8f5e9; border-left: 4px solid #4caf50; padding: 1rem; border-radius: 4px; margin-top: 1rem; }
.bank-info-display h4 { margin: 0 0 0.5rem 0; color: #2e7d32; font-size: 0.95rem; }
.bank-info-display p { margin: 0.25rem 0; color: #558b2f; font-size: 0.9rem; }
.info-badge { background: #e3f2fd; color: #1565c0; padding: 0.5rem 0.75rem; border-radius: 4px; font-size: 0.85rem; margin-top: 0.75rem; display: block; }
.info-badge code { background: rgba(0,0,0,0.06); padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.8em; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--border); color: var(--text-dark); }
.toggle-row input { width: 20px; height: 20px; cursor: pointer; }
.pm-item { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 0.6rem; margin-bottom: 0.75rem; }
.pm-brand { font-size: 1.5rem; }
.pm-info { flex: 1; }
.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.support-tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 0.6rem; text-decoration: none; color: var(--text-dark); transition: all 0.2s; }
.support-tile:hover { border-color: var(--primary); background: var(--primary-light); }
.support-tile span { font-size: 1.5rem; }
.support-tile strong { color: var(--text-dark); }
.support-tile small { color: var(--text-light); }
@media (max-width: 768px) { .account-layout { grid-template-columns: 1fr; } .account-nav { position: static; flex-direction: row; flex-wrap: wrap; } .support-grid { grid-template-columns: 1fr; } }

/* ==================== PLAID / BANK LINKING ==================== */
.bank-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.bank-head h2 { margin-bottom: 0.25rem; }
.plaid-connect-btn { white-space: nowrap; }
.bank-item { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 0.6rem; margin-bottom: 0.75rem; }
.bank-logo { font-size: 1.6rem; }
.bank-info { flex: 1; display: flex; flex-direction: column; }
.bank-info strong { color: var(--text-dark); }
.bank-status { color: var(--success); font-weight: 700; font-size: 0.85rem; }
.plaid-note { margin-top: 1rem; font-size: 0.82rem; line-height: 1.5; }
.plaid-modal { max-width: 460px; }
.plaid-bank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.plaid-bank-option { display: flex; align-items: center; gap: 0.6rem; padding: 1rem; border: 2px solid var(--border); border-radius: 0.6rem; background: #fff; cursor: pointer; font-size: 0.95rem; font-weight: 600; color: var(--text-dark); font-family: inherit; transition: all 0.2s; }
.plaid-bank-option:hover { border-color: var(--primary); background: var(--primary-light); }
.plaid-bank-option span { font-size: 1.3rem; }
@media (max-width: 480px) { .plaid-bank-grid { grid-template-columns: 1fr; } }

/* ==================== PRODUCT PHOTOS ==================== */
.product-img { position: relative; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.product-card:hover .product-img img { transform: scale(1.06); }

.product-seller-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.5rem; }
.product-seller-row a { color: var(--text-dark); font-weight: 600; text-decoration: none; }
.product-seller-row a:hover { color: var(--primary); text-decoration: underline; }
.product-loc { white-space: nowrap; }

.pd-image img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pd-seller-name { text-decoration: none; color: var(--text-dark); font-weight: 700; }
.pd-seller-name[href]:hover { color: var(--primary); text-decoration: underline; }
.pd-rating-new { color: var(--success); font-weight: 700; }

/* ==================== PHOTO UPLOAD (sell.html) ==================== */
.photo-dropzone {
    border: 2px dashed var(--border);
    border-radius: 0.6rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}
.photo-dropzone:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.photo-dropzone-icon { font-size: 1.8rem; }
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.photo-preview-grid img { width: 100%; height: 72px; object-fit: cover; border-radius: 0.4rem; border: 1px solid var(--border); }

.listing-item { display: flex; gap: 0.9rem; align-items: flex-start; }
.listing-item-thumb { flex-shrink: 0; width: 56px; height: 56px; border-radius: 0.5rem; overflow: hidden; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.listing-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-item-body { flex: 1; min-width: 0; }
.listing-item-body h4 { margin-bottom: 0.4rem; }

.demand-poster { font-size: 0.8rem; color: var(--text-light); margin: -0.25rem 0 0.5rem; }
.demand-poster a { color: var(--primary); font-weight: 600; text-decoration: none; }
.demand-poster a:hover { text-decoration: underline; }
.hint { font-size: 0.9rem; color: var(--text-light); padding: 1rem 0; }

/* ==================== COMPANY PROFILE ==================== */
.company-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
    margin: 1.5rem 0 2rem;
    flex-wrap: wrap;
}
.company-avatar-xl {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    flex-shrink: 0;
}
.company-banner-info { flex: 1; min-width: 200px; }
.company-banner-info h1 { font-size: 1.7rem; margin-bottom: 0.4rem; color: #fff; }
.company-banner-meta { display: flex; gap: 1.25rem; font-size: 0.95rem; opacity: 0.95; flex-wrap: wrap; }
.company-banner-meta .pd-rating-new { color: #d1fae5; }
.company-stats { display: flex; gap: 1.5rem; }
.company-stat { text-align: center; background: rgba(255,255,255,0.15); border-radius: 0.6rem; padding: 0.6rem 1.1rem; }
.company-stat strong { display: block; font-size: 1.4rem; }
.company-stat span { font-size: 0.75rem; text-transform: uppercase; opacity: 0.85; }

.company-tabs { display: flex; gap: 0.75rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); }
.company-tab { background: none; border: none; padding: 0.75rem 0.25rem; margin-right: 1.5rem; font-size: 0.95rem; font-weight: 600; color: var(--text-light); cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; }
.company-tab:hover { color: var(--primary); }
.company-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.company-pane { padding-bottom: 2rem; }

@media (max-width: 640px) {
    .company-banner { flex-direction: column; text-align: center; }
    .company-banner-meta { justify-content: center; }
}

/* ==========================================================================
   MODERN REFRESH LAYER — 2026
   Appended last so it re-tokenises and re-skins the original stylesheet
   without having to unpick it. Palette moves from the old purple to a
   blue/cyan "infrastructure" scheme that reads as engineered and trustworthy;
   every emoji is now an inline SVG (see sfIcon in script.js) so glyphs are
   consistent across platforms.
   ========================================================================== */

:root {
    /* Brand */
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-darker: #5b21b6;
    --primary-light: #ede9fe;
    --primary-tint: #f5f3ff;
    --accent: #c026d3;
    --accent-dark: #a21caf;
    --secondary: #c026d3;

    /* Status */
    --success: #059669;
    --success-light: #d1fae5;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;

    /* Neutrals */
    --ink: #0f172a;
    --ink-soft: #1e293b;
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-light: #64748b;
    --text-faint: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --canvas: #f1f5f9;
    --dark: #0f172a;
    --light: #f8fafc;

    /* Depth */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .07), 0 2px 4px rgba(15, 23, 42, .04);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, .10), 0 4px 8px rgba(15, 23, 42, .04);
    --shadow-xl: 0 24px 56px rgba(15, 23, 42, .14);
    --ring: 0 0 0 3px rgba(124, 58, 237, .18);

    /* Shape */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-pill: 999px;

    --grad-brand: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
    --grad-ink: linear-gradient(160deg, #16112e 0%, #241d47 55%, #3b0764 100%);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-sans);
    background: var(--surface);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.006em;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    color: var(--ink);
    letter-spacing: -0.022em;
    line-height: 1.18;
}

::selection { background: var(--primary-light); color: var(--primary-darker); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.container { max-width: 1240px; }

/* ---------------------------------------------------------------- icons -- */
.sf-ic {
    display: inline-block;
    vertical-align: -0.18em;
    flex-shrink: 0;
}

/* Anything that pairs an icon with a label lines them up on the optical
   centre rather than the text baseline. */
.btn, .btn-primary-nav, .filter-btn, .qa-link, .sale-badge, .product-cat,
.demand-cat-chip, .demand-meta-item, .footer-trust-item, .checkout-trust p,
.account-menu-item, .company-tab, .admin-tab, .account-nav-item,
.page-header h1, .pd-history-panel h3, .reviews-head h3, .filter-sidebar h3 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header h1, .pd-history-panel h3, .reviews-head h3 { display: flex; }
.page-header h1 .sf-ic { color: var(--accent); }

/* ------------------------------------------------------------ navigation -- */
.navbar {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}

.navbar .container { padding: 0.85rem 20px; gap: 1.5rem; }

.nav-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: block;
    flex-shrink: 0;
    filter: drop-shadow(0 3px 8px rgba(124, 58, 237, .3));
}
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }

.nav-brand h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--ink);
}

.nav-brand .tagline {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--text-faint);
    font-weight: 600;
}

.nav-center { flex: 1; max-width: 520px; }

.search-bar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 0.32rem 0.32rem 0.32rem 0.9rem;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.search-bar-nav:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.search-ic { display: flex; color: var(--text-faint); }
.search-bar-nav input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font: inherit;
    font-size: 0.9rem;
    color: var(--ink);
    padding: 0.35rem 0;
    min-width: 0;
}
.search-bar-nav input::placeholder { color: var(--text-faint); }

.search-btn-nav {
    border: none;
    background: var(--grad-brand);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    border-radius: var(--r-pill);
    cursor: pointer;
    transition: filter .18s, transform .18s;
}
.search-btn-nav:hover { filter: brightness(1.08); transform: translateY(-1px); }

.nav-menu { display: flex; align-items: center; gap: 0.25rem; list-style: none; }

.nav-menu > li > a {
    display: block;
    padding: 0.5rem 0.8rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: none;
    transition: color .16s, background .16s;
}
.nav-menu > li > a:hover { color: var(--primary); background: var(--primary-tint); }
.nav-menu > li > a.active { color: var(--primary); background: var(--primary-tint); font-weight: 600; }

.btn-primary-nav,
.nav-menu > li > a.btn-primary-nav {
    background: var(--grad-brand);
    color: #fff !important;
    padding: 0.55rem 1.15rem;
    border-radius: var(--r-pill);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(124, 58, 237, .28);
    margin-left: 0.4rem;
}
.nav-menu > li > a.btn-primary-nav:hover {
    background: var(--grad-brand);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(124, 58, 237, .34);
}

.hamburger { background: none; border: none; padding: 0.4rem; cursor: pointer; }
.hamburger span { background: var(--ink); }

/* Account dropdown */
.account-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 0.28rem 0.6rem 0.28rem 0.3rem;
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s;
}
.account-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }

.account-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.account-avatar.lg { width: 42px; height: 42px; font-size: 0.95rem; }

.account-menu {
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-width: 260px;
}
.account-menu-head { padding: 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.account-menu-id { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.account-menu-id strong { color: var(--ink); font-size: 0.92rem; }
.account-menu-id span { font-size: 0.78rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; }

.account-type-chip {
    align-self: flex-start;
    margin-top: 0.25rem;
    background: var(--primary-tint);
    color: var(--primary-darker);
    border: 1px solid var(--primary-light);
    border-radius: var(--r-pill);
    padding: 0.1rem 0.5rem;
    font-size: 0.68rem !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.account-menu-item {
    width: 100%;
    padding: 0.62rem 1rem;
    font-size: 0.88rem;
    color: var(--text-body);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .14s, color .14s;
}
.account-menu-item:hover { background: var(--primary-tint); color: var(--primary-darker); }
.account-menu-item .sf-ic { color: var(--text-faint); }
.account-menu-item:hover .sf-ic { color: var(--primary); }
.account-menu-item.signout { border-top: 1px solid var(--border); color: var(--danger); }
.account-menu-item.signout:hover { background: var(--danger-light); color: var(--danger); }
.account-menu-item.signout .sf-ic { color: var(--danger); }

/* ---------------------------------------------------------------- buttons */
.btn {
    justify-content: center;
    border-radius: var(--r-md);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.94rem;
    letter-spacing: -0.005em;
    padding: 0.7rem 1.4rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, background .16s, color .16s, border-color .16s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, .26);
}
.btn-primary:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(124, 58, 237, .32);
}
.btn-primary:disabled { filter: grayscale(.5) brightness(1.1); opacity: .65; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: #fff;
    color: var(--ink);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.btn-secondary.watching { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

.btn-ghost {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .32);
    color: #fff;
    backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }

.btn-primary-large { padding: 0.9rem 1.8rem; font-size: 1rem; border-radius: var(--r-md); }

.qa-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}
.qa-link:hover { color: var(--primary-darker); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------------- hero */
.hero-split {
    background: var(--grad-ink);
    color: #fff;
    padding: 4.5rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.hero-split::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(720px 340px at 12% -10%, rgba(124, 58, 237, .5), transparent 65%),
        radial-gradient(620px 320px at 88% 8%, rgba(192, 38, 211, .34), transparent 62%);
    pointer-events: none;
}
.hero-split .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 3.5rem;
    align-items: center;
}
.hero-content { max-width: 620px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--r-pill);
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ede9fe;
    margin-bottom: 1.4rem;
    backdrop-filter: blur(6px);
}
.hero-badge .sf-ic { color: #d8b4fe; }

.hero-content h2 {
    font-size: clamp(2.15rem, 4.6vw, 3.5rem);
    color: #fff;
    line-height: 1.08;
    margin-bottom: 1.15rem;
    letter-spacing: -0.035em;
}
.grad-text {
    background: linear-gradient(100deg, #d8b4fe 0%, #e879f9 55%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content > p {
    font-size: 1.08rem;
    color: #cbd5e1;
    line-height: 1.65;
    max-width: 33em;
    margin-bottom: 1.9rem;
}

.hero-cta { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-points { list-style: none; display: grid; gap: 0.6rem; padding: 0; }
.hero-points li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: #cbd5e1;
}
.hero-points .sf-ic { color: #34d399; }

/* Floating proof-of-flow cards */
.hero-visual { position: relative; min-height: 340px; }
.hero-card {
    position: relative;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--r-lg);
    padding: 1.05rem 1.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(2, 6, 23, .35);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    animation: heroFloat 7s ease-in-out infinite;
}
.hero-card + .hero-card { margin-top: 0.9rem; }
.hero-card-1 { margin-right: 3rem; animation-delay: 0s; }
.hero-card-2 { margin-left: 2.5rem; animation-delay: .8s; }
.hero-card-3 { margin-right: 1.5rem; animation-delay: 1.6s; }

.hero-card strong { color: #fff; font-size: 1rem; font-family: var(--font-display); }
.hero-card-meta { font-size: 0.8rem; color: #94a3b8; }
.hero-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fda4af;
    margin-bottom: 0.2rem;
}
.hero-card-tag.alt { color: #d8b4fe; }
.hero-card-tag.ok { color: #6ee7b7; }

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-card { animation: none; }
    .btn, .qa-card, .product-card { transition: none; }
}

/* --------------------------------------------------------- quick access -- */
.quick-access { padding: 4.5rem 0; background: var(--surface); }
.qa-heading {
    text-align: center;
    font-size: 1.9rem;
    margin-bottom: 2.5rem;
}
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.25rem; }

.qa-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.7rem 1.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
}
.qa-card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--grad-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.qa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.qa-card:hover::after { transform: scaleX(1); }
.qa-card.highlight { border-color: var(--primary-light); background: linear-gradient(180deg, var(--primary-tint), #fff 60%); }

.qa-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--r-md);
    background: var(--primary-tint);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    font-size: 0;
    border: 1px solid var(--primary-light);
}
.qa-card:hover .qa-icon { background: var(--grad-brand); color: #fff; border-color: transparent; }
.qa-card h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.qa-card p { font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.9rem; line-height: 1.55; }

.qa-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--grad-brand);
    color: #fff;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    border-radius: var(--r-pill);
}

/* -------------------------------------------------------------- stats -- */
.stats-strip {
    background: var(--surface-2);
    border-block: 1px solid var(--border);
    padding: 2.75rem 0;
}
.stats-strip .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.stat-num, .stat-prefix {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.03em;
}
.stat-label {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-light);
    font-weight: 600;
}

/* -------------------------------------------------------------- trust -- */
.trust-section { padding: 4.5rem 0; background: var(--surface); }
.trust-section h2 { text-align: center; font-size: 1.9rem; margin-bottom: 2.5rem; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.25rem; }
.trust-card {
    text-align: center;
    padding: 2rem 1.4rem;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform .2s, box-shadow .2s;
}
.trust-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.trust-icon {
    width: 54px; height: 54px;
    margin: 0 auto 1.1rem;
    border-radius: 50%;
    background: var(--primary-tint);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    border: 1px solid var(--primary-light);
}
.trust-card h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.trust-card p { font-size: 0.87rem; color: var(--text-light); line-height: 1.6; }

/* ------------------------------------------------------- page headers -- */
.page-header {
    background: var(--grad-ink);
    color: #fff;
    padding: 2.75rem 0 3rem;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(700px 300px at 15% -30%, rgba(124, 58, 237, .45), transparent 65%);
    pointer-events: none;
}
.page-header .container { position: relative; }
.page-header h1 { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.3rem); margin: 0.5rem 0 0.6rem; }
.page-header > .container > p { color: #cbd5e1; max-width: 62ch; font-size: 1rem; line-height: 1.6; }
.page-header .btn { margin-top: 1.3rem; }

.breadcrumb { font-size: 0.82rem; color: #94a3b8; }
.breadcrumb a { color: #cbd5e1; text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

.page-body { background: var(--surface-2); padding: 2.75rem 0 4rem; min-height: 50vh; }

/* -------------------------------------------------------------- forms -- */
.form-group { margin-bottom: 1.05rem; }
.form-group > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.4rem;
    letter-spacing: -0.003em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea,
.sort-select,
.modal-form input,
.modal-form select,
.modal-form textarea {
    width: 100%;
    font: inherit;
    font-size: 0.92rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    padding: 0.62rem 0.8rem;
    transition: border-color .16s, box-shadow .16s;
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover { border-color: var(--text-faint); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.sort-select:focus, .modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-faint); }

.form-group select, .sort-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: 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='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2.1rem;
}

.field-hint { font-size: 0.78rem; color: var(--text-light); margin-top: 0.35rem; line-height: 1.5; }

.radio-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    padding: 0.42rem 0.85rem;
    font-size: 0.85rem;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s, background .15s, color .15s;
}
.radio-group label:hover { border-color: var(--primary); color: var(--primary); }
.radio-group label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-tint);
    color: var(--primary-darker);
    font-weight: 600;
}

/* ------------------------------------------------------ auth / signup -- */
.auth-wrap {
    background: var(--surface-2);
    min-height: calc(100vh - 74px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}
.auth-card {
    width: 100%;
    max-width: 470px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
}
.auth-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: var(--success-light);
    color: #065f46;
    border-radius: var(--r-pill);
    padding: 0.4rem 0.8rem;
    font-size: 0.76rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.25rem;
    margin-bottom: 1.4rem;
}
.auth-tab {
    border: none;
    background: none;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.55rem;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background .16s, color .16s, box-shadow .16s;
}
.auth-tab.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-xs); }

.auth-form h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; font-size: 0.85rem; }
.remember { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-light); cursor: pointer; }

.auth-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: var(--r-sm);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.auth-legal { font-size: 0.75rem; color: var(--text-light); text-align: center; margin-top: 0.9rem; line-height: 1.55; }
.auth-legal a { color: var(--primary); }

/* Business vs individual selector */
.acct-type { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 0.75rem; }
.acct-type-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    padding: 0.85rem 0.9rem;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color .16s, background .16s, box-shadow .16s, transform .16s;
}
.acct-type-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.acct-type-btn .sf-ic { color: var(--text-faint); margin-bottom: 0.3rem; }
.acct-type-btn strong { font-size: 0.92rem; color: var(--ink); font-family: var(--font-display); }
.acct-type-btn small { font-size: 0.74rem; color: var(--text-light); }
.acct-type-btn.active {
    border-color: var(--primary);
    background: var(--primary-tint);
    box-shadow: var(--ring);
}
.acct-type-btn.active .sf-ic { color: var(--primary); }
.acct-type-btn.active strong { color: var(--primary-darker); }

.acct-type-note {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.55;
    background: var(--surface-2);
    border-left: 3px solid var(--primary-light);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1.15rem;
}

/* ------------------------------------------------------ product cards -- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.15rem; }

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }

.product-img {
    aspect-ratio: 4 / 3;
    background: linear-gradient(150deg, var(--surface-2), var(--canvas));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img-ph { color: var(--text-faint); display: flex; }

.product-body { padding: 1rem 1.05rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.product-cat {
    align-self: flex-start;
    background: var(--primary-tint);
    color: var(--primary-darker);
    border: 1px solid var(--primary-light);
    border-radius: var(--r-pill);
    padding: 0.18rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.product-body h3 { font-size: 0.98rem; line-height: 1.35; margin: 0; }

.product-seller-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-light); }
.product-seller-row a { color: var(--primary); text-decoration: none; font-weight: 600; }
.product-seller-row a:hover { text-decoration: underline; }
.product-loc { display: inline-flex; align-items: center; gap: 0.22rem; color: var(--text-faint); }

.product-spec {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-light);
    background: var(--surface-2);
    border-radius: var(--r-sm);
    padding: 0.4rem 0.6rem;
    text-transform: capitalize;
}
.product-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; margin-top: auto; }
.price-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); font-weight: 600; }
.product-price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--ink); }

.sale-badge {
    border-radius: var(--r-pill);
    padding: 0.24rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.sale-badge.buy { background: var(--success-light); color: #065f46; }
.sale-badge.auction { background: var(--warning-light); color: #92400e; }

/* -------------------------------------------------------- marketplace -- */
.marketplace-layout { display: grid; grid-template-columns: 268px 1fr; gap: 1.75rem; align-items: start; }

.filter-sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 92px;
}
.filter-sidebar h3 { font-size: 1rem; margin-bottom: 1.1rem; }
.filter-sidebar h3 .sf-ic { color: var(--primary); }
.filter-block { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.filter-block:last-of-type { border-bottom: none; }
.filter-block h4 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-light);
    margin-bottom: 0.6rem;
}
.filter-block > label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.87rem;
    color: var(--text-body);
    padding: 0.28rem 0;
    cursor: pointer;
    text-transform: capitalize;
}
.filter-block input[type="checkbox"], .filter-block input[type="radio"], .check-row input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

/* Category list is long — scroll it rather than pushing the page down. */
.filter-scroll { max-height: 290px; overflow-y: auto; padding-right: 0.35rem; margin-right: -0.35rem; }
.filter-scroll::-webkit-scrollbar { width: 6px; }
.filter-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.32rem 0.35rem;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    color: var(--text-body);
    cursor: pointer;
    transition: background .14s, color .14s;
}
.check-row:hover { background: var(--primary-tint); color: var(--primary-darker); }
.check-row-icon { display: flex; color: var(--text-faint); }
.check-row:hover .check-row-icon { color: var(--primary); }
.check-row-label { line-height: 1.3; }

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.7rem 1rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--shadow-xs);
}
.results-meta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--text-light); font-weight: 500; }
.search-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-tint);
    color: var(--primary-darker);
    border: 1px solid var(--primary-light);
    border-radius: var(--r-pill);
    padding: 0.2rem 0.4rem 0.2rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.search-chip a { color: inherit; display: inline-flex; text-decoration: none; opacity: .7; }
.search-chip a:hover { opacity: 1; }
.sort-select { width: auto; min-width: 175px; }

/* ------------------------------------------------------- demand board -- */
.board-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.demand-controls { display: flex; gap: 0.45rem; flex-wrap: wrap; flex: 1; }

.filter-btn {
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    padding: 0.42rem 0.85rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-body);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.filter-btn .sf-ic { color: var(--text-faint); }
.filter-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.filter-btn:hover .sf-ic { color: var(--primary); }
.filter-btn.active {
    background: var(--grad-brand);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(124, 58, 237, .25);
}
.filter-btn.active .sf-ic { color: #fff; }

.demand-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.15rem; }

.demand-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.3rem;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.demand-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.demand-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.demand-card-header h3 { font-size: 1.02rem; line-height: 1.35; }

.demand-urgency {
    flex-shrink: 0;
    border-radius: var(--r-pill);
    padding: 0.2rem 0.6rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.urgency-urgent { background: var(--danger-light); color: #991b1b; }
.urgency-high { background: var(--warning-light); color: #92400e; }
.urgency-normal { background: var(--canvas); color: var(--text-light); }

.demand-cat-chip {
    align-self: flex-start;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 0.2rem 0.65rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-light);
}
.demand-cat-chip .sf-ic { color: var(--primary); }

.demand-poster { font-size: 0.82rem; color: var(--text-light); }
.demand-poster a { color: var(--primary); font-weight: 600; text-decoration: none; }
.demand-description { font-size: 0.89rem; color: var(--text-body); line-height: 1.6; }

.demand-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.demand-meta-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0.45rem 0.7rem;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--ink);
}
.demand-meta-item .sf-ic { color: var(--primary); }

.demand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.demand-posted { font-size: 0.76rem; color: var(--text-faint); }

/* ------------------------------------------------------ product detail -- */
.pd-image {
    background: linear-gradient(150deg, var(--surface-2), var(--canvas));
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.pd-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-image-ph { color: var(--text-faint); }

.pd-thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.pd-thumb {
    width: 68px; height: 68px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    color: var(--text-faint);
    background: var(--surface-2);
    transition: border-color .15s;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover { border-color: var(--primary); }
.pd-thumb.active { border-color: var(--primary); box-shadow: var(--ring); }

.pd-info h1 { font-size: 1.75rem; margin: 0.6rem 0 0.75rem; }
.pd-seller { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: 0.88rem; margin-bottom: 1.25rem; }
.pd-seller-name { color: var(--primary); font-weight: 600; text-decoration: none; }
.pd-rating, .pd-location { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text-light); }
.pd-rating .sf-ic { color: #f59e0b; }
.pd-rating-new .sf-ic { color: var(--accent); }

.pd-price-box {
    background: linear-gradient(140deg, var(--primary-tint), #fff);
    border: 1px solid var(--primary-light);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.pd-price { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.pd-unit { font-size: 1rem; font-weight: 500; color: var(--text-light); }
.pd-total { display: block; font-size: 0.85rem; color: var(--text-light); margin-top: 0.3rem; }

.pd-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.pd-spec {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0.65rem 0.8rem;
}
.pd-spec .label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-faint); font-weight: 600; }
.pd-spec .value { font-size: 0.92rem; font-weight: 600; color: var(--ink); text-transform: capitalize; }

.pd-description { font-size: 0.94rem; line-height: 1.7; color: var(--text-body); margin-bottom: 1.5rem; }
.pd-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* --------------------------------------------------- quantity stepper -- */
.pd-qty {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.9rem 1rem;
    margin-bottom: 1.1rem;
}
.pd-qty > label { font-size: 0.82rem; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; }

.qty-stepper {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-sm);
    overflow: hidden;
}
.qty-stepper:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 40px;
    border: none;
    background: #fff;
    color: var(--text-body);
    cursor: pointer;
    transition: background .14s, color .14s;
}
.qty-btn:hover { background: var(--primary-tint); color: var(--primary); }
.qty-stepper input {
    width: 74px;
    height: 40px;
    border: none;
    border-inline: 1px solid var(--border);
    text-align: center;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
    background: #fff;
    -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; }

.qty-side { display: flex; flex-direction: column; gap: 0.15rem; margin-left: auto; text-align: right; }
.qty-max {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.qty-max:hover { color: var(--primary-darker); }
.qty-total { font-size: 0.9rem; color: var(--text-light); }
.qty-total strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }

/* ----------------------------------------------------------- checkout -- */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1.75rem; align-items: start; }

.checkout-form-panel, .checkout-summary {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.checkout-summary { position: sticky; top: 92px; }
.checkout-summary h3 { font-size: 1.05rem; margin-bottom: 1.1rem; }

.co-item { display: flex; align-items: center; gap: 0.75rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.co-item-ic {
    width: 46px; height: 46px;
    border-radius: var(--r-sm);
    background: var(--primary-tint);
    color: var(--primary);
    border: 1px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.co-item-id { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.co-item-id strong { font-size: 0.94rem; color: var(--ink); }
.co-item-id span { font-size: 0.79rem; color: var(--text-light); }

.co-qty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.co-qty > label { font-size: 0.8rem; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; }
.co-qty-avail { font-size: 0.78rem; color: var(--text-faint); margin-left: auto; }

.co-item-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; font-size: 0.9rem; color: var(--text-body); }
.co-item-row.total {
    border-top: 1px solid var(--border);
    margin-top: 0.35rem;
    padding-top: 0.8rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
}
.co-item-row.small { font-size: 0.8rem; color: var(--text-light); padding: 0.25rem 0; }
.co-fee-breakdown { background: var(--surface-2); border-radius: var(--r-sm); padding: 0.6rem 0.75rem; margin-top: 0.75rem; }
.co-fee-note { font-size: 0.76rem; color: var(--text-light); line-height: 1.6; margin-top: 0.85rem; }

.checkout-trust {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 0.55rem;
}
.checkout-trust p { font-size: 0.82rem; color: var(--text-light); margin: 0; }
.checkout-trust .sf-ic { color: var(--success); }

/* -------------------------------------------------------------- misc  -- */
.modal-overlay {
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(4px);
}
.modal {
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}
.modal-header { border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 1.25rem; }
.modal-close {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--surface-2);
    color: var(--text-light);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background .14s, color .14s;
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.no-data, .hint {
    background: #fff;
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-md);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}
.muted { color: var(--text-light); }

.star-row { display: inline-flex; gap: 0.08rem; vertical-align: -0.15em; }
.star-ic { color: var(--border-strong); display: inline-flex; }
.star-ic.on { color: #f59e0b; }
.star {
    color: var(--border-strong);
    cursor: pointer;
    display: inline-flex;
    transition: color .14s, transform .14s;
}
.star:hover { transform: scale(1.12); }
.star.on { color: #f59e0b; }

.review-submitted {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--r-md);
    padding: 0.9rem 1rem;
    font-size: 0.88rem;
}

.respond-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--primary-tint);
    border: 1px solid var(--primary-light);
    border-radius: var(--r-md);
    padding: 0.9rem 1rem;
    margin-bottom: 1.15rem;
}
.respond-banner-icon { color: var(--primary); display: flex; }
.respond-banner strong { display: block; font-size: 0.9rem; color: var(--primary-darker); }
.respond-banner p { font-size: 0.82rem; color: var(--text-body); margin: 0.2rem 0 0; }
.respond-banner-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
}

.photo-dropzone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-md);
    padding: 1.6rem;
    text-align: center;
    cursor: pointer;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: border-color .16s, background .16s;
}
.photo-dropzone:hover { border-color: var(--primary); background: var(--primary-tint); }
.photo-dropzone-icon { color: var(--text-faint); display: flex; }
.photo-dropzone:hover .photo-dropzone-icon { color: var(--primary); }
.photo-dropzone strong { display: block; font-size: 0.9rem; color: var(--ink); }
.photo-dropzone small { font-size: 0.76rem; color: var(--text-light); }

.demo-warning {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--warning-light);
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: var(--r-md);
    padding: 0.8rem 1rem;
    font-size: 0.86rem;
    margin-bottom: 1rem;
}

.admin-cell-ic { color: var(--text-faint); display: inline-flex; vertical-align: -0.2em; margin-right: 0.4rem; }
.admin-note { display: flex; align-items: flex-start; gap: 0.55rem; }
.admin-note .sf-ic { color: var(--primary); flex-shrink: 0; margin-top: 0.1rem; }

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--success-light);
    color: #065f46;
    border-radius: var(--r-pill);
    padding: 0.15rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-xs);
}
.kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-light); font-weight: 600; }
.kpi-value { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--ink); margin: 0.3rem 0 0.2rem; letter-spacing: -0.03em; }
.kpi-trend { font-size: 0.78rem; font-weight: 600; }
.kpi-trend.up { color: var(--success); }

/* ------------------------------------------------------------- footer -- */
.footer {
    background: var(--grad-ink);
    color: #cbd5e1;
    padding: 3.5rem 0 1.75rem;
}
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-bottom: 0.9rem; }
.footer-brand span { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: #fff; }
.footer-brand-col p { font-size: 0.87rem; line-height: 1.7; color: #94a3b8; max-width: 42ch; }

.footer-trust { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.footer-trust-item { font-size: 0.78rem; color: #94a3b8; }
.footer-trust-item .sf-ic { color: #34d399; }

.footer-col h4 {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: grid; gap: 0.55rem; padding: 0; }
.footer-col a { color: #94a3b8; text-decoration: none; font-size: 0.87rem; transition: color .15s; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 2.5rem;
    padding-top: 1.4rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.8rem; color: #64748b; margin: 0; }
.footer-note { color: #475569 !important; }

/* --------------------------------------------------------- responsive -- */
@media (max-width: 1100px) {
    .hero-split .container { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-visual { max-width: 460px; }
    .marketplace-layout { grid-template-columns: 232px 1fr; }
    .checkout-layout { grid-template-columns: 1fr 330px; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .nav-center { order: 3; flex-basis: 100%; max-width: none; }
    .navbar .container { flex-wrap: wrap; gap: 0.75rem; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-summary, .filter-sidebar { position: static; }
}

@media (max-width: 768px) {
    .marketplace-layout { grid-template-columns: 1fr; }
    .filter-scroll { max-height: 220px; }
    .hero-split { padding: 3rem 0 3.5rem; }
    .hero-cta .btn { flex: 1; min-width: 160px; }
    .acct-type { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .qty-side { margin-left: 0; text-align: left; width: 100%; }
    .pd-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .demand-board, .product-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.45rem; }
    .brand-text .tagline { display: none; }
}

/* Slim footer for auth pages — legal + trust signal without a full sitemap. */
.footer-slim { padding: 1.75rem 0; }
.footer-slim .footer-bottom { margin-top: 0; padding-top: 0; border-top: none; justify-content: center; text-align: center; gap: 0.35rem 1rem; }
.footer-slim .footer-note a { color: #64748b; text-decoration: none; }
.footer-slim .footer-note a:hover { color: #cbd5e1; }

/* --------------------------------------------------------------------------
   MOBILE NAVIGATION
   The refresh layer's `.nav-menu { display: flex }` sits after the original
   stylesheet, so it was winning over the old max-width:768px collapse and
   forcing every page to scroll sideways on a phone. These rules restore the
   collapse and restyle the open menu to match the new design.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .navbar .container { flex-wrap: wrap; row-gap: 0.75rem; }
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        order: 2;
        width: 42px;
        height: 42px;
        border-radius: var(--r-sm);
        margin-left: auto;
    }
    .hamburger:hover { background: var(--surface-2); }
    .hamburger span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 2px;
        background: var(--ink);
        margin: 0 auto;
    }

    .nav-center { order: 3; flex-basis: 100%; max-width: none; }

    .nav-menu {
        display: none;
        order: 4;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }
    .nav-menu.active { display: flex; }
    .nav-menu > li { width: 100%; }
    .nav-menu > li > a { display: block; padding: 0.7rem 0.85rem; }
    .nav-menu > li > a.btn-primary-nav {
        margin: 0.4rem 0 0;
        text-align: center;
        border-radius: var(--r-md);
    }
    /* Keep the account dropdown anchored inside the stacked menu. */
    .nav-account { display: flex; justify-content: flex-start; padding: 0.35rem 0; }
    .account-menu { left: 0; right: auto; }
}

@media (min-width: 901px) {
    .hamburger { display: none; }
}

/* --------------------------------------------------------------------------
   INLINE FORM MESSAGES
   .form-msg was referenced by the checkout Stripe error and by the demand /
   listing / review handlers, but had no styling at all — errors rendered as
   bare unstyled text. These give failed writes a visible, legible surface.
   -------------------------------------------------------------------------- */
.form-msg {
    display: none;
    align-items: flex-start;
    gap: 0.55rem;
    border-radius: var(--r-sm);
    padding: 0.7rem 0.85rem;
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
    border: 1px solid transparent;
}
.form-msg .sf-ic { flex-shrink: 0; margin-top: 0.1rem; }
.form-msg.error { background: var(--danger-light); color: #991b1b; border-color: #fecaca; }
.form-msg.error .sf-ic { color: var(--danger); }
.form-msg.ok { background: var(--success-light); color: #065f46; border-color: #a7f3d0; }
.form-msg.ok .sf-ic { color: var(--success); }

/* Same treatment for the small inline confirmations on the account page. */
.form-inline-msg { font-size: 0.84rem; font-weight: 600; }
.form-inline-msg.ok { color: var(--success); }
.form-inline-msg.error { color: var(--danger); }

/* --------------------------------------------------------------------------
   DEMAND POST LIFECYCLE
   Posts persist until the buyer marks them fulfilled or removes them; they are
   never auto-expired. Fulfilled posts stay retrievable behind "Show fulfilled".
   -------------------------------------------------------------------------- */
.show-fulfilled {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
}
.show-fulfilled input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }

.demand-card.fulfilled { opacity: 0.72; background: var(--surface-2); }
.demand-card.fulfilled h3 { color: var(--text-light); }
.demand-card.fulfilled:hover { opacity: 1; }

.urgency-fulfilled {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--success-light);
    color: #065f46;
}

.demand-closed-note { font-size: 0.82rem; font-weight: 600; color: var(--success); }

.demand-owner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px dashed var(--border);
}
.demand-act {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    padding: 0.32rem 0.75rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-body);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}
.demand-act:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.demand-act.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-light); }

/* Seller controls on "Your Active Listings". Removal is limited to the seller
   who posted the listing or the site owner, matching the Firestore rule. */
.listing-item-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.listing-locked {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: var(--text-light);
    background: var(--warning-light);
    border-radius: var(--r-pill);
    padding: 0.25rem 0.65rem;
}
.listing-locked .sf-ic { color: var(--warning); }

/* --------------------------------------------------------------------------
   LEGAL DOCUMENTS
   Long-form policy text: narrower measure, clear heading hierarchy, and a
   sticky-ish table of contents so the three documents stay navigable.
   -------------------------------------------------------------------------- */
.legal-doc { max-width: 780px; }
.legal-doc h2 {
    font-size: 1.7rem;
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}
.legal-doc h2:first-of-type { border-top: none; padding-top: 0; margin-top: 1.5rem; }
.legal-doc h3 { font-size: 1.05rem; margin: 1.9rem 0 0.6rem; color: var(--ink); }
.legal-doc p { margin-bottom: 0.9rem; line-height: 1.75; color: var(--text-body); }
.legal-doc .link-list { margin: 0.5rem 0 1.1rem; padding-left: 1.1rem; list-style: disc; }
.legal-doc .link-list li { margin-bottom: 0.5rem; line-height: 1.7; color: var(--text-body); }
.legal-doc code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.88em;
}

.legal-updated { font-size: 0.85rem; color: var(--text-light); }

.legal-notice {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: var(--warning-light);
    border: 1px solid #fde68a;
    border-radius: var(--r-md);
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
}
.legal-notice .sf-ic { color: var(--warning); flex-shrink: 0; margin-top: 0.15rem; }
.legal-notice strong { display: block; color: #92400e; margin-bottom: 0.2rem; }
.legal-notice p { font-size: 0.86rem; color: #92400e; margin: 0; line-height: 1.6; }

.legal-toc {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.9rem 0 0.4rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}
.legal-toc a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    background: var(--primary-tint);
    border: 1px solid var(--primary-light);
    border-radius: var(--r-pill);
    padding: 0.35rem 0.85rem;
}
.legal-toc a:hover { background: var(--primary-light); color: var(--primary-darker); }

/* Anchor targets clear the sticky navbar. */
.legal-doc h2[id], .legal-doc h3[id] { scroll-margin-top: 90px; }

/* Clickwrap consent on signup. Deliberately unticked by default and `required`
   — an affirmative act is what makes acceptance evidenceable. */
.terms-accept {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.8rem 0.9rem;
    margin: 0.25rem 0 1.1rem;
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-body);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.terms-accept:hover { border-color: var(--border-strong); }
.terms-accept:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.terms-accept input {
    accent-color: var(--primary);
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    cursor: pointer;
}
.terms-accept a { color: var(--primary); font-weight: 600; }
.terms-accept a:hover { color: var(--primary-darker); }
/* Browser validation styling once the user has tried to submit. */
.terms-accept:has(input:invalid:not(:placeholder-shown)),
form.was-validated .terms-accept:has(input:invalid) {
    border-color: var(--danger);
    background: var(--danger-light);
}

/* --------------------------------------------------------------------------
   UPDATED-TERMS RE-CONSENT BANNER
   For signed-in users whose recorded acceptance predates the current revision.
   No dismiss control — it persists until accepted — but it never blocks the
   page underneath.
   -------------------------------------------------------------------------- */
.terms-banner {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1200;
    width: min(760px, calc(100vw - 2rem));
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem 1.15rem;
    animation: termsBannerIn .3s ease-out;
}
@keyframes termsBannerIn {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) { .terms-banner { animation: none; } }

.terms-banner-ic { display: flex; color: var(--primary); flex-shrink: 0; }
.terms-banner-copy { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 0.15rem; }
.terms-banner-copy strong { font-size: 0.92rem; color: var(--ink); }
.terms-banner-copy span { font-size: 0.84rem; color: var(--text-light); }
.terms-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.terms-banner-actions .btn { padding: 0.55rem 1.1rem; font-size: 0.87rem; }
.terms-banner-error { flex-basis: 100%; margin: 0.25rem 0 0; }

@media (max-width: 560px) {
    .terms-banner { bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100%; }
    .terms-banner-actions { width: 100%; }
    .terms-banner-actions .btn { flex: 1; }
}
