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

:root {
  /* Dark Mode Default Theme Variables */
  --bg-page: #07070a;
  --bg-sidebar: #0b0b0f;
  --bg-card: rgba(15, 15, 20, 0.7);
  --bg-card-hover: rgba(22, 22, 30, 0.85);
  --bg-input: #121217;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f4f4f7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-primary: #8b5cf6; /* Violet */
  --accent-primary-hover: #7c3aed;
  --accent-secondary: #06b6d4; /* Cyan */
  --accent-secondary-hover: #0891b2;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --sidebar-width: 260px;
  --header-height: 70px;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 15px rgba(139, 92, 246, 0.2);
}

/* Light Mode Override */
html.light {
  --bg-page: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-input: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-primary: #6d28d9; /* Deep Violet */
  --accent-primary-hover: #5b21b6;
  --accent-secondary: #0891b2; /* Deep Cyan */
  --accent-secondary-hover: #0e7490;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 15px rgba(109, 40, 217, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Auth Layout toggling */
body.logged-out #mainAppLayout {
  display: none !important;
}
body.logged-out #landingPage {
  display: flex !important;
}
body.logged-in #mainAppLayout {
  display: flex !important;
}
body.logged-in #landingPage {
  display: none !important;
}

/* 1. LANDING & LOGIN PAGE DESIGN */
.landing-container {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(139,92,246,0.1) 0%, rgba(7,7,10,1) 70%);
  padding: 0 40px;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.landing-hero {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 800px;
  margin: 80px auto 40px;
  animation: fadeIn 0.5s ease-out;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #ffffff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Feature Preview Sandbox styling */
.landing-preview-sandbox {
  animation: fadeIn 0.6s ease-out;
}

.preview-sandbox-grid {
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
}

.mock-card-render {
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.features-grid {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 80px;
}

.feature-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

/* LOGIN DIALOG PANEL */
.auth-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.auth-modal-overlay.active {
  display: flex;
}

.auth-modal-content {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

/* Layout Elements */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  padding: 24px 16px;
}

.main-content {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: rgba(7, 7, 10, 0.5);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 90;
}

html.light .header {
  background-color: rgba(248, 250, 252, 0.8);
}

.view-container {
  padding: 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  animation: fadeIn 0.4s ease-out;
}

/* Tab View state hiding logic */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  margin-top: 0 !important;
  margin-bottom: auto !important;
}

/* Sidebar Logo & Branding */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  box-shadow: var(--shadow-glow);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 0.7rem;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-primary);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: auto;
  font-weight: 600;
}

/* Sidebar Navigation */
.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

