/* ============================================================
   FB BULK SCHEDULER — Dark Industrial Dashboard
   Font: JetBrains Mono (labels/code) + Syne (headings/UI)
   Colors: #080b10 bg, #0e1117 card, #00d4ff accent
   ============================================================ */

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

:root {
  --bg:          #080b10;
  --bg2:         #0e1117;
  --bg3:         #141921;
  --border:      rgba(255,255,255,0.07);
  --border-acc:  rgba(0,212,255,0.25);
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --accent:      #00d4ff;
  --accent-dim:  rgba(0,212,255,0.12);
  --accent-glow: 0 0 20px rgba(0,212,255,0.15);
  --green:       #22c55e;
  --yellow:      #f59e0b;
  --red:         #ef4444;
  --sidebar-w:   240px;
  --radius:      10px;
  --radius-sm:   6px;
  --font-ui:     'Syne', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── SIDEBAR ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 34px; height: 34px;
  background: var(--accent-dim);
  border: 1px solid var(--border-acc);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-acc);
}

.nav-item svg { flex-shrink: 0; }

.sidebar-queue-status {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.qs-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s;
}
.qs-dot.active { background: var(--accent); box-shadow: 0 0 6px var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.qs-dot.partial { background: var(--yellow); }

/* ── MOBILE HEADER ──────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-menu-btn {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; padding: 4px;
}
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 1px; }

.mobile-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex: 1;
}

.mobile-queue-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 150;
  backdrop-filter: blur(2px);
}

/* ── MAIN CONTENT ───────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px 28px;
  max-width: 960px;
  width: 100%;
}

/* ── SECTIONS ───────────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

.section-header { margin-bottom: 24px; }
.section-title {
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
}
.section-sub { color: var(--text-muted); font-size: 13px; }
.header-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }

/* ── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.card-head h2 {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
}

.step-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border-acc);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* ── PAGES CHECKLIST ────────────────────────────────── */
.pages-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.page-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s;
  user-select: none;
}
.page-check-item:hover { border-color: var(--border-acc); }
.page-check-item.selected { border-color: var(--accent); background: var(--accent-dim); }

.page-check-item input[type="checkbox"] { display: none; }

.page-check-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #1877f2;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.page-check-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.page-check-name {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-check-tick {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.page-check-item.selected .page-check-tick {
  background: var(--accent);
  border-color: var(--accent);
}
.page-check-item.selected .page-check-tick::after {
  content: '';
  display: block;
  width: 5px; height: 3px;
  border-left: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(-45deg) translateY(-1px);
}

.page-select-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.selected-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-left: auto;
}

