/* =====================================================
   Bansy - Main Styles (Dark Theme + Profile System)
   ===================================================== */

:root {
  --background: oklch(0.9741 0 129.63);
  --foreground: oklch(0.2277 0.0034 67.65);
  --card: oklch(98.46% 0.002 247.84);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.93 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --border: oklch(0.1149 0 0 / 8%);
  --accent: #e4e4e7;
  --success: #10b981;
  --destructive: #ef4444;
  --primary-color: #000000;
  --radius: 0.5rem;
}

.dark {
  --background: oklch(0.185 0.005 285.823);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.2 0.005 285.823);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.31 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --border: oklch(0.2565 0.0019 286.27);
  --accent: oklch(0.274 0.006 286.033);
  --primary-color: #ffffff;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--background);
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0rem;
  font-size: 17px;
  font-weight: 700;
  color: var(--foreground);
}

.logo-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn svg {
  stroke: var(--foreground);
}

.theme-toggle-btn:hover {
  background: var(--accent);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.5rem;
}

.nav-group {
  margin-bottom: 1.5rem;
}

.nav-group-label {
  padding: 0 12px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-add-project {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  margin-top: 8px;
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-project:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.02);
}

.project-name-input:focus {
  outline: 2px solid var(--primary-color);
  border-color: transparent;
}

.nav-item {
  position: relative;
  /* Essential for absolute positioning of actions */
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  margin: 0.125rem 0;
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.15s;
}

/* Custom Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--foreground);
}

.modal-body input {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--foreground);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-body input:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-modal {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-modal.cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-foreground);
}

.btn-modal.cancel:hover {
  background: var(--accent);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.btn-modal.confirm {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: black;
  /* Black text on white button for contrast */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-modal.confirm:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-item:hover,
.nav-item.active {
  background: var(--accent);
}

/* Promo project active state - more prominent background */
.promo-project.active {
  background: var(--accent);
}

.nav-icon {
  font-size: 18px;
  opacity: 1;
  width: 26px;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1.5px solid var(--border);
  position: relative;
}

.user-prof.nav-item {
  position: relative;
  /* For absolute positioning of menu */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item-content {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}

.project-name-span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
}

/* Action Buttons */
.project-actions {
  display: none;
  /* Hidden by default */
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 4px;
  background: inherit;
  /* Match parent background if possible, or transparent */
}

.nav-item:hover .project-actions {
  display: flex;
  /* Show on hover */
}

.action-btn {
  padding: 4px;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  opacity: 1;
}

/* Light theme hover styles */
html:not(.dark) .action-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--foreground);
  opacity: 1;
}

.action-btn.delete:hover {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

html:not(.dark) .action-btn.delete:hover {
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
}

.action-btn.save:hover {
  background: rgba(52, 199, 89, 0.1);
  color: #34c759;
}

html:not(.dark) .action-btn.save:hover {
  background: rgba(52, 199, 89, 0.15);
  color: #34c759;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

.user-profile:hover {
  background: var(--accent);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

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

.user-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 12px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chevron-icon {
  opacity: 0.5;
  transition: transform 0.2s;
}

.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-login:hover {
  opacity: 0.9;
}

.user-dropdown {
  position: absolute;
  bottom: 100%;
  left: 1rem;
  right: 1rem;
  margin-bottom: 0.5rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.user-dropdown.hidden {
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 14px;
  background: none;
  border: none;
  width: 100%;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--accent);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2rem;
  overflow-y: auto;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.content-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 14px;
  color: var(--muted-foreground);
}

/* Profiles Grid */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.profile-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.profile-card:hover {
  border-color: var(--muted-foreground);
}

.profile-header {
  padding: 1.25rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.profile-status {
  font-size: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}

.profile-status.idle {
  background: var(--accent);
  color: var(--muted-foreground);
}

.profile-status.running {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.profile-status.authenticating {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.profile-body {
  padding: 1.25rem;
  flex: 1;
}

.social-connections {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.social-btn {
  flex: 1;
  padding: 0.625rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  color: var(--foreground);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.social-btn:hover {
  background: var(--accent);
  border-color: var(--muted-foreground);
}

.social-btn.connected {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-config {
  padding: 1rem;
  background: var(--accent);
  border-radius: var(--radius);
}

.config-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 13px;
}

.config-item:last-child {
  margin-bottom: 0;
}

.config-item .label {
  color: var(--muted-foreground);
  font-weight: 500;
}

.config-item .value {
  color: var(--foreground);
}

.profile-footer {
  padding: 1rem 1.25rem;
  border-top: 1.5px solid var(--border);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Buttons */
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--foreground);
  padding: 0.625rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--muted-foreground);
}

.btn-icon {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--accent);
}

.btn-icon.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* Light icons in dark mode */
.dark .btn-icon svg {
  stroke: var(--foreground);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-large {
  max-width: 700px;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.close-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--foreground);
}



.modal-footer {
  padding: 1.5rem;
  border-top: 1.5px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--background);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--foreground);
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--muted-foreground);
}

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

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* =====================================================
   IMPORTED: Analytics Styles
   ===================================================== */

/* Utility */
.hidden {
  display: none !important;
}

  /* Top Bar */
  .top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 2rem;
    position: relative;
  }

.project-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-action svg {
  opacity: 0.7;
}

.total-points-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  white-space: nowrap;
}

