:root {
  color-scheme: light;
  --bg: #f3f6f4;
  --panel: #ffffff;
  --text: #1a2b24;
  --muted: #5b6b63;
  --line: #d7e0db;
  --primary: #0f6e56;
  --primary-dark: #0b5341;
  --shadow: 0 16px 36px rgba(15, 40, 30, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(18, 183, 106, 0.14), transparent 30%),
    linear-gradient(180deg, #f7fbf8 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.hero h1 {
  margin: 8px 0 10px;
  font-size: 2rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 24px;
  padding: 20px;
}

label > span,
.filter-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.multi-select {
  position: relative;
}

.multi-select-toggle {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

.multi-select-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
}

.multi-select-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.multi-select-actions button {
  border: 0;
  background: #eef5f1;
  color: var(--primary-dark);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
}

.multi-select-option {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 4px;
  cursor: pointer;
}

.multi-select-empty {
  color: var(--muted);
  padding: 8px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 16px;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  cursor: pointer;
  color: var(--muted);
}

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.status {
  color: var(--muted);
  margin: 0 0 16px;
}

.table-card {
  padding: 18px 18px 8px;
  margin-bottom: 18px;
}

.table-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.table-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.detail-table {
  min-width: 920px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

tfoot td {
  font-weight: 700;
  border-bottom: 0;
  background: #f4f8f6;
}

.detail-table a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.detail-table a:hover {
  text-decoration: underline;
}

.deal-empty {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.empty-row td {
  color: var(--muted);
  text-align: center;
}

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

  .filter-actions {
    width: 100%;
  }

  .filter-actions .btn {
    flex: 1;
  }
}
