/* ============================================
   Supergency — Neon Green Dark Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds (layered elevation) */
  --bg-base: #050505;
  --bg-primary: #111213;
  --bg-secondary: #1A1C1E;
  --bg-tertiary: #262A2D;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.3);

  /* Accent — Neon Green */
  --accent: #00E68A;
  --accent-hover: #33FFAA;
  --accent-subtle: rgba(0, 230, 138, 0.10);
  --accent-glow: rgba(0, 230, 138, 0.15);

  /* System Colors */
  --green: #00E68A;
  --yellow: #FFD60A;
  --orange: #FF9F0A;
  --blue: #0A84FF;
  --red: #FF453A;
  --purple: #BF5AF2;
  --cyan: #5CE0D8;

  /* Semantic */
  --separator: rgba(255, 255, 255, 0.06);
  --separator-heavy: rgba(255, 255, 255, 0.12);

  /* Spacing (8px grid) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 980px;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* Transitions */
  --ease-standard: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Sidebar */
  --sidebar-width: 240px;
}


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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  position: relative;
}

/* Aurora ambient glow — subtle green atmosphere */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 230, 138, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 230, 138, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  opacity: 0.85;
}

img, video, iframe {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

::placeholder {
  color: var(--text-tertiary);
}

::selection {
  background: var(--accent);
  color: #000;
}


/* --- Typography --- */
.text-large-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.text-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.text-headline {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.text-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.text-caption {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-secondary);
}

.text-mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }


/* --- Layout --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--separator);
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

/* Aurora glow at top of sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: -80px;
  left: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(0, 230, 138, 0.12) 0%, rgba(0, 230, 138, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: sidebarGlow 8s ease-in-out infinite alternate;
}
@keyframes sidebarGlow {
  0% { opacity: 0.7; transform: translate(0, 0); }
  100% { opacity: 1; transform: translate(10px, 15px); }
}

.sidebar-logo {
  font-size: 20px;
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
  z-index: 1;
  color: var(--accent);
  letter-spacing: -0.01em;
  text-shadow: 0 0 20px rgba(0, 230, 138, 0.3);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  position: relative;
  z-index: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--space-md);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s var(--ease-standard);
  cursor: pointer;
}
.sidebar-link:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  opacity: 1;
}
.sidebar-link.active {
  background: var(--accent-subtle);
  color: var(--accent);
}
.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-link-accent {
  color: var(--accent) !important;
  font-weight: 600 !important;
}
.sidebar-link-accent svg {
  opacity: 1 !important;
  stroke: var(--accent);
}

.sidebar-separator {
  height: 1px;
  background: var(--separator);
  margin: var(--space-md) 0;
}

.main-content {
  margin-left: var(--sidebar-width);
  padding: var(--space-2xl) var(--space-2xl);
  max-width: calc(1200px + var(--space-2xl) * 2);
  min-height: 100vh;
}

/* Mobile bottom tab bar */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-primary);
  border-top: 1px solid var(--separator);
  z-index: 100;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--space-md);
}
.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  padding: 6px 16px;
}
.mobile-nav-link.active {
  color: var(--accent);
}
.mobile-nav-link svg {
  width: 22px;
  height: 22px;
}


/* --- Cards --- */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--separator);
  transition: border-color 0.3s var(--ease-standard), box-shadow 0.3s var(--ease-standard);
  position: relative;
  z-index: 1;
}
.card:hover {
  border-color: rgba(0, 230, 138, 0.08);
}

.card-elevated {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--separator);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s var(--ease-standard);
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
  text-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 36px rgba(0, 230, 138, 0.3), 0 0 80px rgba(0, 230, 138, 0.1);
  opacity: 1;
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--separator-heavy);
}
.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent);
  opacity: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--text-primary);
  opacity: 1;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 36px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  min-height: 52px;
}

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

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,230,138,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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


/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: rgba(0, 230, 138, 0.12);
  color: var(--green);
}
.badge-error {
  background: rgba(255, 69, 58, 0.12);
  color: var(--red);
}
.badge-warning {
  background: rgba(255, 214, 10, 0.12);
  color: var(--yellow);
}
.badge-processing {
  background: rgba(255, 159, 10, 0.12);
  color: var(--orange);
}
.badge-info {
  background: rgba(10, 132, 255, 0.12);
  color: var(--blue);
}
.badge-purple {
  background: rgba(191, 90, 242, 0.12);
  color: var(--purple);
}
.badge-neutral {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}