.promo-avatar-small {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.points-label {
  font-size: 13px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.points-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
}

/* View Toggle Row */
.view-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.view-toggle {
  display: flex;
  gap: 0.125rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.125rem;
}

.toggle-btn-small {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn-small svg {
  width: 12px;
  height: 12px;
}

.toggle-btn-small.active {
  background: var(--muted);
  color: var(--foreground);
}

.toggle-btn-small:hover:not(.active) {
  background: var(--accent);
}

/* Toggle Switch (iOS style) */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  /* Wider */
  height: 28px;
  /* Taller */
  margin-left: auto;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--muted);
  transition: 0.3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  /* Larger circle */
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

/* Platform Cards Grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.platform-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color 0.3s;

  /* Fixed height to match connected state */
  display: flex;
  flex-direction: column;
}

.platform-card.connected {
  border-color: var(--success);
}

.platform-card:hover {
  border-color: var(--muted-foreground);
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.platform-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.platform-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin-right: auto;
}

/* Stats Grid - 3 stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat svg {
  opacity: 0.7;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
}

/* Empty Stats */
.empty-stats {
  text-align: center;
  padding: 0;
  /* Remove padding to use flex centering */
  color: var(--muted-foreground);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Align to top */
  align-items: center;
  /* Prevent button stretching */
  padding-top: 1rem;
  /* Slight top padding */
}

.empty-stats p {
  margin-bottom: 1rem;
  font-size: 14px;
  display: none;
  /* Hide text if user wants just button higher, or keep it? User said "raise button". */
}

.btn-connect {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-connect:hover {
  opacity: 0.9;
}

.btn-disconnect {
  width: 100%;
  background: transparent;
  color: var(--destructive);
  padding: 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

/* Platform Card Connected State */
.platform-card.connected {
  border: 1px solid var(--success);

  /* Slight green tint */
}

/* Card Top Row */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  /* More space below header */
}

.card-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.platform-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-left h3 {
  font-size: 16px;
  /* Larger title */
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.channel-name {
  font-size: 12px;
  color: var(--muted-foreground);
  font-weight: 500;
}

.card-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Disconnect Button - Dark with Red Text */
.btn-disconnect {

  color: var(--destructive);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.5rem 1rem;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
  height: 32px;
  /* Fixed height */
  display: flex;
  align-items: center;
}

.btn-disconnect:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--destructive);
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: none;
}

/* Stat Item - Centered layout without icons */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 1;
  text-align: center;
}

.stat-item svg {
  display: none;
  /* Icons removed from HTML, hide if any remain */
}

.stat-item .stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1;
  margin: 0;
}

.stat-item .stat-label {
  font-size: 12px;
  color: var(--muted-foreground);
  font-weight: 500;
  text-align: center;
}

/* Compact View */
.platforms-compact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compact-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  align-items: center;
  transition: all 0.2s;
}

.compact-row.youtube,
.compact-row.tiktok {
  border-color: var(--success);
}

.compact-row:hover {
  border-color: var(--muted-foreground);
}

.compact-platform {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
}

.platform-name {
  font-weight: 600;
  font-size: 14px;
}

.compact-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-self: center;
}

.compact-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: 600;
}

.compact-stat svg {
  opacity: 0.6;
}

.compact-row .toggle-switch {
  justify-self: end;
  margin-left: 0;
}