html.light .nav-item a:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.nav-item.active a {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-left: 3px solid var(--accent-primary);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #27272a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px solid var(--border-color);
  background-size: cover;
  background-position: center;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Theme Toggle button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

html.light .theme-toggle-btn:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Base Cards styling */
.card {
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  color: white;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

html.light .btn-secondary {
  background-color: #f1f5f9;
}
html.light .btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.25);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Required empty field validations border highlighting */
.input-error {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  animation: shake 0.2s ease-in-out 0s 2 alternate;
}

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

/* Dashboard Metrics Row */
.metrics-grid {
  display: grid;
  grid-template-cols: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.metric-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin: 6px 0;
}

.metric-trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.trend-down {
  background-color: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

.metric-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(139, 92, 246, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-box svg {
  width: 24px;
  height: 24px;
}

/* Dashboard Specifics */
.dash-content-grid {
  display: grid;
  grid-template-cols: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .dash-content-grid {
    grid-template-cols: 1fr;
  }
}

/* Interactive Distribution Timeline Todo elements */
.timeline-container {
  position: relative;
  padding-left: 20px;
  margin-top: 20px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--text-muted);
  border: 2px solid var(--bg-card);
  transition: all 0.2s ease;
}

.timeline-item.active .timeline-dot {
  background-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.timeline-item.completed .timeline-dot {
  background-color: var(--success);
}

.timeline-time {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.timeline-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  margin-right: 12px;
}

.timeline-dropdown-content {
  animation: fadeIn 0.25s ease;
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.timeline-resource-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
  margin-right: 8px;
  transition: all 0.2s ease;
}

.timeline-resource-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
}

/* Lock overlay for locked campaign phases */
.lock-notice-card {
  padding: 20px;
  background: rgba(239, 68, 68, 0.04);
  border: 1.5px dashed rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  color: var(--error);
  font-size: 0.9rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* QA Verification badges */
.qa-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}

.qa-badge.badge-draft {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.qa-badge.badge-published {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Reiteration feedback comment box directly nested under copy box textareas */
.reiteration-comment-box {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
}

.reiteration-comment-box .form-input {
  flex: 1;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.reiteration-comment-box .btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent-primary);
  border-color: rgba(139, 92, 246, 0.25);
  margin-left: auto;
}

/* Mod Change Audit Logs layout */
.changelog-list {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-input);
}

.changelog-item {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-item-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.changelog-item-desc {
  color: var(--text-secondary);
}

/* Notification Bell Dropdown styles */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--error);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 320px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.notif-body {
  max-height: 250px;
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notif-item:hover {
  background: rgba(255,255,255,0.02);
}

.notif-item.unread {
  background: rgba(139,92,246,0.03);
  border-left: 3px solid var(--accent-primary);
}

.notif-item:last-child {
  border-bottom: none;
}

/* Clean workspaces manager settings grids */
.clean-workspaces-grid {
  display: grid;
  grid-template-cols: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.clean-workspace-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clean-workspace-card:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}

/* Campaigns Grid Mode */
.campaign-card {
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.campaign-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.campaign-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--text-primary);
}

.campaign-card-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.campaign-card-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* Progress bar inside card */
.campaign-progress-bar-container {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background-color: var(--border-color);
  overflow: hidden;
  margin-top: 6px;
}

.campaign-progress-bar-fill {
  height: 100%;
  background-color: var(--accent-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Editor/Generator workspace details (editable copy boxes) */
.copy-area-wrapper {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 16px;
}

.copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
}

.copy-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}

.copy-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

.copy-body {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 220px;
  resize: vertical;
  outline: none;
}

.copy-body:focus {
  outline: none;
}

/* Card Designer Grid Layout */
.designer-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .designer-grid {
    grid-template-columns: 1fr;
  }
}

.canvas-preview-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
}

canvas#cardCanvas {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16/9;
  background-color: #000;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Slider for Tone adjustment */
.tone-slider-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.accent-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
}

.accent-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.1s ease;
}

.accent-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Quick Add Webinar Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Badge States */
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-draft {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.badge-published {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.badge-archived {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Role Management Styles - Clean visibility overrides */
body.role-client .admin-or-staff-only {
  display: none !important;
}

body.role-client .admin-only,
body.role-client .admin-or-owner-only {
  display: none !important;
}

body.role-member .admin-only,
body.role-member .admin-or-owner-only {
  display: none !important;
}

body.role-owner .admin-only {
  display: none !important;
}

/* Show elements specific to other roles if needed */
body.role-client .client-only-visible {
  display: block !important;
}

/* Campaign Card Status Borders */
.campaign-card.status-draft {
  border-left: 4px solid var(--warning);
}
.campaign-card.status-in-progress {
  border-left: 4px solid var(--accent-secondary);
}
.campaign-card.status-approved {
  border-left: 4px solid var(--success);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

/* Disabled Header links */
.link-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
  pointer-events: none;
  color: var(--text-muted) !important;
}

/* Progressive QA Action Buttons & Status Badges */
.qa-badge.status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.qa-badge.status-approved {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.qa-badge.status-posted {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.copy-btn.btn-verify-qa {
  background: rgba(245, 158, 11, 0.1) !important;
  color: var(--warning) !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
}
.copy-btn.btn-verify-qa:hover {
  background: rgba(245, 158, 11, 0.18) !important;
}
.copy-btn.btn-mark-posted {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
}
.copy-btn.btn-mark-posted:hover {
  background: rgba(59, 130, 246, 0.18) !important;
}
.copy-btn.btn-reset {
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color) !important;
}
.copy-btn.btn-reset:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* Phase Tab Segregation */
.collateral-content-box {
  display: none;
}
.collateral-content-box.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Workspace Phase Pill Tabs Navigation */
.workspace-tabs {
  display: inline-flex;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 6px;
  gap: 6px;
  margin-bottom: 24px;
  width: auto;
}

.workspace-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-tab:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

html.light .workspace-tab:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.workspace-tab.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.25);
}

.calendar-campaign-tag:hover {
  background-color: rgba(139, 92, 246, 0.22) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  transform: translateY(-1px);
}




/* -- Master Workspace Filter Buttons ------------------------------- */
.master-filter-btn {
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.master-filter-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.master-filter-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

/* -- Designer Main Menu Cards ------------------------------- */
.designer-menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}
.designer-menu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.12);
}
.designer-menu-card.active {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.02) 100%);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
}
.designer-menu-card.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-primary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   📱 MOBILE & TABLET RESPONSIVENESS OVERRIDES
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Off-canvas collapsible sidebar drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
    z-index: 99999;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .header {
    padding: 0 20px !important;
    justify-content: space-between !important;
  }

  /* Hamburger Menu Toggle button display */
  .sidebar-mobile-toggle {
    display: flex !important;
  }

  .sidebar-mobile-close {
    display: block !important;
  }

  /* General Form stack inputs */
  .form-grid-2,
  #newUserForm,
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

