.hero {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: reveal-in 180ms ease-out forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero h1 {
  font-family: var(--font-hero);
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 18px;
}

.data-panel {
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: var(--space-4);
  box-shadow: var(--shadow-panel);
}

.panel-search {
  margin-bottom: var(--space-2);
}

.search {
  position: relative;
  display: block;
}

.search input {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-input);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  padding: 0 72px 0 40px;
  font-size: 13px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.search input::placeholder {
  color: var(--text-muted);
}

.search input:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: inline-flex;
}

.search-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  transition: opacity 140ms ease;
}

.search input:not(:placeholder-shown) ~ .search-hint {
  opacity: 0;
}

.panel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: var(--space-4);
}

.panel-filters[hidden] {
  display: none;
}

.data-panel.is-filtered .panel-filters {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-3);
  margin-left: calc(var(--space-3) * -1);
  margin-right: calc(var(--space-3) * -1);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-group.has-active .filter-label {
  color: var(--text-secondary);
}

.filter-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.filter-pill {
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.filter-pill:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.filter-pill[aria-pressed="true"] {
  background: rgba(207, 173, 105, 0.12);
  border-color: var(--amber);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(207, 173, 105, 0.55), 0 0 16px rgba(207, 173, 105, 0.35);
}

.filter-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.filter-select,
.filter-input {
  height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 12px;
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.tone-high {
  background: var(--green);
}

.tone-medium {
  background: var(--amber);
}

.tone-low {
  background: var(--gray);
}

.panel-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-3);
  justify-content: space-between;
}

.filter-actions.is-active .filter-status {
  color: var(--text-secondary);
}

.filter-actions__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.filter-clear {
  height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.filter-clear:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

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

.filter-toggle {
  height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.filter-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.panel-filters--more {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface-1);
}

.table-wrap {
  border: 1px solid var(--divider);
  border-radius: 12px;
  overflow: auto;
  max-height: 520px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 980px;
  table-layout: fixed;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-1);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-align: left;
  padding: 14px;
  height: 44px;
  border-bottom: 1px solid var(--divider);
  z-index: var(--z-sticky);
}

.data-table th.is-active {
  color: var(--text);
}

.sort-button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-transform: inherit;
}

.sort-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.sort-icon {
  display: inline-flex;
  color: var(--text-muted);
}

th.is-active .sort-icon {
  color: var(--text-secondary);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--divider);
  vertical-align: middle;
}

.data-table tbody tr {
  background: transparent;
  height: 56px;
  transition: background-color 140ms ease;
}

:root[data-theme="light"] .data-table thead th {
  background: #e1d4bf;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}

:root[data-theme="light"] .data-table td {
  border-bottom: 1px solid var(--border-strong);
}

:root[data-theme="light"] .data-table tbody tr:nth-child(even) {
  background: #f2e8d9;
}

:root[data-theme="light"] .data-table tbody tr:hover {
  background: #e6dac7;
}

:root[data-theme="light"] .col-event {
  border-right: 1px solid var(--border-strong);
}

:root[data-theme="light"] .sort-icon {
  color: #7a6f62;
}

.data-table tbody tr:hover {
  background: var(--surface-3);
}

.col-event {
  width: 30%;
  border-right: 1px solid var(--divider);
}

.col-location {
  width: 18%;
}

.col-dates {
  width: 14%;
}

.col-region {
  width: 14%;
}

.col-fee {
  width: 12%;
}

.col-action {
  width: 12%;
  text-align: left;
}

.cell-primary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-icon {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.row-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-initials {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.row-icon.is-fallback .row-logo {
  display: none;
}

.row-icon.is-fallback .row-initials {
  opacity: 1;
}

.row-title {
  font-weight: 600;
  color: var(--text);
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

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

.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.badge {
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
}

.badge--high {
  color: var(--green);
  background: var(--green-bg);
  border-color: var(--green-border);
}

.badge--medium {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber-border);
}

.badge--low {
  color: var(--gray);
  background: var(--gray-bg);
  border-color: var(--gray-border);
}

.badge--neutral {
  color: var(--text-secondary);
  background: var(--surface-1);
  border-color: var(--border);
}

.badge--tag {
  background: rgba(255, 255, 255, 0.06);
}

.badge--compact {
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.cell-text--soon {
  color: var(--amber);
}

.cell-text--fee {
  color: var(--green);
}

.account-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dadada;
  font-size: 12px;
}

.account-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-secondary);
}

.account-dot.is-verified {
  border-color: var(--green-border);
  background: var(--green-bg);
  color: var(--green);
}

.account-dot.is-manual {
  border-color: var(--gray-border);
  background: var(--gray-bg);
  color: var(--gray);
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.action-button.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.action-button.is-external {
  border-color: var(--amber-border);
  color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(207, 173, 105, 0.18);
}

.action-button:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.action-button.is-external:hover {
  background: rgba(207, 173, 105, 0.08);
  border-color: var(--amber);
}

.action-button:active {
  background: var(--surface-3);
}

@media (max-width: 900px) {
  .hero h1 {
    font-size: clamp(36px, 6vw, 56px);
  }

  .data-table {
    min-width: 900px;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(32px, 7vw, 44px);
  }

  .hero p {
    font-size: 16px;
  }

  .data-panel {
    padding: 12px;
  }

  .panel-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--space-2);
  }

  .data-panel.is-filtered .panel-filters {
    margin-left: 0;
    margin-right: 0;
  }

  .filter-group {
    flex-wrap: nowrap;
  }

  .panel-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .data-table {
    min-width: 840px;
  }

  .filter-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
