/* ─────────────────────────────────────────────
   BrandFlow AI  —  app.css
   Design: Amber/Orange palette, clean sidebar
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --primary:        #F5A23A;
  --primary-dark:   #E07820;
  --primary-light:  #FFF3E8;
  --primary-border: #F5E2C8;
  --bg:             #FFF9F5;
  --bg-card:        #FFFFFF;
  --sidebar-bg:     #FFFFFF;
  --border:         #F0EAE2;
  --border-mid:     #E8DDD6;
  --text-1:         #1A1A1A;
  --text-2:         #6B6560;
  --text-3:         #9A908A;
  --text-4:         #C0B8B2;
  --success:        #16A34A;
  --success-bg:     #E8F9F0;
  --danger:         #DC2626;
  --danger-bg:      #FEF2F2;
  --info:           #4F46E5;
  --info-bg:        #EEF2FF;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --radius-pill:    50px;
  --shadow-card:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,.08);
  --sidebar-w:      230px;
  --topbar-h:       60px;
  --font-body:      'Outfit', system-ui, sans-serif;
  --font-display:   'Syne', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font-body); }

/* ── Layout ─────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark i { color: #fff; font-size: 17px; }
.logo-name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--text-1); letter-spacing: -.3px;
}
.logo-name span { color: var(--primary); }

.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-group-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-4); text-transform: uppercase;
  letter-spacing: 1px; padding: 0 8px;
  margin: 14px 0 5px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-2); cursor: pointer;
  transition: all .15s; margin-bottom: 2px;
}
.nav-item i { font-size: 17px; width: 20px; text-align: center; }
.nav-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.active { background: var(--text-1); color: #fff; }
.nav-item.active i { color: #fff; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.workspace-pill {
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.workspace-label { font-size: 10px; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .5px; }
.workspace-name  { font-size: 13px; font-weight: 700; color: var(--text-1); margin-top: 2px; }
.workspace-plan  { font-size: 11px; color: var(--text-3); }

/* ── Main area ─────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Topbar — sticky in flow, content starts right below ── */
.topbar {
  height: var(--topbar-h);
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}
.topbar-title {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--text-1); letter-spacing: -.3px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border-radius: var(--radius-pill);
  padding: 7px 14px; font-size: 13px; color: var(--text-3);
  border: 1px solid var(--border);
}
.search-box input {
  border: none; background: none; outline: none;
  font-size: 13px; color: var(--text-1); width: 180px;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-2);
  transition: all .15s;
}
.icon-btn:hover { background: var(--primary-light); border-color: var(--primary-border); color: var(--primary); }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer; flex-shrink: 0;
}

/* ── Page content ───────────────────────────── */
.page-content {
  padding: 24px;
  flex: 1;
}

/* ── Section header ─────────────────────────── */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 700; color: var(--text-1);
}

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
}
.card-head-title {
  font-size: 13.5px; font-weight: 700; color: var(--text-1);
  display: flex; align-items: center; gap: 7px;
}
.card-body { padding: 16px 18px; }

