/* ==========================================================================
   KDP STUDIO PRO — DESIGN SYSTEM & MASTER STYLESHEET
   Aesthetics: Deep Obsidian / Cyber-Navy Glassmorphic SaaS with Cyan & Gold Accents
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #0a0d14;
  --bg-sidebar: #0e121d;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 54, 0.85);
  --bg-input: #121826;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #0ea5e9;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.35);
  --accent-blue: #2563eb;
  --accent-indigo: #6366f1;
  --accent-gold: #f59e0b;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --glass-blur: blur(16px);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--accent-cyan-glow);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Top Navigation Bar */
.top-nav {
  height: 70px;
  background: rgba(14, 18, 29, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-glow {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.5);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-pro {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-metrics-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
}

.metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.metric-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.metric-label {
  color: var(--text-muted);
}

.metric-value {
  color: #fff;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Workspace Body Layout */
.workspace-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar-nav {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0 12px 12px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  position: relative;
}

.nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--transition-fast);
}

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

.nav-link:hover i {
  color: var(--accent-cyan);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.2), rgba(99, 102, 241, 0.1));
  color: #fff;
  border-left: 3px solid var(--accent-cyan);
}

.nav-link.active i {
  color: var(--accent-cyan);
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-muted);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
}

.kdp-spec-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 11px;
}

.spec-header {
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-detail {
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* Main Content Area */
.main-content {
  flex: 1;
  background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.05) 0%, transparent 70%);
  overflow-y: auto;
  padding: 32px 40px;
}

/* Pane Headers */
.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.pane-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pane-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 820px;
}

/* Tab Switching */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857, #059669);
  transform: translateY(-1px);
}

.btn.icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-copy:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   TAB 1: BESTSELLER INTELLIGENCE STYLES
   ========================================================================== */

.search-filter-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.search-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  margin-bottom: 16px;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-dim);
  font-size: 16px;
}

.search-input-group input {
  flex: 1;
  height: 48px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 16px 0 46px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
}

.search-input-group input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

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

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

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

.cat-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.bestsellers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.bestseller-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.bestseller-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-md), 0 0 20px rgba(56, 189, 248, 0.1);
}

