:root {
  --void: #0b0a08;
  --void-soft: #12100c;
  --surface: #1c1812;
  --surface-elevated: #262117;
  --surface-glass: rgba(26, 22, 16, 0.8);
  --border: rgba(208, 169, 63, 0.2);
  --gold: #d0a93f;
  --gold-bright: #f1ce68;
  --gold-dim: #a7872b;
  --text-primary: #f3efe6;
  --text-secondary: #c6beab;
  --text-dim: #8f8674;
  --success: #7dbb6a;
  --error: #e16a6a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Outfit', sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: radial-gradient(circle at 20% 10%, rgba(208, 169, 63, 0.08), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(208, 169, 63, 0.05), transparent 35%),
    var(--void);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(160deg, rgba(26, 21, 14, 0.95), rgba(16, 13, 9, 0.95));
  border-right: 1px solid var(--border);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand .material-symbols-outlined {
  font-size: 2rem;
  color: var(--gold);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-dim);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-item .material-symbols-outlined {
  font-size: 1.25rem;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text-primary);
  border-color: var(--border);
  background: rgba(208, 169, 63, 0.08);
  box-shadow: inset 0 0 0 1px rgba(208, 169, 63, 0.12);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-pill {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(125, 187, 106, 0.12);
  color: var(--success);
  border: 1px solid rgba(125, 187, 106, 0.3);
}

.ghost-button,
.secondary-button,
.primary-button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: #1a140a;
  box-shadow: 0 14px 30px rgba(208, 169, 63, 0.3);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(208, 169, 63, 0.35);
}

