/* ==========================================================================
   TOKTOK STUDIO (v3.5.0) — COMPLETE MODERN LUXURY GLASSMORPHISM
   ========================================================================== */

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

:root {
  --bg-app: #08090d;
  --bg-sidebar: #0b0c12;
  --bg-surface: rgba(18, 20, 30, 0.75);
  --bg-surface-elevated: rgba(25, 28, 44, 0.85);
  --bg-surface-hover: rgba(34, 38, 58, 0.95);
  --bg-input: rgba(15, 17, 26, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-focus: #fe2c55;

  --tiktok-red: #fe2c55;
  --tiktok-cyan: #00f2fe;
  --tiktok-purple: #8a2be2;
  --tiktok-blue: #3b82f6;
  --tiktok-emerald: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --shadow-glow-pink: 0 0 24px rgba(254, 44, 85, 0.4);
  --shadow-glow-cyan: 0 0 24px rgba(0, 242, 254, 0.35);

  --transition-fast: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: 20%;
  width: 60vw;
  height: 50vh;
  background: radial-gradient(ellipse at center, rgba(138, 43, 226, 0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: 10%;
  width: 50vw;
  height: 50vh;
  background: radial-gradient(ellipse at center, rgba(254, 44, 85, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
}

/* Layout */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  flex-shrink: 0;
  user-select: none;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fe2c55 0%, #00f2fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(254, 44, 85, 0.4);
}

.brand-title {
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--tiktok-red);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-menu {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-category {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding: 10px 10px 4px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9.5px 13px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.nav-item i {
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(254, 44, 85, 0.12) 0%, rgba(138, 43, 226, 0.06) 100%);
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(254, 44, 85, 0.3);
}
.nav-item.active i { color: var(--tiktok-red); }

.badge-count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.badge-tag {
  margin-left: auto;
  background: linear-gradient(135deg, var(--tiktok-red), var(--tiktok-purple));
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tiktok-blue), var(--tiktok-purple));
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.user-info { flex-grow: 1; overflow: hidden; }
.username { font-size: 12.5px; font-weight: 700; color: #fff; }
.role { font-size: 10.5px; color: var(--text-muted); }
.version-tag { font-size: 10px; color: var(--text-dim); text-align: center; margin-top: 8px; }

/* Main Content */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-app);
}

.topbar {
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 12, 18, 0.85);
  backdrop-filter: blur(20px);
  z-index: 10;
  flex-shrink: 0;
}

.header-left { display: flex; align-items: center; gap: 14px; }
.header-left h2 { font-family: 'Outfit', sans-serif; font-size: 20px; font-weight: 700; color: #fff; }
.header-right { display: flex; align-items: center; gap: 12px; }

.kling-credits-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 12px;
  color: #f59e0b;
}

.selection-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tiktok-cyan);
  box-shadow: 0 0 8px var(--tiktok-cyan);
}

.live-clock {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

/* View Container */
.view-container {
  flex-grow: 1;
  padding: 26px 32px 40px;
  overflow-y: auto;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.tab-view { display: none; animation: fadeIn 0.2s ease; }
.tab-view.active { display: block; }

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

/* Glass Card */
.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
  transition: var(--transition-smooth);
}

.card-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-header-bar h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--tiktok-red);
  color: #fff;
  box-shadow: 0 4px 14px rgba(254, 44, 85, 0.35);
}
.btn-primary:hover {
  background: #ff1242;
  box-shadow: var(--shadow-glow-pink);
  transform: translateY(-1px);
}

.btn-gradient {
  background: linear-gradient(135deg, #fe2c55 0%, #8a2be2 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(254, 44, 85, 0.3);
}
.btn-gradient:hover {
  box-shadow: 0 6px 24px rgba(138, 43, 226, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: #fff;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 24px; font-size: 14px; border-radius: var(--radius-md); }
.btn-block { width: 100%; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* ==========================================================================
   DASHBOARD HERO & STATS
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, rgba(254, 44, 85, 0.12) 0%, rgba(138, 43, 226, 0.1) 50%, rgba(0, 242, 254, 0.05) 100%);
  border: 1px solid rgba(254, 44, 85, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--tiktok-cyan);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
  display: inline-block;
}

.hero-banner h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.hero-banner p {
  color: var(--text-secondary);
  font-size: 13.5px;
  max-width: 600px;
  margin-bottom: 18px;
}

.hero-actions { display: flex; gap: 10px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-val { font-family: 'Outfit', sans-serif; font-size: 24px; font-weight: 800; color: #fff; line-height: 1; }
.stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }

.recent-products-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.recent-thumb {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-xs);
  object-fit: cover;
}

.quick-workflow-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workflow-item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface-elevated);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-fast);
}

