:root {
  --primary: #1A237E;
  --secondary: #283593;
  --accent: #3949AB;
  --accent-light: #7986CB;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --surface: #E8EAF6;
  --surface-hover: #f8fafc;
  --bg: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --orange: #f59e0b;
  --orange-bg: rgba(245, 158, 11, 0.1);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --purple: #8b5cf6;
  --purple-bg: rgba(139, 92, 246, 0.1);
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== APP LAYOUT ===== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.app-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.app-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.app-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* ===== WEBHOOK URL SECTION ===== */
.webhook-url-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.url-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: block;
}

.url-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.url-display {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.url-protocol {
  background: var(--green-bg);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.url-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.copy-btn.copied {
  background: var(--green);
}

.url-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  animation: fadeInUp 0.4s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.stat-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.method-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.method-pill {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ===== PAYLOADS SECTION ===== */
.payloads-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.payloads-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.filters {
  display: flex;
  gap: 8px;
}

.search-input {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 200px;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.method-select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.method-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== PAYLOAD CARDS ===== */
.payload-list {
  padding: 8px;
}

.payload-card {
  padding: 16px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
  animation: fadeInUp 0.35s ease both;
}

.payload-card:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.payload-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.method-post { background: var(--green-bg); color: var(--green); }
.method-get { background: var(--blue-bg); color: var(--blue); }
.method-put { background: var(--orange-bg); color: var(--orange); }
.method-patch { background: var(--purple-bg); color: var(--purple); }
.method-delete { background: var(--red-bg); color: var(--red); }

.payload-path {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payload-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.payload-card-body {
  margin-bottom: 8px;
}

.body-preview {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--border-light);
}

.payload-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content-type {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.view-detail {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}

.payload-card:hover .view-detail {
  opacity: 1;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  padding: 60px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.8;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 20px;
}

.empty-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: inline-block;
  text-align: left;
}

.example-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.example-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  word-break: break-all;
}

/* ===== SKELETON ===== */
.skeleton-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton-card {
  height: 80px;
  background: linear-gradient(90deg, var(--bg) 25%, var(--border-light) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== DETAIL VIEW ===== */
.detail-view {
  animation: fadeInUp 0.3s ease both;
}

.detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.back-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  transition: opacity 0.2s;
}

.back-btn:hover {
  opacity: 0.7;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.detail-path {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}

.detail-timestamp {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===== DETAIL TABS ===== */
.detail-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.detail-tab {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-tab:hover {
  color: var(--text);
  background: var(--bg);
}

.detail-tab.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.tab-icon {
  font-size: 0.85rem;
}

/* ===== DETAIL CONTENT ===== */
.detail-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== JSON VIEW ===== */
.json-view-container {
  overflow: hidden;
}

.json-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}

.json-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.copy-json-btn {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-glow);
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-json-btn:hover {
  background: var(--accent);
  color: white;
}

.copy-json-btn.copied {
  background: var(--green);
  color: white;
}

.json-view {
  padding: 16px 0;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.json-pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
}

.json-line {
  display: flex;
  padding: 0 20px;
  transition: background 0.1s;
}

.json-line:hover {
  background: var(--accent-glow);
}

.line-number {
  color: var(--text-muted);
  font-size: 0.72rem;
  width: 36px;
  flex-shrink: 0;
  text-align: right;
  margin-right: 16px;
  user-select: none;
  opacity: 0.5;
}

.line-content {
  white-space: pre;
}

.json-key {
  color: var(--accent);
}

.json-string {
  color: var(--green);
}

.json-number {
  color: var(--orange);
}

.json-boolean {
  color: var(--purple);
}

.json-null {
  color: var(--red);
  font-style: italic;
}

/* ===== HEADERS TABLE ===== */
.headers-table-container {
  overflow-x: auto;
}

.headers-table {
  width: 100%;
  border-collapse: collapse;
}

.headers-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}

.headers-table td {
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  vertical-align: top;
}

.header-key {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.header-value {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  word-break: break-all;
}

/* ===== META VIEW ===== */
.meta-view {
  padding: 20px 24px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.meta-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-all;
}

.query-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ===== NO DATA ===== */
.no-data {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
}

.no-data-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-header {
    padding: 12px 16px;
  }

  .app-main {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .url-container {
    flex-direction: column;
  }

  .url-display {
    min-width: 0;
  }

  .payloads-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .filters {
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .detail-tabs {
    padding: 4px;
  }

  .detail-tab {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .tab-icon {
    display: none;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 14px;
  }

  .webhook-url-section {
    padding: 16px;
  }

  .payload-card {
    padding: 12px 14px;
  }
}

<!-- WALKTHROUGH_SCRIPT:
[
  {"step": 1, "narration": "Welcome to Webhook Inspector! This is your real-time webhook testing dashboard. At the top you'll see your unique webhook URL.", "view": "user", "highlight_selector": ".webhook-url-section", "wait_for": "tap_to_continue"},
  {"step": 2, "narration": "Click the Copy button to copy your webhook URL to the clipboard. You can then paste it into any external service that supports webhooks.", "view": "user", "highlight_selector": ".copy-btn", "wait_for": "user_interaction"},
  {"step": 3, "narration": "The stats cards show you an overview: total requests received, today's count, when the last request came in, and which HTTP methods have been used.", "view": "user", "highlight_selector": ".stats-grid", "wait_for": "tap_to_continue"},
  {"step": 4, "narration": "When external services POST to your webhook URL, the payloads appear here in real-time. You can search and filter by HTTP method.", "view": "user", "highlight_selector": ".payloads-section", "wait_for": "tap_to_continue"},
  {"step": 5, "narration": "Click on any request to see the full details — the complete request body with syntax-highlighted JSON, all HTTP headers, and metadata like source IP and content type.", "view": "user", "highlight_selector": ".payload-list", "wait_for": "user_interaction"}
]
-->

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dashboard-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(160px, 220px));
  gap: 0.75rem;
  align-items: end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.control-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

.search-input,
.filter-select {
  width: 100%;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-card {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.75;
}

.payload-list-section {
  min-height: 220px;
}

.payload-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payload-item {
  text-align: left;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.payload-item-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.payload-item-title {
  font-weight: 700;
}

.payload-item-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.payload-badge,
.payload-timestamp {
  font-size: 0.75rem;
  opacity: 0.8;
}

.payload-item-preview {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.9;
  max-height: 120px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .dashboard-controls,
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .payload-item-header {
    flex-direction: column;
  }
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-owner-card {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-owner-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.dashboard-owner-name {
  margin-top: 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.dashboard-owner-meta {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

.dashboard-summary {
  display: flex;
  gap: 1rem;
}

.summary-stat {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 160px;
}

.summary-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
}

.summary-stat-label {
  display: block;
  margin-top: 0.25rem;
  opacity: 0.75;
}

.dashboard-history .section-header {
  margin-bottom: 1rem;
}

.dashboard-empty-state {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  opacity: 0.8;
}

.payload-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payload-row {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.payload-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.payload-row-title {
  font-weight: 700;
}

.payload-row-subtitle {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  opacity: 0.75;
}

.export-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

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

.export-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.export-actions {
  display: flex;
  align-items: center;
}

.export-btn {
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.export-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px)) 1fr;
  gap: 12px;
  align-items: end;
}

.filter-select {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.export-summary {
  justify-self: end;
  text-align: right;
}

.export-summary-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.export-summary-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.export-status {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .export-header {
    flex-direction: column;
  }

  .export-controls {
    grid-template-columns: 1fr;
  }

  .export-summary {
    justify-self: start;
    text-align: left;
  }
}

.chart-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

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

.chart-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.chart-controls {
  display: flex;
  align-items: flex-end;
}

.chart-canvas-wrap {
  position: relative;
  min-height: 260px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}

.chart-canvas {
  width: 100%;
  height: 260px;
  display: block;
}

.chart-empty-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  pointer-events: none;
}

@media (max-width: 768px) {
  .chart-header {
    flex-direction: column;
  }
}
