/* ============================================================
   PABRIK FIGURE — SHARED DESIGN SYSTEM
   Fonts: Cormorant Garamond (display) + Plus Jakarta Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ===== TOKENS ===== */
:root {
  /* Brand */
  --red: #D62828;
  --red-dark: #A61C1C;
  --red-light: #FFF0F0;
  --red-mid: #FFCECE;
  --red-glow: rgba(214, 40, 40, 0.15);

  /* Neutrals */
  --black: #0F0F0F;
  --ink: #1A1A1A;
  --surface: #FAFAF8;
  --white: #FFFFFF;
  --g50: #F6F5F2;
  --g100: #EDEBE7;
  --g200: #D9D6D0;
  --g300: #C0BCB5;
  --g400: #A09B93;
  --g500: #7D7870;
  --g600: #5A564F;
  --g700: #3A3731;
  --g800: #1F1D1A;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Spacing */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadow */
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);

  /* Topbar */
  --topbar-h: 56px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-body); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
.t-display { font-family: var(--font-display); }
.t-display-xl { font-family: var(--font-display); font-size: clamp(36px, 6vw, 64px); font-weight: 400; line-height: 1.05; letter-spacing: -0.5px; }
.t-display-lg { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 400; line-height: 1.1; }
.t-display-md { font-family: var(--font-display); font-size: clamp(22px, 3vw, 32px); font-weight: 400; line-height: 1.2; }
.t-display-sm { font-family: var(--font-display); font-size: clamp(18px, 2.5vw, 24px); font-weight: 500; line-height: 1.25; }
.t-heading   { font-size: 16px; font-weight: 600; line-height: 1.3; letter-spacing: -0.2px; }
.t-subhead   { font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--g400); }
.t-body      { font-size: 14px; font-weight: 400; line-height: 1.6; }
.t-small     { font-size: 12px; line-height: 1.5; }
.t-xs        { font-size: 11px; line-height: 1.4; }
.t-muted     { color: var(--g500); }
.t-red       { color: var(--red); }
.t-green     { color: #1D6B43; }
.t-semibold  { font-weight: 600; }
.t-bold      { font-weight: 700; }
.italic      { font-style: italic; }

/* ===== LAYOUT UTILS ===== */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.items-start { align-items: flex-start; }
.items-end   { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.flex-1      { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Spacing */
.mt-4  { margin-top: 4px; }  .mb-4  { margin-bottom: 4px; }
.mt-8  { margin-top: 8px; }  .mb-8  { margin-bottom: 8px; }
.mt-12 { margin-top: 12px; } .mb-12 { margin-bottom: 12px; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; }
.mt-20 { margin-top: 20px; } .mb-20 { margin-bottom: 20px; }
.mt-24 { margin-top: 24px; } .mb-24 { margin-bottom: 24px; }
.mt-32 { margin-top: 32px; } .mb-32 { margin-bottom: 32px; }

/* ===== GRID SYSTEM ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  transition: all 0.18s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary  { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--g50); color: var(--ink); border: 1px solid var(--g200); }
.btn-secondary:hover { background: var(--g100); }
.btn-ghost    { background: transparent; color: var(--ink); border: 1px solid var(--g200); }
.btn-ghost:hover { background: var(--g50); }
.btn-dark     { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--g700); }
.btn-sm  { padding: 7px 14px; font-size: 12px; border-radius: var(--r-sm); }
.btn-xs  { padding: 5px 10px; font-size: 11px; border-radius: 6px; }
.btn-lg  { padding: 14px 28px; font-size: 15px; border-radius: var(--r-lg); }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--r-sm); }

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 1px solid var(--g100);
  border-radius: var(--r-xl);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}
.card-sm {
  background: var(--white);
  border: 1px solid var(--g100);
  border-radius: var(--r-lg);
  padding: 14px;
}
.card-inset {
  background: var(--g50);
  border-radius: var(--r-lg);
  padding: 14px;
}

/* ===== FORM ELEMENTS ===== */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--g500);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--g200);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.field textarea { resize: vertical; min-height: 88px; line-height: 1.6; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.badge-new     { background: #DBEAFE; color: #1E3A8A; }
.badge-active  { background: #D1FAE5; color: #065F46; }
.badge-done    { background: #D1FAE5; color: #065F46; }
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-rev     { background: var(--red-light); color: var(--red-dark); }
.badge-suspend { background: #FFE4E6; color: #9F1239; }
.badge-promo   { background: var(--ink); color: #fff; }

/* ===== TAGS ===== */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--g200);
  color: var(--g600);
  background: var(--g50);
}
.tag-red { background: var(--red-light); color: var(--red-dark); border-color: var(--red-mid); }

/* ===== FILTER CHIPS ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--g200);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--white);
  color: var(--g600);
  transition: all 0.18s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--g400); color: var(--ink); }
.chip.active { background: var(--red); color: #fff; border-color: var(--red); }
.chip-secondary { background: var(--g50); border-color: var(--g200); }
.chip-selected { background: var(--red-light); color: var(--red-dark); border-color: var(--red-mid); font-weight: 600; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--topbar-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--g100);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.topbar-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--red);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.topbar-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--g500);
  transition: all 0.18s;
  cursor: pointer;
  white-space: nowrap;
}
.topbar-nav a:hover { color: var(--ink); background: var(--g50); }
.topbar-nav a.active { color: var(--ink); background: var(--g100); font-weight: 600; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* ===== USER CHIP ===== */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--r-full);
  border: 1px solid var(--g100);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s;
}
.user-chip:hover { border-color: var(--g300); }
.user-chip-name { font-size: 13px; font-weight: 600; }
.user-chip-role { font-size: 10px; color: var(--g400); font-weight: 500; }

/* ===== ICON BUTTON ===== */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  border: 1px solid var(--g100);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
}
.icon-btn:hover { border-color: var(--g300); }
.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  border-right: 1px solid var(--g100);
  background: var(--white);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  height: calc(100vh - var(--topbar-h));
  position: sticky;
  top: var(--topbar-h);
}
.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--g400);
  padding: 10px 10px 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--g600);
  cursor: pointer;
  transition: all 0.15s;
}
.sidebar-item:hover { background: var(--g50); color: var(--ink); }
.sidebar-item.active { background: var(--red-light); color: var(--red-dark); font-weight: 600; }
.sidebar-item svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
}
.sidebar-layout { display: flex; }
.sidebar-main { flex: 1; overflow-y: auto; padding: 24px; min-width: 0; }