.workflow-item-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(0, 242, 254, 0.4);
  transform: translateX(4px);
}

.workflow-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tiktok-red);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.workflow-item-card strong { font-size: 13px; color: #fff; }
.workflow-item-card p { font-size: 11.5px; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   SHOWCASE & UNIFIED TOOLBAR
   ========================================================================== */
.unified-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(14, 16, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin-bottom: 18px;
  flex-wrap: nowrap;
}

.toolbar-search-wrap {
  position: relative;
  width: 300px;
  flex-shrink: 0;
}

.toolbar-search-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12.5px;
  outline: none;
  transition: var(--transition-fast);
}

.toolbar-search-wrap input:focus {
  border-color: var(--tiktok-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.toolbar-search-wrap .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 12px;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.cat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

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

.cat-pill.active {
  background: var(--tiktok-red);
  color: #fff;
  border-color: var(--tiktok-red);
  box-shadow: 0 2px 8px rgba(254, 44, 85, 0.4);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.product-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.product-thumb-wrap {
  width: 100%;
  height: 170px;
  background: #11131c;
  position: relative;
  overflow: hidden;
}

.product-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-thumb-wrap img { transform: scale(1.04); }

.commission-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.product-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-cat-tag { font-size: 10px; color: var(--tiktok-cyan); font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }

.product-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 35px;
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.price-text { font-size: 14px; font-weight: 800; color: var(--tiktok-red); }
.sales-text { font-size: 11px; color: var(--text-muted); }

/* Sounds List */
.sounds-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sound-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface-elevated);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.sound-card-row:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(0, 242, 254, 0.3);
}

.btn-play-sound {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tiktok-cyan);
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.btn-play-sound:hover { transform: scale(1.08); }

/* ==========================================================================
   FASHION MOTION STUDIO (4-STEP PIPELINE)
   ========================================================================== */
.step-card { margin-bottom: 22px; }

.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tiktok-red), var(--tiktok-purple));
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(254, 44, 85, 0.35);
}

.step-title-wrap { flex-grow: 1; }
.step-title-wrap h3 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; color: #fff; }

