:root {
  /* Colorful but professional palette */
  --bg: #f8fafc; /* Cool gray-50 */
  --surface: #ffffff;
  --border: #e2e8f0;
  
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  
  /* Modern Gradient Accents */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-surface: linear-gradient(to bottom, #ffffff, #f8fafc);
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: #eff6ff;
  
  --success: #10b981;
  --success-bg: #f0fdf4;
  --success-text: #15803d;
  
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --warning-text: #b45309;
  
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #b91c1c;
  
  --neutral-bg: #f1f5f9;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.03);
  
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; outline: none; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 40%);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.floating-refresh-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  color: var(--primary);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.floating-refresh-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 24px 32px -12px rgba(37, 99, 235, 0.25);
}

.floating-refresh-btn:active {
  transform: translateY(0px) scale(0.98);
}

@media (max-width: 1024px) {
  /* 移动端 sidebar 会变成顶部，给悬浮按钮留更大底部间距避免挡住日志滚动条 */
  .floating-refresh-btn {
    right: 14px;
    bottom: 14px;
  }
}

.app {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* Page Layout (Quick Nav + Main) */
.page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.page-main {
  min-width: 0;
}

.scroll-anchor {
  scroll-margin-top: 96px;
}

/* Quick Nav: sticky on desktop, top tabs on mobile */
.quick-nav {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quick-nav-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.quick-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.quick-nav-link:hover {
  background: var(--neutral-bg);
  color: var(--text);
}

.quick-nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.22);
}

/* Module Card (for crawler section) */
.module-card {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.module-card-header {
  margin-bottom: 18px;
}

.module-card-header h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.module-card-header p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  padding: 24px 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

/* Subtle colored line at top of header */
.header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #10b981);
}

.brand-logo {
  display: flex;
  flex-direction: column;
}

.title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.site-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
}

.subtitle {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* Panel & Controls */
.control-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.report-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.report-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.report-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.field .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input,
.select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--neutral-bg);
  font-size: 13px;
  color: var(--text);
}

.input:hover,
.select:hover {
  border-color: #cbd5e1;
}

.report-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.report-list {
  grid-column: 1 / -1;
  border-top: 1px solid var(--neutral-bg);
  padding-top: 16px;
}

.report-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.report-list-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.report-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
}

