/* ============================================================
   A2YMART SELLER CENTRE PRO — layout, dashboard, tables, charts
   Loads AFTER style.css. Red seller theme preserved.
   ============================================================ */

/* ---------- SHELL: SIDEBAR + MAIN ---------- */
.sc-shell { display: flex; align-items: flex-start; max-width: 1280px; margin: 0 auto; padding: 16px 14px 60px; gap: 16px; }
.sc-side {
  width: 216px; flex-shrink: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 10px; position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow-y: auto;
}
.sc-group { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: #a0a0a8; text-transform: uppercase; padding: 12px 10px 5px; }
.sc-link {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; color: #444;
  background: transparent; transition: background .15s;
}
.sc-link:hover { background: #f6f6f6; }
.sc-link.active { background: #fdeaea; color: #e02020; }
.sc-link .badge { margin-left: auto; background: #e02020; color: #fff; border-radius: 10px; font-size: 10px; font-weight: 800; padding: 2px 7px; }
.sc-link .badge.warn { background: #f59e0b; }
.sc-main { flex: 1; min-width: 0; }
.sc-main > div { margin-bottom: 16px; }
.sc-burger { display: none; background: rgba(0,0,0,.18); color: #fff; border-radius: 8px; padding: 7px 11px; font-size: 16px; font-weight: 800; }
.sc-dim { display: none; }

@media (max-width: 900px) {
  .sc-burger { display: inline-block; }
  .sc-shell { padding: 12px 10px 70px; }
  .sc-side {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 300; max-height: none; height: 100%;
    border-radius: 0 14px 14px 0; transform: translateX(-105%); transition: transform .22s ease; width: 240px;
  }
  .sc-side.open { transform: translateX(0); }
  .sc-dim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 290; }
}

/* ---------- TOPBAR BELL ---------- */
.sc-bell { position: relative; background: rgba(0,0,0,.18); color: #fff; border-radius: 8px; padding: 7px 11px; font-size: 14px; }
.sc-bell .badge { position: absolute; top: -5px; right: -5px; background: #ffd400; color: #7a1010; border-radius: 10px; font-size: 10px; font-weight: 800; padding: 1px 6px; }
.bell-panel {
  position: fixed; top: 62px; right: 12px; z-index: 400; width: 330px; max-width: calc(100vw - 20px);
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.22); padding: 12px; max-height: 70vh; overflow-y: auto;
}
.bell-panel h4 { font-size: 13px; margin-bottom: 8px; }

/* ---------- NOTIFICATION ROWS ---------- */
.ntf { display: flex; gap: 9px; align-items: flex-start; padding: 8px 9px; border-radius: 9px; font-size: 12px; }
.ntf:hover { background: #f8f8f8; }
.ntf .ic { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.ntf .tt { font-weight: 700; }
.ntf .sb { color: #888; font-size: 11px; margin-top: 1px; }
.ntf.unread { background: #fdf3f3; }
.ntf.unread .tt { color: #c01818; }

/* ---------- RANGE BAR / CHIPS ---------- */
.range-bar { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.rchip { background: #fff; border: 1.5px solid #e4e4e4; border-radius: 18px; padding: 6px 14px; font-size: 12px; font-weight: 700; color: #555; }
.rchip.active { background: #e02020; border-color: #e02020; color: #fff; }
.range-bar input[type=date] { border: 1.5px solid #e4e4e4; border-radius: 8px; padding: 5px 8px; font-size: 12px; background: #fff; color: #444; }

/* ---------- STAT CARDS ---------- */
.sc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sc-card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 13px 14px; border-left: 4px solid #e02020; }
.sc-card .num { font-size: 21px; font-weight: 800; line-height: 1.2; word-break: break-word; }
.sc-card .lbl { font-size: 11px; color: var(--gray); font-weight: 700; margin-top: 2px; }
.sc-card.green { border-left-color: #16a34a; } .sc-card.green .num { color: #16a34a; }
.sc-card.amber { border-left-color: #f59e0b; } .sc-card.amber .num { color: #b45309; }
.sc-card.blue  { border-left-color: #4288d4; } .sc-card.blue .num { color: #306cb0; }
.sc-card.gray  { border-left-color: #9ca3af; }
.sc-card.red .num { color: #e02020; }

/* ---------- 2-COLUMN PANELS ---------- */
.sc-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.sc-2col .panel { margin-bottom: 0; }
.panel h2 { font-size: 15px; }

/* ---------- MINI LIST ROWS (recent orders / tx) ---------- */
.mini-row { display: flex; align-items: center; gap: 9px; padding: 8px 4px; border-bottom: 1px solid #f1f1f1; font-size: 12px; }
.mini-row:last-child { border-bottom: none; }
.mini-row .m-main { flex: 1; min-width: 0; }
.mini-row .m-main .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .m-main .s { color: #999; font-size: 11px; }
.mini-row .m-amt { font-weight: 800; color: #e02020; white-space: nowrap; }
.mini-row .m-amt.green { color: #16a34a; }

/* ---------- SVG CHART ---------- */
.chart-wrap { overflow-x: auto; }
.chart-wrap svg { display: block; }
.chart-note { font-size: 11px; color: #999; margin-top: 6px; }

/* ---------- TOOLBARS ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=text], .toolbar input[type=search], .toolbar input[type=date], .toolbar select {
  border: 1.5px solid #e2e2e2; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; background: #fff; color: #333; outline: none;
}
.toolbar input:focus, .toolbar select:focus { border-color: #e02020; }
.toolbar .grow { flex: 1; min-width: 150px; }

/* ---------- ORDER STATUS TABS ---------- */
.otabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.otab { background: #f3f3f3; border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 700; color: #555; }
.otab.active { background: #e02020; color: #fff; }
.otab .c { opacity: .75; font-weight: 800; margin-left: 3px; }

/* ---------- STATUS CHIPS ---------- */
.chip { display: inline-block; font-size: 10.5px; font-weight: 800; border-radius: 12px; padding: 3px 9px; }
.chip.live { background: #dcf5e4; color: #15803d; }
.chip.draft { background: #e8e8ee; color: #555; }
.chip.archived { background: #f3e8ff; color: #7c3aed; }
.chip.out { background: #fde3dd; color: #e02020; }
.chip.low { background: #fef3c7; color: #b45309; }
.chip.cancel { background: #fde3dd; color: #e02020; }
.chip.ship { background: #dbeafe; color: #1d4ed8; }
.chip.ret { background: #fef3c7; color: #b45309; }

/* ---------- PRODUCT TABLE ROWS ---------- */
.prow { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid #f1f1f1; }
.prow:last-child { border-bottom: none; }
.prow .thumb { width: 46px; height: 46px; border-radius: 9px; background: #f6f6f6; display: flex; align-items: center; justify-content: center; font-size: 20px; overflow: hidden; flex-shrink: 0; }
.prow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.prow .pm { flex: 1; min-width: 0; }
.prow .pm .n { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pm .s { font-size: 11px; color: #999; }
.prow .pp { text-align: right; flex-shrink: 0; }
.prow .pp .pr { font-weight: 800; color: #e02020; font-size: 13px; }
.prow .pp .op { font-size: 10.5px; color: #aaa; text-decoration: line-through; }
.prow .st { width: 70px; text-align: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.prow input[type=checkbox] { width: 16px; height: 16px; accent-color: #e02020; flex-shrink: 0; }
.pcols { display: flex; gap: 10px; padding: 4px 6px 8px; font-size: 10px; font-weight: 800; color: #aaa; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1.5px solid #eee; }

/* ---------- BULK BAR ---------- */
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #1c1c22; color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.bulk-bar button { background: rgba(255,255,255,.14); color: #fff; border-radius: 7px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; }
.bulk-bar button:hover { background: rgba(255,255,255,.26); }
.bulk-bar button.danger { background: #e02020; }

/* ---------- PAGER ---------- */
.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pager button { background: #f3f3f3; border-radius: 7px; padding: 6px 11px; font-size: 12px; font-weight: 700; color: #555; }
.pager button.active { background: #e02020; color: #fff; }
.pager button:disabled { opacity: .4; }
.pager .pinfo { font-size: 11px; color: #999; margin: 0 6px; }

/* ---------- SIMPLE TABLE ---------- */
.tblx { width: 100%; border-collapse: collapse; font-size: 12px; }
.tblx th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: #aaa; padding: 7px 8px; border-bottom: 1.5px solid #eee; }
.tblx td { padding: 8px; border-bottom: 1px solid #f3f3f3; }
.tblx tr:last-child td { border-bottom: none; }
.tblx .r { text-align: right; } .tblx th.r { text-align: right; }

/* ---------- HORIZONTAL BAR LIST (categories) ---------- */
.hbar { margin-bottom: 9px; }
.hbar .hl { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; margin-bottom: 3px; }
.hbar .ht { height: 8px; border-radius: 5px; background: #f1f1f1; overflow: hidden; }
.hbar .hf { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #e02020, #ff6b4a); }

/* ---------- FINANCE BREAKDOWN ---------- */
.fin-break { background: #fafafa; border: 1.5px dashed #e4e4e4; border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.fin-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
.fin-row .fl { color: #666; font-weight: 600; }
.fin-row .fv { font-weight: 800; }
.fin-row.minus .fv { color: #e02020; }
.fin-row.total { border-top: 1.5px solid #ddd; margin-top: 6px; padding-top: 8px; font-size: 14px; }
.fin-row.total .fv { color: #16a34a; }

/* ---------- SUPPLIER CARDS ---------- */
.sup-card { background: #fff; border: 1.5px solid #eee; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.sup-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.sup-head .sn { font-weight: 800; font-size: 15px; }
.sup-head .sc { font-size: 11.5px; color: #888; }
.sup-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 11px 0; }
.sup-stat { background: #fafafa; border-radius: 9px; padding: 8px 10px; }
.sup-stat .v { font-weight: 800; font-size: 14px; }
.sup-stat .l { font-size: 10px; color: #999; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.sup-stat.owe .v { color: #e02020; }
.sup-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.sup-actions .btn { padding: 7px 12px; font-size: 12px; }

/* ---------- CUSTOMER ROWS ---------- */
.cust-row { display: flex; align-items: center; gap: 11px; padding: 10px 6px; border-bottom: 1px solid #f1f1f1; }
.cust-row .av { width: 38px; height: 38px; border-radius: 50%; background: #e02020; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.cust-row .cm { flex: 1; min-width: 0; }
.cust-row .cm .n { font-weight: 700; font-size: 13px; }
.cust-row .cm .s { font-size: 11px; color: #999; }
.cust-row .cv { text-align: right; flex-shrink: 0; }
.cust-row .cv .t { font-weight: 800; color: #e02020; font-size: 13px; }
.cust-row .cv .s { font-size: 10.5px; color: #999; }
.cust-detail { background: #fafafa; border-radius: 10px; padding: 10px 12px; margin: 4px 0 10px; font-size: 12px; }

/* ---------- ACTIVITY LOG ---------- */
.act-row { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #f2f2f2; font-size: 12.5px; align-items: flex-start; }
.act-row .ic { width: 20px; text-align: center; margin-top: 1px; }
.act-row .at { margin-left: auto; font-size: 10.5px; color: #aaa; white-space: nowrap; }

/* ---------- SETTINGS SECTIONS ---------- */
.set-sec { background: #fff; border: 1.5px solid #f0f0f0; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.set-sec h3 { font-size: 14px; margin-bottom: 11px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 14px; }
.set-note { font-size: 11px; color: #999; margin: -4px 0 10px; }

/* ---------- MARKETING ---------- */
.mk-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.vch-meta { font-size: 11px; color: #888; padding: 6px 16px 10px; background: #fff; }
.promo-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #f2f2f2; font-size: 12.5px; }

/* ---------- INVOICE ---------- */
.invoice { font-size: 12.5px; }
.invoice .inv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.invoice h2 { font-size: 18px; letter-spacing: 1px; }
.invoice table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.invoice th { text-align: left; border-bottom: 1.5px solid #333; padding: 5px 4px; font-size: 10.5px; text-transform: uppercase; }
.invoice td { padding: 6px 4px; border-bottom: 1px solid #eee; }
.invoice .tot td { border-top: 1.5px solid #333; border-bottom: none; font-weight: 800; }

/* ---------- EMPTY STATES ---------- */
.empty-sm { text-align: center; color: #aaa; font-size: 12px; padding: 18px 8px; }

/* ---------- DARK MODE ---------- */
body.dark .sc-side, body.dark .bell-panel, body.dark .sc-card, body.dark .sup-card { background: #1d1d24; }
body.dark .sc-link { color: #b9b9c3; }
body.dark .sc-link:hover { background: #26262f; }
body.dark .sc-link.active { background: #3a1016; color: #ff6b6b; }
body.dark .sc-group { color: #5d5d68; }
body.dark .sc-card .num, body.dark .sup-head .sn, body.dark .mini-row .m-main .t,
body.dark .prow .pm .n, body.dark .cust-row .cm .n, body.dark .tblx td { color: #e8e8ee; }
body.dark .rchip, body.dark .toolbar input, body.dark .toolbar select, body.dark .range-bar input[type=date] { background: #26262f; border-color: #35353f; color: #cfcfd8; }
body.dark .otab { background: #26262f; color: #9a9aa5; }
body.dark .otab.active { background: #e02020; color: #fff; }
body.dark .prow, body.dark .mini-row, body.dark .cust-row, body.dark .act-row, body.dark .promo-row { border-color: #2c2c36; }
body.dark .prow .thumb, body.dark .sup-stat, body.dark .cust-detail { background: #26262f; }
body.dark .fin-break { background: #16161c; border-color: #2c2c36; }
body.dark .set-sec { background: #1d1d24; border-color: #2c2c36; }
body.dark .ntf:hover { background: #26262f; }
body.dark .ntf.unread { background: #2b161a; }
body.dark .hbar .ht { background: #2c2c36; }
body.dark .pager button { background: #26262f; color: #9a9aa5; }
body.dark .pager button.active { background: #e02020; color: #fff; }
body.dark .vch-meta { background: #1d1d24; }
body.dark .pcols { border-color: #2c2c36; }
body.dark .tblx th, body.dark .tblx td { border-color: #2c2c36; }
