:root {
  --bg-main: #0B0F19;
  --bg-card: #131B2E;
  --bg-card-hover: #1E293B;
  --border-color: #243049;
  --accent-primary: #3B82F6;
  --accent-hover: #2563EB;
  --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-main: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* Header */
.app-header {
  background: rgba(19, 27, 46, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 200;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.logo-group h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge-4k {
  background: linear-gradient(135deg, #10B981, #06B6D4);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

/* Main Layout */
.app-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 65px);
  position: relative;
}

#studioView,
#csvStudioView {
  display: none !important;
}

#studioView.active,
#csvStudioView.active {
  display: flex !important;
}

/* Sidebar / Controls */
.controls-sidebar {
  width: 440px;
  min-width: 380px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  height: calc(100vh - 65px);
  flex-shrink: 0;
  z-index: 20;
}

.control-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.text-input, .select-input, .textarea-input {
  width: 100%;
  background-color: #0B0F19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.text-input:focus, .select-input:focus, .textarea-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.textarea-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
  font-family: monospace;
  font-size: 0.9rem;
}

/* Presets pill buttons */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip-btn {
  background-color: #1E293B;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.chip-btn:hover {
  background-color: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* Grid Size Selector Grid */
.grid-preset-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.grid-preset-btn {
  background-color: #0B0F19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 9px 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.grid-preset-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.grid-preset-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Checkbox group */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Action Buttons */
.btn-generate {
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-generate:active {
  transform: translateY(1px);
}

/* Export section buttons */
.export-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-download {
  background-color: #1E293B;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 11px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-download:hover {
  background-color: #2D3D56;
  border-color: #475569;
}

.btn-download.primary {
  background: #10B981;
  border-color: #059669;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-download.primary:hover {
  background: #059669;
}

.btn-download.accent {
  background: #8B5CF6;
  border-color: #7C3AED;
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-download.accent:hover {
  background: #7C3AED;
}

/* Stats box */
.stats-badge {
  background-color: #0B0F19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-badge .count-success {
  color: var(--success);
  font-weight: 700;
}

.stats-badge .count-warning {
  color: var(--warning);
  font-weight: 700;
}

/* Preview Area */
.preview-area {
  flex: 1;
  background-color: #060911;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  overflow: visible;
  position: relative;
}

.preview-toolbar {
  width: 100%;
  max-width: 850px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  background: rgba(19, 27, 46, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  position: sticky;
  top: 72px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.toolbar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.solution-toggle-btn {
  background: #1E293B;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.solution-toggle-btn.active {
  background: #8B5CF6;
  border-color: #7C3AED;
  color: white;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* Pages Stack Container */
.pages-container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.canva-page-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Canva Page Top Action Bar */
.canva-page-topbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 4px;
}

.canva-page-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.canva-page-num-tag {
  background: #1E293B;
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  color: var(--text-primary);
}

.canva-page-title-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canva-page-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.canva-top-icon-btn {
  background: #1E293B;
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #94A3B8;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.canva-top-icon-btn svg {
  display: block;
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.canva-top-icon-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.canva-top-icon-btn:hover svg {
  transform: scale(1.08);
}

.canva-top-icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
  border-color: rgba(239, 68, 68, 0.45);
}

/* Paper Preview Mockup */
.preview-paper {
  background-color: #FFFFFF;
  color: #0F172A;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 800px;
  min-height: 1035px; /* Exact 8.5 x 11 ratio (800 * 11 / 8.5 = 1035px) */
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.preview-paper.active {
  box-shadow: 0 0 0 3px #3B82F6, 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* Canva Add Page Bar directly under paper (Matches user screenshot 1:1) */
.canva-add-page-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 14px;
  position: relative;
}

.canva-add-page-bar {
  width: 100%;
  display: flex;
  height: 42px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: relative;
}

.canva-add-page-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.canva-add-page-main:hover {
  background: #F8FAFC;
  color: #0284C7;
}

.canva-plus-symbol {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.canva-add-page-chevron {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-left: 1px solid #CBD5E1;
  color: #0F172A;
  cursor: pointer;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.canva-add-page-chevron:hover {
  background: #F8FAFC;
  color: #0284C7;
}

.canva-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 250px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  padding: 6px;
  z-index: 100;
}

.canva-dropdown-menu.show {
  display: block;
}

.canva-dropdown-item {
  padding: 9px 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #0F172A;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.12s;
}

.canva-dropdown-item:hover {
  background: #F1F5F9;
  color: #0284C7;
}

.canva-dropdown-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 4px 0;
}

/* Empty Page Placeholder State */
.empty-page-placeholder {
  width: 100%;
  max-width: 680px;
  min-height: 480px;
  background: #F8FAFC;
  border: 2px dashed #94A3B8;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  margin: 20px 0;
  text-align: center;
}

.empty-placeholder-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: pulse-slow 2s infinite ease-in-out;
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.empty-placeholder-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.empty-placeholder-text {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  max-width: 440px;
  margin-bottom: 14px;
}

.empty-placeholder-text strong {
  color: #0284C7;
}

.empty-placeholder-hint {
  font-size: 0.8rem;
  color: #64748B;
  font-style: italic;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 6px 14px;
  border-radius: 9999px;
}

.paper-header {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.paper-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #0F172A;
}

.paper-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748B;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.paper-divider {
  width: 80px;
  height: 4px;
  background: #3B82F6;
  margin: 14px auto 0;
  border-radius: 2px;
}

/* Grid Preview Container */
.grid-preview-container {
  display: inline-grid;
  gap: 2px;
  background-color: #E2E8F0;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 30px;
  position: relative;
  user-select: none;
}

.grid-cell {
  width: 36px;
  height: 36px;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #0F172A;
  border-radius: 4px;
  position: relative;
  transition: background-color 0.2s;
}

.grid-cell.highlighted {
  font-weight: 800;
}

.grid-cell.highlight-bw {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Circled Words Solution Overlay (SVG Loop Capsules) */
.solution-svg-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.solution-capsule-path {
  transition: all 0.2s ease;
  pointer-events: auto;
  cursor: pointer;
}

.solution-capsule-path:hover,
.solution-capsule-path.focused {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* Word Bank Preview (Prominent, High-Legibility, KDP-Ready) */
.paper-wordbank {
  width: 100%;
  background: #F8FAFC;
  border: 1.5px solid #CBD5E1;
  border-radius: 14px;
  padding: 22px 28px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

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

.wordbank-header .wordbank-title,
.wordbank-header span:first-child {
  font-size: 1.25rem !important;
  font-weight: 850 !important;
  color: #0F172A !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.wordbank-header .paper-wordbank-count {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #475569 !important;
  background: #E2E8F0;
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.wordbank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px 18px;
  list-style: none;
  min-height: 48px;
}

.wordbank-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wordbank-item .word-text {
  font-size: 1.18rem !important;
  font-weight: 750 !important;
  color: #0F172A !important;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* Crisp Square Checkbox - matches user reference image 1:1 */
.word-check {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  border: 2px solid #94A3B8 !important;
  border-radius: 3px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1;
  background-color: #FFFFFF;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
}

.word-check.checked {
  color: #FFFFFF !important;
  border-color: transparent !important;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1E293B;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-main);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 990px) {
  .app-container {
    flex-direction: column;
  }
  .controls-sidebar {
    width: 100%;
    min-width: unset;
    max-height: unset;
  }
}

/* =========================================================================
   Top Navigation Links & Header Actions
   ========================================================================= */
.top-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
}

.nav-link-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-link-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link-btn.active {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

.btn-auth-header {
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60A5FA;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  outline: none;
}

.btn-auth-header:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  border-color: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1E293B;
  border: 1px solid #334155;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.82rem;
  color: #E2E8F0;
}

.user-avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.user-tier-tag {
  background: #10B981;
  color: #064E3B;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* =========================================================================
   SaaS Home Landing Page
   ========================================================================= */
.home-view {
  display: none;
  width: 100%;
  min-height: calc(100vh - 65px);
  background: #060911;
  color: #F8FAFC;
  overflow-y: auto;
}

.home-view.active {
  display: block;
}

.home-hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  text-align: center;
  position: relative;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60A5FA;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.home-hero-title {
  font-size: 3.2rem;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.home-hero-title span {
  background: linear-gradient(135deg, #38BDF8 20%, #818CF8 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.home-hero-sub {
  font-size: 1.2rem;
  color: #94A3B8;
  max-width: 760px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.home-hero-ctas {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.home-hero-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 auto 48px;
  font-size: 0.86rem;
  color: #94A3B8;
  max-width: 800px;
}

.home-hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #CBD5E1;
}

.home-hero-trust-item strong {
  color: #FFFFFF;
  font-weight: 700;
}

.home-hero-trust-dot {
  color: #475569;
  font-size: 0.75rem;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #FFFFFF;
  padding: 15px 32px;
  font-size: 1.08rem;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
}

.btn-hero-secondary {
  background: #0F172A;
  border: 1px solid #334155;
  color: #E2E8F0;
  padding: 15px 28px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.btn-hero-secondary:hover {
  background: #1E293B;
  border-color: #64748B;
  color: #FFFFFF;
}

.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1140px;
  margin: 0 auto 64px;
  padding: 28px 32px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 30, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-stat-item {
  text-align: center;
  padding: 8px 12px;
}

.home-stat-num {
  font-size: 2.2rem;
  font-weight: 850;
  color: #38BDF8;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
}

.home-stat-lbl {
  font-size: 0.86rem;
  color: #94A3B8;
  font-weight: 600;
  line-height: 1.4;
}

.home-section {
  max-width: 1140px;
  margin: 0 auto;
  padding: 60px 24px;
}

.home-sec-header {
  text-align: center;
  margin-bottom: 48px;
}

.home-sec-tag {
  color: #38BDF8;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.home-sec-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.home-sec-sub {
  font-size: 1.05rem;
  color: #94A3B8;
  max-width: 620px;
  margin: 0 auto;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.home-feat-card {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 14px;
  padding: 28px;
  transition: all 0.2s;
}

.home-feat-card:hover {
  border-color: #38BDF8;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.home-feat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.home-feat-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.home-feat-desc {
  font-size: 0.95rem;
  color: #94A3B8;
  line-height: 1.55;
}

/* Pricing Grid */
.home-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}

.pricing-card {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 16px;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.featured {
  border-color: #38BDF8;
  background: linear-gradient(180deg, #0F172A, #131F37);
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.15);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, #10B981, #06B6D4);
  color: white;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pricing-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 2.8rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: #94A3B8;
}

.pricing-desc {
  font-size: 0.92rem;
  color: #94A3B8;
  margin-bottom: 24px;
  line-height: 1.5;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
  flex: 1;
}

.pricing-feat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: #E2E8F0;
}

.pricing-feat-item span.chk {
  color: #10B981;
  font-weight: 800;
}

/* Home Footer */
.home-footer {
  border-top: 1px solid #1E293B;
  background: #02040A;
  padding: 48px 24px 36px;
  color: #94A3B8;
  font-size: 0.9rem;
}

.footer-content {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 36px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: #38BDF8;
}

.footer-bottom {
  max-width: 1140px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid #0F172A;
  padding-top: 24px;
  font-size: 0.84rem;
  color: #64748B;
}

/* =========================================================================
   Saved Projects & Books View
   ========================================================================= */
.projects-view {
  display: none;
  width: 100%;
  min-height: calc(100vh - 65px);
  background: #060911;
  color: #F8FAFC;
  padding: 36px 30px;
  overflow-y: auto;
}

.projects-view.active {
  display: block;
}

.projects-container {
  max-width: 1200px;
  margin: 0 auto;
}

.projects-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1E293B;
  flex-wrap: wrap;
}

.projects-title {
  font-size: 2rem;
  font-weight: 850;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.projects-subtitle {
  color: #94A3B8;
  font-size: 0.95rem;
  margin-top: 6px;
  max-width: 650px;
  line-height: 1.5;
}

.projects-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.projects-stats-strip {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.proj-stat-box {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 14px;
  padding: 16px 22px;
  min-width: 170px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.proj-stat-num {
  font-size: 1.7rem;
  font-weight: 850;
  color: #38BDF8;
}

.proj-stat-lbl {
  font-size: 0.76rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

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

.project-book-card {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.project-book-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.1);
}

.project-book-card.is-active {
  border-color: #38BDF8;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.04) 0%, #0F172A 100%);
  box-shadow: 0 0 0 1px #38BDF8, 0 10px 24px rgba(0, 0, 0, 0.35);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.project-book-card.is-active .project-card-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(99, 102, 241, 0.25));
  border-color: #38BDF8;
}

.project-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.project-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94A3B8;
  font-size: 0.83rem;
  flex-wrap: wrap;
}

.project-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-card-preview-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(11, 15, 25, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.4);
  padding: 10px 12px;
  border-radius: 10px;
  min-height: 48px;
  align-items: center;
}

.proj-page-chip {
  display: inline-flex;
  align-items: center;
  background: #1E293B;
  color: #CBD5E1;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
  flex-wrap: wrap;
}

.btn-card-action {
  background: #1E293B;
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #F1F5F9;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-card-action:hover {
  background: #334155;
  border-color: #64748B;
  color: #FFFFFF;
}

.btn-card-action.primary {
  background: linear-gradient(135deg, #0284C7, #2563EB);
  border-color: #38BDF8;
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
  margin-right: auto;
}

.btn-card-action.primary:hover {
  background: linear-gradient(135deg, #0369A1, #1D4ED8);
  transform: translateY(-1px);
}

.btn-card-action.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #EF4444;
  color: #EF4444;
}

/* Empty projects state */
.projects-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #0F172A;
  border: 2px dashed #1E293B;
  border-radius: 18px;
}

.projects-empty-icon {
  font-size: 3rem;
  margin-bottom: 14px;
}

.projects-empty-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.projects-empty-desc {
  color: #94A3B8;
  font-size: 0.92rem;
  max-width: 480px;
  margin: 0 auto 20px;
}

/* Studio Toolbar Project Tracker */
.studio-project-tracker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 9999px;
  padding: 3px 8px 3px 10px;
}

.studio-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #F8FAFC;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 9999px;
  transition: all 0.15s ease;
}

.studio-project-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
}

.project-pages-count {
  color: #94A3B8;
  font-weight: 500;
  font-size: 0.78rem;
}

.btn-studio-new-proj {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38BDF8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-studio-new-proj:hover {
  background: #38BDF8;
  color: #060911;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

.nav-projects-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  margin-left: 4px;
}

/* =========================================================================
   Admin Panel View
   ========================================================================= */
.admin-view {
  display: none;
  width: 100%;
  min-height: calc(100vh - 65px);
  background: #060911;
  color: #F8FAFC;
  padding: 36px 30px;
  overflow-y: auto;
}

.admin-view.active {
  display: block;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #1E293B;
}

.admin-title-group h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
}

.admin-title-group p {
  color: #94A3B8;
  font-size: 0.9rem;
}

/* Admin Trust & Mission Hero Card (Replaces fake KPI metrics) */
.admin-mission-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1.5px solid #334155;
  border-radius: 16px;
  padding: 32px 36px;
  margin-bottom: 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.admin-mission-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38BDF8, #818CF8, #10B981);
}

.admin-mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38BDF8;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.admin-mission-title {
  font-size: 1.5rem;
  font-weight: 850;
  color: #FFFFFF;
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.admin-mission-sub {
  font-size: 0.95rem;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 840px;
  margin-bottom: 24px;
}

.admin-system-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
}

.system-metric-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #1E293B;
  border-radius: 10px;
  padding: 12px 16px;
}

.system-metric-pill .metric-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.system-metric-pill .metric-meta {
  display: flex;
  flex-direction: column;
}

.system-metric-pill .metric-meta strong {
  font-size: 0.85rem;
  color: #F1F5F9;
  font-weight: 750;
}

.system-metric-pill .metric-meta span {
  font-size: 0.76rem;
  color: #94A3B8;
  margin-top: 2px;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.admin-kpi-card {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 12px;
  padding: 22px;
}

.admin-kpi-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.admin-kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.admin-kpi-growth {
  font-size: 0.8rem;
  font-weight: 700;
  color: #10B981;
}

.admin-card-section {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 30px;
}

.admin-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  padding: 12px 16px;
  background: #1E293B;
  color: #94A3B8;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #1E293B;
  color: #E2E8F0;
}

.admin-badge-plan {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-badge-plan.pro {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.admin-badge-plan.free {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
}

/* =========================================================================
   Top Creation Banner inside Studio
   ========================================================================= */
.studio-top-banner {
  width: 100%;
  max-width: 800px;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.top-banner-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 800;
  font-size: 1rem;
  color: #FFFFFF;
}

.top-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-banner-action {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-banner-action.primary {
  background: #2563EB;
  border: 1px solid #3B82F6;
  color: #FFFFFF;
}

.btn-banner-action.primary:hover {
  background: #1D4ED8;
}

.btn-banner-action.secondary {
  background: #1E293B;
  border: 1px solid #334155;
  color: #38BDF8;
}

.btn-banner-action.secondary:hover {
  background: #334155;
}

/* =========================================================================
   Universal Modals (Themes, Wizard, Auth)
   ========================================================================= */
.studio-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.studio-modal-overlay.show,
.studio-modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.studio-modal-card {
  background: #0F172A;
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  color: #F8FAFC;
  position: relative;
  z-index: 10000;
}

.modal-header-bar {
  padding: 20px 24px;
  border-bottom: 1px solid #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-bar h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: #FFFFFF;
  background: #1E293B;
}

.modal-body-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.themes-search-box {
  width: 100%;
  padding: 12px 16px;
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.95rem;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.themes-search-box:focus {
  outline: none;
  border-color: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.themes-cat-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.cat-filter-btn {
  background: #1E293B;
  border: 1px solid #334155;
  color: #94A3B8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cat-filter-btn:hover {
  background: #334155;
  color: #FFFFFF;
}

.cat-filter-btn.active {
  background: #38BDF8;
  color: #0F172A;
  border-color: #38BDF8;
}

.themes-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 4px;
}

.theme-card-item,
.theme-lib-card {
  background: #1E293B;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.theme-card-item:hover,
.theme-lib-card:hover {
  border-color: #38BDF8;
  transform: translateY(-2px);
  background: #243248;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.theme-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.theme-card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38BDF8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.theme-card-words-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: #7DD3FC;
  padding: 2px 8px;
  border-radius: 9999px;
}

.theme-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 2px;
}

.theme-card-sub {
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.3;
}

.theme-card-preview {
  font-size: 0.76rem;
  color: #64748B;
  line-height: 1.4;
  height: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-theme-use {
  width: 100%;
  padding: 8px 12px;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  margin-top: 6px;
}

.btn-theme-use:hover {
  background: #1D4ED8;
  transform: scale(1.02);
}

/* =========================================================================
   Quick Themes Studio Dedicated Styles
   ========================================================================= */
.theme-info-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.theme-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.theme-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.theme-pool-stat {
  font-size: 0.74rem;
  color: #10B981;
  font-weight: 700;
}

.theme-words-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 85px;
  overflow-y: auto;
  padding: 8px 10px;
  background: #0B0F19;
  border: 1px solid #1E293B;
  border-radius: 8px;
  margin-top: 8px;
}

.theme-word-tag {
  font-size: 0.72rem;
  background: #1E293B;
  color: #E2E8F0;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.batch-book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.btn-batch-book {
  background: #1E293B;
  border: 1px solid #334155;
  color: #F8FAFC;
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  text-align: center;
}

.btn-batch-book:hover {
  background: #2563EB;
  border-color: #3B82F6;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-batch-book span.count {
  font-size: 1.1rem;
  font-weight: 900;
  color: #38BDF8;
}

.btn-batch-book:hover span.count {
  color: #FFFFFF;
}

.studio-switch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* =========================================================================
   Placement Directions Single-Line 4-Column Layout
   ========================================================================= */
.directions-inline-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}

.direction-pill-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: #0B0F19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 3px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.direction-pill-label:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
  background-color: #131B2E;
}

.direction-pill-label input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
}

.direction-pill-label .dir-icon {
  font-size: 0.82rem;
  color: #38BDF8;
}

.direction-pill-label .dir-text {
  font-size: 0.76rem;
}

/* =========================================================================
   Project Management & Subactions
   ========================================================================= */
.btn-subaction {
  background-color: #1E293B;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.76rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 600;
}

.btn-subaction:hover {
  background-color: #334155;
  color: #FFFFFF;
  border-color: #475569;
}

.btn-subaction.danger:hover {
  background-color: rgba(239, 68, 68, 0.2);
  color: #EF4444;
  border-color: #EF4444;
}

.project-saved-tag {
  font-size: 0.72rem;
  color: #10B981;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 9999px;
}

/* =========================================================================
   Mobile Studio Tabs & Floating Return Button (Base styles)
   ========================================================================= */
.mobile-studio-tabs {
  display: none;
}

.mobile-fab-back {
  display: none;
}

/* =========================================================================
   Mobile & Phone Responsive Enhancements (Screen widths <= 768px)
   ========================================================================= */
@media (max-width: 768px) {
  /* Prevent horizontal scroll without breaking sticky positioning */
  html, body {
    overflow-x: clip;
    width: 100%;
    position: relative;
  }

  /* Compact Phone Header */
  .app-header {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .logo-group {
    gap: 8px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .logo-group h1 {
    font-size: 1.05rem;
  }

  .badge-4k {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  #btnLaunchStudioHeader {
    display: none;
  }

  .btn-auth-header {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  /* Horizontally scrollable top navigation strip */
  .top-nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 6px;
    gap: 6px;
    scrollbar-width: none;
  }

  .top-nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-link-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 9999px;
  }

  /* Mobile Studio Tab Switcher (Segmented Control) */
  .mobile-studio-tabs {
    display: flex;
    width: 100%;
    background: #0F172A;
    border-bottom: 1px solid var(--border-color);
    padding: 6px 12px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 45;
  }

  .mobile-tab-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #1E293B;
    background: #131B2E;
    color: #94A3B8;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
  }

  .mobile-tab-btn.active {
    background: var(--accent-gradient);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
  }

  /* App Container Mobile Layout */
  .app-container {
    flex-direction: column;
    min-height: calc(100vh - 110px);
    width: 100%;
    overflow-x: clip;
  }

  /* Tab-based visibility in studio: show-controls vs show-preview */
  .app-container.show-controls .controls-sidebar {
    display: flex !important;
  }
  .app-container.show-controls .preview-area {
    display: none !important;
  }

  .app-container.show-preview .controls-sidebar {
    display: none !important;
  }
  .app-container.show-preview .preview-area {
    display: flex !important;
  }

  /* Sidebar styling for phone */
  .controls-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
    top: 0 !important;
    padding: 16px 12px 60px !important;
    border-right: none !important;
  }

  /* Preview area styling for phone */
  .preview-area {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 10px 80px !important;
    overflow-x: clip !important;
  }

  .studio-top-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    gap: 10px;
    border-radius: 10px;
  }

  .top-banner-actions {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }

  .btn-banner-action {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .preview-toolbar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    padding: 10px 12px;
    max-width: 100%;
  }

  .preview-toolbar > div {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }

  /* Canva Multi-Page Layout on Phone */
  .canva-page-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .canva-page-topbar {
    padding: 6px 8px;
    border-radius: 8px 8px 0 0;
  }

  .canva-page-title-label {
    max-width: 120px;
    font-size: 0.74rem;
  }

  .canva-page-actions {
    gap: 3px;
  }

  .canva-top-icon-btn {
    width: 28px;
    height: 28px;
  }

  /* Phone-optimized Preview Paper */
  .preview-paper {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    padding: 18px 8px 24px !important;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    overflow: hidden;
  }

  .paper-header {
    margin-bottom: 14px;
  }

  .paper-title {
    font-size: 1.25rem !important;
    letter-spacing: 0.02em !important;
  }

  .paper-subtitle {
    font-size: 0.7rem !important;
    margin-top: 3px !important;
  }

  .paper-divider {
    margin: 8px auto 0 !important;
    width: 60px !important;
  }

  /* Grid Preview Container on Phone */
  .grid-preview-container {
    padding: 6px 4px !important;
    gap: 1px !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px !important;
    border-radius: 8px;
  }

  /* Word Bank on Phone */
  .paper-wordbank {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 12px !important;
  }

  .wordbank-header {
    font-size: 0.95rem !important;
    margin-bottom: 10px !important;
  }

  .wordbank-header .wordbank-title,
  .wordbank-header span:first-child {
    font-size: 0.98rem !important;
  }

  .wordbank-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 10px !important;
  }

  .wordbank-item {
    font-size: 0.95rem !important;
    padding: 4px 6px !important;
  }

  .wordbank-item .word-text {
    font-size: 0.95rem !important;
  }

  .word-check {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    font-size: 12px !important;
  }

  /* Canva Add Page Bar on Phone */
  .canva-add-page-wrapper {
    margin-top: 10px;
  }

  .canva-add-page-bar {
    height: 38px;
  }

  .canva-add-page-main {
    font-size: 0.82rem;
  }

  /* Floating Return Button on Phone */
  .mobile-fab-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: fixed;
    bottom: 18px;
    right: 18px;
    background: var(--accent-gradient);
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    padding: 12px 20px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
    z-index: 60;
    cursor: pointer;
    transition: transform 0.15s ease;
  }

  .mobile-fab-back:active {
    transform: scale(0.95);
  }

  /* SaaS Landing Page Mobile */
  .home-hero {
    padding: 36px 16px 28px;
  }

  .home-hero-badge {
    font-size: 0.74rem;
    padding: 4px 12px;
    margin-bottom: 16px;
  }

  .home-hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
    margin-bottom: 14px;
  }

  .home-hero-sub {
    font-size: 0.92rem;
    margin-bottom: 24px;
    line-height: 1.5;
  }

  .home-hero-ctas {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 32px;
  }

  .btn-hero-primary, .btn-hero-secondary {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 0.92rem;
  }

  .home-stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
    margin-bottom: 32px;
  }

  .home-stat-num {
    font-size: 1.4rem;
  }

  .home-stat-lbl {
    font-size: 0.72rem;
  }

  .home-section {
    padding: 32px 14px;
  }

  .home-sec-title {
    font-size: 1.45rem;
  }

  .home-feature-grid, .home-pricing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  /* Admin View Mobile */
  .admin-container {
    padding: 16px 10px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .admin-mission-card {
    padding: 20px 16px;
    margin-bottom: 20px;
  }

  .admin-mission-title {
    font-size: 1.22rem;
  }

  .admin-system-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .admin-kpi-value {
    font-size: 1.35rem;
  }

  /* Modals Mobile */
  .studio-modal-card {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 90vh !important;
    padding: 16px 12px !important;
    margin: 10px auto !important;
  }

  .modal-header-bar h3 {
    font-size: 1rem;
  }

  .themes-grid-cards {
    grid-template-columns: 1fr !important;
  }
}



/* =============================================================================
   WORDGRIDLY ENHANCEMENTS: TAILORED SOLUTIONS, PROJECT CONTROLS, TICKETS & ADMIN
   ============================================================================= */

/* High-contrast, readable Explore Tailored Solutions Cards */
.seo-btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #FFFFFF !important;
  padding: 16px 22px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
  flex: 1 1 280px !important;
  max-width: 320px !important;
}

.seo-btn-secondary:hover {
  border-color: #38BDF8 !important;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45) !important;
}

.seo-btn-secondary strong {
  color: #FFFFFF !important;
}

/* Enhanced Project / Book card inside Studio */
.project-card-control {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.65), rgba(15, 23, 42, 0.85)) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  border-radius: var(--radius-md) !important;
  padding: 14px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

.project-saved-badge {
  font-size: 0.74rem;
  color: #10B981;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.project-btn-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.project-btn-item {
  flex: 1;
  background: #1E293B;
  border: 1px solid #334155;
  color: #E2E8F0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.project-btn-item:hover {
  background: #334155;
  border-color: #64748B;
  color: #FFFFFF;
}

.project-btn-item.danger {
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.project-btn-item.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  color: #FFFFFF;
}

/* Support Tickets Badges & Admin Actions */
.admin-badge-ticket {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.admin-badge-ticket.open {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.admin-badge-ticket.in-progress {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.admin-badge-ticket.resolved {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-admin-action {
  background: #1E293B;
  border: 1px solid #334155;
  color: #F8FAFC;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-admin-action:hover {
  background: #2563EB;
  border-color: #3B82F6;
}
.btn-admin-action.success:hover {
  background: #10B981;
  border-color: #059669;
}
.btn-admin-action.danger:hover {
  background: #EF4444;
  border-color: #DC2626;
}


/* =========================================================================
   BULK CSV TO BOOK STUDIO STYLES (Super Easy 3-Step Workflow)
   ========================================================================= */

/* Step Number Badges */
.step-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #38BDF8;
  color: #0F172A;
  font-size: 0.78rem;
  font-weight: 900;
}

/* Sample CSV Template Link Button */
.btn-csv-sample-link {
  background: transparent;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  color: #38BDF8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-csv-sample-link:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38BDF8;
  color: #FFFFFF;
}

/* CSV Upload Dropzone */
.csv-upload-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.csv-upload-dropzone:hover,
.csv-upload-dropzone:focus-visible,
.csv-upload-dropzone.drag-over {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
  outline: none;
}

.csv-upload-dropzone .dropzone-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.csv-upload-dropzone .dropzone-title {
  color: #F8FAFC;
  font-size: 0.84rem;
  font-weight: 600;
}

.csv-upload-dropzone .dropzone-sub {
  color: #94A3B8;
  font-size: 0.75rem;
  margin-top: 3px;
}

.csv-upload-dropzone .dropzone-browse {
  color: #38BDF8;
  text-decoration: underline;
  font-weight: 700;
}

/* CSV Loaded File & Puzzles Status Box */
.csv-loaded-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
}

.csv-loaded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 6px;
}

.csv-loaded-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399; /* WCAG AA High Contrast Emerald */
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.csv-loaded-file {
  color: #CBD5E1;
  font-size: 0.75rem;
  font-family: monospace;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Puzzles Mini Drawer / List */
.csv-puzzles-drawer {
  max-height: 120px;
  overflow-y: auto;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.csv-puzzle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #E2E8F0;
  padding: 3px 6px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 4px;
}

.csv-puzzle-item .puzzle-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.csv-puzzle-item .puzzle-words-cnt {
  color: #38BDF8;
  font-size: 0.7rem;
  font-weight: 600;
}

/* CSV Grid Size Preset Buttons */
.csv-grid-btn {
  background: #1E293B;
  border: 1px solid #334155;
  color: #CBD5E1;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.csv-grid-btn:hover {
  border-color: #38BDF8;
  color: #FFFFFF;
}

.csv-grid-btn.active {
  background: #0284C7;
  border-color: #38BDF8;
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}


/* =========================================================================
   BULK CSV STUDIO: STICKY TOOLBAR & SQUARE ZOOM BUTTONS
   ========================================================================= */

/* Sticky Preview Toolbar on Scroll */
.csv-sticky-preview-toolbar {
  position: sticky !important;
  top: 72px !important;
  z-index: 100 !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  background: rgba(11, 15, 25, 0.96) !important;
  border: 1px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), 0 0 15px rgba(56, 189, 248, 0.15) !important;
  border-radius: var(--radius-md) !important;
  margin-bottom: 24px !important;
}

/* Sleek Square Zoom Buttons */
.zoom-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.square-zoom-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(30, 41, 59, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 8px !important;
  color: #FFFFFF !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  padding: 0 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
}

.square-zoom-btn:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: #38BDF8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}

.square-zoom-btn:active {
  transform: translateY(1px) !important;
}

/* =========================================================================
   KDP QUALITY & REPEATED WORDS INSPECTOR MODAL
   ========================================================================= */

.kdp-modal-tabs {
  display: flex;
  background: #0B0F19;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  gap: 12px;
}

.kdp-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #94A3B8;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.kdp-tab-btn:hover {
  color: #F8FAFC;
}

.kdp-tab-btn.active {
  color: #38BDF8;
  border-bottom-color: #38BDF8;
}

.kdp-badge-count {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 9999px;
}

.kdp-badge-count.zero {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.35);
}

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

.kdp-kpi-card {
  background: #0F172A;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kdp-kpi-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kdp-kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #F8FAFC;
}

.kdp-kpi-sub {
  font-size: 0.76rem;
  color: #64748B;
}

.kdp-spec-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kdp-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0B0F19;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.kdp-spec-row .spec-name {
  font-weight: 700;
  color: #E2E8F0;
  width: 32%;
}

.kdp-spec-row .spec-value {
  color: #94A3B8;
  flex: 1;
}

.kdp-spec-row .spec-status {
  font-weight: 700;
  font-size: 0.76rem;
  padding: 3px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.kdp-spec-row .spec-status.pass {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.kdp-spec-row .spec-status.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.kdp-repeat-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kdp-repeat-banner.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #A7F3D0;
}

.kdp-repeat-banner.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #FDE68A;
}

/* AI Smart De-Duplicator UI */
.btn-kdp-ai-fix-all {
  background: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #FFFFFF;
  padding: 9px 18px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-kdp-ai-fix-all:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.55);
  border-color: #C4B5FD;
}

.btn-ai-row-action {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #C4B5FD;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-ai-row-action:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: #A78BFA;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.ai-processing-orb-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.ai-processing-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(59, 130, 246, 0.15) 70%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: aiOrbPulse 1.8s ease-in-out infinite;
  border: 1px solid rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}

@keyframes aiOrbPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 16px rgba(139, 92, 246, 0.3); }
  50% { transform: scale(1.1); box-shadow: 0 0 32px rgba(139, 92, 246, 0.65); }
  100% { transform: scale(0.95); box-shadow: 0 0 16px rgba(139, 92, 246, 0.3); }
}