/* ── Stat cards ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px; position: relative;
  box-shadow: var(--shadow-card);
}
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.stat-badge {
  position: absolute; top: 16px; right: 16px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 3px;
}
.badge-up   { background: var(--success-bg); color: var(--success); }
.badge-down { background: var(--danger-bg);  color: var(--danger);  }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text-1); letter-spacing: -.5px; }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── Grid layouts ───────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.grid-2-eq { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mb-20 { margin-bottom: 20px; }
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }

/* ── Tables ─────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.bf-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.bf-table th {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-align: left; padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: .5px;
}
.bf-table td {
  padding: 11px 18px; color: var(--text-1);
  border-bottom: 1px solid var(--bg);
  vertical-align: middle;
}
.bf-table tr:last-child td { border-bottom: none; }
.bf-table tr:hover td { background: var(--bg); }
.content-title { font-weight: 500; max-width: 240px; }
.content-title small { display: block; color: var(--text-3); font-size: 11px; font-weight: 400; margin-top: 2px; }

/* ── Badges / Pills ─────────────────────────── */
.status-pill {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: var(--radius-pill);
  display: inline-block; white-space: nowrap;
}
.voice-pill {
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-pill);
  display: inline-block;
}
.platform-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .15s; border: none;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-dark { background: var(--text-1); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-outline {
  background: transparent; color: var(--text-2);
  border: 1.5px solid var(--border-mid);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-ghost {
  background: var(--bg); color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-border); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 6px 13px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  cursor: pointer; transition: all .15s;
}
.pill-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── Forms ──────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12.5px;
  font-weight: 600; color: var(--text-2);
  margin-bottom: 7px;
}
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13.5px; color: var(--text-1);
  background: var(--bg-card); outline: none;
  transition: border-color .15s;
  font-family: var(--font-body);
}
.form-control:focus { border-color: var(--primary); }
.form-control.pill { border-radius: var(--radius-pill); }
.form-control[disabled] { background: var(--bg); color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239A908A' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 16px; }
.input-icon .form-control { padding-left: 38px; }

/* ── Auth pages ─────────────────────────────── */
.auth-shell {
  min-height: 100vh; display: flex;
  background: var(--bg);
}
.auth-left {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 40px;
}
.auth-right {
  width: 50%; background: var(--text-1);
  display: flex; align-items: center;
  justify-content: center; padding: 40px;
  position: relative; overflow: hidden;
}
.auth-card {
  width: 100%; max-width: 400px;
}
.auth-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 32px;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  color: var(--text-1); margin-bottom: 6px;
}
.auth-sub { font-size: 14px; color: var(--text-3); margin-bottom: 28px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-3); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-3); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-right-content { color: #fff; max-width: 380px; }
.auth-hero-title {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800;
  line-height: 1.2; margin-bottom: 16px;
}
.auth-hero-title span { color: var(--primary); }
.auth-feat { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.auth-feat-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(245,162,58,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
}
.auth-feat-icon i { color: var(--primary); font-size: 16px; }
.auth-feat-text { font-size: 13.5px; color: rgba(255,255,255,.8); line-height: 1.5; }
.auth-feat-text strong { color: #fff; font-weight: 600; }

/* ── Flash messages ─────────────────────────── */
.flash {
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
}
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error   { background: var(--danger-bg);  color: var(--danger); }
.flash-info    { background: var(--info-bg);    color: var(--info); }

/* ── Generator page ─────────────────────────── */
.gen-input-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px; margin-bottom: 18px;
}
.gen-type-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px;
}
.gen-type-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-2);
  cursor: pointer; transition: all .15s;
}
.gen-type-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}
.gen-type-chip i { font-size: 14px; }
.platform-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.p-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer;
  transition: all .15s; opacity: .6;
}
.p-chip.sel { opacity: 1; border-color: currentColor; }
.output-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px; font-size: 13.5px;
  color: var(--text-1); line-height: 1.8;
  min-height: 150px; white-space: pre-wrap;
  position: relative;
}
.copy-btn-abs {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-3);
  transition: all .15s;
}
.copy-btn-abs:hover { border-color: var(--primary); color: var(--primary); }
.output-placeholder { color: var(--text-4); font-style: italic; }
.generating { display: flex; align-items: center; gap: 10px; color: var(--text-3); }
.dot-anim span {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--primary);
  animation: dot-bounce .9s infinite both;
}
.dot-anim span:nth-child(2) { animation-delay: .15s; }
.dot-anim span:nth-child(3) { animation-delay: .3s; }
@keyframes dot-bounce {
  0%,100% { transform: translateY(0); opacity: .5; }
  50% { transform: translateY(-5px); opacity: 1; }
}

/* ── Carousel builder ───────────────────────── */
.slide-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.slide-card {
  border-radius: var(--radius-md);
  aspect-ratio: 9 / 11;
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 12px;
  position: relative; cursor: pointer;
  overflow: hidden; transition: transform .15s;
}
.slide-card:hover { transform: translateY(-3px); }
.slide-num {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.7);
  background: rgba(0,0,0,.25);
  padding: 2px 8px; border-radius: var(--radius-pill);
}
.slide-type-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.2);
  padding: 2px 6px; border-radius: 4px;
}
.slide-headline { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 4px; }
.slide-body { font-size: 10px; color: rgba(255,255,255,.8); line-height: 1.4; }
.slide-card.selected { outline: 2px solid var(--primary); outline-offset: 2px; }
.template-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.template-thumb {
  border-radius: 10px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid transparent;
  font-size: 10px; font-weight: 700; transition: all .15s;
}
.template-thumb:hover { transform: scale(1.03); }
.template-thumb.active { border-color: var(--primary); }