.studio-grid { display: grid; gap: 16px; }
.characters-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.fashion-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.backgrounds-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.motions-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.studio-card {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.studio-card:hover {
  border-color: rgba(0, 242, 254, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.studio-card.selected {
  border-color: var(--tiktok-red) !important;
  background: rgba(254, 44, 85, 0.08) !important;
  box-shadow: 0 0 18px rgba(254, 44, 85, 0.35);
}

.card-thumb-wrap {
  width: 100%;
  height: 160px;
  background: #11131c;
  position: relative;
  overflow: hidden;
}

.card-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.studio-card:hover .card-thumb-wrap img { transform: scale(1.04); }

.card-check-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--tiktok-red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 4px;
}

.account-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(11, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  color: var(--tiktok-cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.category-tag {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.motion-pill-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  line-height: 1;
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Upload Dropzone Triggers */
.upload-trigger-card {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1.5px dashed rgba(0, 242, 254, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  transition: var(--transition-fast);
}

.upload-trigger-card:hover {
  background: rgba(0, 242, 254, 0.06) !important;
  border-color: var(--tiktok-cyan) !important;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}

.upload-trigger-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

.upload-icon {
  font-size: 26px;
  color: var(--tiktok-cyan);
}

.upload-trigger-inner strong {
  font-size: 13px;
  color: #fff;
}

.upload-trigger-inner span {
  font-size: 11px;
  color: var(--text-muted);
}

.card-body { padding: 12px 14px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta { font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; }
.char-bg-hint { font-size: 11px; color: var(--tiktok-cyan); margin-top: auto; padding-top: 6px; border-top: 1px solid var(--border-subtle); }
.card-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.price-val { font-size: 13.5px; font-weight: 800; color: var(--tiktok-red); }
.store-label { font-size: 10.5px; color: var(--text-muted); }

/* Sticky Bottom Summary Bar */
.studio-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 250px;
  right: 0;
  height: 76px;
  background: rgba(11, 12, 18, 0.95);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: none;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.6);
}

.workflow-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.workflow-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.badge-lbl { color: var(--text-muted); font-weight: 500; }
.badge-val { color: #fff; font-weight: 700; }
.badge-val strong { color: var(--tiktok-cyan); }
.badge-val small { color: var(--text-muted); font-size: 11px; font-weight: normal; }
.workflow-arrow { color: var(--text-dim); font-size: 10px; }

/* ==========================================================================
   GALLERY & TABLES
   ========================================================================== */
.jobs-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.job-card { background: rgba(14, 16, 26, 0.7); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 14px 16px; }
.job-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.job-title { font-size: 13.5px; font-weight: 700; color: #fff; }
.status-badge-pulse { background: rgba(0, 242, 254, 0.15); color: var(--tiktok-cyan); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); border: 1px solid rgba(0, 242, 254, 0.3); }
.job-progress-bar-wrap { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: var(--radius-full); overflow: hidden; }
.job-progress-fill { height: 100%; background: linear-gradient(90deg, var(--tiktok-red), var(--tiktok-purple)); transition: width 0.4s ease; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.gallery-card { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; }
.gallery-video-wrap { width: 100%; height: 280px; background: #000; position: relative; }
.gallery-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.btn-play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(254, 44, 85, 0.85); border: none; color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); transition: var(--transition-fast); }
.btn-play-overlay:hover { transform: translate(-50%, -50%) scale(1.1); background: var(--tiktok-red); }
.gallery-body { padding: 14px; }

/* Table */
.styled-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.styled-table th { padding: 12px 14px; background: rgba(255, 255, 255, 0.03); color: var(--text-muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid var(--border-subtle); }
.styled-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); vertical-align: middle; }
.styled-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Accounts */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.account-card { background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 16px 18px; transition: var(--transition-smooth); }
.account-card:hover { background: var(--bg-surface-hover); border-color: rgba(255, 255, 255, 0.12); }

/* Forms & Modals */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 14px; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: #fff; font-size: 13px; outline: none; transition: var(--transition-fast); }
.form-control:focus { border-color: rgba(0, 242, 254, 0.4); box-shadow: 0 0 12px rgba(0, 242, 254, 0.15); }

.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(4, 5, 8, 0.85); backdrop-filter: blur(20px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.modal-card { background: #121420; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-lg); width: 100%; max-width: 780px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.85); }
.modal-header { padding: 16px 22px; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; }
.modal-header h4 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 22px; display: grid; grid-template-columns: 280px 1fr; gap: 22px; }
.video-preview-wrapper { width: 100%; height: 380px; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.video-preview-wrapper video { width: 100%; height: 100%; object-fit: contain; }

/* Inline Link Fetch Bars (Step 2 & Step 4) */
.step-inline-fetch-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.inline-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 40px;
}

.inline-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.inline-input-wrap input::placeholder {
  color: var(--text-muted);
  font-size: 12.5px;
}

/* Visual Publisher Video Selector */
.publisher-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.pub-video-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.pub-video-card:hover {
  border-color: rgba(0, 242, 254, 0.5);
  transform: translateY(-2px);
}

.pub-video-card.selected {
  border-color: var(--tiktok-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.06);
}

.pub-video-card .pub-thumb-wrap {
  height: 105px;
  background: #000;
  position: relative;
}

.pub-video-card .pub-thumb-wrap video,
.pub-video-card .pub-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-video-card .pub-info {
  padding: 8px 10px;
}

.pub-video-card .pub-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-video-card .pub-meta {
  font-size: 10.5px;
  color: var(--tiktok-cyan);
}

/* Publisher Account Selector */
.publisher-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.pub-acc-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pub-acc-card:hover {
  border-color: rgba(254, 44, 85, 0.5);
}

.pub-acc-card.selected {
  border-color: var(--tiktok-red);
  background: rgba(254, 44, 85, 0.08);
  box-shadow: 0 0 16px rgba(254, 44, 85, 0.3);
}

.pub-acc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.pub-acc-username {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

/* Hashtag Pills */
.quick-hashtag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.tag-pill:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--tiktok-cyan);
  color: #fff;
}

/* Product Dual Mode Tabs */
.product-mode-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.mode-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.mode-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, rgba(254, 44, 85, 0.15), rgba(0, 242, 254, 0.15));
  border-color: var(--tiktok-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}

/* Live Scraper Sections */
.live-scraper-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.section-sub-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.divider-text {
  text-align: center;
  position: relative;
}

.divider-text::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-subtle);
}

.divider-text span {
  position: relative;
  background: #0f111a;
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* Dedicated Single Product Preview Card */
.single-preview-card {
  display: flex;
  gap: 20px;
  background: rgba(14, 16, 26, 0.85);
  border: 1.5px solid rgba(0, 242, 254, 0.4);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  align-items: center;
}

.single-preview-thumb {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.single-preview-details {
  flex-grow: 1;
}

.single-preview-details .store-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tiktok-cyan);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.single-preview-details .prod-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.35;
}

.single-preview-details .prod-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  margin-bottom: 12px;
}

.single-preview-details .price-highlight {
  font-size: 16px;
  font-weight: 800;
  color: var(--tiktok-red);
}

.single-preview-details .comm-highlight {
  font-size: 12px;
  color: var(--tiktok-emerald);
  font-weight: 700;
}

/* Store Result Header */
.store-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 242, 254, 0.05);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.store-result-header h4 {
  font-size: 14px;
  color: #fff;
  font-weight: 700;
}

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 900px) { .studio-bottom-bar { left: 0; } .modal-body { grid-template-columns: 1fr; } .single-preview-card { flex-direction: column; align-items: stretch; } }
@media (max-width: 768px) { .sidebar { position: absolute; left: -260px; } .sidebar.mobile-open { left: 0; } }