/* ===== CREATOR CARD ===== */
.creator-card {
  border: 1px solid var(--g100);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-xs);
}
.creator-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
/* ===== CREATOR CARD IMAGE ===== */
.cc-img {
  height: 140px;
  position: relative;
  overflow: hidden;
  background: var(--g100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* --- PLACEHOLDER when no real photo --- */
.cc-img .avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-img .avatar-placeholder svg { width: 100%; height: 100%; }
.cc-badge-top {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: rgba(15,15,15,0.75);
  color: #fff;
  backdrop-filter: blur(4px);
}
.cc-verified {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(214,40,40,0.4);
}
.cc-body { padding: 12px 14px 14px; }
.cc-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.cc-niche { font-size: 11px; color: var(--g500); margin-bottom: 8px; }
.cc-footer { display: flex; align-items: center; justify-content: space-between; }
.cc-price { font-size: 13px; font-weight: 700; color: var(--red); }
.cc-rating { font-size: 11px; color: #C89B14; font-weight: 600; }
.cc-followers { font-size: 10px; color: var(--g400); margin-top: 3px; }

/* ===== STAT CARD ===== */
.stat-card {
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: var(--r-xl);
  padding: 18px;
}
.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--g400);
  margin-bottom: 8px;
}
.stat-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  font-family: var(--font-display);
}
.stat-change { font-size: 12px; margin-top: 6px; font-weight: 500; }
.change-up   { color: #065F46; }
.change-down { color: var(--red); }
.change-neu  { color: var(--g400); }

/* ===== SECTION HEADER ===== */
.section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-hd h2 { font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.section-hd a  { font-size: 12px; color: var(--red); font-weight: 600; cursor: pointer; }

/* ===== ORDER ROW ===== */
.order-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--g100);
  border-radius: var(--r-xl);
  margin-bottom: 10px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s;
}
.order-row:hover { border-color: var(--g300); }