.primary-button.danger {
  background: linear-gradient(135deg, #f06b6b, #d84f4f);
  color: #fff5f5;
}

.secondary-button {
  background: rgba(37, 32, 22, 0.9);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.ghost-button {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.ghost-button.danger {
  color: var(--error);
  border-color: rgba(225, 106, 106, 0.3);
}

.main {
  padding: 2.75rem 4.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.6rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem 1.8rem;
  border-radius: 24px;
  border: 1px solid rgba(208, 169, 63, 0.2);
  background: linear-gradient(135deg, rgba(24, 20, 14, 0.9), rgba(14, 12, 9, 0.85));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.topbar-title-group {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.topbar-kicker {
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  margin-top: 0.1rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(208, 169, 63, 0.2);
  background: rgba(12, 10, 8, 0.6);
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(208, 169, 63, 0.25);
  background: rgba(14, 12, 9, 0.6);
  color: var(--text-primary);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(208, 169, 63, 0.3);
}

.search {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(208, 169, 63, 0.2);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 260px;
  height: 46px;
  box-shadow: inset 0 0 0 1px rgba(15, 12, 8, 0.4);
  position: relative;
}

.search input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-size: 0.9rem;
}

.search.has-text .material-symbols-outlined {
  opacity: 0;
  transform: scale(0.85);
}

.search.has-text input::placeholder {
  color: transparent;
}

.search-results {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  right: 0;
  background: rgba(16, 13, 10, 0.96);
  border: 1px solid rgba(208, 169, 63, 0.2);
  border-radius: 18px;
  padding: 0.65rem;
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.search-results.active {
  display: flex;
}

.search-item {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-item:hover {
  border-color: rgba(208, 169, 63, 0.4);
  transform: translateY(-1px);
}

.search-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(208, 169, 63, 0.25);
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  height: 48px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: #1b140a;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.user-chip span {
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view {
  display: none;
}

.view.active {
  display: flex;
  flex-direction: column;
  gap: 2.6rem;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid {
  display: grid;
  gap: 2.2rem;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 2.4rem;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(208, 169, 63, 0.25);
  background: linear-gradient(125deg, rgba(32, 26, 18, 0.95), rgba(18, 15, 10, 0.9));
}

.reports-hero h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.reports-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.report-studio-card {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.studio-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.studio-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.25), rgba(242, 209, 120, 0.15));
  border: 1px solid rgba(208, 169, 63, 0.35);
  box-shadow: 0 8px 20px rgba(208, 169, 63, 0.2);
}

.studio-icon .material-symbols-outlined {
  font-size: 32px;
  color: var(--gold);
}

.studio-title {
  flex: 1;
}

.studio-title h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.studio-presets {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.preset-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
}

.reports-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.library-card,
.upload-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.library-header,
.upload-header,
.export-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.library-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.2), rgba(242, 209, 120, 0.12));
  border: 1px solid rgba(208, 169, 63, 0.3);
}

.library-icon .material-symbols-outlined {
  font-size: 28px;
  color: var(--gold);
}

.preset-chips {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.report-form-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-section-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 600;
}

.section-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.toggle-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(208, 169, 63, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-card:hover {
  border-color: rgba(208, 169, 63, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.toggle-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.toggle-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.toggle-content strong {
  font-size: 0.9rem;
  font-family: var(--font-display);
}

.toggle-content span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.report-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.library-upload {
  padding: 1.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(208, 169, 63, 0.3);
}

.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(208, 169, 63, 0.3);
}

.upload-icon {
  font-size: 48px !important;
  color: var(--gold);
  opacity: 0.5;
}

.upload-zone strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.export-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.export-button {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.6rem 1.8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(208, 169, 63, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.export-button:hover {
  border-color: rgba(208, 169, 63, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.export-button-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.2), rgba(242, 209, 120, 0.12));
  border: 1px solid rgba(208, 169, 63, 0.3);
}

.export-button-icon .material-symbols-outlined {
  font-size: 28px;
  color: var(--gold);
}

.export-button-content {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.export-button-content strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.export-button-content span {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.household-forms {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.reports-hero,
.household-hero,
.pets-hero {
  padding: 2rem 2.2rem;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(208, 169, 63, 0.25);
  background: linear-gradient(125deg, rgba(32, 26, 18, 0.95), rgba(18, 15, 10, 0.9));
}

.household-hero h2,
.pets-hero h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.household-card {
  background: linear-gradient(140deg, rgba(30, 24, 16, 0.92), rgba(16, 12, 8, 0.9));
  border: 1px solid rgba(208, 169, 63, 0.32);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.household-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(208, 169, 63, 0.18), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.household-card .card-header {
  align-items: center;
  gap: 2rem;
}

.household-card .card-header h3 {
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.household-card .card-header p {
  color: rgba(198, 190, 171, 0.8);
}

.household-card .form label {
  font-size: 0.8rem;
}

.household-card .form input,
.household-card .form select {
  background: rgba(19, 15, 10, 0.85);
  border-color: rgba(208, 169, 63, 0.25);
}

.household-card .secondary-button,
.household-card .primary-button,
.household-card .ghost-button {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.household-grid {
  gap: 2.2rem;
}

.household-grid .household-card {
  min-height: 260px;
}

.member-item,
.trainer-item,
.invite-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(208, 169, 63, 0.25);
}

.member-item strong,
.trainer-meta strong {
  font-size: 1.05rem;
}

.settings-hero h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: start;
}

.settings-plan {
  grid-column: span 2;
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.settings-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.2), rgba(242, 209, 120, 0.12));
  border: 1px solid rgba(208, 169, 63, 0.3);
}

.settings-icon .material-symbols-outlined {
  font-size: 28px;
  color: var(--gold);
}

.settings-icon.danger {
  background: linear-gradient(140deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.12));
  border-color: rgba(220, 38, 38, 0.3);
}

.settings-icon.danger .material-symbols-outlined {
  color: #ef4444;
}

.plan-status {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.plan-status-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.plan-status-item strong {
  font-size: 1.3rem;
  font-family: var(--font-display);
}

.plan-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(208, 169, 63, 0.15);
  transition: all 0.2s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(208, 169, 63, 0.25);
}

.feature-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.feature-item.locked {
  opacity: 0.6;
}

.feature-item.locked .material-symbols-outlined {
  color: var(--text-dim);
  opacity: 0.7;
}

.feature-item.locked span {
  color: var(--text-dim);
}

.feature-item span {
  font-size: 0.82rem;
  line-height: 1.3;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sync-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(208, 169, 63, 0.15);
}

.sync-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(208, 169, 63, 0.1);
}

.sync-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sync-stat strong {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.sync-stat span {
  font-family: var(--font-display);
  font-size: 1rem;
}

.data-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.danger-zone {
  border-color: rgba(220, 38, 38, 0.3);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(185, 28, 28, 0.04));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(208, 169, 63, 0.08), transparent 55%);
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.card h3 {
  font-size: 1.4rem;
  font-family: var(--font-display);
}

.card p {
  color: var(--text-secondary);
}

.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pro-badge {
  background: rgba(208, 169, 63, 0.15);
  border-color: rgba(208, 169, 63, 0.45);
  color: var(--gold);
  box-shadow: 0 8px 18px rgba(208, 169, 63, 0.2);
}

.metric h2 {
  font-size: 2.6rem;
  margin-top: 0.5rem;
  font-family: var(--font-display);
}

.metric-note {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.analytics-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 1.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(208, 169, 63, 0.2);
  background: linear-gradient(120deg, rgba(32, 26, 18, 0.9), rgba(18, 15, 10, 0.85));
}

.analytics-hero h2 {
  font-family: var(--font-display);
  font-size: 2rem;
}

.analytics-window {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(208, 169, 63, 0.35);
  color: var(--gold-bright);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  background: rgba(12, 10, 8, 0.6);
}

.analytics-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  align-items: end;
}

.analytics-filters input:disabled,
.analytics-filters select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.analytics-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.analytics-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analytics-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.8rem;
}

.analytics-grid .span-4 {
  grid-column: span 4;
}

.analytics-grid .span-5 {
  grid-column: span 5;
}

.analytics-grid .span-6 {
  grid-column: span 6;
}

.analytics-grid .span-7 {
  grid-column: span 7;
}

.analytics-grid .span-8 {
  grid-column: span 8;
}

.analytics-grid .tall {
  min-height: 360px;
}

.chart-card canvas {
  width: 100%;
  height: 260px !important;
  max-height: 300px;
}

.chart-card {
  min-height: 360px;
  height: 360px;
  padding-bottom: 2.5rem;
}

.chart-card.tall {
  height: 400px;
  min-height: 400px;
}

.gate-note {
  display: none;
  margin: 0.75rem 0 0.25rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(208, 169, 63, 0.12);
  border: 1px solid rgba(208, 169, 63, 0.3);
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  width: fit-content;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

.pro-gate-card {
  display: none;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 1.8rem;
  margin: 1.2rem 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(208, 169, 63, 0.15), rgba(242, 209, 120, 0.08));
  border: 1px solid rgba(208, 169, 63, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.pro-gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.pro-gate-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.9), rgba(242, 209, 120, 0.8));
  color: #1b140a;
  box-shadow: 0 8px 20px rgba(208, 169, 63, 0.35);
}

.pro-gate-icon .material-symbols-outlined {
  font-size: 28px;
}

.pro-gate-card strong {
  font-size: 1.05rem;
  font-family: var(--font-display);
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.pro-gate-card p {
  margin-top: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pro-gate-cta {
  margin-left: auto;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  color: #1b140a;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 8px 18px rgba(208, 169, 63, 0.3);
}

.pro-gate-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(208, 169, 63, 0.45);
}

.chip-button.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
}

.chip-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip-button.is-locked:hover {
  border-color: rgba(208, 169, 63, 0.25);
  color: var(--text-secondary);
  background: rgba(30, 26, 18, 0.7);
}

.table-wrap {
  max-height: 320px;
  overflow: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.analytics-table th,
.analytics-table td {
  text-align: left;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid rgba(208, 169, 63, 0.15);
}

.analytics-table th {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  font-size: 0.65rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

input,
select,
textarea {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.helper {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.view-meta {
  display: flex;
  justify-content: flex-end;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(208, 169, 63, 0.25);
  background: rgba(20, 17, 12, 0.85);
  color: var(--text-secondary);
  font-size: 0.85rem;
  height: 48px;
}

.plan-chip.pro {
  border-color: rgba(208, 169, 63, 0.45);
  color: var(--gold-bright);
  background: rgba(28, 22, 14, 0.7);
}

.plan-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(208, 169, 63, 0.4);
}

.plan-cta {
  background: transparent;
  border: 1px solid rgba(208, 169, 63, 0.35);
  color: var(--gold-bright);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(208, 169, 63, 0.2);
  color: var(--text-dim);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  background: rgba(14, 12, 9, 0.55);
}

.weather {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border);
  margin-bottom: 1rem;
}

.weather-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.weather-icon {
  font-size: 2.5rem;
  color: var(--gold);
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.activity-list,
.member-list,
.invite-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item,
.member-item,
.invite-item,
.report-item,
.pet-card,
.insight-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
}

.insight-tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(208, 169, 63, 0.4);
  color: var(--gold);
  background: rgba(208, 169, 63, 0.14);
}

.invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.invite-actions {
  display: flex;
  gap: 0.6rem;
}

.invite-actions .ghost-button {
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
}

.pro-lock {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.2rem 1.4rem;
  margin-top: 1.2rem;
  border-radius: 14px;
  background: linear-gradient(130deg, rgba(26, 20, 12, 0.92), rgba(8, 6, 4, 0.96));
  border: 1px solid rgba(208, 169, 63, 0.4);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.pro-lock::before {
  content: 'Pro';
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(208, 169, 63, 0.4);
  background: rgba(208, 169, 63, 0.12);
}

.pro-lock p {
  max-width: 320px;
}

.pro-lock strong {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.locked .pro-lock {
  display: flex;
}

.locked .form,
.locked .report-upload,
.locked .export-actions {
  opacity: 0.35;
  filter: grayscale(0.4);
}

.locked .primary-button,
.locked .secondary-button,
.locked .ghost-button {
  pointer-events: none;
}


.report-item.selected {
  border-color: rgba(208, 169, 63, 0.5);
  box-shadow: 0 0 0 1px rgba(208, 169, 63, 0.3), 0 18px 40px rgba(0, 0, 0, 0.4);
}

.pet-grid,
.report-grid,
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.pet-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pet-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pet-card.featured {
  grid-column: span 2;
  padding: 1.8rem;
  border-radius: 22px;
  background: radial-gradient(circle at top right, rgba(208, 169, 63, 0.18), transparent 55%),
    rgba(18, 14, 10, 0.9);
}

.pet-card.compact {
  padding: 1.4rem;
}

.pet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(208, 169, 63, 0.45);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

.pet-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.pet-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.9), rgba(242, 209, 120, 0.8));
  color: #1b140a;
}

.pet-card-stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(208, 169, 63, 0.2);
}

.pet-card-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(208, 169, 63, 0.15);
}

