/* TikTok Niche Bot — Dashboard Theme */
:root {
  --bg: #0a0a0a;
  --bg2: #111113;
  --bg3: #1a1a1e;
  --bg4: #252529;
  --border: #2a2a2e;
  --pink: #FE2C55;
  --cyan: #25F4EE;
  --text: #f0f0f0;
  --text2: #9a9aaa;
  --text3: #666;
  --green: #00c853;
  --orange: #ff9800;
  --red: #f44336;
  --sidebar-w: 260px;
  --topbar-h: 60px;
  --radius: 10px;
  --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #e0264c; }
.btn-secondary { background: var(--bg4); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg3); }
.btn-outline { background: transparent; color: var(--text2); border: 1px solid var(--border); padding: 6px 14px; font-size: 12px; }
.btn-outline:hover { border-color: var(--text2); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-cyan { background: var(--cyan); color: #000; }
.btn-cyan:hover:not(:disabled) { background: #1dd8d3; }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-icon { background: none; border: none; color: var(--text2); cursor: pointer; padding: 6px; }
.btn-icon:hover { color: var(--text); }

/* ── Forms ────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: 14px;
  transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--pink);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 20px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ── Auth Screen ─────────────────────────── */
#auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a0a12 50%, #0a0a0a 100%);
}
.auth-container { width: 100%; max-width: 420px; padding: 20px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-img {
  width: 72px; height: 72px; margin: 0 auto 16px; display: block;
  filter: drop-shadow(0 0 20px rgba(254,44,85,.3));
}
.auth-logo h1 { font-size: 24px; font-weight: 700; }
.auth-logo p { color: var(--text2); font-size: 14px; margin-top: 4px; }
.auth-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; padding: 12px; background: none; border: none; color: var(--text2);
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .2s;
}
.auth-tab.active { color: var(--pink); border-bottom-color: var(--pink); }
.auth-card-wide { max-width: 760px; }
.auth-register-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.auth-register-right { border-left: 1px solid var(--border); padding-left: 24px; }
.auth-register-right h3 { font-size: 15px; margin-bottom: 16px; color: var(--cyan); }
.payment-method-item {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 10px;
}
.payment-method-item h4 { font-size: 14px; margin-bottom: 4px; color: var(--text); }
.payment-method-item p { font-size: 12px; color: var(--text2); line-height: 1.5; white-space: pre-line; }
.payment-method-type { font-size: 11px; color: var(--pink); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.voucher-upload {
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; cursor: pointer; transition: border-color .2s;
}
.voucher-upload:hover { border-color: var(--pink); }
.voucher-upload span { font-size: 12px; color: var(--text3); display: block; margin-top: 4px; }
.voucher-upload img { max-width: 100%; max-height: 120px; border-radius: 4px; }
.auth-footer { text-align: center; color: var(--text3); font-size: 12px; margin-top: 16px; }
@media (max-width: 768px) {
  .auth-card-wide { max-width: 100%; }
  .auth-register-layout { grid-template-columns: 1fr; }
  .auth-register-right { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 20px; }
}
.auth-container { width: 100%; max-width: 420px; padding: 20px; }
.auth-container:has(.auth-card-wide:not([style*="display: none"])) { max-width: 800px; }
.voucher-box {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 16px; text-align: center;
}
.voucher-price { font-size: 32px; font-weight: 800; color: var(--pink); line-height: 1; }
.voucher-price small { font-size: 16px; font-weight: 600; color: var(--text2); }
.voucher-hint { font-size: 12px; color: var(--text2); margin: 6px 0 12px; }

/* ── Sidebar ─────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 100;
  transition: transform .3s ease;
}
.sidebar-header {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-img {
  width: 32px; height: 32px; flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(254,44,85,.25));
}
.sidebar-brand { font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.sidebar-close { display: none; background: none; border: none; color: var(--text2); font-size: 24px; cursor: pointer; margin-left: auto; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  color: var(--text2); font-size: 14px; font-weight: 500;
  transition: all .15s; text-decoration: none;
}
.nav-item:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.nav-item.active { color: var(--pink); background: rgba(254,44,85,.08); border-right: 3px solid var(--pink); }
.nav-item svg { flex-shrink: 0; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 20px; }
.nav-label { padding: 8px 20px 4px; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-info div:first-child { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text3); text-transform: uppercase; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 99;
}

/* ── Main Content ────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w); min-height: 100vh;
  display: flex; flex-direction: column;
}
.topbar {
  height: var(--topbar-h); padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.hamburger { display: none; background: none; border: none; color: var(--text); cursor: pointer; }
.topbar-title { font-size: 18px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.account-selector select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: var(--radius-sm); font-family: inherit; font-size: 13px;
}
.status-dot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); }
.status-dot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.status-dot.ok .dot { background: var(--green); }
.content-area { flex: 1; padding: 24px; }

/* ── Cards ────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 700; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--pink); }
.stat-label { font-size: 13px; color: var(--text2); margin-top: 4px; }
.stat-card.cyan .stat-value { color: var(--cyan); }
.stat-card.green .stat-value { color: var(--green); }
.stat-card.orange .stat-value { color: var(--orange); }

/* ── Tables ───────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
th { color: var(--text2); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
td { color: var(--text); }
tr:hover td { background: var(--bg3); }

/* ── Badges ───────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
}
.badge-pending { background: rgba(255,152,0,.15); color: var(--orange); }
.badge-active, .badge-approved { background: rgba(0,200,83,.15); color: var(--green); }
.badge-suspended, .badge-rejected { background: rgba(244,67,54,.15); color: var(--red); }
.badge-admin { background: rgba(37,244,238,.15); color: var(--cyan); }

/* ── Account Cards ────────────────────────── */
.account-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.account-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.account-card-header { display: flex; align-items: center; gap: 12px; }
.account-card-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff;
}
.account-card-info h3 { font-size: 16px; }
.account-card-info p { font-size: 12px; color: var(--text2); }
.account-card-actions { display: flex; gap: 8px; margin-top: auto; }
.account-card-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.account-card-stats .mini-stat { font-size: 12px; color: var(--text2); }
.account-card-stats .mini-stat strong { color: var(--text); }

.add-account-card {
  background: var(--bg3); border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; cursor: pointer; transition: all .2s;
  min-height: 180px;
}
.add-account-card:hover { border-color: var(--pink); }
.add-account-card svg { opacity: .4; }
.add-account-card span { color: var(--text2); font-size: 14px; }

/* ── Video Grid ───────────────────────────── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.video-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .15s;
}
.video-card:hover { transform: translateY(-2px); }
.video-thumb {
  width: 100%; aspect-ratio: 9/16; object-fit: cover; background: var(--bg3);
  max-height: 280px;
}
.video-info { padding: 10px; }
.video-desc { font-size: 12px; color: var(--text2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.video-stats { display: flex; gap: 10px; font-size: 11px; color: var(--text3); }
.video-stats span { display: flex; align-items: center; gap: 3px; }

/* ── Niche Columns ────────────────────────── */
.niche-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.niche-col { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.niche-col h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--pink); }
.niche-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.niche-bar { flex: 1; height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.niche-bar-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--pink), var(--cyan)); }
.niche-tag { font-size: 13px; min-width: 100px; }
.niche-count { font-size: 12px; color: var(--text3); min-width: 30px; text-align: right; }