.btn-connect-compact {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-connect-compact:hover {
  opacity: 0.9;
}

.compact-row.not-connected {
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .project-title {
    text-align: center;
  }

  .action-buttons {
    flex-direction: column;
  }

  .total-points-badge {
    justify-content: center;
  }

  .view-toggle-row {
    justify-content: center;
  }

  /* Platforms grid responsive is handled above */

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .compact-stats {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .compact-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .compact-stats {
    width: 100%;
    justify-content: space-between;
  }

  .compact-row .toggle-switch {
    align-self: flex-end;
  }
}


/* =====================================================
   IMPORTED: Auth Styles
   ===================================================== */

/* Logo Header */
.logo-header {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 10;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
  font-size: 20px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-icon {
  font-size: 28px;
}

/* Main Container */
.auth-container {
  display: flex;
  min-height: 100vh;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* Auth Form Side */
.auth-form-side {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-wrapper {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Auth Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo img {
  width: 120px;
  height: auto;
}

/* OAuth Buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.oauth-btn:hover {
  background: var(--accent);
  border-color: var(--muted-foreground);
}

.oauth-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Auth Footer */
.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.auth-footer a {
  color: var(--muted-foreground);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: var(--foreground);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  padding: 0 1rem;
  font-size: 13px;
  color: var(--muted-foreground);
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group {
  width: 100%;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--background);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--foreground);
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--muted-foreground);
}

.form-input::placeholder {
  color: var(--muted-foreground);
}

/* Terms Checkbox */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1rem 0;
}

.checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}

.checkbox-label {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

.checkbox-label a {
  color: var(--foreground);
  text-decoration: none;
  transition: opacity 0.2s;
}

.checkbox-label a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  opacity: 0.9;
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer */
.form-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
  margin-bottom: 1rem;
}

.link-btn:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.toggle-mode {
  margin-top: 1rem;
}

.link-secondary {
  color: var(--muted-foreground);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.link-secondary:hover {
  color: var(--foreground);
}

/* Right Side - Visual (Hidden) */
.auth-visual-side {
  display: none !important;
}

.visual-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      var(--background) 0%,
      var(--accent) 50%,
      var(--background) 100%);
}

.visual-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 4rem 2rem;
  text-align: center;
}

.visual-icon {
  font-size: 72px;
  margin-bottom: 2rem;
}

.visual-content h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.visual-content p {
  font-size: 16px;
  color: var(--muted-foreground);
  max-width: 500px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .auth-container {
    padding: 1rem 0.75rem;
  }

  .form-wrapper {
    max-width: 100%;
  }

  .auth-logo {
    margin-bottom: 1.5rem;
  }

  .auth-logo img {
    width: 100px;
  }

  .oauth-buttons {
    gap: 0.5rem;
  }

  .oauth-btn {
    font-size: 12px;
    padding: 0.5rem 0.875rem;
    height: 38px;
    gap: 0.5rem;
  }

  .oauth-icon {
    width: 16px;
    height: 16px;
  }

  .auth-footer {
    margin-top: 1.25rem;
  }

  .auth-footer a {
    font-size: 12px;
  }
}

/* Settings Modal Styles */
/* Settings Modal Preloader */
.settings-modal-preloader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: var(--radius);
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.settings-modal-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.settings-modal-preloader .preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.settings-modal-preloader .preloader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.settings-modal-preloader .preloader-text {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

.settings-section {
  margin-bottom: 24px;
}

.settings-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.settings-section textarea {
  width: 100%;
  background: var(--background);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  color: var(--foreground);
  font-family: inherit;
  resize: vertical;
}

/* Toggle Switch */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--muted);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Settings Modal Layout */
.settings-body-flex {
  display: flex;
  gap: 24px;
  padding: 0;
  /* Remove default padding to handle panels better */
  overflow: hidden;
  /* Contain the panels */
  min-height: 400px;
}

.settings-left-panel {
  flex: 1;
  min-width: 400px;
  /* Fixed width for settings */
  padding: 24px;
  transition: all 0.3s ease;
}

/* Media Library Side Panel */
.media-library-panel {
  width: 0;
  opacity: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--background-secondary);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.media-library-panel:not(.hidden) {
  width: 400px;
  /* Width of the side panel */
  opacity: 1;
  padding: 24px;
}

/* Adjust modal width when expanded */
.modal-content.expanded {
  max-width: 900px;
  /* Wider when panel is open */
}

