/* ============================================================
   FLOW VENTAS — Design System
   Aesthetic Direction: "Industrial Luxe"
   - Warm amber/copper tones on deep charcoal
   - Distinctive typography (Outfit + Space Mono)
   - Subtle grain textures and depth
   - Precise micro-interactions
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

/* --- CSS Variables --- */
:root {
  /* Palette: Clean white + warm amber/copper */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-input: rgba(0, 0, 0, 0.04);

  --border-subtle: rgba(0, 0, 0, 0.10);
  --border-active: rgba(196, 120, 58, 0.55);

  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #999999;

  /* Warm amber accent */
  --accent-primary: #c4783a;
  --accent-secondary: #a0522d;
  --accent-gradient: linear-gradient(135deg, #e8a74c 0%, #c4785a 50%, #9a5b6a 100%);
  --accent-warm: #d05c40;
  --accent-success: #2e7d50;
  --accent-warning: #b8860b;
  --accent-info: #2a6a8c;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-blur: 24px;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Shadows — soft, light-mode */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.10), 0 8px 40px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 24px rgba(196, 120, 58, 0.12);

  /* Transitions */
  --transition-fast: 120ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-base: 280ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 450ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Aliases for legacy usage */
  --surface-primary: #f5f5f7;
  --surface-secondary: #ffffff;
  --border: rgba(0, 0, 0, 0.10);
  --border-light: rgba(0, 0, 0, 0.05);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* No overlay — clean white background */
body::before,
body::after {
  display: none;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

/* --- Layout --- */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* --- Sidebar --- */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-md);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  padding: 0 var(--space-sm);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 12px rgba(232, 167, 76, 0.25);
}

.sidebar-logo h1 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: rgba(232, 167, 76, 0.08);
  color: var(--accent-primary);
  border-left: 2px solid var(--accent-primary);
  font-weight: 600;
}

.nav-item .nav-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.sidebar-footer {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.sidebar-footer .status-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 10px;
  background: rgba(106, 191, 138, 0.08);
  border: 1px solid rgba(106, 191, 138, 0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-success);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-footer .status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-success);
  border-radius: 50%;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.3;
    transform: scale(0.85);
  }
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: var(--space-2xl) var(--space-2xl) var(--space-2xl) var(--space-xl);
  max-width: 1100px;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 400;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(var(--glass-blur));
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 167, 76, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-badge {
  padding: 3px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(232, 167, 76, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(232, 167, 76, 0.2);
}

.card-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

/* --- Project Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  cursor: pointer;
}

.project-card .project-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  margin-bottom: var(--space-md);
  letter-spacing: -0.5px;
}

.project-card .project-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.project-card .project-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

/* New project card */
.new-project-card {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  cursor: pointer;
  gap: var(--space-md);
  color: var(--text-muted);
  font-weight: 500;
}

.new-project-card:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(232, 167, 76, 0.03);
}

.new-project-card .plus-icon {
  width: 48px;
  height: 48px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  transition: transform var(--transition-base);
}

.new-project-card:hover .plus-icon {
  transform: rotate(90deg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #0e0e10;
  box-shadow: 0 4px 20px rgba(232, 167, 76, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(232, 167, 76, 0.35);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

.btn-danger {
  background: rgba(224, 108, 94, 0.12);
  color: var(--accent-warm);
  border: 1px solid rgba(224, 108, 94, 0.25);
}

.btn-danger:hover {
  background: rgba(224, 108, 94, 0.2);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 14px 36px;
  font-size: 0.92rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(232, 167, 76, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 300;
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

.form-select {
  appearance: none;
  cursor: pointer;
}

.form-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* --- Tags input --- */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  min-height: 42px;
  align-items: center;
  cursor: text;
}

.tags-container:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(232, 167, 76, 0.1);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(232, 167, 76, 0.1);
  color: var(--accent-primary);
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(232, 167, 76, 0.15);
}

.tag-remove {
  cursor: pointer;
  opacity: 0.5;
  font-size: 0.95rem;
  line-height: 1;
  transition: opacity var(--transition-fast);
}

.tag-remove:hover {
  opacity: 1;
}

.tag-input {
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  outline: none;
  flex: 1;
  min-width: 120px;
  padding: 3px;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-xl);
  background: rgba(255, 255, 255, 0.02);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.tab {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  background: none;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--accent-gradient);
  color: #0e0e10;
  font-weight: 700;
}

/* --- Agent Pipeline Visual --- */
.pipeline {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  min-width: 140px;
  transition: all var(--transition-base);
}

.pipeline-step.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 24px rgba(232, 167, 76, 0.12);
  background: rgba(232, 167, 76, 0.06);
}

.pipeline-step.completed {
  border-color: var(--accent-success);
  background: rgba(106, 191, 138, 0.06);
}

.pipeline-step.error {
  border-color: var(--accent-warm);
  background: rgba(224, 108, 94, 0.06);
}

.pipeline-step .step-icon {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.pipeline-step .step-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pipeline-step.active .step-label {
  color: var(--accent-primary);
}

.pipeline-step.completed .step-label {
  color: var(--accent-success);
}

.pipeline-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

/* --- Results Panel --- */
.result-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.result-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.result-body {
  padding: var(--space-lg);
}

.result-field {
  margin-bottom: var(--space-lg);
}

.result-field-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.result-field-value {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-primary);
}

/* --- Scene Cards (Director Visual) --- */
.scenes-grid {
  display: grid;
  gap: 10px;
}

.scene-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  align-items: start;
  transition: border-color var(--transition-fast);
}

