/* style.css - Premium Dashboard Styling for Prism v1.0 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #080a10;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #e2e8f0;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.28);
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: rgba(99, 102, 241, 0.12);
  --success-color: #34d399;
  --accent-color: #fbbf24;
  
  --font-title: 'Outfit', 'Noto Sans KR', sans-serif;
  --font-body: 'Inter', 'Apple SD Gothic Neo', sans-serif;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #0b0c10;
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Wrapper */
.prism-container {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--bg-primary);
  overflow: hidden;
  position: relative;
}

/* SIDEBAR */
.sb {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: width var(--transition-normal), min-width var(--transition-normal);
  overflow: hidden;
  flex-shrink: 0;
}

.sb.open {
  width: 262px;
  min-width: 262px;
}

.sb.closed {
  width: 58px;
  min-width: 58px;
}

.sb-top {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  height: 56px;
}

.sb-logo-gem {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sb-logo-text {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  white-space: nowrap;
}

.sb-ver {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.25);
  margin-left: auto;
  white-space: nowrap;
  font-weight: 700;
}

.sb-sec {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.sb-sec-head {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 750;
}

.sb-search {
  position: relative;
  margin-bottom: 10px;
}

.sb-search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.sb-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 7px 8px 7px 30px;
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}

.sb-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.sb-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.06);
}

.chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 550;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.chip.on {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.25);
}

.chip:hover:not(.on) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
}

.rl {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.rl::-webkit-scrollbar {
  width: 4px;
}
.rl::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.ri {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-fast);
}

.ri:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ri-av {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

.ri-av.keyword {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
}

.ri-av.category {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.ri-av.custom {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.ri-body {
  flex: 1;
  min-width: 0;
}

.ri-title {
  font-size: 12px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.ri-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
}

.sdot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
}

.ri-time {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.star-btn {
  opacity: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  padding: 3px;
  border-radius: 4px;
  transition: opacity var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ri:hover .star-btn {
  opacity: 1;
}

.star-btn.on {
  opacity: 1 !important;
  color: #fbbf24;
}

.sb-foot {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  height: 48px;
}

.col-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.col-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

/* MAIN CONTENT AREA */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background-color: var(--bg-primary);
}

/* HEADER */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-secondary);
  flex-shrink: 0;
  gap: 12px;
  z-index: 10;
}

.hdr-l, .hdr-r {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

.bc-active {
  color: rgba(255, 255, 255, 0.85);
}

.divider {
  color: rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.sys-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  color: #34d399;
  font-weight: 600;
}

.sys-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.ps-wrap {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.ps-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.ps-btn.on {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.ps-btn:disabled {
  cursor: not-allowed;
}

.psdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.psdot.cp {
  background: #ff3500;
}

.psdot.nv {
  background: #03c75a;
}

.soon {
  font-size: 8.5px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 700;
}

.trk {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.trk:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
}

.ico-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.38);
  transition: all var(--transition-fast);
}

.ico-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

.usr-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 4px 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 550;
  transition: all var(--transition-fast);
}

.usr-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.av {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
}

/* CONTENT VIEWPORT */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.content::-webkit-scrollbar {
  width: 6px;
}
.content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

/* HERO */
.hero {
  margin-bottom: 24px;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 6px;
  display: block;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 6px;
}

.hero p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* CMD / SEARCH CONTROL BOX */
.cmd {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.mode-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.15);
}

.mtab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition-fast);
}

.mtab.on {
  color: #818cf8;
  border-bottom-color: #4f46e5;
}

.mtab:hover:not(.on) {
  color: rgba(255, 255, 255, 0.6);
}

.mp {
  padding: 18px;
}

.cmd-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  transition: border-color var(--transition-fast);
}

.cmd-box:focus-within {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.cmd-lead {
  color: rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
}

.cmd-in {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-body);
}

.cmd-in::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.cmd-kbd {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 700;
  user-select: none;
}

.cmd-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #4338ca;
  color: #ffffff;
  white-space: nowrap;
  transition: background var(--transition-fast), opacity var(--transition-fast);
  font-family: var(--font-body);
}

.cmd-cta:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cmd-cta:not(:disabled):hover {
  background: #4f46e5;
}

.ctx-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.ctx-g {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctx-lbl {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 700;
  margin-right: 2px;
}

.oc {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 550;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.42);
  transition: all var(--transition-fast);
}

.oc.on {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.28);
}

.oc:hover:not(.on) {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
}

/* Category grid search view */
.cat-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e2e8f0;
  font-size: 12.5px;
  outline: none;
  margin-bottom: 10px;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
}

.cat-search:focus {
  border-color: rgba(99, 102, 241, 0.4);
}

.cat-search::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.cat-grid::-webkit-scrollbar {
  width: 4px;
}
.cat-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.6);
  text-align: left;
  transition: all var(--transition-fast);
}

.cat-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
}

.cat-item.selected {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.3);
}

.cat-id {
  color: rgba(255, 255, 255, 0.22);
  font-size: 9.5px;
}

.cat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.cat-info {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
  flex: 1;
}

.cat-cnt {
  display: flex;
  gap: 4px;
}

.cc {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cc.on {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.28);
}

