/* TerrierFit - lightweight design system (red brand) */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;

  --bg0: #0b0a0a;
  --bg1: #120b0c;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-strong: rgba(255, 255, 255, 0.97);
  --ink: #12090b;
  --muted: rgba(18, 9, 11, 0.62);
  --line: rgba(18, 9, 11, 0.12);

  --brand: #e11d48; /* rose-600 */
  --brand2: #fb7185; /* rose-400 */
  --brand-ink: #fff;

  --ok: #16a34a;
  --warn: #f59e0b;
  --bad: #dc2626;

  --r8: 8px;
  --r12: 12px;
  --r16: 16px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  --shadow2: 0 10px 24px rgba(0, 0, 0, 0.12);
  --container: 1080px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(225, 29, 72, 0.22), transparent 55%),
    radial-gradient(900px 520px at 90% 25%, rgba(251, 113, 133, 0.20), transparent 55%),
    radial-gradient(760px 520px at 55% 95%, rgba(225, 29, 72, 0.12), transparent 60%),
    linear-gradient(180deg, #0f0a0b 0%, #130b0d 50%, #0b0a0a 100%);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }

.shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(18, 10, 11, 0.92), rgba(18, 10, 11, 0.70));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  outline: 1px solid rgba(255, 255, 255, 0.10);
}
.brand-name {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
  margin: 0;
}
.brand-tag {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.nav {
  display: flex;
  flex: 1;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.nav a {
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1px;
}
.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.userbox {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 240px;
}
.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, var(--brand) 0%, #ff2e55 32%, #ff5b6d 100%);
  color: var(--brand-ink);
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 16px 34px rgba(225, 29, 72, 0.26);
  transition: transform 120ms ease, filter 120ms ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn:active { transform: translateY(0px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.10); }

main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 18px 44px;
}

.page-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.title {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Fraunces", ui-serif, Georgia, serif;
  letter-spacing: 0.2px;
  font-size: 34px;
  line-height: 1.1;
}
.subtitle {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.panel {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: var(--shadow2);
  overflow: hidden;
}
.panel-inner { padding: 16px; }

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.stat {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
}
.stat .k { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
.stat .v { margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.2px; }
.stat .h { margin-top: 4px; color: var(--muted); font-size: 13px; }

.card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: var(--shadow2);
  padding: 16px;
}

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

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

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
}
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(18, 9, 11, 0.08);
  font-size: 14px;
}
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(18, 9, 11, 0.62); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(225, 29, 72, 0.05); }

form p { margin: 0 0 12px; }
label {
  display: block;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(18, 9, 11, 0.68);
  margin: 0 0 6px;
}
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(18, 9, 11, 0.16);
  background: rgba(255, 255, 255, 0.98);
  font: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(225, 29, 72, 0.55);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15);
}

button {
  all: unset;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.toast {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow2);
}
.toast ul { margin: 0; padding-left: 18px; }
.toast li { margin: 0; }

footer {
  padding: 24px 18px;
  color: rgba(255, 255, 255, 0.48);
  text-align: center;
  font-size: 12px;
}

/* Mobile */
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; justify-content: space-between; }
  .brand { min-width: auto; }
  .nav { order: 3; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .userbox { min-width: auto; }
  .title { font-size: 28px; }
  .span-4, .span-6, .span-8 { grid-column: span 12; }
}

@media (prefers-reduced-motion: reduce) {
  .nav a, .btn { transition: none; }
}