.ai-diff-old {
  text-decoration: line-through;
  color: #EF4444;
  font-family: monospace;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.ai-diff-new {
  color: #10B981;
  font-family: monospace;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-theme-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: #A78BFA;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.kdp-filter-pill {
  background: #1E293B;
  border: 1px solid var(--border-color);
  color: #94A3B8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kdp-filter-pill:hover {
  background: #334155;
  color: #F8FAFC;
}

.kdp-filter-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38BDF8;
  color: #38BDF8;
}

.kdp-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #0B0F19;
}

.kdp-words-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.kdp-words-table th {
  background: #131B2E;
  padding: 10px 14px;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  font-size: 0.74rem;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-color);
}

.kdp-words-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  color: #E2E8F0;
}

.kdp-words-table tr:hover td {
  background: rgba(30, 41, 59, 0.6);
}

.word-page-tag {
  display: inline-block;
  background: #1E293B;
  border: 1px solid #334155;
  color: #38BDF8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 4px;
  margin-bottom: 2px;
}

/* =========================================================================
   PRO SCANNING PROGRESS SUITE (KDP QUALITY & REPEATED WORDS)
   ========================================================================= */

.kdp-scan-view {
  padding: 8px 0;
  animation: kdpFadeIn 0.3s ease;
}

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