/* ── Chat ─────────────────────────────────── */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - 48px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 16px; }
.chat-msg { max-width: 85%; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; line-height: 1.6; }
.chat-msg.user { align-self: flex-end; background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.ai { align-self: flex-start; background: var(--bg3); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-input-row { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.chat-input-row input {
  flex: 1; padding: 12px 16px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: inherit; font-size: 14px;
}
.chat-input-row input:focus { outline: none; border-color: var(--pink); }

/* ── Caption ──────────────────────────────── */
.caption-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center; cursor: pointer; transition: border-color .2s;
  min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--pink); }
.drop-zone img { max-width: 100%; max-height: 300px; border-radius: var(--radius-sm); }
.drop-zone p { color: var(--text2); font-size: 14px; }

/* ── Markdown Content ─────────────────────── */
.md-content { line-height: 1.7; font-size: 14px; }
.md-content h1 { font-size: 20px; margin: 20px 0 10px; color: var(--pink); }
.md-content h2 { font-size: 17px; margin: 18px 0 8px; color: var(--cyan); }
.md-content h3 { font-size: 15px; margin: 14px 0 6px; }
.md-content ul, .md-content ol { padding-left: 20px; margin: 8px 0; }
.md-content li { margin-bottom: 4px; }
.md-content strong { color: var(--pink); }
.md-content code { background: var(--bg4); padding: 2px 6px; border-radius: 3px; font-size: 13px; }
.md-content table { width: 100%; margin: 12px 0; }
.md-content blockquote { border-left: 3px solid var(--pink); padding-left: 12px; color: var(--text2); margin: 8px 0; }

/* ── Subscription ─────────────────────────── */
.sub-status {
  text-align: center; padding: 40px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px;
}
.sub-status .sub-icon { font-size: 48px; margin-bottom: 12px; }
.sub-status h2 { font-size: 20px; margin-bottom: 8px; }
.sub-status p { color: var(--text2); font-size: 14px; }
.price-tag { font-size: 36px; font-weight: 800; color: var(--pink); }

/* ── AI Loading Overlay ───────────────────── */
.ai-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center;
}
.ai-loading-orb {
  width: 80px; height: 80px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--pink), var(--cyan), var(--pink));
  animation: orbSpin 2s linear infinite;
  margin-bottom: 32px;
}
.ai-loading-orb::after {
  content: ''; position: absolute; inset: 6px; border-radius: 50%;
  background: var(--bg2);
}
.ai-loading-orb::before {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(transparent 60%, var(--pink)40, var(--cyan));
  opacity: .3; filter: blur(12px);
  animation: orbSpin 3s linear infinite reverse;
}
@keyframes orbSpin { to { transform: rotate(360deg); } }