/* --- Status Dot --- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot-green { background: var(--green); box-shadow: 0 0 6px var(--accent-glow); }
.status-dot-red { background: var(--red); }
.status-dot-orange { background: var(--orange); }
.status-dot-blue { background: var(--blue); }
.status-dot-yellow { background: var(--yellow); }
.status-dot-purple { background: var(--purple); }
.status-dot-gray { background: var(--text-tertiary); }

.status-dot-pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* --- Form Inputs --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input {
  background: var(--bg-secondary);
  border: 1px solid var(--separator-heavy);
  border-radius: var(--radius-md);
  padding: 12px var(--space-md);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s var(--ease-standard), box-shadow 0.2s var(--ease-standard);
  width: 100%;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}


/* --- Toggle Switch (iOS-style, green) --- */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle {
  position: relative;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: 16px;
  transition: background 0.2s var(--ease-standard);
}
.toggle input:checked + .toggle-track {
  background: var(--green);
  box-shadow: 0 0 12px var(--accent-glow);
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle input:checked ~ .toggle-thumb {
  transform: translateX(20px);
}
.toggle-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}


/* --- Progress Bar --- */
.progress-track {
  background: var(--bg-secondary);
  border-radius: 6px;
  height: 6px;
  overflow: hidden;
  width: 100%;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 6px;
  transition: width 0.5s var(--ease-standard);
  min-width: 0;
  box-shadow: 0 0 12px var(--accent-glow);
  animation: progressGlow 2s ease-in-out infinite alternate;
}
@keyframes progressGlow {
  0% { box-shadow: 0 0 8px var(--accent-glow); }
  100% { box-shadow: 0 0 20px rgba(0, 230, 138, 0.3); }
}

.progress-track-lg {
  height: 8px;
}


/* --- Stat Card --- */
.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 1;
}
.stat-card:hover {
  border-color: rgba(0, 230, 138, 0.12);
  box-shadow: 0 0 24px rgba(0, 230, 138, 0.06);
}
.stat-card .stat-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.stat-card .stat-icon {
  font-size: 20px;
  opacity: 0.5;
  align-self: flex-end;
  margin-top: -40px;
}


/* --- Separator --- */
.separator {
  height: 1px;
  background: var(--separator);
  border: none;
}


/* --- Upload Zone --- */
.upload-zone {
  border: 2px dashed var(--separator-heavy);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-standard);
}
.upload-zone:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.upload-zone.has-file {
  border-color: var(--green);
  border-style: solid;
  background: rgba(0, 230, 138, 0.06);
}
.upload-zone-icon {
  font-size: 32px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}
.upload-zone-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.upload-zone-hint {
  font-size: 13px;
  color: var(--text-tertiary);
}
.upload-zone input[type="file"] {
  display: none;
}
.upload-zone-file {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 14px;
  color: var(--green);
  font-weight: 500;
}


/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-2xl);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--separator-heavy);
  color: var(--text-tertiary);
  transition: all 0.3s var(--ease-standard);
  position: relative;
  z-index: 2;
  background: var(--bg-base);
}
.step-item.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  box-shadow: 0 0 16px var(--accent-glow);
}
.step-item.done .step-circle {
  background: var(--green);
  border-color: var(--green);
  color: #000;
}

.step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.step-item.active .step-label {
  color: var(--text-primary);
}
.step-item.done .step-label {
  color: var(--text-secondary);
}

.step-line {
  width: 80px;
  height: 2px;
  background: var(--separator-heavy);
  margin: 0 -8px;
  margin-bottom: 28px;
  transition: background 0.3s var(--ease-standard);
}
.step-line.done {
  background: var(--green);
}


/* --- Job List Row --- */
.job-row {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  transition: background 0.15s var(--ease-standard);
  cursor: pointer;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
}
.job-row:hover {
  background: var(--bg-secondary);
  opacity: 1;
}

.job-row-info {
  flex: 1;
  min-width: 0;
}
.job-row-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.job-row-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.job-row-date {
  font-size: 13px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.job-row-chevron {
  color: var(--text-tertiary);
  font-size: 18px;
  flex-shrink: 0;
}


/* --- Video Card (Job Detail) --- */
.video-card {
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s var(--ease-standard), border-color 0.2s;
}
.video-card:hover {
  transform: scale(1.01);
  border-color: rgba(0, 230, 138, 0.15);
  box-shadow: 0 4px 24px rgba(0, 230, 138, 0.06);
}
.video-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}
.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card-body {
  padding: var(--space-md);
}
.video-card-domain {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-card-meta {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.video-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin-top: var(--space-sm);
}
.video-card-error {
  font-size: 12px;
  color: var(--red);
  margin-top: var(--space-sm);
  border-left: 2px solid var(--red);
  padding-left: var(--space-sm);
}
.video-card-stats {
  display: flex;
  gap: var(--space-md);
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
}


/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}
.empty-state-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.empty-state-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}