.kdp-scan-radar-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.kdp-scan-radar-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38BDF8, #10B981, transparent);
  animation: kdpTopGlow 2s linear infinite;
}

@keyframes kdpTopGlow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.kdp-scan-radar {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(15, 23, 42, 0.9) 70%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.kdp-scan-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.35);
}

.kdp-scan-ring.ring-1 {
  width: 52px;
  height: 52px;
}

.kdp-scan-ring.ring-2 {
  width: 30px;
  height: 30px;
  border-color: rgba(56, 189, 248, 0.55);
}

.kdp-scan-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(56, 189, 248, 0.1) 320deg, rgba(56, 189, 248, 0.5) 360deg);
  animation: kdpRadarRotate 1.8s linear infinite;
}

@keyframes kdpRadarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.kdp-scan-center-icon {
  position: relative;
  z-index: 2;
  font-size: 1.5rem;
  animation: kdpPulseIcon 1.5s ease-in-out infinite;
}

@keyframes kdpPulseIcon {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 8px #38BDF8); }
}

.kdp-scan-headline {
  flex: 1;
}

.kdp-scan-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.kdp-scan-desc {
  font-size: 0.84rem;
  color: #94A3B8;
  margin-top: 4px;
  line-height: 1.45;
}

/* Progress Box */
.kdp-scan-progress-box {
  background: #0B0F19;
  border: 1px solid #1E293B;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
}

