:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --surface-2: #243040;
  --border: #334155;
  --text: #e8eef6;
  --muted: #94a3b8;
  --accent: #3d9cf0;
  --accent-soft: rgba(61, 156, 240, 0.15);
  --danger: #f87171;
  --new: #64748b;
  --progress: #f59e0b;
  --done: #34d399;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #1e3a5f 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #16324a 0%, transparent 45%),
    var(--bg);
}

.page {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-word;
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr 0.9fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

input[type="date"] {
  color-scheme: dark;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input,
select {
  appearance: none;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: normal;
}

input:focus,
select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.count {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.error {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: #fecaca;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.tickets-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.tickets-table th,
.tickets-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.tickets-table th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}

.tickets-table tbody tr:last-child td {
  border-bottom: none;
}

.tickets-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.key {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.key:hover {
  text-decoration: underline;
}

.summary {
  max-width: 320px;
  line-height: 1.35;
}

.date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}

.chip.status-new {
  color: #cbd5e1;
  background: color-mix(in srgb, var(--new) 25%, transparent);
}

.chip.status-indeterminate {
  color: #fde68a;
  background: color-mix(in srgb, var(--progress) 22%, transparent);
}

.chip.status-done {
  color: #a7f3d0;
  background: color-mix(in srgb, var(--done) 22%, transparent);
}

.chip.is-bug {
  color: #fecaca;
  background: color-mix(in srgb, var(--danger) 22%, transparent);
}

.empty {
  padding: 2.5rem 1rem !important;
  text-align: center;
  color: var(--muted);
}

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

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