:root {
  --orange: #E8511A;
  --orange-light: #fdf0ea;
  --dark: #111111;
  --dark2: #1e1e1e;
  --dark3: #2a2a2a;
  --gray: #888888;
  --gray-light: #cccccc;
  --border: #e8e8e8;
  --bg: #f5f5f5;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #888;
  --green: #22a06b;
  --blue: #0052cc;
  --red: #e5484d;
  --amber: #d97706;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; background: var(--bg); color: var(--text); font-size: 13px; }

/* ── LAYOUT ── */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 230px; background: var(--dark); display: flex; flex-direction: column; flex-shrink: 0; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 54px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; flex-shrink: 0; }
.content { flex: 1; overflow-y: auto; padding: 24px 28px; }

/* ── SIDEBAR ── */
.sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid var(--dark3); display: flex; align-items: center; gap: 10px; }
.logo-icon svg { display: block; }
.logo-text { color: var(--white); font-size: 15px; font-weight: 700; letter-spacing: .3px; line-height: 1.1; }
.logo-sub { color: var(--gray); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 0; }
.nav-group { margin-bottom: 4px; }
.nav-label { padding: 8px 20px 4px; font-size: 10px; color: #555; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 20px; cursor: pointer; color: #999; font-size: 13px; border-left: 3px solid transparent; transition: all .15s; user-select: none; }
.nav-item:hover { color: var(--white); background: var(--dark2); }
.nav-item.active { color: var(--white); background: var(--dark2); border-left-color: var(--orange); }
.nav-item .ni { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--dark3); color: #aaa; font-size: 10px; padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center; }
.nav-item.active .nav-badge { background: var(--orange); color: var(--white); }
.sidebar-bottom { padding: 16px 20px; border-top: 1px solid var(--dark3); }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--white); flex-shrink: 0; }
.user-name { color: #aaa; font-size: 12px; }

/* ── TOPBAR ── */
.page-title { font-size: 15px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 4px; font-size: 13px; font-family: inherit; cursor: pointer; border: none; font-weight: 500; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #d4470f; }
.btn-dark { background: var(--dark); color: var(--white); }
.btn-dark:hover { background: var(--dark3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 9px; font-size: 11px; }

/* ── CARDS ── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 14px; font-weight: 600; }
.card-body { padding: 20px; }

/* ── STATS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 20px 22px; }
.stat-val { font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-orange .stat-val { color: var(--orange); }
.stat-sub { font-size: 11px; color: var(--gray-light); margin-top: 4px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid var(--border); background: #fafafa; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 3px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.b-gray { background: #f0f0f0; color: #555; }
.b-orange { background: var(--orange-light); color: var(--orange); }
.b-green { background: #e8f5ee; color: var(--green); }
.b-red { background: #fef0f0; color: var(--red); }
.b-blue { background: #e8f0ff; color: var(--blue); }
.b-amber { background: #fff8e8; color: var(--amber); }
.b-dark { background: var(--dark); color: var(--white); }

/* ── PRIORITY ── */
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.prio-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pd-high { background: var(--red); }
.pd-mid { background: var(--amber); }
.pd-low { background: var(--green); }

/* ── PROGRESS ── */
.prog-wrap { display: flex; align-items: center; gap: 8px; }
.prog-bar { flex: 1; height: 4px; background: #f0f0f0; border-radius: 2px; overflow: hidden; min-width: 60px; }
.prog-fill { height: 100%; background: var(--orange); border-radius: 2px; }
.prog-text { font-size: 11px; color: var(--text-muted); white-space: nowrap; width: 32px; }

/* ── AVATAR ── */
.av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--white); flex-shrink: 0; font-size: 11px; }

/* ── MODAL ── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--white); border-radius: 6px; width: 560px; max-width: 96vw; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.modal-lg { width: 780px; }
.modal-hd { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--white); z-index: 1; }
.modal-hd h3 { font-size: 15px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--gray); line-height: 1; padding: 0 2px; }
.modal-close:hover { color: var(--text); }
.modal-bd { padding: 22px 24px; }
.modal-ft { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--white); }

/* ── FORM ── */
.fg { margin-bottom: 16px; }
.fg label { display: block; font-size: 11px; font-weight: 600; color: #555; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.fg input, .fg select, .fg textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 13px; font-family: inherit; color: var(--text); transition: border .15s; background: var(--white);
}
.fg input:focus, .fg select:focus, .fg textarea:focus { outline: none; border-color: var(--orange); }
.fg textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 18px; font-size: 13px; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.tab:hover:not(.active) { color: var(--text); }

/* ── FILTER BAR ── */
.fbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.fbar input, .fbar select { padding: 7px 11px; border: 1px solid var(--border); border-radius: 4px; font-size: 12px; font-family: inherit; background: var(--white); }
.fbar input:focus, .fbar select:focus { outline: none; border-color: var(--orange); }
.fbar input { width: 200px; }

/* ── ICON BTN ── */
.ibtn { background: none; border: none; cursor: pointer; padding: 4px 7px; border-radius: 4px; color: var(--gray); font-size: 14px; transition: all .15s; }
.ibtn:hover { background: var(--bg); color: var(--text); }

/* ── ACTIONS ── */
.actions { display: flex; gap: 2px; }

/* ── SECTION HDR ── */
.sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sec-hdr h2 { font-size: 14px; font-weight: 600; }

/* ── PRODUCT GRID (E-COMMERCE VIEW) ── */
.prod-layout { display: flex; gap: 20px; }
.prod-filters { width: 200px; flex-shrink: 0; }
.prod-filters-inner { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 0; overflow: hidden; position: sticky; top: 0; }
.filter-section { border-bottom: 1px solid var(--border); }
.filter-section:last-child { border-bottom: none; }
.filter-title { padding: 12px 16px; font-size: 11px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.filter-title:hover { background: var(--bg); }
.filter-options { padding: 4px 16px 12px; }
.filter-opt { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; cursor: pointer; }
.filter-opt label { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; color: #444; }
.filter-opt input[type=checkbox] { accent-color: var(--orange); width: 13px; height: 13px; cursor: pointer; }
.filter-opt .cnt { font-size: 11px; color: var(--gray); }
.filter-opt label.checked { color: var(--orange); font-weight: 500; }
.prod-main { flex: 1; min-width: 0; }
.prod-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.prod-search { flex: 1; max-width: 320px; position: relative; }
.prod-search input { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: inherit; }
.prod-search input:focus { outline: none; border-color: var(--orange); }
.prod-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 14px; pointer-events: none; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.prod-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; cursor: pointer; transition: all .2s; }
.prod-card:hover { border-color: var(--orange); box-shadow: 0 4px 16px rgba(232,81,26,.12); transform: translateY(-1px); }
.prod-img { aspect-ratio: 1; background: #f8f8f8; display: flex; align-items: center; justify-content: center; font-size: 48px; border-bottom: 1px solid var(--border); overflow: hidden; position: relative; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-img-placeholder { font-size: 42px; }
.prod-card-body { padding: 12px; }
.prod-card-type { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.prod-card-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.prod-card-sku { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; font-family: monospace; }
.prod-card-cost { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.prod-card-meta { font-size: 11px; color: var(--gray); margin-bottom: 8px; }
.prod-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.market-tag { background: var(--dark); color: var(--white); font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 600; }

/* ── PIPELINE ── */
.pipeline { display: flex; align-items: stretch; gap: 0; margin-bottom: 24px; overflow-x: auto; }
.pipe-step { flex: 1; min-width: 100px; text-align: center; padding: 12px 8px; background: var(--white); border: 1px solid var(--border); border-right: none; position: relative; cursor: pointer; transition: background .15s; }
.pipe-step:first-child { border-radius: 4px 0 0 4px; }
.pipe-step:last-child { border-right: 1px solid var(--border); border-radius: 0 4px 4px 0; }
.pipe-step.active { background: var(--orange); border-color: var(--orange); color: var(--white); }
.pipe-step.active + .pipe-step { border-left-color: var(--orange); }
.pipe-step-num { font-size: 20px; font-weight: 700; }
.pipe-step-label { font-size: 11px; color: inherit; opacity: .8; margin-top: 2px; }
.pipe-step.active .pipe-step-label { opacity: 1; color: var(--white); }

/* ── CHECKLIST ── */
.checklist { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.check-item:last-child { border-bottom: none; }
.check-item input[type=checkbox] { accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.check-item label { flex: 1; font-size: 13px; cursor: pointer; }
.check-item.done label { color: var(--text-muted); text-decoration: line-through; }
.check-item .check-tag { font-size: 10px; color: var(--gray); }

/* ── KANBAN ── */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.k-col { flex-shrink: 0; width: 220px; }
.k-col-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 8px 12px; background: var(--white); border: 1px solid var(--border); border-radius: 4px; }
.k-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.k-cnt { background: var(--bg); color: var(--gray); font-size: 11px; padding: 1px 7px; border-radius: 10px; }
.k-card { background: var(--white); border: 1px solid var(--border); border-left: 3px solid transparent; border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; transition: all .15s; }
.k-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.k-card.kc-orange { border-left-color: var(--orange); }
.k-card.kc-blue { border-left-color: var(--blue); }
.k-card.kc-green { border-left-color: var(--green); }
.k-card.kc-red { border-left-color: var(--red); }
.k-card-title { font-size: 12px; font-weight: 500; margin-bottom: 7px; line-height: 1.4; }
.k-card-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* ── EMPTY ── */
.empty { text-align: center; padding: 56px 24px; color: var(--gray); }
.empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty p { font-size: 13px; }

/* ── DIVIDER ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── TAG ── */
.tag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 2px 8px; font-size: 11px; color: var(--text); }

/* ── REPORT CARDS ── */
.report-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.rpt-card { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 20px; cursor: pointer; transition: all .15s; }
.rpt-card:hover { border-color: var(--orange); }
.rpt-card.active { border-color: var(--orange); background: var(--orange-light); }
.rpt-icon { font-size: 28px; margin-bottom: 10px; }
.rpt-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.rpt-desc { font-size: 12px; color: var(--text-muted); }

/* ── NOTIFICATION DOT ── */
.notif-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; flex-shrink: 0; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

.logo-icon { width: 30px; height: 30px; flex-shrink: 0; overflow: hidden; }
.logo-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