.kdp-scan-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.kdp-scan-stage-txt {
  font-size: 0.85rem;
  font-weight: 700;
  color: #38BDF8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kdp-scan-stage-txt::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px #38BDF8;
  animation: kdpBlinkDot 0.8s ease-in-out infinite alternate;
}

@keyframes kdpBlinkDot {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.kdp-scan-percent-txt {
  font-size: 1.15rem;
  font-weight: 900;
  font-family: monospace;
  color: #10B981;
}

.kdp-scan-bar-bg {
  width: 100%;
  height: 10px;
  background: #1E293B;
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.kdp-scan-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284C7, #38BDF8 60%, #10B981 100%);
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.kdp-scan-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: kdpBarShimmer 1.5s linear infinite;
}

@keyframes kdpBarShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Pipeline Grid */
.kdp-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.kdp-pipeline-step {
  background: #0B0F19;
  border: 1px solid #1E293B;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.25s ease;
}

.kdp-pipeline-step.active {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.kdp-pipeline-step.done {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.08);
}

.pipeline-icon {
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kdp-pipeline-step.active .pipeline-icon {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
  animation: kdpSpinSlow 2s linear infinite;
}

@keyframes kdpSpinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.kdp-pipeline-step.done .pipeline-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
}

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

.pipeline-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #F8FAFC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-status {
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kdp-pipeline-step.active .pipeline-status {
  color: #38BDF8;
  font-weight: 600;
}

.kdp-pipeline-step.done .pipeline-status {
  color: #10B981;
  font-weight: 600;
}

/* Telemetry Console */
.kdp-telemetry-console {
  background: #050811;
  border: 1px solid #1E293B;
  border-radius: 10px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.console-top {
  background: #0B0F19;
  padding: 8px 14px;
  border-bottom: 1px solid #1E293B;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.05em;
}

.btn-skip-scan {
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid #475569;
  color: #CBD5E1;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-skip-scan:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38BDF8;
  color: #38BDF8;
}

.console-body {
  padding: 10px 14px;
  max-height: 96px;
  overflow-y: auto;
  font-size: 0.74rem;
  line-height: 1.6;
  color: #94A3B8;
}

.console-line {
  margin-bottom: 2px;
  animation: kdpConsoleLine 0.2s ease-out;
}

@keyframes kdpConsoleLine {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

.console-line.info {
  color: #38BDF8;
}

.console-line.success {
  color: #10B981;
}

.console-line.warn {
  color: #F59E0B;
}

/* =========================================================================
   Bulk Book PDF Download Progress Modal & Pipeline Styling
   ========================================================================= */
.csv-download-pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.csv-pipeline-step {
  background: #0B0F19;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 12px 10px;
  text-align: center;
  transition: all 0.25s ease;
}

.csv-pipeline-step.active {
  border-color: #38BDF8;
  background: rgba(56, 189, 248, 0.08);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.15);
}

.csv-pipeline-step.done {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.08);
}

.pipeline-step-icon {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.pipeline-step-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #FFFFFF;
}

.pipeline-step-sub {
  font-size: 0.68rem;
  color: #94A3B8;
  margin-top: 2px;
}

.csv-pipeline-step.active .pipeline-step-sub {
  color: #38BDF8;
  font-weight: 600;
}

.csv-pipeline-step.done .pipeline-step-sub {
  color: #10B981;
  font-weight: 600;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =========================================================================
   AUTH, PROFILE SETTINGS & IP QUOTA HUD STYLES (Zero-Credit Architecture)
   ========================================================================= */
.auth-tabs-bar {
  display: flex;
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab-btn.active {
  background: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.auth-pane {
  display: none;
  animation: fadeInPane 0.2s ease-out;
}

.auth-pane.active {
  display: block;
}

.auth-forgot-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #38BDF8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-forgot-link:hover {
  color: #60A5FA;
  background: rgba(56, 189, 248, 0.1);
  text-decoration: underline;
  transform: translateY(-1px);
}

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

/* Quota HUD Badge in Header */
.nav-quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #334155;
  color: #38BDF8;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.nav-quota-badge.warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
}

.nav-quota-badge.limit-reached {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
  color: #F87171;
}

.nav-quota-badge.admin-unlimited {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.15) 100%);
  color: #FBBF24;
}

