/* ==========================================================================
   BidNexa theme — deep navy + royal blue. Loaded AFTER the core, site and panel sheets to re-skin them.
   ========================================================================== */
:root {
    --ink: #0f1f3d;
    --ink-2: #1e3a6e;
    --ink-3: #3f4f6b;
    --muted: #5f6f8a;
    --line: #e4e9f2;
    --bg: #f4f6fb;
    --accent: #2563eb;
    --accent-600: #1d4ed8;
    --accent-soft: #e8f0fe;
    --accent-light: #9db9f5;
    --blue: #1d4ed8;
    --bs-link-color: #1d4ed8;
    --brand-grad: linear-gradient(135deg, #0f1f3d 0%, #1e3a6e 55%, #1e3a8a 100%);
}
body { font-family: 'Inter', system-ui, sans-serif; }
::selection { background: var(--accent); color: #fff; }

/* buttons / forms */
.btn-primary { --bs-btn-focus-shadow-rgb: 37, 99, 235; box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .95); font-weight: 700; }
.btn-primary:hover { transform: translateY(-1px); }
.btn-dark { --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink); --bs-btn-hover-bg: var(--ink-2); --bs-btn-hover-border-color: var(--ink-2); }
.form-control:focus, .form-select:focus { border-color: #1d4ed8; box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .22); }
.form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .25); border-color: #1d4ed8; }

