:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fff7ee;
  --text: #2f2f32;
  --muted: #69636a;
  --text-inverse: #233047;
  --primary: #f58c2e;
  --primary-600: #f19a40;
  --primary-700: #c86519;
  --accent: #2f2b2d;
  --link: #a65316;
  --border: #ded6cf;
  --border-strong: #9a8f88;
  --danger: #c53535;
  --shadow: 0 8px 18px rgba(47, 43, 45, 0.08);
  --mobile-nav-height: 66px;
  --chip-bg: #fff0de;
  --chip-text: #854813;
  --topbar-bg: #322f30;
  --menu-bg: #ffffff;
  --alert-error-bg: #ffe9e9;
  --alert-error-border: #f6c5c5;
  --alert-success-bg: #e8f8ef;
  --alert-success-border: #bce5c9;
  --alert-success-text: #1c6f42;
  --header-bg: #322f30;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

html[data-theme='dark'] {
  --bg: #0a0d12;
  --surface: #121922;
  --surface-alt: #1b232e;
  --text: #e9eef4;
  --muted: #aab4c0;
  --text-inverse: #0a0d12;
  --primary: #f3b51a;
  --primary-600: #e5a800;
  --primary-700: #c88700;
  --accent: #d9b98a;
  --link: #f0bd40;
  --border: #2a3542;
  --border-strong: #3b495a;
  --danger: #e35a5a;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  --chip-bg: #3a2c03;
  --chip-text: #ffd670;
  --topbar-bg: #121922;
  --menu-bg: #121922;
  --alert-error-bg: #3a1d22;
  --alert-error-border: #7c3a45;
  --alert-success-bg: #15372a;
  --alert-success-border: #2f6d52;
  --alert-success-text: #8ce1b6;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
}

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

a:hover { text-decoration: underline; }

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  background: transparent;
  border-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: .55rem 0 0;
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem;
  min-height: 78px;
  padding: .7rem .95rem;
  background: var(--header-bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 900;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .26);
  background: #141414;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: .6rem;
  min-width: 0;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  flex: 1;
  gap: .25rem .65rem;
  overflow-x: visible;
  scrollbar-width: thin;
  max-width: 100%;
}

.desktop-nav a {
  text-align: center;
  white-space: nowrap;
  font-size: .9rem;
  padding: .45rem .55rem;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-weight: 700;
}

.desktop-nav a:hover {
  background: rgba(255, 255, 255, .14);
  text-decoration: none;
}

.topbar-actions .theme-toggle {
  margin-left: auto;
}