/* ── Brand cards ─────────────────────────────── */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.brand-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 18px; display: flex;
  flex-direction: column; gap: 12px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .15s;
}
.brand-card:hover { box-shadow: var(--shadow-md); }
.brand-header { display: flex; align-items: center; gap: 12px; }
.brand-avatar {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.brand-name  { font-size: 14px; font-weight: 700; color: var(--text-1); }
.brand-niche { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.brand-stats { display: flex; gap: 8px; }
.bstat {
  flex: 1; text-align: center;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 8px 6px;
}
.bstat-val { font-size: 15px; font-weight: 700; color: var(--text-1); }
.bstat-label { font-size: 10px; color: var(--text-3); margin-top: 1px; }
.brand-actions { display: flex; gap: 7px; }
.add-brand-card {
  border: 2px dashed var(--border-mid);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px; gap: 10px; cursor: pointer;
  min-height: 170px; transition: all .15s;
  color: var(--text-3);
}
.add-brand-card:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ── Scheduler ──────────────────────────────── */
.sched-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg);
}
.sched-item:last-child { border-bottom: none; }
.sched-time { font-size: 11.5px; font-weight: 700; color: var(--text-3); min-width: 75px; }
.sched-content { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-1); line-height: 1.4; }
.sched-content small { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.sched-actions { display: flex; gap: 6px; }

/* ── Platform progress bars ─────────────────── */
.plat-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bg); }
.plat-row:last-child { border-bottom: none; }
.plat-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.plat-name { font-size: 12.5px; font-weight: 600; color: var(--text-1); flex: 1; }
.plat-bar-wrap { flex: 2; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.plat-bar { height: 100%; border-radius: 3px; transition: width .4s ease; }
.plat-count { font-size: 12px; font-weight: 700; color: var(--text-2); min-width: 32px; text-align: right; }

/* ── Settings ───────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500; color: var(--text-2);
  cursor: pointer; transition: all .15s;
}
.settings-nav-item:hover { background: var(--primary-light); color: var(--primary); }
.settings-nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.key-preview {
  font-family: monospace; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 10px 14px; font-size: 13px; color: var(--text-2);
  letter-spacing: 1px;
}

/* ── Repurpose ───────────────────────────────── */
.repurpose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.repurpose-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.repurpose-body { padding: 14px 16px; font-size: 13px; color: var(--text-1); line-height: 1.7; white-space: pre-wrap; min-height: 120px; }

/* ── Tabs ───────────────────────────────────── */
.tab-row { display: flex; gap: 2px; background: var(--bg); border-radius: var(--radius-pill); padding: 3px; margin-bottom: 16px; width: fit-content; }
.tab-item { padding: 6px 14px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer; transition: all .15s; }
.tab-item.active { background: var(--bg-card); color: var(--text-1); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ── Alerts ─────────────────────────────────── */
.alert { padding: 14px 16px; border-radius: var(--radius-md); font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: var(--info-bg);    border: 1px solid #C7D2FE; color: #312E81; }
.alert-success { background: var(--success-bg); border: 1px solid #BBF7D0; color: #14532D; }

/* ── Empty state ─────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-3);
}
.empty-icon { font-size: 48px; color: var(--text-4); margin-bottom: 12px; }
.empty-title { font-size: 15px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--text-4); max-width: 300px; margin: 0 auto 20px; }

/* ── Color swatches ─────────────────────────── */
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid rgba(0,0,0,.1); cursor: pointer; display: inline-block; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-grid { grid-template-columns: 1fr; }
  .auth-right { display: none; }
}

/* ── Loading overlay ─────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; display: none;
}
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ───────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 12.5px; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