.modal-content:not(.expanded) {
  max-width: 500px;
  /* Standard width */
}

/* Toggle Switch - Green */
input:checked+.slider {
  background-color: #10b981;
  /* Green color */
}

input:checked+.slider:before {
  transform: translateX(24px);
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
  color: var(--muted-foreground);
  background: var(--background);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  /* Take remaining height */
  padding-right: 4px;
  /* Space for scrollbar */
}

.media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.media-item .delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}

.media-item:hover .delete-btn {
  opacity: 1;
}

.media-item .delete-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  /* Red */
}

/* Mobile - always show delete button */
@media (max-width: 768px) {
  .media-item .delete-btn {
    opacity: 1;
  }
}


/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  margin-bottom: 1.5rem;
}

/* Loading */
.loading {
  text-align: center;
  padding: 4rem;
  color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 1024px) {
  .profiles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .content-header {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Loading State */
.platform-card.loading .platform-actions,
.platform-card.loading .platform-stats,
.platform-card.loading .connect-btn,
.platform-card.loading .btn-connect,
.platform-card.loading .empty-stats,
.platform-card.loading .status-badge {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.platform-card .platform-actions,
.platform-card .platform-stats,
.platform-card .connect-btn,
.platform-card .btn-connect,
.platform-card .empty-stats,
.platform-card .status-badge {
  transition: opacity 0.3s ease, visibility 0.3s;
}

/* =====================================================
   Generation Progress Indicator
   ===================================================== */

.project-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.generation-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.progress-step {
  position: relative;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.progress-step.active {
  opacity: 1;
}

.progress-step.completed {
  opacity: 1;
}

.step-icon-wrapper {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.platform-icon {
  width: 24px;
  height: 24px;
}

.step-status {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spinner Animation */
.step-status.spinning::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #4CAF50;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Checkmark */
.step-status.completed::before {
  content: '✓';
  color: #4CAF50;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

.progress-arrow {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  margin: 0 2px;
}

/* Modal Sidebar Layout */
.modal-sidebar-layout {
  display: flex;
  gap: 0;
  height: 500px;
  /* Fixed height for sidebar layout */
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Adjust modal body padding when language tabs are present */
.modal-content.large-modal:has(.prompt-language-tabs-global) .modal-body {
  padding-top: 0;
}

.modal-sidebar {
  width: 200px;
  background: var(--background-secondary);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  box-sizing: border-box;
}

.modal-content-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  min-width: 300px;
  /* Ensure content area doesn't get too small */
}

.media-library-column {
  width: 300px;
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--background-secondary);
  /* Or card background */
  overflow-y: auto;
  flex-shrink: 0;
  transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
  opacity: 1;
}

.media-library-column.hidden {
  display: block !important;
  width: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  opacity: 0 !important;
  border-left-color: transparent !important;
  overflow: hidden !important;
}

.media-library-column h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 16px;
  font-weight: 600;
}

/* Dynamic Modal Width */
.modal-content.large-modal {
  width: 90%;
  max-width: 1000px;
  /* Fixed wide width */
  height: 80vh;
  /* Fixed height */
  display: flex;
  flex-direction: column;
  padding: 0;
}

.modal-content.large-modal .modal-header {
  padding: 24px 24px 16px 24px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

/* Settings Modal Mobile Responsive */
@media (max-width: 768px) {
  .modal-content.large-modal {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  .modal-sidebar-layout {

    height: auto;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    /* Important for nested flex scrolling */
  }

  .modal-sidebar {
    width: 100%;
    max-width: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
    max-height: 200px;
    overflow-y: auto;
  }

  .modal-content-area {
    width: 100%;
    padding: 1rem;
    flex: 0 0 auto;
    /* Allow it to take necessary height */
    min-height: auto;
  }

  .media-library-column {
    width: 100% !important;
    /* Override inline styles or other classes */
    max-width: none;
    border-left: none;
    border-top: 1px solid var(--border);
    flex: 1;
    /* Take remaining space */
    opacity: 1 !important;
    /* Ensure visible */
    padding: 1rem !important;
    overflow-y: auto;
  }

  .media-library-column.hidden {
    display: none !important;
  }

  .settings-section textarea {
    min-height: 150px;
  }
}

/* Modals Responsive */
@media (max-width: 600px) {
  .sidebar-header {
    /* Added selector based on context */
    padding: 0.5rem 1rem;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
  }
}

.sidebar-header {
  padding: 0.75rem 1rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);

  letter-spacing: 0.5px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 14px;
  color: var(--foreground);
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-item:hover {
  background: var(--accent);
}

.sidebar-item.active {
  background: var(--accent);
  border-left-color: var(--primary);
  font-weight: 500;
}

.settings-tab {
  display: none;
}

.settings-tab.active {
  display: block;
}

/* Adjust existing settings styles */
.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.settings-section textarea,
.settings-section input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
}

.settings-section textarea:focus,
.settings-section input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

#topic-preview-prompt {
  font-size: 16px;
}

/* Prompt Language Tabs (Global) */
.prompt-language-tabs-global {
  width: 100%;
  border-bottom: 1px solid var(--border);
  padding: 0;
  background: var(--card);
  margin: 0;
  box-sizing: border-box;
}

.prompt-language-tabs-global .tabs-container {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  align-items: stretch;
  padding: 0 24px;
  margin: 0;
}

.prompt-lang-tab {
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted-foreground);
  transition: all 0.2s ease;
  position: relative;
  font-weight: 500;
  margin: 0;
  border-radius: 0;
  white-space: nowrap;
}

.prompt-lang-tab:hover {
  background: var(--muted);
  color: var(--foreground);
}

.prompt-lang-tab.active {
  background: transparent;
  color: var(--foreground);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Language Switcher */
.language-selector {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  margin-left: 0;
  /* Removed margin as it's handled by wrapper gap */
  border-radius: 16px;
  /* Circle initially */
  border: 1.5px solid var(--border);
  background: var(--background);
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s;
  overflow: hidden;
  cursor: pointer;
  z-index: 50;
}

.language-selector.active {
  height: 70px;
  /* Expands to fit two items */
  border-radius: 16px;
  /* Pill shape */
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lang-current {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--foreground);
  transition: opacity 0.2s;
  position: absolute;
  top: 0;
  left: 0;
}

.lang-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.language-selector.active .lang-menu {
  opacity: 1;
  pointer-events: auto;
}

.language-selector.active .lang-current {
  opacity: 0;
  /* Hide the initial label when expanded */
}

/* Single language - disable selector */
.language-selector.single-lang {
  pointer-events: none;
  cursor: default;
}

.language-selector.single-lang .lang-current {
  cursor: default;
}

.language-selector.single-lang.active {
  height: 32px;
  box-shadow: none;
}

.lang-option {
  width: 100%;
  height: 35px;
  /* Half of 70px */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}

.lang-option:hover {
  color: var(--foreground);
  background: var(--accent);
}

/* Compact Promo Settings Modal */
/* Compact Promo Settings Modal */
.modal-content.compact-promo {
  max-width: 420px;
  height: auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-content.compact-promo .modal-header {
  padding: 1.25rem 1.5rem 0.5rem;
  border-bottom: none;
}

.modal-content.compact-promo .modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-content.compact-promo .modal-sidebar-layout {
  min-height: auto;
  display: block;
  padding: 0;
  height: auto;
  margin: 0;
}

.modal-content.compact-promo .modal-content-area {
  min-width: 100%;
  padding: 0 1.5rem 1.5rem;
  padding-bottom: 0.5rem;
}

.modal-content.compact-promo .form-group {
  margin-bottom: 1rem;
}

.modal-content.compact-promo .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  display: block;
}

.modal-content.compact-promo select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  font-size: 14px;
  height: 42px;
  border-radius: 10px;
  background-color: var(--background);
  border-color: var(--border);
  transition: all 0.2s;
}

.modal-content.compact-promo select.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--border);
  outline: none;
}

.modal-content.compact-promo .modal-footer {
  margin-top: 0;
  padding: 1.25rem 1.5rem;
  background: var(--background-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-content.compact-promo .btn-secondary,
.modal-content.compact-promo .btn-primary {
  padding: 0.5rem 1rem;
  font-size: 13px;
  border-radius: 8px;
}

.modal-content.compact-promo .modal-sidebar,
.modal-content.compact-promo .media-library-column {
  display: none !important;
}

/* Dashboard Preloader */
.dashboard-preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dashboard-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preloader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preloader-text {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

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

.dark .preloader-spinner {
  border-color: var(--border);
  border-top-color: var(--foreground);
}