:root {
  --bg: #f6fbf2;
  --panel: rgba(255, 255, 255, 0.9);
  --sidebar: #203810;
  --sidebar-soft: rgba(255, 255, 255, 0.1);
  --ink: #203017;
  --muted: #66775a;
  --line: #d8e6cf;
  --accent: #7abf2f;
  --accent-soft: #eef8df;
  --shadow: 0 24px 60px rgba(57, 94, 21, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(122, 191, 47, 0.12), transparent 16%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.track-auth-body, .track-dashboard-body { min-height: 100vh; }

.password-setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 38, 15, 0.68);
  backdrop-filter: blur(10px);
}

.password-setup-overlay.is-hidden {
  display: none;
}

.password-setup-card {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.track-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.95fr) minmax(320px, 0.85fr);
  gap: 20px;
  padding: 24px;
}

.track-auth-hero,
.track-auth-stack,
.track-sidebar,
.track-column,
.feed-list,
.audit-list,
.mini-list,
.form-grid,
.stack-form {
  display: grid;
  gap: 10px;
}

.track-auth-hero {
  align-content: center;
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(122, 191, 47, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.auth-links,
.header-actions,
.filter-row,
.form-actions,
.sidebar-actions,
.feed-card__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-links a,
.track-nav a,
.sidebar-note,
.filter-pill,
.sidebar-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
}

.auth-links a {
  padding: 10px 14px;
  background: white;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.brand-badge img { width: 100%; height: 100%; object-fit: cover; }
.brand-badge--large { width: 72px; height: 72px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  font-weight: 800;
}

h1, h2, h3, h4 { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  line-height: 1.06;
}

.hero-subtitle,
.inline-status,
.feed-card p,
.mini-card span,
.audit-item span,
.selected-pet-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.track-auth-form label,
.form-grid label,
.stack-form label {
  display: grid;
  gap: 6px;
}

.track-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.track-sidebar {
  padding: 18px 16px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 30%),
    var(--sidebar);
  color: white;
  overflow-y: auto;
  align-content: start;
}

.track-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 2px 10px;
}

.track-brand span:last-child {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.track-nav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 14px;
  background: var(--sidebar-soft);
  border-color: rgba(255, 255, 255, 0.14);
  line-height: 1.1;
  white-space: nowrap;
  font-weight: 700;
}

.track-nav a.active {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.track-nav {
  display: grid;
  gap: 8px;
}

.sidebar-panel,
.panel {
  padding: 16px;
  border-radius: 24px;
  min-height: 0;
}

.sidebar-panel {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-panel--compact {
  gap: 12px;
}

.panel-heading--sidebar {
  align-items: flex-start;
  margin-bottom: 0;
}

.panel-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.track-sidebar .panel-heading h2,
.track-sidebar .feed-card p,
.track-sidebar .feed-card__line,
.track-sidebar .sidebar-note p { color: rgba(255, 255, 255, 0.82); }

.track-sidebar .feed-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.track-sidebar .feed-card.is-selected {
  background: rgba(122, 191, 47, 0.18);
  border-color: rgba(122, 191, 47, 0.62);
}

.sidebar-note {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  background: var(--sidebar-soft);
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-note p { margin: 0; }

.sidebar-note a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.sidebar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
  font-weight: 800;
}

.track-main {
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.track-header,
.panel,
.metric-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.track-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 24px;
}

.track-header h1 {
  font-size: clamp(1.7rem, 2.2vw, 2.5rem);
}

.hero-subtitle--compact {
  max-width: 520px;
  margin: 0;
  font-size: 0.96rem;
}

.session-panel { width: min(100%, 320px); }

.metrics-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  padding: 10px 14px;
  border-radius: 20px;
}

.metric-card strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
}

.metric-card span { color: var(--muted); }

.track-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.78fr);
  gap: 10px;
  min-height: 0;
}

.track-column {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.panel-heading--tight { margin-bottom: 0; }

.panel-note-inline {
  color: var(--muted);
  font-size: 13px;
}

.selected-pet-hero {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.selected-pet-photo,
.feed-card__photo {
  border: 1px solid var(--line);
  background: #eef3e6;
  object-fit: cover;
}

.selected-pet-photo {
  width: 112px;
  height: 112px;
  border-radius: 24px;
}

.selected-pet-copy {
  display: grid;
  gap: 8px;
}

.selected-pet-copy h3 {
  margin-bottom: 0;
  font-size: 1.3rem;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.form-grid__full, .form-actions--full { grid-column: 1 / -1; }

.launch-alert-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 126, 0, 0.14), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(255, 126, 0, 0.3);
}

.launch-alert-panel.is-hidden {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
}

textarea { resize: vertical; }

button {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent) 0%, #5ea81c 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

button.secondary,
.filter-pill {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.button-alert {
  background: linear-gradient(135deg, #ff7a00 0%, #ff4f18 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(255, 102, 0, 0.28);
}

button:disabled { opacity: 0.58; cursor: not-allowed; }

.filter-pill {
  min-height: 34px;
  padding: 0 14px;
  line-height: 1;
  white-space: nowrap;
}

.sidebar-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}

.sidebar-actions button,
.filter-row .filter-pill {
  width: 100%;
  min-height: 38px;
  max-height: 38px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.filter-pill.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, #5ea81c 100%);
  color: white;
  border-color: transparent;
}

.feed-list,
.audit-list {
  min-height: 0;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.feed-card,
.mini-card,
.audit-item,
.callout-card {
  padding: 12px;
  border-radius: 18px;
  background: #f8fbfd;
  border: 1px solid var(--line);
}

.feed-card {
  display: grid;
  gap: 10px;
  cursor: pointer;
}

.feed-card--empty { cursor: default; }

.feed-card__top {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
}

.feed-card__photo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.feed-card__meta { display: grid; gap: 6px; }
.feed-card__meta h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.feed-card__line { color: var(--muted); font-size: 14px; }

.status {
  display: inline-flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-neutral { background: #eff4f7; color: var(--ink); }

.mini-list,
.audit-list { gap: 10px; }

.mini-card,
.audit-item {
  display: grid;
  gap: 5px;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.track-sidebar .filter-row,
.track-sidebar .feed-card__chips,
.header-actions,
.form-actions {
  align-items: center;
}

.track-sidebar .panel-heading {
  margin-bottom: 8px;
}

.track-sidebar .sidebar-actions button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.14);
}

@media (max-width: 920px) {
  .track-auth-shell { grid-template-columns: 1fr; }
}