/* Product Detail & Multi-Image Gallery */
.product-detail-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 20px;
}

@media (max-width: 768px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
  }
}

.gallery-main-wrap {
  width: 100%;
  height: 340px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-thumbs-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.gallery-thumb-item {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  opacity: 0.65;
  transition: all 0.2s ease;
  background: rgba(0,0,0,0.3);
}

.gallery-thumb-item:hover, .gallery-thumb-item.active {
  opacity: 1;
  border-color: var(--tiktok-cyan);
  transform: scale(1.05);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-desc-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 12.5px;
  color: #ddd;
  line-height: 1.6;
  white-space: pre-line;
  margin-top: 10px;
}

.badge-photo-count {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}


/* ==========================================================================
   NEW: SIMPLIFIED CHARACTER UPLOAD DROPZONE & MULTI-IMAGE FASHION SELECTOR
   ========================================================================== */

/* Character Avatar Dropzone */
.char-upload-dropzone {
  border: 2px dashed rgba(0, 242, 254, 0.4);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.char-upload-dropzone:hover {
  border-color: var(--tiktok-cyan);
  background: rgba(0, 242, 254, 0.05);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.2);
}

/* Fashion Multi-Image Angle Reference Strip */
.fashion-ref-bar {
  background: rgba(18, 18, 28, 0.85);
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-top: 14px;
  margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 242, 254, 0.1);
  animation: fadeIn 0.3s ease-out;
}

.fashion-ref-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 10px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--tiktok-cyan) transparent;
}

.fashion-ref-strip::-webkit-scrollbar {
  height: 6px;
}
.fashion-ref-strip::-webkit-scrollbar-thumb {
  background: rgba(0, 242, 254, 0.4);
  border-radius: 4px;
}

.ref-thumb-card {
  position: relative;
  width: 90px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #000;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ref-thumb-card:hover {
  border-color: var(--tiktok-cyan);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.3);
}

.ref-thumb-card.active {
  border-color: var(--tiktok-red);
  box-shadow: 0 0 16px rgba(254, 44, 85, 0.5);
  transform: scale(1.04);
}

.ref-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-thumb-card .ref-idx {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  font-size: 10px;
  color: #ddd;
  text-align: center;
  padding: 2px 4px;
  font-weight: 600;
}