@media (max-width: 768px) {
  .view-container {
    padding: 20px !important;
  }

  /* Workspace Phase tabs navigation */
  .workspace-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    padding: 4px !important;
    gap: 4px !important;
  }

  .workspace-tab {
    flex: 1 1 auto !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    padding: 8px 12px !important;
  }

  /* Modal split views */
  .tweaker-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Text elements scales */
  .hero-title {
    font-size: 2.2rem !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
  }
  
  /* Zoom details flex columns buttons stack */
  div[style*="display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:12px;"],
  div[style*="display:flex; gap:10px; width:100%; flex-wrap:wrap;"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  div[style*="display:flex; gap:10px; width:100%; flex-wrap:wrap;"] > button,
  div[style*="display:flex; gap:10px; width:100%; flex-wrap:wrap;"] > a,
  div[style*="display:flex; gap:8px;"] > button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* Speech-to-text mic buttons */
.mic-btn-inside {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  z-index: 2;
}

.mic-btn-inside:hover {
  color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
}

.mic-btn-inside.recording {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.4);
  animation: pulse-mic-glow 1.5s infinite;
}

.form-input.recording-active {
  border-color: rgba(239, 68, 68, 0.4) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15) !important;
  background: rgba(239, 68, 68, 0.01) !important;
  color: var(--text-primary) !important;
  transition: all 0.3s ease;
}

@keyframes pulse-mic-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Upgraded Campaign Navigation & Upgrades */
.campaign-nav-btn.active {
  border-bottom: 3px solid var(--accent-primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  opacity: 1 !important;
}
.campaign-nav-btn {
  opacity: 0.6;
}
.campaign-nav-btn:hover {
  color: #ffffff;
  opacity: 0.95;
}

/* Transcriber & Audio Wave classes */
.transcript-bubble {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
  cursor: pointer;
}
.transcript-bubble:hover {
  background: rgba(255, 255, 255, 0.03);
}
.transcript-bubble.playing-highlight {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid var(--accent-primary);
}
.transcript-keyword-highlight {
  background: rgba(245, 158, 11, 0.4);
  color: #fff;
  border-radius: 2px;
  padding: 0 2px;
}
.transcript-tag-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 8px;
}
.transcript-tag-pill.pain { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.transcript-tag-pill.action { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.transcript-tag-pill.metric { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.transcript-tag-pill.feature { background: rgba(139, 92, 246, 0.15); color: #c084fc; }

/* Monday.com Grid Table */
.monday-table th {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}
.monday-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.monday-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}
.monday-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
.monday-status-select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  font-weight: 700;
  font-size: 0.72rem;
  text-align: center;
  color: #fff;
  cursor: pointer;
  appearance: none;
  text-align-last: center;
}
.monday-status-select.done { background-color: #00c875 !important; }
.monday-status-select.working { background-color: #fdab3d !important; }
.monday-status-select.stuck { background-color: #df2f4a !important; }
.monday-status-select.todo { background-color: #797e93 !important; }

.monday-priority-select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  font-weight: 700;
  font-size: 0.72rem;
  text-align: center;
  color: #fff;
  cursor: pointer;
  appearance: none;
  text-align-last: center;
}
.monday-priority-select.high { background-color: #f65f7c !important; }
.monday-priority-select.medium { background-color: #ffcc00 !important; color: #111 !important; }
.monday-priority-select.low { background-color: #579bfc !important; }

.monday-assignee-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.monday-assignee-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}