/* ===== AVATAR ===== */
/* Use these classes to wrap an <img> or the placeholder SVG */
.avatar {
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.avatar-40 { width: 40px; height: 40px; }
.avatar-48 { width: 48px; height: 48px; }
.avatar-56 { width: 56px; height: 56px; }
.avatar-80 { width: 80px; height: 80px; }
.avatar .online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid var(--white);
}

/* ===== TOGGLE ===== */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--g200);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--red); }
.toggle-knob {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on .toggle-knob { left: 21px; }

/* ===== CHAT ===== */
.bubble-wrap { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.bubble-wrap.me { flex-direction: row-reverse; }
.bubble {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.6;
}
.bubble.them { background: var(--g50); border-bottom-left-radius: 4px; }
.bubble.me   { background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.bubble-time { font-size: 10px; color: var(--g400); margin-top: 4px; }

/* ===== VIDEO PLAYER MOCK ===== */
.player-mock {
  background: var(--ink);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.player-screen {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1A0505 0%, #2D0F0F 100%);
  height: 220px;
  overflow: hidden;
}
/* ===== VIDEO THUMBNAIL PLACEHOLDER ===== */
/* Replace .video-thumb-placeholder with <img> when you have a real thumbnail */
.video-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1A0505 0%, #2D0F0F 100%);
}
.play-icon-overlay {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(214, 40, 40, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 20px rgba(214,40,40,0.5);
  z-index: 2;
}
.play-icon-overlay:hover { transform: scale(1.08); background: var(--red); }
.player-bar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
}
.progress-slim {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}
.progress-slim-fill { height: 100%; width: 0%; background: var(--red); border-radius: 2px; }

/* ===== STEPPER ===== */
.stepper { display: flex; align-items: center; margin-bottom: 28px; }
.step-item { display: flex; align-items: center; gap: 8px; }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-num.done   { background: var(--red); color: #fff; }
.step-num.active { background: var(--red); color: #fff; }
.step-num.idle   { background: var(--g100); color: var(--g500); }
.step-label      { font-size: 12px; font-weight: 600; }
.step-label.idle { color: var(--g400); font-weight: 400; }
.step-line { flex: 1; height: 1px; background: var(--g200); margin: 0 8px; }
.step-line.done { background: var(--red); }

/* ===== RATING STARS ===== */
.stars { color: #C89B14; letter-spacing: 1px; font-size: 13px; }
.star-pick { display: flex; gap: 6px; margin: 8px 0 12px; }
.star-pick span { font-size: 26px; cursor: pointer; color: var(--g200); transition: color 0.15s; }
.star-pick span.lit { color: #C89B14; }

/* ===== PAY OPTION ===== */
.pay-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid var(--g200);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.18s;
  margin-bottom: 8px;
  background: var(--white);
}
.pay-opt:hover { border-color: var(--g300); }
.pay-opt.selected { border-color: var(--red); background: var(--red-light); }
.pay-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--g300);
  transition: all 0.18s;
  flex-shrink: 0;
}
.pay-opt.selected .pay-radio { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px #fff; }
.pay-icon {
  width: 32px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

/* ===== DATA TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--g400);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--g100);
  background: var(--g50);
}
.data-table td {
  font-size: 13px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--g100);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--g50); }

/* ===== BAR CHART ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 90px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-fill { width: 100%; border-radius: 3px 3px 0 0; background: var(--red); opacity: 0.75; min-height: 4px; }
.bar-lbl { font-size: 10px; color: var(--g400); }

/* ===== ALERT ===== */
.alert-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: var(--r-lg);
  border: 1px solid;
  margin-bottom: 10px;
}
.alert-red    { background: #FFF5F5; border-color: #FFCECE; }
.alert-yellow { background: #FFFBEB; border-color: #FDE68A; }
.alert-green  { background: #F0FDF4; border-color: #BBF7D0; }
.alert-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-red { background: var(--red); }
.ai-yellow { background: #D97706; }
.ai-green { background: #059669; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.page-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  border: 1px solid var(--g200);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g600);
  transition: all 0.18s;
}
.page-btn.active { background: var(--red); color: #fff; border-color: var(--red); }
.page-btn:hover:not(.active) { background: var(--g50); border-color: var(--g300); }

/* ===== WIZARD PROGRESS ===== */
.wizard-bar { padding: 20px 28px; background: var(--white); border-bottom: 1px solid var(--g100); }
.wizard-progress { height: 4px; background: var(--g100); border-radius: 2px; margin-top: 14px; }
.wizard-fill { height: 100%; background: var(--red); border-radius: 2px; transition: width 0.4s ease; }

/* ===== ROLE SWITCHER (dev tool) ===== */
#role-bar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,15,15,0.92);
  backdrop-filter: blur(12px);
  border-radius: var(--r-full);
  padding: 5px;
  display: flex;
  gap: 3px;
  z-index: 9999;
  box-shadow: var(--shadow-xl);
}
#role-bar button {
  padding: 7px 18px;
  border-radius: var(--r-full);
  border: none;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  color: rgba(255,255,255,0.45);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
#role-bar button.active { background: var(--red); color: #fff; }
#role-bar button:hover:not(.active) { color: rgba(255,255,255,0.9); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g200); border-radius: 3px; }

/* ============================================================
   RESPONSIVE — MOBILE FIRST
   ============================================================ */

/* Mobile: hide sidebar nav text, show only icons on very small screens */
@media (max-width: 480px) {
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar-logo-text { display: none; }
  .topbar-nav a { padding: 6px 10px; font-size: 12px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; overflow-x: auto; padding: 8px; border-right: none; border-bottom: 1px solid var(--g100); flex-wrap: nowrap; }
  .sidebar-label { display: none; }
  .sidebar-item { flex-direction: column; font-size: 10px; gap: 3px; padding: 7px 10px; min-width: 64px; }
  .sidebar-badge { margin-left: 0; }
  .sidebar-main { padding: 16px; }
  .stat-num { font-size: 20px; }
  .creator-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  #role-bar button { padding: 6px 12px; font-size: 11px; }
}

@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .card { padding: 16px; border-radius: var(--r-xl); }
  .section-hd h2 { font-size: 18px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 180px; }
}

@media (min-width: 1025px) {
  .topbar { padding: 0 28px; }
  .sidebar-main { padding: 28px 32px; }
}

/* ===== ADMIN DARK TOPBAR ===== */
.topbar-dark {
  background: rgba(15,15,15,0.95) !important;
  border-bottom-color: rgba(255,255,255,0.07) !important;
}
.topbar-dark .topbar-logo-text { color: #fff; }
.topbar-dark .topbar-nav a { color: rgba(255,255,255,0.45); }
.topbar-dark .topbar-nav a:hover,
.topbar-dark .topbar-nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.topbar-dark .icon-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); }
.topbar-dark .icon-btn svg { stroke: rgba(255,255,255,0.6); }
.topbar-dark .user-chip { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }
.topbar-dark .user-chip-name { color: #fff; }
.topbar-dark .user-chip-role { color: rgba(255,255,255,0.4); }

.sidebar-dark {
  background: #161412;
  border-right-color: rgba(255,255,255,0.06);
}
.sidebar-dark .sidebar-label { color: rgba(255,255,255,0.25); }
.sidebar-dark .sidebar-item { color: rgba(255,255,255,0.45); }
.sidebar-dark .sidebar-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-dark .sidebar-item.active { background: rgba(214,40,40,0.15); color: #ff8a8a; }
.sidebar-dark .sidebar-item svg { opacity: 0.6; }
.sidebar-dark .sidebar-item.active svg { opacity: 1; }