.scene-card:hover {
  border-color: var(--border-active);
}

.scene-number {
  width: 28px;
  height: 28px;
  background: var(--accent-gradient);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #0e0e10;
  flex-shrink: 0;
}

.scene-type {
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.scene-type.broll {
  background: rgba(106, 163, 191, 0.15);
  color: var(--accent-info);
}

.scene-type.talking {
  background: rgba(232, 167, 76, 0.12);
  color: var(--accent-primary);
}

.scene-type.transition {
  background: rgba(232, 200, 76, 0.12);
  color: var(--accent-warning);
}

.scene-duration {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-info);
  white-space: nowrap;
}

.scene-prompt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}

/* --- Table (Historial) --- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

tbody td {
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: rgba(232, 167, 76, 0.03);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  max-width: 460px;
  width: 92%;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(232, 167, 76, 0.05);
  transform: scale(0.96) translateY(8px);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal h3 {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: var(--space-lg);
  color: var(--accent-primary);
  letter-spacing: -0.02em;
}

.modal-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  margin-top: var(--space-xl);
}

/* --- Loading Spinner --- */
.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(232, 167, 76, 0.15);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-3xl);
  color: var(--text-secondary);
}

.loading-state .loading-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 2rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  opacity: 0.4;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}

.toast.success {
  background: rgba(106, 191, 138, 0.95);
  color: #0e0e10;
}

.toast.error {
  background: rgba(224, 108, 94, 0.95);
  color: #fff;
}

.toast.info {
  background: rgba(232, 167, 76, 0.95);
  color: #0e0e10;
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- Back button --- */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-fast);
  background: none;
  border: none;
  padding: 0;
}

.back-btn:hover {
  color: var(--accent-primary);
}