/* ── DROP ZONE ──────────────────────────────────────── */
.drop-zone {
  border: 1.5px dashed rgba(0,212,255,0.3);
  border-radius: var(--radius);
  background: rgba(0,212,255,0.03);
  padding: 40px 20px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: var(--accent-glow);
}
.drop-icon { margin-bottom: 12px; }
.drop-label { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.drop-sub { color: var(--text-muted); font-size: 12px; margin-bottom: 16px; }

/* ── FILE LIST ──────────────────────────────────────── */
.file-list-wrap { margin-top: 16px; }
.file-list-header {
  display: grid;
  grid-template-columns: 1fr 80px 1fr 40px;
  gap: 8px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.file-list { max-height: 320px; overflow-y: auto; }

.file-item {
  display: grid;
  grid-template-columns: 1fr 80px 1fr 40px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.file-item:hover { background: var(--bg3); }

.file-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.file-title-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s;
}
.file-title-input:focus { outline: none; border-color: var(--accent); }
.file-title-input::placeholder { color: var(--text-muted); }

.file-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.file-remove:hover { color: var(--red); }

/* ── FORM ELEMENTS ──────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.form-hint { font-weight: 400; color: var(--text-muted); }

.form-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.1); }
.form-input::placeholder { color: var(--text-muted); }
.form-input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.5); cursor: pointer; }
.form-input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(0.5); cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}
.form-select:focus { outline: none; border-color: var(--accent); }
.mono { font-family: var(--font-mono); font-size: 12px; }

/* ── SCHEDULE PREVIEW ───────────────────────────────── */
.schedule-preview {
  margin-top: 20px;
  border: 1px solid var(--border-acc);
  border-radius: var(--radius);
  background: rgba(0,212,255,0.04);
  overflow: hidden;
}
.preview-header {
  padding: 10px 14px;
  background: rgba(0,212,255,0.07);
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid var(--border-acc);
}
.preview-list { max-height: 180px; overflow-y: auto; }
.preview-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.preview-item:last-child { border-bottom: none; }
.preview-day {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  min-width: 50px;
}
.preview-file {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preview-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
}

/* ── SUBMIT CARD ────────────────────────────────────── */
.card-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg2);
  border-color: var(--border);
}
.submit-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.info-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.info-pill-accent { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.info-sep { color: var(--text-muted); font-size: 16px; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary:hover:not(:disabled) { background: #22e3ff; box-shadow: 0 0 16px rgba(0,212,255,0.3); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary.btn-lg { padding: 12px 28px; font-size: 14px; }
.btn-primary.btn-sm { padding: 6px 14px; font-size: 12px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.btn-sm { padding: 5px 10px; font-size: 11px; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-danger:hover { background: rgba(239,68,68,0.1); border-color: var(--red); }

.upload-label {
  display: inline-flex;
  cursor: pointer;
}

/* ── BADGES ─────────────────────────────────────────── */
.badge-neutral {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

/* ── PROGRESS OVERLAY ───────────────────────────────── */
.progress-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,11,16,0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress-modal {
  background: var(--bg2);
  border: 1px solid var(--border-acc);
  border-radius: 14px;
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 0 60px rgba(0,212,255,0.1);
}
.progress-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 700;
}
.progress-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.progress-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg3);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00d4ff, #0099ff);
  border-radius: 4px;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(0,212,255,0.5);
}
.progress-pct {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  min-width: 36px;
}
.progress-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.progress-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* ── LOGS TABLE ─────────────────────────────────────── */
.logs-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  min-width: 80px;
}
.stat-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}
.stat-key {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 2px;
}
.stat-green { color: var(--green); }
.stat-yellow { color: var(--yellow); }
.stat-red { color: var(--red); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px !important;
  font-size: 13px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-pending  { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.status-uploading{ background: rgba(0,212,255,0.1); color: var(--accent); border: 1px solid rgba(0,212,255,0.3); }
.status-scheduled{ background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.status-failed   { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.status-expired  { background: rgba(245,158,11,0.1); color: var(--yellow); border: 1px solid rgba(245,158,11,0.3); }
.status-deleted  { background: rgba(100,116,139,0.1); color: #64748b; border: 1px solid rgba(100,116,139,0.2); }

.td-mono { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 16px 0;
}

/* ── CONNECTED PAGES GRID ───────────────────────────── */
.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.page-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.page-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #1877f2;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.page-avatar img { width: 100%; height: 100%; object-fit: cover; }
.page-card-info { flex: 1; }
.page-card-name { font-size: 13px; font-weight: 700; }
.page-card-cat { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.page-card-id { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }
.page-card-actions { display: flex; justify-content: flex-end; }

/* ── CONNECT CARD ───────────────────────────────────── */
.connect-card { margin-bottom: 16px; }
.connect-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.cstep { display: flex; gap: 14px; align-items: flex-start; }
.cstep-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-acc);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cstep-body strong { font-size: 13px; font-weight: 700; display: block; margin-bottom: 3px; }
.cstep-body p { font-size: 12px; color: var(--text-muted); }
.ext-link { color: var(--accent); text-decoration: none; }
.ext-link:hover { text-decoration: underline; }
code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg3);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--yellow);
}

.connect-actions { display: flex; gap: 10px; margin-top: 16px; }
.connect-result {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.connect-result.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green); }
.connect-result.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--red); }

.system-user-card { border-color: rgba(245,158,11,0.25); }
.system-user-card .card-head { margin-bottom: 10px; }
.system-user-card .card-head h2 { font-size: 14px; color: var(--yellow); }
.card-body-text { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 12px; }
.steps-list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps-list li { font-size: 12px; color: var(--text-muted); }

/* ── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

/* ── TOASTS ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  max-width: 320px;
  font-size: 13px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  pointer-events: all;
  animation: slideIn 0.25s ease;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.toast.warning { border-left-color: var(--yellow); }

/* ── ANIMATIONS ─────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.5);
  }
  .sidebar-overlay.open { display: block; }
  .mobile-header { display: flex; }
  .main { margin-left: 0; padding: 74px 14px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .card-submit { flex-direction: column; align-items: stretch; }
  .btn-primary.btn-lg { justify-content: center; width: 100%; }
  .file-list-header, .file-item {
    grid-template-columns: 1fr 60px 1fr 32px;
  }
  .section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .pages-grid { grid-template-columns: 1fr; }
  .logs-stats { gap: 8px; }
  .stat-pill { padding: 8px 14px; min-width: 60px; }
  .file-list-header, .file-item {
    grid-template-columns: 1fr 50px 30px;
  }
  .file-list-header span:nth-child(3),
  .file-item > :nth-child(3) { display: none; }
}