.cc:hover:not(.on) {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
}

/* STATS / KPI GRID */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.kpi {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px 16px 14px;
  transition: all var(--transition-normal);
}

.kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.kpi.ac {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.2);
}

.kpi.ac:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(79, 70, 229, 0.08);
}

.kpi-lbl {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-val {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  line-height: 1;
}

.kpi.ac .kpi-val {
  color: #a5b4fc;
}

.kpi-den {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  margin-left: 1px;
}

.kpi-spark {
  height: 32px;
  margin: 10px 0;
  overflow: hidden;
  position: relative;
}

.kpi-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
}

.delta {
  display: flex;
  align-items: center;
  gap: 1px;
  font-weight: 700;
  font-size: 11.5px;
}

.delta.up {
  color: #34d399;
}

.delta.dn {
  color: #f87171;
}

/* Toast Messages */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* Simple Spinner */
.spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Responsive Adaptive Layouts */
@media (max-width: 1024px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .sb.open {
    width: 58px;
    min-width: 58px;
  }
  .sb-logo-text, .sb-ver, .sb-sec, .rl, .sb-foot {
    display: none !important;
  }
}

/* ─── COUPANG EXPOSURE ANALYSIS TABLE ─── */
.results-wrap {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  animation: fadein 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.results-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.results-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.results-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.results-badge strong {
  color: #fff;
}

.results-table-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.results-table-container::-webkit-scrollbar {
  height: 4px;
}
.results-table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.results-table th {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  color: rgba(255, 255, 255, 0.8);
}

.results-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
  color: #fff;
}

.results-table .rank-cell {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  width: 50px;
  text-align: center;
}

.results-table tr:nth-child(1) .rank-cell { color: #fbbf24; }
.results-table tr:nth-child(2) .rank-cell { color: #94a3b8; }
.results-table tr:nth-child(3) .rank-cell { color: #b45309; }

.prod-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.prod-thumb {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 16px;
  flex-shrink: 0;
}

.prod-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prod-name {
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.prod-seller {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

.price-cell {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}

.rating-cell {
  white-space: nowrap;
}

.stars-gold {
  color: #fbbf24;
  margin-right: 4px;
}

.review-cnt {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}

.rocket-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: -0.2px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  user-select: none;
}

.rocket-badge::before {
  content: '🚀';
  font-size: 8px;
  margin-right: 3px;
}

.normal-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.exposure-cell {
  width: 120px;
}

.exposure-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exposure-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.exposure-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #6366f1, #34d399);
}

.exposure-val {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  width: 24px;
  text-align: right;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── HIGH-FIDELITY COUPANG EXPOSURE STYLE ADDITIONS ── */
.rank-badge-cp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #ff3500; /* Coupang red */
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(255, 53, 0, 0.25);
  user-select: none;
}
.rank-badge-cp.gold {
  background: #ff3500;
}
.rank-badge-cp.silver {
  background: #ff6a00;
}
.rank-badge-cp.bronze {
  background: #ff9100;
}
.rank-badge-cp.other {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5) !important;
  box-shadow: none;
  font-weight: 700;
}

.price-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.discount-rate {
  color: #f87171; /* soft red */
  font-weight: 800;
  font-size: 13.5px;
  font-family: var(--font-title);
}
.original-price {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: line-through;
  font-weight: 500;
}

.delivery-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.delivery-date {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.text-rocket {
  color: #60a5fa; /* light blue */
}
.text-normal {
  color: rgba(255, 255, 255, 0.45);
}

.stars-gold-row {
  color: #fbbf24;
  letter-spacing: -1.5px;
  font-size: 12px;
  margin-right: 4px;
}
.rating-num {
  font-weight: 800;
  color: #fff;
  font-size: 11px;
}

/* ── DETAIL ANALYSIS ROW EXPANSION ── */
.btn-expand {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.btn-expand:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-expand.active i {
  transform: rotate(180deg);
}

.btn-expand i {
  transition: transform var(--transition-fast);
  display: inline-block;
}

.detail-row td {
  padding: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: #13151b !important;
}

.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 16px 24px;
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-sec {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-sec-title {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-card {
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  padding: 12px 14px;
}

.opt-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11.5px;
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.opt-table th {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
  font-size: 9.5px;
}

.opt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
}

.opt-table tr:last-child td {
  border-bottom: none;
}

.opt-table td.text-right {
  text-align: right;
}

.opt-ratio-val {
  color: #818cf8;
  font-weight: 700;
}

.sentiment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sentiment-lbl {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
}

.sentiment-meter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sentiment-bar-bg {
  width: 110px;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.sentiment-bar-fill {
  height: 100%;
  background: #10b981;
  border-radius: 3px;
}

.sentiment-percent {
  font-size: 11.5px;
  font-weight: 700;
  color: #10b981;
  width: 30px;
  text-align: right;
}

.keywords-lbl {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 550;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.tag-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

/* 28D METRICS CELLS */
.metrics-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metrics-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.metrics-lbl {
  color: rgba(255, 255, 255, 0.35);
}

.metrics-val {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.metrics-val.revenue {
  color: #34d399;
  font-weight: 700;
}

