:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface-2: #243044;
  --text: #e8edf4;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-2: #22c55e;
  --danger: #ef4444;
  --border: #2d3a4f;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card h2,
.card h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.metric {
  font-size: 1.8rem;
  font-weight: 700;
}

.section {
  margin-bottom: 32px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

th,
td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
}

.badge.ok {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-2);
}

.badge.warn {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.alert {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 12px;
  align-items: center;
  font-size: 0.9rem;
}

.bar-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.day-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
}

.day-card .date {
  font-weight: 600;
}

.day-card .price {
  color: var(--accent-2);
}

.day-card.unavailable {
  opacity: 0.55;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.login-card h1 {
  margin: 0 0 8px;
}

.slack-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  background: #4a154b;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.slack-button:hover {
  background: #611f69;
  text-decoration: none;
}

.alert-warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.nav-tabs a {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-tabs a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.nav-tabs a.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.link-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
}

.link-card p {
  margin: 0 0 16px;
  font-size: 0.88rem;
}

.section-intro {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.setup-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.table-note {
  margin-top: 8px;
  font-size: 0.85rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.filter-bar input[type="date"] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.section-tab {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.section-tab.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

.tab-panel {
  display: none;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table-wrap table {
  border: none;
  border-radius: 0;
  min-width: 100%;
}

.row-details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.82rem;
}

.detail-pre {
  margin: 8px 0 0;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  max-width: 480px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