.card-top {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-cover-thumb {
  width: 90px;
  height: 126px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.card-header-info {
  flex: 1;
}

.card-category-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.card-book-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.card-book-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-ratings {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.stars {
  color: #f59e0b;
}

.review-count {
  color: var(--text-dim);
}

.card-financials {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.fin-metric-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.fin-metric-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.fin-metric-val.royalty {
  color: var(--accent-green);
}

.card-structure-preview {
  padding: 16px 20px;
  flex: 1;
}

.structure-hook {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.4;
}

.chapter-preview-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ch-pill-item {
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ch-pill-item i {
  color: var(--accent-cyan);
  font-size: 8px;
}

.card-actions {
  padding: 16px 20px;
  background: rgba(14, 18, 29, 0.5);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   TAB 2: PRODUCT STUDIO STYLES
   ========================================================================== */

.active-project-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.active-proj-heading {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 4px;
}

.active-proj-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.proj-action-group {
  display: flex;
  gap: 12px;
}

.generation-progress-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}

.progress-pct {
  color: var(--accent-cyan);
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  transition: width 0.4s ease;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.studio-subnav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.subnav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.subnav-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.subtab-pane {
  display: none;
}

.subtab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.manuscript-paper {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-md);
  padding: 48px 56px;
  max-width: 860px;
  margin: 0 auto;
  min-height: 600px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  line-height: 1.8;
}

.manuscript-paper h1, 
.manuscript-paper h2, 
.manuscript-paper h3 {
  color: #0f172a;
  font-family: 'Times New Roman', Times, serif;
}

.manuscript-paper hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}

.exercises-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.exercise-type-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.exercise-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.exercise-instr {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.exercise-prompts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exercise-prompts li {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--accent-cyan);
}

.visuals-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.visual-card.full-width {
  grid-column: 1 / -1;
}

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

.badge-spec {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--accent-cyan);
}

.visual-preview-area {
  min-height: 380px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
}

.cover-img-preview {
  max-height: 380px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.mockup-img-preview {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.visual-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
}

.visual-placeholder i {
  font-size: 40px;
}

.paperback-wrap-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.2);
  padding: 16px;
  border-radius: var(--radius-md);
}

/* Canva Panel */
.canva-hero {
  background: linear-gradient(135deg, rgba(0, 196, 204, 0.15), rgba(125, 42, 232, 0.1));
  border: 1px solid rgba(0, 196, 204, 0.3);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}

.canva-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #00c4cc;
  margin-bottom: 8px;
}

.canva-action-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.canva-input-row {
  flex: 1;
}

.canva-input-row label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.canva-input-row input {
  width: 100%;
  height: 42px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: #fff;
}

.canva-result-box {
  background: rgba(0, 196, 204, 0.08);
  border: 1px solid rgba(0, 196, 204, 0.25);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ==========================================================================
   TAB 4: KDP LISTING & SEO KIT
   ========================================================================== */

.kdp-kit-selector-card {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  gap: 16px;
  flex-wrap: wrap;
}

.selector-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.selector-info label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.kdp-kit-select {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.kdp-kit-select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

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

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
}

.custom-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.kdp-kit-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.kit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.kit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.copyable-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #fff;
  margin-top: 6px;
}

.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.kw-badge {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.html-preview-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.desc-preview-box {
  background: #ffffff;
  color: #1e293b;
  border-radius: var(--radius-sm);
  padding: 20px;
  min-height: 180px;
}

.desc-raw-textarea {
  width: 100%;
  height: 200px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 12px;
  resize: vertical;
}

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

.mkt-post-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.mkt-platform-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.mkt-post-caption {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ==========================================================================
   TAB 5: ROYALTY CALCULATOR
   ========================================================================== */

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.calc-controls-card, .calc-results-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.calc-input-group {
  margin-bottom: 24px;
}

.calc-input-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-wrapper input[type="range"] {
  flex: 1;
  accent-color: var(--accent-cyan);
}

.slider-val {
  min-width: 100px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-align: right;
}

.calc-formula-note {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--accent-gold);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.metric-hero {
  text-align: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.metric-hero-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.metric-hero-value {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-green);
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.metric-hero-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.calc-breakdown-table {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.val-bold { color: #fff; font-weight: 600; }
.val-danger { color: #f87171; font-weight: 600; }
.val-success { color: var(--accent-green); font-weight: 700; }
.val-cyan { color: var(--accent-cyan); font-weight: 700; }

/* ==========================================================================
   MODALS & SETTINGS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-dialog {
  background: #0f1523;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(2, 132, 199, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.modal-dialog.modal-lg {
  max-width: 760px;
}

.modal-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
}

.btn-close:hover { color: #fff; }

.modal-body {
  padding: 24px 28px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.form-row {
  margin-bottom: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-row input, 
.form-row select, 
.form-row textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
}

.form-row input:focus, 
.form-row select:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.input-with-btn input {
  flex: 1;
}

.settings-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.provider-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.provider-box-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.badge-free {
  font-size: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: 999px;
}

.test-feedback {
  display: block;
  font-size: 11px;
  margin-top: 6px;
}

.test-feedback.success { color: var(--accent-green); }
.test-feedback.error { color: var(--accent-red); }

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.25s ease;
}

.toast.success { border-color: var(--accent-green); }
.toast.error { border-color: var(--accent-red); }

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

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  color: #94a3b8;
  margin-bottom: 6px;
}

/* ==========================================================================
   GLOBAL AUTHOR & PUBLISHER SETTINGS STYLES
   ========================================================================== */

.author-settings-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1100px) {
  .author-settings-grid {
    grid-template-columns: 1fr;
  }
}

.author-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.card-section-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-section-header i {
  font-size: 24px;
  margin-top: 2px;
}

.card-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.card-section-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 5px;
  line-height: 1.4;
}

.author-sync-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: border-color var(--transition-fast);
}

.author-sync-box:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.author-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-md);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -12px;
  line-height: 1.5;
}

.preview-cover-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.cover-type-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 16px;
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.preview-cover-art {
  display: flex;
  height: 270px;
  max-width: 320px;
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.9);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-cover-spine {
  width: 30px;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 10px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-cover-front {
  flex: 1;
  background: linear-gradient(145deg, #1a1b35 0%, #0b0f19 100%);
  border-left: 2px solid rgba(255, 255, 255, 0.06);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  position: relative;
}

.mock-series {
  font-size: 8px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.16em;
}

.mock-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 10px 0 4px;
}

.mock-subtitle {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.35;
}

.mock-byline {
  margin-top: 14px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.byline-prefix {
  display: block;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 2px;
}

.byline-name {
  font-size: 13px;
  color: var(--accent-cyan);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mock-imprint {
  font-size: 9px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
  margin-top: 8px;
}

.preview-bio-box {
  background: #090d16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.bio-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.preview-bio-body {
  font-size: 12px;
  line-height: 1.6;
  color: #94a3b8;
  font-style: italic;
  margin-bottom: 12px;
  max-height: 90px;
  overflow-y: auto;
}

.preview-bio-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.sync-status-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.sync-status-card i {
  font-size: 20px;
  margin-top: 2px;
}

.sync-status-title {
  font-size: 13px;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 3px;
}

.sync-status-text {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}