.select-sm,
.input-sm {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.input-sm {
  width: 140px;
}

.muted {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.report-list-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.report-item .meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.report-item .meta .name {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}

.report-item .meta .sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.report-item .actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Workflow Steps */
.workflow-section {
  margin-bottom: 32px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
}

.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 24px;
  font-weight: 300;
}

.step-card {
  background: linear-gradient(to bottom right, #ffffff, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1), 0 4px 6px -2px rgba(59, 130, 246, 0.05);
  border-color: var(--primary);
}

/* Step Number Background Effect */
.step-card::before {
  content: attr(data-step);
  position: absolute;
  top: -20px;
  right: -10px;
  font-size: 120px;
  font-weight: 900;
  color: var(--neutral-bg);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
  font-family: var(--font-sans);
  line-height: 1;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.step-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.step-content {
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  min-height: 36px; /* Align heights */
}

.step-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.step-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input-xs {
  width: 60px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.btn-full {
  width: 100%;
}

/* Optimized Report Filter */
.report-list-header {
  background: var(--neutral-bg);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.report-filter {
  background: white;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.report-filter .select-sm,
.report-filter .input-sm {
  border: none;
  background: transparent;
  box-shadow: none;
  height: 28px;
}
.report-filter .select-sm:hover,
.report-filter .input-sm:hover {
  background: var(--neutral-bg);
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* Mobile Responsive */
@media (max-width: 1100px) {
  .workflow-steps {
    grid-template-columns: 1fr 1fr;
  }
  .step-arrow { display: none; }
}
@media (max-width: 640px) {
  .workflow-steps {
    grid-template-columns: 1fr;
  }
}


/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  border: none;
}
.btn-primary:hover { 
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); 
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { 
  background: #f0f9ff; 
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { 
  background: rgba(0,0,0,0.03); 
  color: var(--text); 
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Inputs */
.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.input-group:focus-within { border-color: var(--primary); ring: 2px solid var(--primary-light); }
.input-group span { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.input-group input {
  background: transparent;
  border: none;
  width: 42px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  font-size: 14px;
  padding: 4px 0;
}

.input-group-date input {
  width: 140px;
  text-align: left;
  color: var(--text);
  font-weight: 600;
}

/* Specific styling for Get Token button to make it more visible */
#captureTokenBtn {
  background-color: #f0f9ff;
  color: #0284c7;
  border: 1px solid #e0f2fe;
}
#captureTokenBtn:hover {
  background-color: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

/* Layout Content */
.main-content {
  display: grid;
  grid-template-columns: 1fr 340px; /* Slightly wider sidebar */
  gap: 32px;
}

/* Brand Grid */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.brand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Top accent border for cards */
.brand-card::after {
  content: "";
  position: absolute;
  top: -1px; left: 20px; right: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.brand-card:hover::after { opacity: 1; }

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(59, 130, 246, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.03);
  border-color: rgba(59, 130, 246, 0.2);
}

.brand-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  line-height: 1.3;
}
.brand-key {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  margin-top: 4px;
  background: var(--neutral-bg);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.status-badge.good { background: #dcfce7; color: #166534; border: none; }
.status-badge.warn { background: #fef3c7; color: #92400e; border: none; }
.status-badge.bad { background: #fee2e2; color: #991b1b; border: none; }
.status-badge.neutral { background: var(--neutral-bg); color: var(--text-secondary); border: none; }

.brand-notes {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1; /* Push footer down */
}

.brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--neutral-bg);
  padding-top: 16px;
  margin-top: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}
.checkbox-label:hover { color: var(--primary); }

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.brand-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-card-clickable {
  cursor: pointer;
}

.brand-card-clickable:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

/* CSV Preview Modal */
.pp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pp-modal {
  width: min(1100px, 100%);
  max-height: min(78vh, 900px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pp-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--neutral-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pp-modal-title {
  font-weight: 900;
  font-size: 14px;
}

.pp-modal-close {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.pp-modal-close:hover {
  color: var(--text);
  border-color: rgba(37, 99, 235, 0.3);
}

.pp-modal-controls {
  padding: 12px 18px 0 18px;
}

.pp-control-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pp-control-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 800;
  flex-shrink: 0;
}

.pp-modal-meta {
  padding: 8px 18px 0 18px;
  font-size: 12px;
  color: var(--text-secondary);
}

.pp-modal-body {
  padding: 12px 18px 18px 18px;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pp-table-wrap {
  overflow: auto;
  border: 1px solid var(--neutral-bg);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.pp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pp-table th,
.pp-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 10px 10px;
  white-space: nowrap;
  text-align: left;
}

.pp-table thead th {
  position: sticky;
  top: 0;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(6px);
  z-index: 1;
  font-weight: 900;
}

.pp-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

/* Sidebar (Status & Logs) */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--neutral-bg);
  background: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-body {
  padding: 24px;
}

.run-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--neutral-bg);
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  word-break: break-all;
  border: 1px dashed var(--border);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--neutral-bg);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.summary-item.good { background: var(--success-bg); border-color: rgba(16, 185, 129, 0.2); }
.summary-item.bad { background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.2); }

.summary-val { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.summary-label { font-size: 12px; color: var(--text-secondary); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.summary-item.good .summary-val { color: var(--success-text); }
.summary-item.bad .summary-val { color: var(--danger-text); }

/* Logs */
.log-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.log-select {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  background: var(--neutral-bg);
  color: var(--text);
  cursor: pointer;
}
.log-select:hover { border-color: #cbd5e1; }

.log-viewer {
  background: #f8fafc;
  color: #475569;
  padding: 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  border: 1px solid #e2e8f0;
}

/* Footer */
.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  padding-bottom: 20px;
}
.footer code {
  background: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
}

@media (max-width: 1024px) {
  .control-panel { grid-template-columns: 1fr; gap: 20px; }
  .report-panel { grid-template-columns: 1fr; gap: 20px; }
  .report-form { grid-template-columns: 1fr; }
  .actions-group { justify-content: flex-start; }
  .main-content { grid-template-columns: 1fr; }
  .sidebar { order: -1; } /* On mobile, show status first? maybe not */

  .page-layout { grid-template-columns: 1fr; }
  .quick-nav {
    top: 12px;
    z-index: 40;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 999px;
  }
  .quick-nav-title { display: none; }
  .quick-nav-link {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
  }
  .scroll-anchor {
    scroll-margin-top: 110px;
  }
}