/* --- Utility --- */
.hidden {
  display: none !important;
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.text-center {
  text-align: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .bottom-nav {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: var(--space-md);
    padding-bottom: 80px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .pipeline-arrow {
    text-align: center;
    transform: rotate(90deg);
  }

  .pipeline-step {
    min-width: unset;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 0.78rem;
  }

  .form-input, .form-textarea, .form-select {
    font-size: 16px;
  }

  .chips-grid {
    gap: 6px;
  }

  .chip {
    padding: 8px 12px;
    font-size: 0.78rem;
    min-height: 44px;
  }

  .modal {
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .scene-card {
    grid-template-columns: auto 1fr;
  }

  .scene-duration {
    grid-column: 1 / -1;
    text-align: right;
  }

  .card {
    padding: var(--space-md);
  }

  .sugerencia-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .sugerencia-label {
    min-width: unset;
  }

  .btn-lg {
    width: 100%;
  }

  .back-btn {
    margin-bottom: var(--space-md);
  }

  .avatar-card {
    flex-wrap: wrap;
  }

  .avatar-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* --- Avatares List --- */
.avatares-list {
  display: grid;
  gap: 10px;
  margin-bottom: var(--space-lg);
}

.avatar-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.avatar-card:hover {
  border-color: var(--border-active);
}

.avatar-card.selected {
  border-color: var(--accent-primary);
  background: rgba(232, 167, 76, 0.06);
}

.avatar-card-info {
  flex: 1;
  min-width: 0;
}

.avatar-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.avatar-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Chips Grid (Selectors) --- */
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  min-height: 44px;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.chip.active {
  background: rgba(232, 167, 76, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(232, 167, 76, 0.1);
}

/* --- Sugerencia Items --- */
.sugerencia-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.sugerencia-item:last-child {
  border-bottom: none;
}

.sugerencia-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 180px;
}

.sugerencia-item span:not(.sugerencia-label) {
  font-weight: 700;
  color: var(--accent-primary);
  flex: 1;
}

/* --- Editable Scene Prompts --- */
.scene-prompt-edit {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.scene-prompt-edit:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(232, 167, 76, 0.1);
}

/* --- Bottom Navigation (Mobile) --- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  z-index: 200;
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  font-family: var(--font-display);
  flex: 1;
  min-height: 44px;
}

.bottom-nav-item.active {
  color: var(--accent-primary);
}

.bottom-nav-icon {
  font-size: 1.3rem;
}

.bottom-nav-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   LOGIN / REGISTER
   ============================================================ */

#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-lg);
  background: var(--bg-primary);
  position: relative;
  z-index: 1;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.login-logo img {
  height: 48px;
  margin-bottom: var(--space-md);
}

.login-logo h2 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.login-card h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.login-error {
  color: var(--accent-warm);
  font-size: 0.85rem;
  min-height: 20px;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.login-toggle {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-toggle a {
  color: var(--accent-primary);
  cursor: pointer;
  text-decoration: underline;
}

.login-toggle a:hover {
  color: var(--accent-secondary);
}


/* ============================================================
   PARRILLA — CALENDARIO DE PUBLICACIÓN
   ============================================================ */

/* Grid mensual: 7 columnas (una por día de la semana) */
.parrilla-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.parrilla-cal-day {
  min-height: 110px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.parrilla-cal-day.weekend {
  background: #fafafa;
}

.parrilla-cal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
}

.parrilla-cal-dayname {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.parrilla-cal-daynum {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.parrilla-cal-add {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.parrilla-cal-add:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.parrilla-cal-items {
  flex: 1;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Card de pieza programada dentro del día */
.parrilla-pub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 5px;
  overflow: hidden;
}

.parrilla-pub-thumb {
  width: 100%;
  height: 44px;
  object-fit: cover;
  display: block;
}

.parrilla-pub-info {
  padding: 4px 6px 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.parrilla-pub-plat {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.parrilla-pub-titulo {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parrilla-pub-actions {
  display: flex;
  gap: 3px;
  padding: 3px 4px;
  border-top: 1px solid var(--border-light);
}

.parrilla-pub-actions .btn {
  flex: 1;
  font-size: 9px;
  padding: 2px 0;
}

/* ============================================================
   PIEZAS PUBLICITARIAS
   ============================================================ */

.piezas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.pieza-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

.pieza-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.pieza-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--surface-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 40px;
}

.pieza-thumbnail img,
.pieza-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pieza-card-body {
  padding: 12px;
}

.pieza-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pieza-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pieza-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Estado badges */
.estado-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.estado-badge.borrador      { background: rgba(0,0,0,0.06);       color: var(--text-muted); }
.estado-badge.en_revision   { background: rgba(200,150,20,0.12);  color: #9a7010; }
.estado-badge.aprobado      { background: rgba(34,140,80,0.12);   color: #1e7a46; }
.estado-badge.rechazado     { background: rgba(200,50,50,0.12);   color: #b03030; }
.estado-badge.auto_aprobado { background: rgba(80,80,200,0.10);   color: #5050b0; }
.estado-badge.pendiente     { background: rgba(200,150,20,0.10);  color: #9a7010; }

/* ============================================================
   APROBACIONES (ADMIN) — lista dentro de tab Piezas
   ============================================================ */

.aprobacion-row {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.aprobacion-row-info {
  flex: 1;
  min-width: 200px;
}

.aprobacion-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.aprobacion-row-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.aprobacion-feedback {
  font-size: 12px;
  color: #f87171;
  margin-top: 4px;
  font-style: italic;
}

/* ============================================================
   PORTAL DEL CLIENTE
   ============================================================ */

#cliente-portal {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.cliente-portal-header {
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cliente-logo {
  height: 36px;
  width: auto;
}

.cliente-portal-header h1 {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
  margin: 0;
}

.cliente-portal-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

.cliente-section {
  margin-bottom: 40px;
}

.cliente-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Aprobación card para cliente */
.aprobacion-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.aprobacion-card-media {
  width: 100%;
  max-height: 400px;
  background: var(--surface-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  color: var(--text-muted);
}

.aprobacion-card-media img,
.aprobacion-card-media video {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.aprobacion-card-body {
  padding: 20px;
}

.aprobacion-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.aprobacion-card-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

.aprobacion-card-deadline {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.aprobacion-card-actions {
  display: flex;
  gap: 12px;
}

.btn-aprobar {
  background: linear-gradient(135deg, #16a34a, #4ade80);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: opacity 0.2s;
}

.btn-aprobar:hover { opacity: 0.9; }

.btn-rechazar {
  background: rgba(239,68,68,0.15);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.3);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-rechazar:hover { background: rgba(239,68,68,0.25); }

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #f87171);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

/* Parrilla readonly (vista cliente) */
.parrilla-readonly-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.parrilla-readonly-table th {
  background: var(--surface-primary);
  padding: 10px 12px;
  text-align: left;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.parrilla-readonly-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.05));
  vertical-align: top;
}

.parrilla-readonly-table tr:last-child td {
  border-bottom: none;
}

/* Preview en modal upload */
#pieza-preview img,
#pieza-preview video {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-md);
  margin-top: 8px;
  display: block;
}

/* Responsive cliente portal */
@media (max-width: 768px) {
  .cliente-portal-header {
    padding: 12px 16px;
  }
  .cliente-portal-header h1 {
    font-size: 16px;
  }
  .aprobacion-card-actions {
    flex-direction: column;
  }
  .piezas-grid {
    grid-template-columns: 1fr;
  }
  .parrilla-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   DASHBOARD DE CLIENTES
   ============================================================ */

.clientes-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
}

.clientes-stat-card {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.clientes-stat-icon {
  font-size: 32px;
  line-height: 1;
}

.clientes-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.clientes-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Tabla de clientes */
.clientes-table {
  width: 100%;
  border-collapse: collapse;
}

.clientes-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-primary);
}

.clientes-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.05));
  font-size: 14px;
  vertical-align: middle;
}

.clientes-table tr:last-child td {
  border-bottom: none;
}

.clientes-table tr:hover td {
  background: rgba(0,0,0,0.025);
}

.cliente-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.cliente-row-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cliente-email {
  font-weight: 500;
  color: var(--text-primary);
}

.cliente-fecha {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.proyecto-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(99,102,241,0.12);
  color: #818cf8;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin: 2px;
}

.clientes-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.clientes-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.clientes-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.clientes-empty-desc {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* Credenciales box en modal */
.credentials-box {
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
  margin-top: 8px;
}

.credentials-box .cred-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.credentials-box .cred-value {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .clientes-stats {
    grid-template-columns: 1fr;
  }
  .clientes-table th:nth-child(3),
  .clientes-table td:nth-child(3) {
    display: none;
  }
}

/* ============================================================
   NOTIFICACIONES — Bell icon + panel deslizante
   ============================================================ */

/* Bell button en sidebar */
.notif-bell-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-sm);
}

.notif-bell-btn:hover {
  border-color: var(--border-active);
  color: var(--accent-primary);
  background: rgba(196, 120, 58, 0.06);
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--accent-warm);
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.notif-badge.hidden {
  display: none !important;
}

/* Overlay backdrop */
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 290;
  background: rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.notif-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Panel */
.notif-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
}

.notif-panel.open {
  transform: translateX(0);
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.notif-panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.notif-panel-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.notif-mark-all-btn {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.notif-mark-all-btn:hover {
  background: rgba(196, 120, 58, 0.08);
}

.notif-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.notif-close-btn:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

/* Notification list */
.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm) 0;
}

.notif-list::-webkit-scrollbar {
  width: 4px;
}

.notif-list::-webkit-scrollbar-track {
  background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 2px;
}

/* Individual notification item */
.notif-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(196, 120, 58, 0.04);
}

.notif-item.unread {
  background: rgba(196, 120, 58, 0.06);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(196, 120, 58, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.notif-item-msg {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.notif-item-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  color: var(--text-muted);
  text-align: center;
}

.notif-empty-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.notif-empty-text {
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .notif-panel {
    width: 100vw;
  }
}