/* =========================================================================
   SaaS Executive Header User Profile Pill (Top Right Corner)
   ========================================================================= */
.header-user-container {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.90) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(71, 85, 105, 0.75);
  padding: 4px 6px 4px 8px;
  border-radius: 9999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.header-user-pill:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(56, 189, 248, 0.15);
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  text-transform: uppercase;
}

.header-user-avatar.admin {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border-color: rgba(253, 230, 138, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.header-user-avatar.creator {
  background: linear-gradient(135deg, #A855F7 0%, #7C3AED 100%);
  border-color: rgba(216, 180, 254, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.35);
}

.header-user-avatar.lifetime {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-color: rgba(167, 243, 208, 0.6);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.header-user-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-user-name {
  font-size: 0.85rem;
  font-weight: 750;
  color: #F8FAFC;
  letter-spacing: -0.01em;
  line-height: 1;
}

.header-user-role-badge {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.header-user-role-badge.admin {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #FBBF24;
}

.header-user-role-badge.creator {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: #C084FC;
}

.header-user-role-badge.lifetime {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.55);
  color: #34D399;
}

.header-user-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 1px;
  flex-shrink: 0;
}

.header-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-user-settings-pill {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #E2E8F0;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-user-settings-pill svg {
  color: #94A3B8;
  transition: color 0.18s, transform 0.25s;
}

.btn-user-settings-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-user-settings-pill:hover svg {
  color: #38BDF8;
  transform: rotate(30deg);
}

.btn-user-settings-pill:active {
  transform: translateY(0);
}

.btn-user-signout-pill {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #FCA5A5;
  font-size: 0.76rem;
  font-weight: 650;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-user-signout-pill svg {
  color: #F87171;
  transition: transform 0.2s;
}

.btn-user-signout-pill:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #FFFFFF;
  border-color: #EF4444;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.btn-user-signout-pill:hover svg {
  transform: translateX(1px);
  color: #FFFFFF;
}

.btn-user-signout-pill:active {
  transform: translateY(0);
}

/* =========================================================================
   PRO AUTH, SUPABASE & PADDLE PRICING TIERS
   ========================================================================= */

.btn-upgrade-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.25) 100%);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #FBBF24;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.btn-upgrade-pill:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.45) 100%);
  border-color: #F59E0B;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

.pro-auth-modal-card {
  max-width: 840px !important;
  width: 95% !important;
  background: radial-gradient(circle at 50% 0%, #172554 0%, #0B0F19 80%) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85) !important;
}

/* Pricing Grid (3 Tiers: Free $0, Creator $9, Lifetime $29) */
.pricing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 860px) {
  .pricing-grid-3 {
    grid-template-columns: 1fr;
  }
}

.pricing-card-tier {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 14px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.pricing-card-tier:hover {
  transform: translateY(-4px);
  border-color: #38BDF8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.pricing-card-tier.featured {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, #0F172A 100%);
  border: 2px solid #F59E0B;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.2);
}

.pricing-ribbon {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.pricing-tier-name {
  font-size: 1.15rem;
  font-weight: 850;
  color: #FFFFFF;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-tier-tagline {
  font-size: 0.78rem;
  color: #94A3B8;
  margin-bottom: 16px;
  line-height: 1.4;
  min-height: 34px;
}

.pricing-price-box {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #1E293B;
}

.pricing-amount {
  font-size: 2.3rem;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
}

.pricing-period {
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 600;
}

.pricing-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-feature-item {
  font-size: 0.82rem;
  color: #CBD5E1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.pricing-feature-check {
  color: #10B981;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
}

.btn-pricing-action {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-pricing-action.primary {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  border: 1px solid #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-pricing-action.primary:hover {
  background: linear-gradient(135deg, #1D4ED8, #1E40AF);
  transform: translateY(-1px);
}

.btn-pricing-action.golden {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  border: 1px solid #FBBF24;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn-pricing-action.golden:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-1px);
}

.btn-pricing-action.secondary {
  background: #1E293B;
  border: 1px solid #334155;
  color: #CBD5E1;
}

.btn-pricing-action.secondary:hover {
  background: #334155;
  color: #FFFFFF;
}


.paddle-live-trust-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: #E2E8F0;
  flex-wrap: wrap;
  gap: 8px;
}

.paddle-live-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 750;
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.03em;
}

.paddle-sandbox-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 0.76rem;
  color: #94A3B8;
  flex-wrap: wrap;
  gap: 8px;
}

.paddle-sandbox-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 750;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: monospace;
}



/* =========================================================================
   PRO HEADER & WIDE PRICING MODAL STYLING
   ========================================================================= */

/* Wide Luxury Pro Header */
.app-header {
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  box-sizing: border-box;
}

.header-brand-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.logo-title-wrap h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #FFFFFF;
}

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

