:root {
    --bbb-green: #087653;
    --bbb-green-dark: #075b40;
    --bbb-ink: #18231f;
    --bbb-muted: #65716b;
    --bbb-line: #dce5df;
    --bbb-surface: #ffffff;
    --bbb-canvas: #f5f8f6;
    --bbb-accent: #e99824;
}

html { scroll-behavior: smooth; }
body { color: var(--bbb-ink); }
[hidden] { display: none !important; }
body.bbb-app { padding-top: 84px; padding-bottom: 76px; }
body.legacy-header, .legacy-nav, .legacy-footer { display: none !important; }

.bbb-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    display: flex !important;
    min-height: 72px;
    align-items: center;
    border-bottom: 1px solid var(--bbb-line);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 2px 12px rgba(24, 35, 31, .05);
    backdrop-filter: blur(14px);
}
.bbb-header-inner {
    width: min(1200px, 100%);
    margin: auto;
    padding: 12px 24px;
    display: flex;
    gap: 28px;
    align-items: center;
}
.bbb-brand { color: var(--bbb-green) !important; font-size: 22px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.bbb-primary-nav { display: flex; align-items: center; gap: 8px; }
.bbb-primary-nav a, .bbb-header-action {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--bbb-muted);
    background: transparent;
    font: 600 14px/1.2 Inter, sans-serif;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.bbb-primary-nav a:hover, .bbb-primary-nav a[aria-current="page"] { color: var(--bbb-green); background: #eaf5ef; }
.bbb-header-search { display: flex; flex: 1; min-width: 150px; max-width: 360px; margin-left: auto; }
.bbb-header-search input {
    width: 100%;
    border: 1px solid var(--bbb-line);
    border-radius: 999px 0 0 999px;
    padding: 11px 16px;
    outline: none;
    background: var(--bbb-canvas);
}
.bbb-header-search input:focus { border-color: var(--bbb-green); }
.bbb-header-search button { border: 1px solid var(--bbb-green); border-radius: 0 999px 999px 0; padding: 0 16px; color: white; background: var(--bbb-green); cursor: pointer; }
.bbb-marketplace-chat { display: flex; width: 100%; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; border: 1px solid var(--bbb-green); border-radius: 8px; padding: 9px 12px; color: white; background: var(--bbb-green); font: 700 12px/1.4 Inter, sans-serif; cursor: pointer; }
.bbb-marketplace-chat:hover { border-color: var(--bbb-green-dark); background: var(--bbb-green-dark); }
.bbb-header-actions { display: flex; align-items: center; gap: 8px; }
.bbb-header-action.primary { color: white; background: var(--bbb-green); }
.bbb-header-action.primary:hover { background: var(--bbb-green-dark); }
.bbb-footer { display: flex !important; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 26px 20px; color: var(--bbb-muted); font-size: 13px; }
.bbb-footer a { color: inherit; text-decoration: none; }
.bbb-footer a:hover { color: var(--bbb-green); }
.bbb-bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 100;
    display: none !important;
    justify-content: space-around;
    border-top: 1px solid var(--bbb-line);
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
    background: white;
    box-shadow: 0 -4px 16px rgba(24, 35, 31, .08);
}
.bbb-bottom-nav a { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--bbb-muted); font-size: 11px; font-weight: 700; text-decoration: none; }
.bbb-bottom-nav a[aria-current="page"] { color: var(--bbb-green); }
.bbb-bottom-nav .material-symbols-outlined { font-size: 23px; }
.bbb-app button:not(:disabled), .bbb-app a { transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s, transform .15s; }
.bbb-app button:focus-visible, .bbb-app a:focus-visible, .bbb-app input:focus-visible, .bbb-app select:focus-visible, .bbb-app textarea:focus-visible { outline: 3px solid #8ed9b3; outline-offset: 2px; }
.bbb-app [data-condition-filter].is-active { color: white !important; border-color: var(--bbb-green) !important; background: var(--bbb-green) !important; }
.bbb-toast {
    position: fixed;
    right: 20px;
    bottom: 88px;
    z-index: 300;
    max-width: min(420px, calc(100vw - 40px));
    border-radius: 12px;
    padding: 13px 17px;
    color: white;
    background: #1d3028;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}
.bbb-toast[hidden], [data-bbb-view][hidden] { display: none !important; }
.bbb-modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(17, 30, 24, .55); }
.bbb-modal { width: min(480px, 100%); border-radius: 18px; padding: 24px; background: white; box-shadow: 0 20px 70px rgba(0, 0, 0, .24); }
.bbb-modal h2 { margin: 0 0 8px; font-size: 22px; }
.bbb-modal p { color: var(--bbb-muted); }
.bbb-modal label { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 13px; }
.bbb-modal input, .bbb-modal textarea { width: 100%; border: 1px solid var(--bbb-line); border-radius: 9px; padding: 11px 12px; }
.bbb-modal textarea { min-height: 110px; resize: vertical; }
.bbb-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.bbb-modal-actions button { border: 0; border-radius: 9px; padding: 11px 15px; font-weight: 700; cursor: pointer; }
.bbb-modal-actions [data-modal-cancel] { color: var(--bbb-muted); background: #edf1ee; }
.bbb-modal-actions [data-modal-submit] { color: white; background: var(--bbb-green); }
.bbb-card-link { color: inherit; text-decoration: none; }
.bbb-card-link:hover { color: var(--bbb-green); }
.bbb-empty { grid-column: 1 / -1; border: 1px dashed var(--bbb-line); border-radius: 14px; padding: 28px; color: var(--bbb-muted); text-align: center; background: white; }
.bbb-user-product { overflow: hidden; border: 1px solid var(--bbb-line); border-radius: 14px; background: white; box-shadow: 0 4px 16px rgba(0, 0, 0, .04); }
.bbb-user-product img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #edf2ee; }
.bbb-user-product-body { padding: 14px; }
.bbb-user-product-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.bbb-user-product-actions button { border: 1px solid var(--bbb-line); border-radius: 8px; padding: 8px 11px; color: var(--bbb-ink); background: white; cursor: pointer; }
.bbb-user-product-actions button:hover { border-color: var(--bbb-green); color: var(--bbb-green); }
.bbb-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; color: var(--bbb-green-dark); background: #e8f5e9; font-size: 11px; font-weight: 700; }
.bbb-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.bbb-preview figure { position: relative; width: 76px; height: 76px; margin: 0; }
.bbb-preview img { width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }
.bbb-preview button { position: absolute; top: -7px; right: -7px; width: 23px; height: 23px; border: 0; border-radius: 50%; color: white; background: #a52d2d; cursor: pointer; }
.bbb-thumbnail { border: 2px solid transparent; }
.bbb-thumbnail[aria-pressed="true"] { border-color: var(--bbb-green); opacity: 1; }
.is-dragging { border-color: var(--bbb-green) !important; background: #e8f5e9 !important; }
.bbb-dashboard-content { padding: 22px 24px 32px; }
.bbb-dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.bbb-dashboard-heading h2 { margin: 0; font-size: clamp(21px, 3vw, 28px); color: var(--bbb-ink); }
.bbb-dashboard-cta { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 11px 16px; color: white; background: var(--bbb-green); font-weight: 700; text-decoration: none; cursor: pointer; }
.bbb-dashboard-cta:hover { color: white; background: var(--bbb-green-dark); }
.bbb-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.bbb-dashboard-tab { display: flex; min-width: 120px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-bottom: 3px solid transparent; padding: 14px 12px; color: var(--bbb-muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.bbb-dashboard-tab.active { border-color: var(--bbb-green); color: var(--bbb-green); }
.bbb-record-list { display: grid; gap: 10px; }
.bbb-record { border: 1px solid var(--bbb-line); border-radius: 11px; padding: 16px; background: white; }
.bbb-dashboard-description { margin: 6px 0 0; color: var(--bbb-muted); font-size: 13px; line-height: 1.55; }
.bbb-profile-campus { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; color: #34483d; background: #edf2ee; font-size: 12px; font-weight: 700; }
.bbb-verification-label { color: #735117; font-size: 12px; font-weight: 600; }
.bbb-dashboard-avatar, .bbb-seller-avatar { display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #dce5df; border-radius: 50%; color: #075b40; background: #edf4ef; font-weight: 800; }
.bbb-dashboard-avatar { width: 128px; height: 128px; font-size: 28px; }
.bbb-seller-avatar { width: 48px; height: 48px; font-size: 12px; }
.bbb-order-list, .bbb-thread-list, .bbb-offer-list { display: grid; gap: 14px; }
.bbb-order-card, .bbb-thread-card { display: grid; gap: 10px; border: 1px solid var(--bbb-line); border-radius: 12px; padding: 18px; background: white; }
.bbb-offer-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--bbb-line); border-radius: 12px; padding: 16px 18px; background: white; }
.bbb-offer-card h3 { margin: 5px 0; color: var(--bbb-ink); font-size: 15px; }
.bbb-offer-card p { margin: 0; color: var(--bbb-muted); font-size: 13px; }
.bbb-offer-card .bbb-order-actions a { align-self: center; color: var(--bbb-green); font-size: 12px; font-weight: 700; text-decoration: none; }
.bbb-order-top, .bbb-thread-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.bbb-order-top h3, .bbb-thread-heading h3 { margin: 5px 0 0; color: var(--bbb-ink); font-size: 16px; }
.bbb-order-role, .bbb-thread-heading > div > p { color: var(--bbb-muted); font-size: 12px; font-weight: 600; }
.bbb-order-card > p { margin: 0; color: #56645b; font-size: 13px; line-height: 1.5; }
.bbb-order-card small { color: var(--bbb-muted); }
.bbb-order-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bbb-order-actions button, .bbb-thread-card form button, .bbb-review-form button { border: 1px solid var(--bbb-green); border-radius: 8px; padding: 9px 12px; color: white; background: var(--bbb-green); font-size: 12px; font-weight: 700; cursor: pointer; }
.bbb-order-actions button[data-order-action="cancel"] { border-color: #c34638; color: #a5322b; background: white; }
.bbb-review-form { display: grid; max-width: 560px; gap: 10px; }
.bbb-review-form label { display: grid; gap: 5px; color: var(--bbb-ink); font-size: 12px; font-weight: 700; }
.bbb-review-form select, .bbb-review-form textarea, .bbb-thread-card form textarea { width: 100%; border: 1px solid var(--bbb-line); border-radius: 8px; padding: 10px; font: inherit; font-size: 13px; }
.bbb-review-form textarea, .bbb-thread-card form textarea { min-height: 78px; resize: vertical; }
.bbb-thread-heading a { color: var(--bbb-green); font-size: 12px; font-weight: 700; text-decoration: none; }
.bbb-thread-messages { display: grid; gap: 8px; max-height: 250px; overflow: auto; border-radius: 9px; padding: 12px; background: #f5f8f6; }
.bbb-thread-messages p { width: fit-content; max-width: 85%; margin: 0; border-radius: 10px; padding: 9px 11px; color: #334139; background: white; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.bbb-thread-messages .bbb-message-own { justify-self: end; color: #174832; background: #e6f3ea; }
.bbb-thread-card form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.bbb-thread-card form .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.bbb-checkout-modal form { display: grid; gap: 8px; }
.bbb-checkout-modal form > label { margin: 8px 0 0; }
.bbb-checkout-modal select, .bbb-checkout-modal input { width: 100%; min-height: 44px; border: 1px solid var(--bbb-line); border-radius: 8px; padding: 9px 11px; color: var(--bbb-ink); background: white; font: inherit; font-size: 14px; }
.bbb-checkout-summary { display: grid; gap: 9px; margin: 10px 0 0; border: 1px solid var(--bbb-line); border-radius: 10px; padding: 12px; }
.bbb-checkout-summary > div { display: flex; justify-content: space-between; gap: 12px; color: var(--bbb-muted); font-size: 13px; }
.bbb-checkout-summary strong { color: var(--bbb-ink); }
.bbb-checkout-summary .bbb-checkout-total { border-top: 1px solid var(--bbb-line); padding-top: 9px; color: var(--bbb-ink); font-weight: 700; }
.bbb-checkout-note { margin: 2px 0; color: var(--bbb-muted); font-size: 11px; line-height: 1.55; }
.bbb-toast a { color: white; }
.bbb-app .bbb-header-actions [data-logout] { font: inherit; }
.bbb-settings-form { display: grid; max-width: 560px; gap: 14px; border: 1px solid var(--bbb-line); border-radius: 14px; padding: 20px; background: white; }
.bbb-settings-form label { display: grid; gap: 6px; font-weight: 700; }
.bbb-settings-form input:not([type="checkbox"]), .bbb-settings-form select { width: 100%; border: 1px solid var(--bbb-line); border-radius: 8px; padding: 11px 12px; background: white; }
.bbb-settings-form .bbb-checkbox { display: flex; align-items: center; font-weight: 500; }
.bbb-settings-form .bbb-checkbox input { width: 18px; height: 18px; accent-color: var(--bbb-green); }
.bbb-dashboard-content .bbb-empty .bbb-header-action { display: inline-flex; margin-top: 6px; color: white; background: var(--bbb-green); }
.bbb-auth.bbb-app { min-height: 100vh; padding: 72px 0 0 !important; background: #f4f7f5; font-family: Inter, sans-serif; }
.bbb-auth .bbb-header { min-height: 68px; }
.bbb-auth-header { justify-content: space-between; }
.bbb-auth .bbb-footer { min-height: 54px; padding: 18px; font-size: 12px; }
.bbb-auth .bbb-bottom-nav { display: none !important; }
.bbb-app main[aria-busy="true"] { position: relative; }
.bbb-loading main > :not(.bbb-skeleton) { visibility: hidden; }
.bbb-loading main > .bbb-skeleton { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; gap: 22px; visibility: visible; border-radius: 16px; padding: clamp(22px, 4vw, 52px); background: var(--bbb-canvas); }
.bbb-skeleton i { display: block; overflow: hidden; border-radius: 8px; background: linear-gradient(100deg, #e4ebe6 22%, #f5f8f6 38%, #e4ebe6 58%); background-size: 220% 100%; animation: bbb-shimmer 1.2s linear infinite; }
.bbb-skeleton-top { display: flex; gap: 12px; }
.bbb-skeleton-top i { width: 24%; height: 34px; }
.bbb-skeleton-columns { display: grid; grid-template-columns: minmax(220px, .8fr) 2fr; gap: 20px; }
.bbb-skeleton-columns section { display: grid; align-content: start; gap: 13px; }
.bbb-skeleton-columns i { height: 21px; }
.bbb-skeleton-columns section:first-child i:first-child { height: 150px; }
.bbb-skeleton-columns section:last-child i:first-child { height: 190px; }
.bbb-skeleton-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bbb-skeleton-cards i { height: 180px; }
@keyframes bbb-shimmer { to { background-position-x: -220%; } }
@media (prefers-reduced-motion: reduce) { .bbb-skeleton i { animation: none; } }
@media (max-width: 760px) {
    body.bbb-app { padding-top: 112px; padding-bottom: 76px; }
    .bbb-header { min-height: 60px; }
    .bbb-header-inner { padding: 8px 14px; gap: 10px; flex-wrap: wrap; }
    .bbb-brand { font-size: 20px; }
    .bbb-primary-nav { display: none; }
    .bbb-header-search { order: 3; flex-basis: 100%; max-width: none; }
    .bbb-header-search input { padding: 9px 13px; }
    .bbb-header-action { padding: 9px; }
    .bbb-header-actions { margin-left: auto; }
    .bbb-bottom-nav { display: flex !important; }
    .bbb-toast { right: 12px; bottom: 82px; }
    .bbb-dashboard-content { padding: 18px 12px 26px; }
    .bbb-dashboard-heading { align-items: flex-start; flex-direction: column; }
    .bbb-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .bbb-user-product-body { padding: 10px; }
    .bbb-auth.bbb-app { padding-top: 60px !important; }
    .bbb-skeleton-columns { grid-template-columns: 1fr; }
    .bbb-skeleton-columns section:first-child { display: none; }
    .bbb-skeleton-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bbb-order-top, .bbb-thread-heading, .bbb-offer-card { align-items: flex-start; flex-direction: column; }
    .bbb-thread-card form { grid-template-columns: 1fr; }
}