.ai-loading-phrase {
  font-size: 16px; font-weight: 600; color: var(--text);
  min-height: 28px; margin-bottom: 8px;
  animation: phraseFade 1s ease;
}
.ai-loading-sub {
  font-size: 13px; color: var(--text3); max-width: 360px;
}
.ai-loading-dots {
  display: flex; gap: 6px; margin-top: 24px;
}
.ai-loading-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pink);
  animation: dotPulse 1.4s ease-in-out infinite;
}
.ai-loading-dots span:nth-child(2) { animation-delay: .2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: .2; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1.2); }
}
@keyframes phraseFade {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.ai-loading-bar {
  width: 200px; height: 3px; background: var(--bg4); border-radius: 2px;
  margin-top: 20px; overflow: hidden;
}
.ai-loading-bar-fill {
  height: 100%; width: 30%; border-radius: 2px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  animation: barSlide 1.8s ease-in-out infinite;
}
@keyframes barSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(700%); }
}

/* ── Loader ───────────────────────────────── */
.loader { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--pink); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text2); font-size: 14px; margin-left: 12px; }

/* ── Toast ────────────────────────────────── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  animation: slideIn .3s ease;
  max-width: 360px;
}
.toast-success { background: var(--green); color: #fff; }
.toast-error { background: var(--red); color: #fff; }
.toast-info { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Empty State ──────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text2);
}
.empty-state svg { opacity: .3; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 400px; margin: 0 auto 20px; }

/* ── Strategy Tabs ────────────────────────── */
.sub-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.sub-tab {
  padding: 10px 20px; background: none; border: none; color: var(--text2);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; transition: all .2s;
}
.sub-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.sub-tab:hover { color: var(--text); }

/* ── Modal ────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 18px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: block; }
  .topbar-title { font-size: 15px; }
  .content-area { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .account-cards { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .niche-grid { grid-template-columns: 1fr; }
  .caption-layout { grid-template-columns: 1fr; }
  .chat-msg { max-width: 95%; }
  .form-row { flex-direction: column; }
  .sub-tabs { gap: 0; }
  .sub-tab { padding: 8px 14px; font-size: 12px; }
  .stat-value { font-size: 22px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .account-selector { display: none !important; }
}

/* ── Generation Cards ─────────────────────── */
.gen-cards { display: flex; flex-direction: column; gap: 8px; }
.gen-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: all .15s;
}
.gen-card:hover { border-color: var(--pink); background: var(--bg4); }
.gen-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.gen-card-date { font-size: 12px; font-weight: 600; color: var(--cyan); }
.gen-card-preview {
  font-size: 13px; color: var(--text2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Caption History ──────────────────────── */
.caption-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.caption-hist-card {
  display: flex; gap: 12px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: all .15s;
}
.caption-hist-card:hover { border-color: var(--pink); }
.caption-hist-thumb {
  width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
}
.caption-hist-nothumb {
  background: var(--bg4); display: flex; align-items: center; justify-content: center; color: var(--text3);
}
.caption-hist-info { flex: 1; min-width: 0; }
.caption-hist-preview {
  font-size: 12px; color: var(--text2); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.caption-hist-meta { font-size: 11px; color: var(--text3); margin-top: 6px; }

/* ── Pending Screen ───────────────────────── */
.pending-screen { text-align: center; padding: 40px 20px; max-width: 560px; margin: 0 auto; }
.pending-icon { margin-bottom: 20px; }
.pending-icon svg { animation: pendingPulse 2s ease-in-out infinite; }
@keyframes pendingPulse { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
.pending-screen h2 { font-size: 22px; margin-bottom: 4px; }
.pending-status-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-top: 24px; text-align: left;
}
.pending-status-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.pending-status-row:last-child { border-bottom: none; }
.pending-status-row span:first-child { color: var(--text2); }
.pending-help {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text2); font-size: 13px;
}

/* ── Utility ──────────────────────────────── */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text2); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