.auth-header-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Glow Upgrade Pill */
.btn-upgrade-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  border: 1px solid #FBBF24;
  color: #FFFFFF !important;
  font-size: 0.84rem;
  font-weight: 850;
  padding: 7px 18px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.4);
  text-decoration: none;
  white-space: nowrap;
}

.btn-upgrade-pill:hover {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.6);
  border-color: #FCD34D;
}

/* Nav Quota Badge */
.nav-quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38BDF8;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 6px 14px;
  border-radius: 9999px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.nav-quota-badge.warning {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
}

.nav-quota-badge.limit-reached {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

@keyframes quotaPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.15); box-shadow: 0 0 16px rgba(56, 189, 248, 0.7); }
  100% { transform: scale(1); }
}

.nav-quota-badge.pulse-update {
  animation: quotaPulse 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Wide Luxury Pricing Modal */
.pricing-modal-wide {
  max-width: 1140px !important;
  width: 96% !important;
  background: radial-gradient(circle at 50% 0%, #172554 0%, #0B0F19 75%) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.95), 0 0 40px rgba(56, 189, 248, 0.15) !important;
  border-radius: 20px !important;
}

.pricing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}

@media (max-width: 960px) {
  .pricing-grid-3 {
    grid-template-columns: 1fr;
  }
}

.pricing-card-tier {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 16px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.pricing-card-tier:hover {
  transform: translateY(-4px);
  border-color: #38BDF8;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.auth-inline-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 14px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.auth-inline-alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}
.auth-inline-alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6EE7B7;
}
.auth-inline-alert.info {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38BDF8;
}

/* =========================================================================
   WordGridly Admin Command Center (v2) - Executive SaaS Styling
   ========================================================================= */

.admin-header-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10B981;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.admin-status-badge.edge {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38BDF8;
}

.admin-kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.admin-kpi-card-v2 {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: 14px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.admin-kpi-card-v2:hover {
  transform: translateY(-2px);
  border-color: #334155;
}

.admin-kpi-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.admin-kpi-card-v2.downloads::before { background: linear-gradient(90deg, #38BDF8, #0284C7); }
.admin-kpi-card-v2.users::before { background: linear-gradient(90deg, #10B981, #059669); }
.admin-kpi-card-v2.subscribers::before { background: linear-gradient(90deg, #F59E0B, #D97706); }
.admin-kpi-card-v2.revenue::before { background: linear-gradient(90deg, #A855F7, #7C3AED); }

.admin-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-kpi-top .kpi-title {
  font-size: 0.8rem;
  font-weight: 750;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-kpi-top .kpi-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.admin-kpi-num {
  font-size: 2.2rem;
  font-weight: 850;
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 8px;
  font-feature-settings: 'tnum';
}

.admin-kpi-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #94A3B8;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-kpi-tag {
  background: rgba(30, 41, 59, 0.8);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: #CBD5E1;
}

/* Sub-Tab Navigation */
.admin-nav-tabs {
  display: flex;
  gap: 8px;
  background: #090E17;
  border: 1px solid #1E293B;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.admin-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(30, 41, 59, 0.5);
}

.admin-tab-btn.active {
  background: #1E293B;
  color: #38BDF8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.admin-tab-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  padding: 2px 7px;
  border-radius: 9999px;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

/* Filters & Search Bar */
.admin-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-pill-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-pill-filter {
  background: #1E293B;
  border: 1px solid #334155;
  color: #94A3B8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.admin-pill-filter:hover {
  background: #334155;
  color: #FFFFFF;
}

.admin-pill-filter.active {
  background: #2563EB;
  border-color: #3B82F6;
  color: #FFFFFF;
}

.admin-search-wrapper {
  position: relative;
  min-width: 280px;
  flex: 1;
  max-width: 380px;
}

.admin-search-wrapper input {
  width: 100%;
  background: #0B0F19;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 14px 9px 36px;
  color: #FFFFFF;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s;
}

.admin-search-wrapper input:focus {
  border-color: #38BDF8;
}

.admin-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: #64748B;
  pointer-events: none;
}

/* User Avatars & Badges */
.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E293B, #334155);
  border: 1px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #F8FAFC;
  text-transform: uppercase;
}

.badge-user-new {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10B981;
  font-size: 0.72rem;
  font-weight: 750;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-user-existing {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38BDF8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-tier-creator {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #C084FC;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-tier-lifetime {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #F59E0B;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-tier-free {
  background: rgba(148, 163, 184, 0.12);
  color: #94A3B8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.badge-tier-admin {
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 6px;
}

.admin-action-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #1E293B;
  color: #CBD5E1;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-action-btn:hover {
  background: #334155;
  color: #FFFFFF;
}

.admin-action-btn.promote {
  border-color: rgba(245, 158, 11, 0.4);
  color: #F59E0B;
}

.admin-action-btn.promote:hover {
  background: rgba(245, 158, 11, 0.15);
}

.admin-action-btn.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

.admin-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
}