/* brand, avatar, bubbles */
.brand .logo { background: var(--brand-grad); color: var(--accent-light); box-shadow: 0 6px 14px -6px rgba(15, 31, 61, .6); }
.brand b { color: var(--accent-600); }
.avatar { background: var(--ink); color: var(--accent-light); }
.icon-bubble { background: var(--accent-soft); color: #1e40af; }
.icon-bubble.dark { background: var(--ink); color: var(--accent-light); }
.chip-lime { background: var(--accent-soft); color: #1e40af; }
.section-head .eyebrow { color: #1e40af; background: var(--accent-soft); }
.step-num { background: var(--ink); color: var(--accent-light); }
.nav-pills-bn .nav-link.active { background: var(--ink); }

/* navbar */
.navbar-bn { box-shadow: 0 1px 0 rgba(15, 31, 61, .03); }
.navbar-bn .nav-link.active { background: var(--accent-soft); color: #1e40af; }
.navbar-bn .nav-link { position: relative; }

/* hero */
.hero { background: radial-gradient(1000px 480px at 88% -10%, rgba(37, 99, 235, .28), transparent 60%), radial-gradient(800px 500px at -10% 110%, rgba(29, 78, 216, .35), transparent 55%), linear-gradient(160deg, #0a1530 0%, #0f1f3d 55%, #16305c 100%); }
.hero h1 em { color: var(--accent-light); }
.hero-search { background: #fff; border-radius: 18px; padding: .5rem; display: flex; gap: .5rem; box-shadow: var(--shadow-lg); max-width: 640px; }
.hero-search input { border: 0; box-shadow: none !important; background: transparent; font-size: 1rem; }
.hero-search select { border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none !important; max-width: 160px; background-color: transparent; }
.hero-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; padding: 1.4rem; backdrop-filter: blur(10px); color: #fff; }
.hero-card .price { font-size: 2rem; font-weight: 800; color: var(--accent-light); letter-spacing: -.03em; }
.hero-card .t { color: #cfe3ee; font-size: .85rem; }
.hero-stats b { color: #fff; }
.cta-band { background: var(--brand-grad); }
.cta-band::after { background: radial-gradient(circle, rgba(37, 99, 235, .4), transparent 65%); }
footer.site a:hover { color: var(--accent-light); }
footer.site .brand b { color: var(--accent-light); }

/* auth */
.auth-side { background: radial-gradient(800px 400px at 80% 0%, rgba(37, 99, 235, .3), transparent 60%), linear-gradient(160deg, #0a1530, #1e3a6e); }
.auth-side ul i, .auth-side .brand b { color: var(--accent-light); }
.demo-otp { background: var(--accent-soft); border-color: #1d4ed8; }
.admin-login { background: radial-gradient(900px 500px at 80% -10%, rgba(37, 99, 235, .25), transparent 60%), linear-gradient(160deg, #0a1530, #1e3a6e); }
.type-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.type-pick input { display: none; }
.type-pick label { border: 1.5px solid var(--line); border-radius: 14px; padding: .7rem .8rem; cursor: pointer; background: #fff; display: flex; gap: .6rem; align-items: center; font-size: .84rem; line-height: 1.25; transition: all .15s; }
.type-pick label i { font-size: 1.3rem; color: var(--ink-2); }
.type-pick label small { display: block; color: var(--muted); font-size: .72rem; }
.type-pick input:checked + label { border-color: var(--accent-600); background: var(--accent-soft); box-shadow: 0 8px 20px -14px rgba(29, 78, 216, 1); }

/* admin panel */
body.panel { background: #f1f4fa; }
.sidebar { background: linear-gradient(180deg, #0a1530 0%, #0f1f3d 100%); }
.side-link.active { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -14px var(--accent); }
.side-link:hover { background: rgba(255, 255, 255, .07); }
.sidebar .brand small, .side-user .avatar { background: var(--accent); color: #fff; }
.side-group { color: #6477a3; }
.topbar { background: rgba(255, 255, 255, .92); }
.stat .num { color: var(--ink); }
.queue-item { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--ink); }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: #fafbfe; color: var(--ink); }
.queue-item .n { margin-left: auto; font-weight: 800; background: var(--accent-soft); color: #1e40af; border-radius: 999px; padding: .1rem .7rem; min-width: 34px; text-align: center; }
.queue-item .n.zero { background: #eef1f7; color: var(--muted); }

/* ==========================================================================
   Auction components
   ========================================================================== */
.live-pill { display: inline-flex; align-items: center; gap: .4rem; background: #fee2e2; color: #b91c1c; font-weight: 700; font-size: .72rem; padding: .22rem .6rem; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.live-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

.a-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: transform .2s, box-shadow .2s; color: var(--ink); }
.a-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.a-thumb { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e8eefb, #f6f8fd); display: grid; place-items: center; overflow: hidden; }
.a-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.a-card:hover .a-thumb img { transform: scale(1.05); }
.a-thumb .ph { font-size: 3rem; color: #9db0d8; }
.a-thumb .tl { position: absolute; top: .7rem; left: .7rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.a-thumb .tr { position: absolute; top: .7rem; right: .7rem; }
.tag-type { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 8px; background: rgba(15, 31, 61, .88); color: #fff; }
.tag-type.rev { background: rgba(37, 99, 235, .96); color: #fff; }
.a-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.a-body h6 { font-size: 1rem; margin: 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.a-meta { font-size: .78rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; }
.a-price { display: flex; justify-content: space-between; align-items: end; margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--line); }
.a-price small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.a-price b { font-size: 1.25rem; letter-spacing: -.02em; }
.a-time { font-size: .8rem; font-weight: 700; color: var(--ink-2); text-align: right; }
.a-time.urgent { color: #dc2626; }
.fav-btn { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 0; display: grid; place-items: center; box-shadow: var(--shadow-sm); color: var(--ink-3); }
.fav-btn.on { color: #e11d48; }

.filter-card { position: sticky; top: 86px; }
.filter-card .form-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cat-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .95rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .86rem; color: var(--ink); transition: all .15s; }
.cat-chip:hover, .cat-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-chip i { color: var(--accent-600); font-size: 1.1rem; }
.how-card { text-align: center; padding: 1.6rem 1.2rem; }
.how-card .ic { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-grad); color: var(--accent-light); display: grid; place-items: center; font-size: 1.7rem; margin: 0 auto 1rem; box-shadow: 0 14px 24px -14px rgba(15, 31, 61, .7); }

/* details page */
.gallery-main { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e8eefb, #f6f8fd); border-radius: 20px; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-main .ph { font-size: 5rem; color: #9db0d8; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; }
.gallery-thumbs img { width: 76px; height: 58px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .75; }
.gallery-thumbs img.on, .gallery-thumbs img:hover { border-color: var(--accent-600); opacity: 1; }
.bid-panel { position: sticky; top: 86px; }
.bid-top { background: var(--brand-grad); color: #fff; border-radius: 18px 18px 0 0; padding: 1.2rem 1.3rem; }
.bid-top .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #aebddf; font-weight: 600; }
.bid-top .big { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: #fff; }
.bid-top .big.flash-up { animation: flashUp .9s ease; }
@keyframes flashUp { 0% { color: var(--accent-light); transform: scale(1.06); } 100% { color: #fff; transform: none; } }
.cd { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; color: var(--accent-light); }
.cd.urgent { color: #ff6b6b; animation: blink 1s infinite; }
.bid-body { padding: 1.2rem 1.3rem; }
.bid-body .input-group-text, .bid-body .form-control { height: 52px; font-size: 1.1rem; font-weight: 700; }
.quick-add { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.quick-add button { border: 1px solid var(--line); background: #f7f9fd; border-radius: 10px; font-size: .78rem; font-weight: 600; padding: .3rem .7rem; }
.quick-add button:hover { background: var(--accent-soft); border-color: #1d4ed8; }
.bid-msg { margin-top: .7rem; font-size: .86rem; font-weight: 600; min-height: 1.2em; }
.bid-msg.ok { color: #15803d; }
.bid-msg.bad { color: #b91c1c; }
.my-state { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; border-radius: 14px; margin-bottom: 1rem; font-size: .9rem; }
.my-state i { font-size: 1.4rem; }
.my-state small { display: block; color: inherit; opacity: .8; }
.my-state.ok { background: #dcfce7; color: #166534; }
.my-state.bad { background: #fee2e2; color: #991b1b; }
.my-state.info { background: #dbeafe; color: #1e40af; }
.conn { font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; display: inline-flex; gap: .3rem; align-items: center; }
.conn.ok { background: #dcfce7; color: #166534; }
.conn.bad { background: #fee2e2; color: #991b1b; animation: blink 1.2s infinite; }
.rank-row, .hist-row { display: flex; align-items: center; gap: .7rem; padding: .65rem 1rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rank-row:last-child, .hist-row:last-child { border-bottom: 0; }
.rank-row .pos { width: 34px; height: 34px; border-radius: 10px; background: #eef1f7; display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.rank-row:first-child .pos { background: var(--accent); color: #fff; }
.rank-row .who { flex: 1; font-weight: 600; min-width: 0; }
.rank-row.me, .hist-row.me { background: #f1f6ff; }
.hist-row span { flex: 1; min-width: 0; }
.hist-row small { color: var(--muted); font-size: .72rem; white-space: nowrap; }
.lv-toast-box { position: fixed; right: 16px; bottom: 16px; z-index: 2100; display: grid; gap: .5rem; width: min(340px, calc(100vw - 32px)); }
.lv-toast { background: var(--ink); color: #fff; border-radius: 12px; padding: .7rem 1rem; font-size: .86rem; box-shadow: var(--shadow-lg); animation: slideIn .25s ease; border-left: 4px solid var(--accent); }
.lv-toast.warn { border-left-color: #ff6b6b; }
.winner-banner { background: linear-gradient(120deg, #e8f0fe, #c7d9fb); border: 1px solid #9db9f5; border-radius: 16px; padding: 1rem 1.2rem; display: flex; gap: .9rem; align-items: center; }
.winner-banner i { font-size: 2rem; color: #1e40af; }
.spec-table td { padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; vertical-align: top; }
.spec-table td:first-child { color: var(--muted); width: 38%; }
.rich { white-space: pre-line; color: var(--ink-3); line-height: 1.65; }
.room-head { background: var(--brand-grad); color: #fff; }
.room-head h1, .room-head h2, .room-head .cd { color: #fff; }
.room-stat { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 1rem 1.2rem; }
.room-stat .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #aebddf; font-weight: 600; }
.room-stat .val { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.lot-chip { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fafbfe; font-size: .9rem; }

/* forms / owner */
.form-section { border: 1px solid var(--line); border-radius: 18px; background: #fff; margin-bottom: 1.1rem; }
.form-section > .fs-head { padding: .95rem 1.25rem; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; gap: .6rem; align-items: center; }
.form-section > .fs-head i { color: var(--accent-600); }
.form-section > .fs-body { padding: 1.25rem; }
.img-slot { position: relative; width: 96px; height: 76px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.img-slot label { position: absolute; top: 3px; right: 3px; background: rgba(255, 255, 255, .92); border-radius: 6px; padding: 0 .35rem; font-size: .68rem; cursor: pointer; }
.timeline-evt { font-size: .84rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); display: flex; gap: .7rem; }
.timeline-evt:last-child { border-bottom: 0; }
.timeline-evt .e { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: #1e40af; background: var(--accent-soft); border-radius: 6px; padding: .1rem .45rem; height: fit-content; white-space: nowrap; }
.score-in { width: 84px; }
.tabs-bn .nav-link { color: var(--ink-3); font-weight: 600; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .7rem 1rem; }
.tabs-bn .nav-link.active { color: var(--ink); border-bottom-color: var(--accent-600); background: transparent; }

@media (max-width: 991.98px) {
    .bid-panel, .filter-card { position: static; }
    .hero-search { flex-direction: column; }
    .hero-search select { border-left: 0; border-top: 1px solid var(--line); max-width: none; }
}
@media (max-width: 575.98px) {
    .bid-top .big { font-size: 1.7rem; }
    .type-pick { grid-template-columns: 1fr; }
    .room-stat .val { font-size: 1.3rem; }
}

/* ==========================================================================
   Logged-in area polish (customer / seller / buyer / supplier pages)
   ========================================================================== */
body.is-auth { background: #f4f6fb; }
body.is-auth main, body.is-auth .container.py-4 { padding-top: 2rem !important; padding-bottom: 3rem !important; }
.stat { padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: 1rem; height: 100%; }
.stat .num { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: .78rem; color: var(--muted); font-weight: 500; margin-top: 3px; }
.stat .icon-bubble { flex: 0 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h2 { font-size: 1.45rem; font-weight: 800; margin: 0; }
.page-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
body.is-auth .card-bn { border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px -12px rgba(15, 23, 42, .12); overflow: hidden; }
body.is-auth .card-bn > .card-head { padding: 1rem 1.25rem; background: #fff; }
body.is-auth .card-bn > .card-body-bn, body.is-auth .card-bn > .p-3 { padding: 1.25rem !important; }
body.is-auth .table-bn thead th { background: #f8f9fc; padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); }
body.is-auth .table-bn tbody td { padding: .9rem 1.1rem; }
body.is-auth .table-bn tbody tr:last-child td { border-bottom: 0; }
body.is-auth .nav-pills-bn { margin-bottom: 1.5rem !important; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; }
body.is-auth .form-control, body.is-auth .form-select { border-radius: 10px; padding: .6rem .85rem; border-color: #dfe4ee; }
body.is-auth .form-control:focus, body.is-auth .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .18); }
body.is-auth .form-label { font-weight: 600; font-size: .85rem; color: var(--ink-3); }
body.is-auth .btn { border-radius: 10px; font-weight: 600; }
body.is-auth .alert { border-radius: 12px; border: 0; }
@media (max-width: 575px) { .stat { padding: .9rem; } .stat .num { font-size: 1.3rem; } }

/* card used directly as padded body (e.g. <form class="card-bn card-body-bn">) */
.card-bn.card-body-bn { padding: 1.25rem 1.4rem !important; }
.card-bn.card-body-bn h6 { font-weight: 700; }
.form-check.form-switch { display: flex; align-items: center; gap: .75rem; padding-left: 0; margin-bottom: .85rem !important; min-height: 1.6rem; }
.form-check.form-switch .form-check-input { float: none; margin: 0; width: 2.4rem; height: 1.3rem; flex: 0 0 auto; cursor: pointer; }
.form-check.form-switch .form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check.form-switch .form-check-label { font-size: .9rem; color: var(--ink-3); cursor: pointer; }
.card-bn > .p-3.small { padding: 1.1rem 1.25rem !important; }
body.is-auth .container.py-4 > h3:first-child, body.is-auth .container.py-4 > h2:first-child { margin-bottom: 1.25rem; }

/* enabled-integration badges (frontend) */
.int-badges { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.int-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.int-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: .3rem; }
.int-cat i { margin-right: .3rem; }
.int-chip { display: inline-flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid var(--line); color: var(--ink-3); border-radius: 999px; padding: .2rem .65rem; font-size: .76rem; font-weight: 600; }
.int-badges.on-dark .int-cat { color: #8fa0c4; }
.int-badges.on-dark .int-chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: #dbe3f5; }
.pay-select { min-width: 170px; }