.theme-toggle,
.mobile-sheet-btn {
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: .45rem .7rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover,
.mobile-sheet-btn:hover {
  background: rgba(255, 255, 255, .18);
}

.main-content {
  padding: 1rem 0 1.5rem;
}

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

.hero {
  border-top: 8px solid var(--header-bg);
}

h1,
h2,
h3 {
  color: #343033;
  line-height: 1.1;
}

.hero h1,
.card > h1:first-child {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.auth-card {
  max-width: 520px;
  margin: 0 auto;
}

label {
  display: block;
  margin-top: .75rem;
  margin-bottom: .25rem;
  font-weight: 800;
  color: #414141;
}

input {
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

select,
textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  background: var(--primary);
  color: var(--text-inverse);
  border: 0;
  border-radius: var(--radius-md);
  padding: .7rem 1rem;
  min-height: 44px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

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

.btn-outline {
  background: #ffffff;
  color: var(--text-inverse);
  border: 1px solid var(--primary-700);
}

.btn-danger {
  background: #c53535;
  border: 1px solid #c53535;
}

.btn-danger:hover {
  background: #a82c2c;
}

.btn-lg {
  min-height: 48px;
  padding: .85rem 1.1rem;
  font-size: 1rem;
}

.filter-btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 0;
  color: var(--muted);
}

.alert {
  border-radius: var(--radius-md);
  padding: .65rem .8rem;
}

.alert-error {
  background: var(--alert-error-bg);
  border: 1px solid var(--alert-error-border);
  color: var(--danger);
}

.alert-success {
  background: var(--alert-success-bg);
  border: 1px solid var(--alert-success-border);
  color: var(--alert-success-text);
}

.mt-sm { margin-top: .75rem; }
.mt-md { margin-top: 1rem; }

.dog-form .actions {
  margin-top: 1rem;
}

.dog-form-page {
  background: #ffffff;
}

.dog-form-page .topbar,
.dog-form-page .footer,
.dog-form-page .mobile-menu {
  display: none;
}

.dog-form-page .main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.dog-list-page {
  background: #ffffff;
}

.dog-list-page .topbar,
.dog-list-page .footer,
.dog-list-page .mobile-menu {
  display: none;
}

.dog-list-page .main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.dog-form-page-shell {
  width: 100%;
  min-height: 100vh;
  background: #ffffff;
  color: #3d3d3d;
}

.dog-list-page-shell {
  width: 100%;
  min-height: 100vh;
  background: #ffffff;
  color: #3d3d3d;
}

.dog-form-page-panel {
  width: min(100%, 540px);
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  overflow: hidden;
}

.dog-list-page-panel {
  width: min(100%, 540px);
  margin: 0 auto;
  background: #ffffff;
  min-height: 100vh;
  overflow: hidden;
}

.dog-form-page-brand {
  background: #322f30;
  color: #ffffff;
  min-height: 140px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.05rem;
  border-radius: 0 0 18px 18px;
  margin: 0 0 .6rem;
}

.dog-list-page-brand {
  background: #322f30;
  color: #ffffff;
  min-height: 140px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.05rem;
  border-radius: 0 0 18px 18px;
  margin: 0 0 .6rem;
}

.dog-form-page-brand img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
  background: #141414;
}

.dog-list-page-brand img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
  background: #141414;
}