.pet-card-stats strong {
  font-size: 1.2rem;
  font-family: var(--font-display);
}

.pet-card-stats span {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pet-card-meta {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.pet-modal {
  backdrop-filter: blur(10px);
}

.pet-modal-card {
  width: min(560px, 92vw);
  background: linear-gradient(140deg, rgba(26, 21, 14, 0.98), rgba(14, 11, 8, 0.96));
  border: 1px solid rgba(208, 169, 63, 0.25);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

.pet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.pet-modal-kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.pet-modal-body {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: center;
}

.pet-modal-avatar {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(140deg, rgba(208, 169, 63, 0.9), rgba(242, 209, 120, 0.8));
  color: #1b140a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.pet-modal-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pet-modal-details strong {
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.pet-modal-notes {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(208, 169, 63, 0.15);
}

.pet-modal-notes .helper {
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
}

.pet-modal-notes p:last-child {
  color: var(--text-secondary);
  line-height: 1.6;
}

.pet-modal-actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-start;
}

.pet-card h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.tag.primary {
  border-color: rgba(208, 169, 63, 0.45);
  color: var(--gold-bright);
  background: rgba(208, 169, 63, 0.12);
}

.tag.muted {
  border-color: rgba(143, 134, 116, 0.35);
  color: var(--text-dim);
  background: rgba(20, 18, 14, 0.6);
}

.trainer-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trainer-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.trainer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(208, 169, 63, 0.3), rgba(242, 209, 120, 0.18));
  font-size: 1.4rem;
  box-shadow: inset 0 0 0 1px rgba(208, 169, 63, 0.25);
}

.trainer-meta strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.trainer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.empty-state {
  margin-top: 1rem;
  color: var(--text-dim);
}

.export-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.report-upload {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-layout {
  align-items: start;
}

.report-studio .form {
  gap: 1.2rem;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.chip-button {
  background: rgba(30, 26, 18, 0.7);
  border: 1px solid rgba(208, 169, 63, 0.25);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-button.active,
.chip-button:hover {
  border-color: var(--gold);
  color: var(--text-primary);
  background: rgba(208, 169, 63, 0.12);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(208, 169, 63, 0.2);
  background: rgba(22, 18, 12, 0.6);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.upload-field {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(208, 169, 63, 0.35);
  background: rgba(255, 255, 255, 0.02);
}

.upload-field input[type='file'] {
  color: var(--text-secondary);
}

.paywall-card {
  margin-top: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(208, 169, 63, 0.35);
  background: rgba(26, 22, 16, 0.75);
  display: none;
}

.paywall-card.active {
  display: block;
}

.muted-button {
  opacity: 0.5;
  pointer-events: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 2, 0.8);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 6, 4, 0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal.active {
  display: flex;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: min(420px, 92vw);
  box-shadow: var(--shadow);
}

.merge-card {
  width: min(520px, 92vw);
  text-align: left;
}

.merge-card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.merge-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.merge-counts {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(26, 21, 14, 0.6);
  border: 1px solid rgba(208, 169, 63, 0.2);
  margin-bottom: 1.5rem;
}

.merge-counts div {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.merge-counts strong {
  color: var(--gold-bright);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 2.4rem;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 40;
  }

  .dashboard-shell.nav-open .sidebar {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .analytics-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .analytics-grid .span-8 {
    grid-column: span 6;
  }

  .analytics-grid .span-7,
  .analytics-grid .span-6,
  .analytics-grid .span-5,
  .analytics-grid .span-4 {
    grid-column: span 6;
  }
}

@media (max-width: 900px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .reports-row {
    grid-template-columns: 1fr;
  }

  .export-grid {
    grid-template-columns: 1fr;
  }

  .section-toggles {
    grid-template-columns: 1fr;
  }

  .export-options {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-plan {
    grid-column: span 1;
  }

  .plan-features {
    grid-template-columns: 1fr;
  }

  .household-forms {
    gap: 1.2rem;
  }

  .report-layout {
    grid-template-columns: 1fr;
  }

  .chart-card {
    min-height: 280px;
  }

  .chart-card canvas {
    height: 200px !important;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-grid .span-8,
  .analytics-grid .span-7,
  .analytics-grid .span-6,
  .analytics-grid .span-5,
  .analytics-grid .span-4 {
    grid-column: span 1;
  }

  .pet-modal-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .topbar-profile {
    width: 100%;
    justify-content: space-between;
    padding: 0.55rem 0.6rem;
  }

  .plan-chip {
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .analytics-metrics {
    grid-template-columns: 1fr;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}