/* --- Alert/Banner --- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.alert-error {
  background: rgba(255, 69, 58, 0.08);
  color: var(--red);
  border: 1px solid rgba(255, 69, 58, 0.15);
}
.alert-success {
  background: rgba(0, 230, 138, 0.08);
  color: var(--green);
  border: 1px solid rgba(0, 230, 138, 0.15);
}
.alert-info {
  background: rgba(10, 132, 255, 0.08);
  color: var(--blue);
  border: 1px solid rgba(10, 132, 255, 0.15);
}


/* --- Data Table (CSV Preview) --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--separator);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table td {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-primary);
  border-bottom: 1px solid var(--separator);
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover {
  background: var(--bg-secondary);
}


/* --- Grid Utilities --- */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Spacing */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }


/* --- Fade In Animation --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.3s var(--ease-standard) both;
}

/* --- Glow Pulse (for accent elements) --- */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px var(--accent-glow); }
  50% { box-shadow: 0 0 24px rgba(0, 230, 138, 0.25); }
}


/* --- Responsive --- */
@media (max-width: 1024px) {
  .main-content {
    padding: var(--space-xl) var(--space-lg);
  }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .mobile-nav {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    padding: var(--space-lg) var(--space-md);
    padding-bottom: 80px;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .text-large-title {
    font-size: 28px;
  }
  .stat-card .stat-value {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .step-line { width: 40px; }
}


/* --- Color Picker Input --- */
.color-input-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--separator-heavy);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.color-swatch input[type="color"] {
  width: 56px;
  height: 56px;
  border: none;
  padding: 0;
  margin: -8px;
  cursor: pointer;
}
.color-hex {
  font-family: var(--font-mono);
  font-size: 13px;
  width: 90px;
}

/* --- Toggle Group (rounded/square selector) --- */
.toggle-group {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--separator);
  overflow: hidden;
}
.toggle-group-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s var(--ease-standard);
  border: none;
  background: none;
}
.toggle-group-btn:hover {
  color: var(--text-primary);
}
.toggle-group-btn.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

/* --- Settings Layout --- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-2xl);
  align-items: start;
}
@media (max-width: 1024px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Section Header --- */
.section-header {
  margin-bottom: var(--space-lg);
}
.section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Logo Upload --- */
.logo-upload {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 2px dashed var(--separator-heavy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.logo-upload:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.logo-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-upload svg {
  width: 24px;
  height: 24px;
  color: var(--text-tertiary);
}

/* --- Watch Page Preview Mock --- */
.watch-preview {
  background: var(--bg-primary);
  border: 1px solid var(--separator);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: var(--space-lg);
}
.watch-preview-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 500px;
}
.watch-preview-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #222;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 13px;
}
.watch-preview-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.watch-preview-subtitle {
  font-size: 13px;
  margin-bottom: 20px;
}
.watch-preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: default;
  margin-bottom: 8px;
}
.watch-preview-cta2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--separator-heavy);
  margin-top: var(--space-sm);
}
.watch-preview-calendar {
  width: 100%;
  height: 80px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 13px;
}
.watch-preview-branding {
  margin-top: auto;
  padding-top: 20px;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* --- 3-dot Menu --- */
.menu-dots {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: all 0.15s;
  position: relative;
}
.menu-dots:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--separator-heavy);
  border-radius: var(--radius-md);
  padding: var(--space-xs) 0;
  min-width: 160px;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: none;
}
.menu-dropdown.open {
  display: block;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-md);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s;
}
.menu-item:hover {
  background: var(--bg-tertiary);
}
.menu-item-danger {
  color: var(--red);
}
.menu-item-danger:hover {
  background: rgba(255, 69, 58, 0.1);
}

/* --- Spreadsheet Grid --- */
.spreadsheet {
  width: 100%;
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.spreadsheet-header {
  display: grid;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--separator);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spreadsheet-header > div {
  padding: 8px 12px;
  border-right: 1px solid var(--separator);
}
.spreadsheet-header > div:last-child {
  border-right: none;
}
.spreadsheet-row {
  display: grid;
  border-bottom: 1px solid var(--separator);
}
.spreadsheet-row:last-child {
  border-bottom: none;
}
.spreadsheet-cell {
  padding: 0;
  border-right: 1px solid var(--separator);
}
.spreadsheet-cell:last-child {
  border-right: none;
}
.spreadsheet-cell input {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
}
.spreadsheet-cell input:focus {
  background: var(--accent-subtle);
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.spreadsheet-add-row {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  text-align: center;
}
.spreadsheet-add-row:hover {
  background: var(--accent-subtle);
}

/* --- Tab Toggle (Upload/Record/Library) --- */
.tab-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.tab-toggle-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s var(--ease-standard);
  border: none;
  background: none;
}
.tab-toggle-btn:hover {
  color: var(--text-primary);
}
.tab-toggle-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* --- Copy Link Button --- */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--separator);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
}