.dog-form-page-brand span {
  font-size: clamp(2.2rem, 7vw, 3.15rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.dog-list-page-brand span {
  font-size: clamp(2.2rem, 7vw, 3.15rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.dog-form-page-title {
  background: #322f30;
  color: #ffffff;
  border-top: 4px solid #ffffff;
  border-bottom: 1px solid #322f30;
  font-size: clamp(2rem, 5.8vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  text-align: center;
  padding: .35rem 1rem .55rem;
  letter-spacing: -0.03em;
  border-radius: 18px;
  margin: 0 .35rem .8rem;
}

.dog-list-page-title {
  background: #322f30;
  color: #ffffff;
  border-top: 4px solid #ffffff;
  border-bottom: 1px solid #322f30;
  font-size: clamp(2rem, 5.8vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  text-align: center;
  padding: .35rem 1rem .55rem;
  letter-spacing: -0.03em;
  border-radius: 18px;
  margin: 0 .35rem .8rem;
}

.dog-form-feedback {
  margin: .6rem 1rem 0;
}

.dog-list-feedback {
  margin: .6rem 1rem 0;
}

.dog-search-card {
  margin: 0 .35rem .8rem;
  padding: .9rem .85rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fffaf2;
  box-shadow: var(--shadow);
}

.dog-search-form {
  display: grid;
  gap: .65rem;
}

.dog-search-form label {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: #414141;
}

.dog-search-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .65rem;
  align-items: center;
}

.dog-search-controls input {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid #8d8d8d;
  background: #ffffff;
  color: #232323;
  font-size: 1.05rem;
  font-weight: 600;
  padding: .75rem .9rem;
}

.dog-search-button,
.dog-search-main-action {
  min-height: 48px;
  margin-top: 0;
  border-radius: 14px;
}

.dog-search-links {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
}

.dog-search-links .btn {
  margin-top: 0;
}

.dog-search-main-action {
  background: #f58c2e;
  color: #233047;
}

.dog-search-main-action:hover {
  background: #f19a40;
  color: #233047;
}

.dog-empty-state {
  margin: 0 .35rem;
  padding: 1rem;
  border-radius: 18px;
  border: 1px dashed #c9c9c9;
  color: var(--muted);
  background: #ffffff;
}

.dog-form-page-form {
  padding: .55rem 1rem 1rem;
}

.dog-form-layout {
  display: grid;
  grid-template-columns: 43% 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0 .35rem;
}

.dog-photo-column {
  min-width: 0;
}

.dog-label-large,
.dog-field label {
  display: block;
  margin: 0 0 .18rem;
  font-weight: 800;
  color: #414141;
  line-height: 1.05;
}

.dog-label-large {
  font-size: 1.5rem;
}

.dog-photo-box {
  display: block;
  width: 100%;
  aspect-ratio: 0.88;
  min-height: 290px;
  border: 1px solid #7a7a7a;
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  border-radius: 14px;
}

.dog-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dog-photo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.02)),
    #ffffff;
}

.dog-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dog-main-column {
  display: grid;
  gap: .8rem;
}

.dog-field {
  min-width: 0;
}

.dog-field label {
  font-size: 1.35rem;
}

.dog-field input,
.dog-field select,
.dog-field textarea {
  border-radius: 12px;
  border: 1px solid #8d8d8d;
  background: #ffffff;
  color: #232323;
  box-shadow: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: .7rem .85rem;
}

.dog-field input,
.dog-field select {
  min-height: 44px;
}

.dog-field select {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: auto;
  padding-right: 2.2rem;
}

.dog-field select option {
  color: #232323;
  background: #ffffff;
  font-weight: 600;
}

.dog-field textarea {
  min-height: 180px;
  resize: vertical;
}

.dog-row-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin-top: .9rem;
  padding: 0 .35rem;
  align-items: start;
}

.dog-row-grid .dog-field {
  display: grid;
  align-content: start;
}

.dog-row-grid .dog-field label {
  min-height: 2.9rem;
  display: flex;
  align-items: flex-end;
}

.dog-row-grid .dog-field select {
  width: 100%;
}

.dog-notes-field {
  margin-top: .55rem;
}

.dog-notes-field textarea {
  min-height: 190px;
}

.dog-actions {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.2rem;
  padding: 0 .35rem;
}

.dog-primary-action,
.dog-secondary-action {
  flex: 1 1 0;
  min-width: 0;
  min-height: 64px;
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 14px;
  border: 0;
  margin-top: 0;
  background: #f58c2e;
  color: #233047;
}

.dog-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dog-primary-action:hover,
.dog-secondary-action:hover {
  background: #f19a40;
  color: #233047;
}

.dog-upgrade-note {
  margin: .8rem 1.35rem 0;
  color: var(--muted);
}

@media (max-width: 560px) {
  .dog-form-page-panel {
    width: 100%;
  }

  .dog-list-page-panel {
    width: 100%;
  }

  .dog-form-page-brand {
    min-height: 120px;
    gap: .9rem;
  }

  .dog-list-page-brand {
    min-height: 120px;
    gap: .9rem;
  }

  .dog-form-page-brand img {
    width: 84px;
    height: 84px;
  }

  .dog-list-page-brand img {
    width: 84px;
    height: 84px;
  }

  .dog-form-layout {
    grid-template-columns: 1fr 1.08fr;
    gap: .8rem;
  }

  .dog-search-controls {
    grid-template-columns: 1fr;
  }

  .dog-photo-box {
    min-height: 230px;
  }

  .dog-row-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .dog-row-grid .dog-field label {
    min-height: 0;
    display: block;
  }

  .dog-item-top {
    grid-template-columns: 1fr;
  }

  .dog-photo-preview-large {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .dog-field label {
    font-size: 1.12rem;
  }

  .dog-label-large {
    font-size: 1.26rem;
  }

  .dog-field input,
  .dog-field select,
  .dog-field textarea {
    font-size: .98rem;
  }

  .dog-field select {
    padding-right: 2rem;
  }

  .dog-actions {
    gap: 1rem;
  }

  .dog-primary-action,
  .dog-secondary-action {
    min-height: 58px;
    font-size: 1rem;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.span-2 {
  grid-column: span 2;
}

.dogs-list {
  display: grid;
  gap: .8rem;
}

.dog-list-themed {
  margin: 0 .35rem .9rem;
}

.dog-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem;
  display: grid;
  gap: .9rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.dog-item-themed {
  border-radius: 18px;
  border: 1px solid #d8d0c7;
  padding: .95rem;
  background: #ffffff;
  box-shadow: var(--shadow);
  grid-template-columns: 1fr;
  align-items: stretch;
}

.dog-item-top {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: .85rem;
  align-items: start;
}

.dog-item-summary h2 {
  margin: 0 0 .35rem;
  font-size: 1.4rem;
}

.dog-item-summary p,
.dog-item-details p {
  margin: .25rem 0;
  line-height: 1.35;
}

.dog-item-details {
  margin-top: .7rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
}

.dog-photo-preview-large {
  width: 120px;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f7fb;
  margin-bottom: 0;
}

.dog-photo-preview-empty {
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.01)),
    #f5f5f5;
}

.dog-item-themed .dog-item-actions {
  margin-top: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.dog-item-themed .dog-item-actions a,
.dog-item-themed .dog-item-actions button {
  margin-top: 0;
}

.dog-item h3 {
  margin: 0 0 .4rem;
}

.dog-item p {
  margin: .2rem 0;
}

.dog-photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3f7fb;
  margin-bottom: .6rem;
}

.dog-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
}

.panel-header h2 {
  margin: 0;
}

.search-form {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-form input {
  width: 280px;
  max-width: 100%;
}

.dog-item-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.dog-item-actions form {
  margin: 0;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .8rem;
}

.category-filters .btn,
.filter-btn {
  margin-top: 0;
}

.training-card .btn {
  margin-top: .6rem;
}

.chip {
  display: inline-block;
  padding: .3rem .55rem;
  border-radius: var(--radius-sm);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-weight: 700;
  font-size: .8rem;
}

.training-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: .8rem 0 1rem;
}

.detail-card h2,
.detail-block h2 {
  margin-top: 0;
}

.detail-block {
  margin-bottom: .8rem;
}

.detail-block ul,
.detail-block ol {
  padding-left: 1.2rem;
  margin: .4rem 0;
}

.detail-block li {
  margin-bottom: .35rem;
}

.routine-select-form .btn {
  width: 100%;
}

.streak-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-600);
}

