:root {
  font-size: 125%;
  --background: #09090b;
  --card: #0a0a0a;
  --muted: #27272a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --foreground: #fafafa;
  --foreground-muted: #a1a1aa;
  --foreground-faint: #71717a;
  --destructive: #ef4444;
  --destructive-muted: #7f1d1d;
  --destructive-border: #991b1b;
  --active-dot: #22c55e;
  --radius: 0.5rem;
  --max-width: 30rem;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto,
    Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Top row */
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.github-link {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.github-link:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  background: var(--muted);
}

.github-link:focus-visible {
  outline: 2px solid var(--foreground-faint);
  outline-offset: 2px;
}

.github-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* Header */
header {
  padding: 0.5rem 0;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Date badge */
.date-badge {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--foreground-muted);
  background: var(--muted);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  width: fit-content;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Hero */
.hero-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-date {
  font-size: 0.875rem;
  color: var(--foreground-muted);
  margin-top: 0.25rem;
}

/* Previous duty card */
.prev-duty-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.prev-duty-card .label {
  margin-bottom: 0;
}

.prev-duty-name {
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Schedule table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.schedule-table th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--foreground-faint);
  font-weight: 500;
  text-align: left;
  padding: 0 0 0.5rem;
}

.schedule-table th:last-child {
  text-align: right;
}

.schedule-table td {
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.625rem 0;
  border-top: 1px solid var(--border);
}

.schedule-table td:last-child {
  text-align: right;
  color: var(--foreground-muted);
  font-variant-numeric: tabular-nums;
}

/* Rotation list */
.rotation-list {
  list-style: none;
  margin-top: 0.5rem;
}

.rotation-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--foreground-muted);
  border-top: 1px solid var(--border);
}

.rotation-list li:first-child {
  border-top: none;
}

.rotation-list li .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
}

.rotation-list li.is-current {
  color: var(--foreground);
  font-weight: 600;
}

.rotation-list li.is-current .dot {
  background: var(--active-dot);
}

/* Penalty banner */
.penalty-banner {
  background: var(--destructive-muted);
  border: 1px solid var(--destructive-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--destructive);
  line-height: 1.4;
}

/* Report section */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.report-header .label {
  margin-bottom: 0;
}

.chevron {
  font-size: 0.75rem;
  color: var(--foreground-faint);
  transition: transform 0.2s ease;
}

.chevron.open {
  transform: rotate(180deg);
}

.report-body {
  margin-top: 1rem;
}

.report-description {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.pin-row {
  display: flex;
  gap: 0.5rem;
}

.pin-input {
  flex: 1;
  background: var(--background);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--foreground);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.15s;
}

.pin-input:focus {
  border-color: var(--foreground-faint);
}

.pin-input::placeholder {
  color: var(--foreground-faint);
}

.btn-destructive {
  background: var(--destructive);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  font-family: var(--font-sans);
}

.btn-destructive:hover {
  opacity: 0.9;
}

.btn-destructive:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.report-response {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--foreground-muted);
}

.report-response.error {
  color: var(--destructive);
}

.report-response.success {
  color: var(--active-dot);
}