.ref-thumb-card.active .ref-idx {
  background: var(--tiktok-red);
  color: #fff;
}

.ref-badge-active {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--tiktok-red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}


/* ==========================================================================
   SECURE VPS LOGIN OVERLAY & CARD
   ========================================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: loginFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 22, 33, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 242, 254, 0.08);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.18) 0%, rgba(254, 44, 85, 0.1) 60%, transparent 80%);
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
  position: relative;
}

.login-badge-shield {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(79, 172, 254, 0.15));
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #00f2fe;
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 242, 254, 0.2);
}

.login-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0.35rem 0 0 0;
}

.login-error-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-field label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

.login-input-wrap input {
  width: 100%;
  background: rgba(11, 15, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  color: #f8fafc;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  outline: none;
}

.login-input-wrap input:focus {
  border-color: #00f2fe;
  background: rgba(11, 15, 25, 0.95);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15);
}

.btn-pwd-eye {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.btn-pwd-eye:hover {
  color: #e2e8f0;
}

.login-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #94a3b8;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.remember-label input[type="checkbox"] {
  accent-color: #00f2fe;
  cursor: pointer;
}

.btn-login-submit {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #04101e;
  border: none;
  border-radius: 12px;
  padding: 0.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 242, 254, 0.35);
  filter: brightness(1.05);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.login-footer-info {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
}


/* ==========================================================================
   /* ACCOUNT POOL STYLES */ ? MULTI-ACCOUNT & TOKEN REFRESH DASHBOARD
   ========================================================================== */

.pool-hero-banner {
  background: linear-gradient(135deg, rgba(20, 24, 38, 0.85) 0%, rgba(13, 16, 26, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.pool-hero-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #a3e635, var(--tiktok-cyan), var(--tiktok-red));
}

.pool-hero-left h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 6px 0 6px 0;
  letter-spacing: -0.4px;
}

.pool-hero-left p {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.5;
}

.pool-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(163, 230, 53, 0.15);
  color: #a3e635;
  border: 1px solid rgba(163, 230, 53, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pool-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pool-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.pool-kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pool-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.pool-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.pool-kpi-info {
  flex: 1;
  min-width: 0;
}

.pool-kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.pool-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0;
}

.pool-kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Engine Tab Switcher */
.pool-engine-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pool-engine-tabs {
  display: flex;
  background: rgba(14, 17, 26, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.pool-engine-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.pool-engine-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.pool-engine-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pool-engine-tab .badge-count {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.pool-engine-tab.active .badge-count {
  background: #a3e635;
  color: #000;
}

.pool-engine-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Toolbar & Search */
.pool-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.pool-search-box {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.pool-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.pool-search-box input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 38px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition-fast);
}

.pool-search-box input:focus {
  border-color: #a3e635;
  box-shadow: 0 0 12px rgba(163, 230, 53, 0.2);
}

.pool-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pool-filter-pills .pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.pool-filter-pills .pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pool-filter-pills .pill.active {
  background: rgba(163, 230, 53, 0.15);
  border-color: rgba(163, 230, 53, 0.4);
  color: #a3e635;
  font-weight: 700;
}

/* Pool Table & Cards */
.pool-card-wrapper {
  padding: 0;
  overflow: hidden;
}

.pool-table-header-info {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(10, 12, 18, 0.4);
}

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

.pool-table th {
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 14, 22, 0.7);
}

.pool-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.pool-table tr {
  transition: background 0.15s ease;
}

.pool-table tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.pool-table tr.active-pool-row {
  background: rgba(163, 230, 53, 0.05);
  border-left: 3px solid #a3e635;
}

.account-cell-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acc-circle-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.acc-details-text .acc-email {
  font-weight: 700;
  color: #fff;
  display: block;
}

.acc-details-text .acc-subtext {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Tokens and Badges */
.token-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--tiktok-cyan);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.token-chip:hover {
  background: rgba(0, 242, 254, 0.18);
  border-color: var(--tiktok-cyan);
  transform: translateY(-1px);
}

.coin-pill-badge {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 12px;
  background: rgba(163, 230, 53, 0.15);
  border: 1px solid rgba(163, 230, 53, 0.35);
  color: #a3e635;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge-saved {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge-expired {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pool-pagination-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 12, 18, 0.4);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