.motivation {
  font-size: 1.02rem;
}

.routine-list {
  display: grid;
  gap: .9rem;
}

.routine-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: .9rem;
  display: grid;
  gap: .8rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.routine-item.is-done {
  background: #f1fbf5;
  border-color: #bce5c9;
}

.routine-item h3 {
  margin: .3rem 0;
}

.routine-item p {
  margin: .2rem 0;
}

.routine-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.routine-training-groups {
  display: grid;
  gap: .8rem;
  margin-top: .8rem;
}

.routine-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-top: .5rem;
}

.routine-training-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .65rem;
  background: #ffffff;
}

.routine-training-group legend {
  font-weight: 700;
  padding: 0 .35rem;
}

.routine-training-option {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: .45rem 0;
}

.routine-training-option input[type="checkbox"] {
  width: auto;
  margin-top: .15rem;
}

.routine-training-option span {
  display: inline-flex;
  flex-direction: column;
  gap: .15rem;
}

.routine-training-option small {
  color: var(--muted);
}

.badge-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .5rem .8rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  color: #1c6f42;
  background: #dbf3e5;
}

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

.metric-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-600);
}

.metric-badge {
  display: inline-block;
  padding: .35rem .75rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.level-iniciante {
  background: #e8f8ef;
  color: #1c6f42;
}

.level-intermediario {
  background: #fff5de;
  color: #9b6a00;
}

.level-avancado {
  background: #ffe9e9;
  color: #a82c2c;
}

.progress-bar-wrap {
  width: 100%;
  height: 14px;
  border-radius: var(--radius-sm);
  background: #e7edf5;
  overflow: hidden;
  margin-top: .5rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #322f30, #f58c2e);
  transition: width .45s ease;
}

.mini-chart {
  height: 180px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: .5rem;
}

.mini-chart-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  gap: .2rem;
}

