/* DocketSignal — single stylesheet. System fonts, no images. */

:root {
  --navy: #0e1b2c;
  --navy-soft: #1a2c44;
  --paper: #f4f6f9;
  --white: #ffffff;
  --ink: #16222f;
  --muted: #5c6b7a;
  --border: #d8dfe7;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --amber-bg: #fef3c7;
  --amber-ink: #92400e;
  --green-bg: #d1fae5;
  --green-ink: #065f46;
  --red-bg: #fee2e2;
  --red-ink: #991b1b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(14, 27, 44, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(64rem, 100% - 2rem);
  margin-inline: auto;
}

/* Header / nav */

.site-header {
  background: var(--navy);
  color: var(--white);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.logo {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--white);
  opacity: 0.9;
}

/* Cards */

main.container {
  padding: 2rem 0 4rem;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.hero h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--navy);
}

.hero .sub {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  color: var(--muted);
}

h1,
h2 {
  color: var(--navy);
}

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

.empty-state {
  color: var(--muted);
  font-style: italic;
  padding: 1rem 0;
}

.message-card h1,
.message-card h2 {
  margin-top: 0;
}

/* Buttons and forms */

.btn {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--ink);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.btn-small {
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--white);
  color: var(--ink);
}

.search-form,
.add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-form input {
  flex: 1 1 16rem;
}

.add-form input {
  flex: 1 1 12rem;
}

.stack-form {
  display: grid;
  gap: 0.5rem;
}

.stack-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-error {
  background: var(--red-bg);
  color: var(--red-ink);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.inline-form {
  display: inline;
}

/* Watch list */

.watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.watch-list:has(.watch-row) .empty-state {
  display: none;
}

.watch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.5rem;
}

.watch-query {
  font-weight: 700;
  font-size: 1.05rem;
}

.watch-main p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

/* Timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.5rem;
}

.timeline-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  padding-top: 0.15rem;
}

.timeline-body p {
  margin: 0 0 0.4rem;
}

.case-name {
  font-weight: 700;
  color: var(--navy);
}

.entry-text {
  white-space: pre-wrap;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.timeline-header h1 {
  margin: 0 0 0.5rem;
}

/* Badges */

.badge {
  display: inline-block;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pending {
  background: var(--amber-bg);
  color: var(--amber-ink);
}

.badge-done {
  background: var(--green-bg);
  color: var(--green-ink);
}

.badge-failed {
  background: var(--red-bg);
  color: var(--red-ink);
}

.pull-error {
  color: var(--red-ink);
  font-size: 0.85rem;
}

/* Tables and billing */

.pricing-table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.pricing-table th,
.pricing-table td,
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.pricing-table th,
.data-table th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.billing-summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.25rem;
}

.billing-summary dt {
  font-weight: 700;
  color: var(--navy);
}

.billing-summary dd {
  margin: 0;
}

progress {
  width: 12rem;
  height: 0.75rem;
  vertical-align: middle;
  accent-color: var(--accent);
}

/* SEO pages */

.case-card h2 {
  margin: 0 0 0.35rem;
}

.entry-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.entry-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.entry-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

/* Responsive: single column under 720px */

@media (max-width: 720px) {
  .timeline-row,
  .entry-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .watch-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .billing-summary {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .billing-summary dt {
    margin-top: 0.65rem;
  }

  .nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .pricing-table th:nth-child(3),
  .pricing-table td:nth-child(3) {
    display: block;
  }
}