.mini-chart-bar {
  display: block;
  width: 100%;
  max-width: 28px;
  margin: 0 auto .4rem;
  min-height: 4px;
  border-radius: 8px 8px 0 0;
  background: #f58c2e;
}

.mini-chart-value {
  color: var(--muted);
}

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

.clean-list li {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .65rem .7rem;
  display: grid;
  gap: .2rem;
  background: #ffffff;
}

.clean-list li span {
  color: var(--muted);
  font-size: .9rem;
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: .75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: #fff7ee;
  color: #343033;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.problem-card h2 {
  margin-top: 0;
}

.problem-card p {
  margin: .3rem 0;
}

.plan-card ul {
  margin: .4rem 0 0;
  padding-left: 1.1rem;
}

.plan-card li {
  margin-bottom: .35rem;
}

.premium-plan-card {
  border-color: #7fc99b;
}

.video-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.mobile-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  justify-content: center;
  align-items: center;
  gap: .35rem;
  min-height: var(--mobile-nav-height);
  padding: .45rem .6rem calc(.45rem + env(safe-area-inset-bottom));
  background: var(--menu-bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px rgba(47, 43, 45, 0.1);
  z-index: 20;
}

.mobile-menu a,
.mobile-menu-more-btn {
  flex: 1 1 0;
  max-width: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .55rem;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.mobile-menu a:active,
.mobile-menu-more-btn:active {
  background: #fff0de;
}

.mobile-more-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 25, 36, 0.34);
  z-index: 21;
}

body.mobile-sheet-open {
  overflow: hidden;
}

.mobile-more-sheet {
  position: fixed;
  left: .8rem;
  right: .8rem;
  bottom: calc(var(--mobile-nav-height) + .5rem + env(safe-area-inset-bottom));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: .45rem;
  display: none;
  z-index: 22;
}

.mobile-more-sheet.is-open {
  display: grid;
  gap: .25rem;
}

.mobile-more-sheet a {
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  color: var(--text);
  font-weight: 600;
  white-space: normal;
  line-height: 1.25;
}

.mobile-more-sheet a:hover {
  background: #fff0de;
  text-decoration: none;
}

.mobile-more-sheet .mobile-sheet-btn {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

@media (max-width: 900px) {
  .cards-3,
  .cards-2 {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .dog-item {
    grid-template-columns: 1fr;
  }

  .dog-photo-preview {
    width: 100%;
    max-width: 220px;
    height: 160px;
  }

  .search-form {
    width: 100%;
  }

  .search-form input,
  .search-form .btn,
  .search-form a.btn {
    width: 100%;
  }

  .dog-item-actions {
    flex-direction: row;
  }

  .dog-item-actions .btn,
  .dog-item-actions button {
    width: 100%;
    text-align: center;
  }

  .training-detail-grid {
    grid-template-columns: 1fr;
  }

  .routine-plan-grid {
    grid-template-columns: 1fr;
  }

  .routine-item-actions .btn,
  .routine-item-actions button,
  .routine-item-actions .badge-done {
    width: 100%;
    text-align: center;
  }

  .desktop-nav { display: none; }
  .theme-toggle { display: none; }
  .mobile-menu { display: flex; }
  .main-content {
    padding-bottom: calc(var(--mobile-nav-height) + 1.2rem + env(safe-area-inset-bottom));
  }

  .simple-table {
    min-width: 760px;
  }
}

@media (max-width: 390px) {
  .mobile-menu a,
  .mobile-menu-more-btn {
    font-size: .76rem;
    padding-inline: .35rem;
  }
}
