:root {
  --brand: #2563eb;
  --ink: #172033;
  --muted: #697386;
  --line: #e6e9ef;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --good: #0f9f6e;
  --warn: #b7791f;
  --danger: #c2410c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
input, select, textarea, button {
  font: inherit;
}
button {
  min-height: 43px;
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--brand);
}
label:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}
textarea { min-height: 100px; resize: vertical; }
h1 { margin: 0 0 18px; font-size: 28px; letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 18px; letter-spacing: 0; }
h3 { margin: 16px 0 6px; font-size: 15px; letter-spacing: 0; }
.app-shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  width: 248px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  margin-bottom: 18px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--brand);
}
.trainer-sidebar-profile {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: -18px -18px 18px;
  padding: 20px 14px 10px;
  border-bottom: 4px solid #dfe6ef;
  background: #fff;
  text-align: center;
}
.trainer-avatar {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--brand);
  border-radius: 999px;
  background: #fff;
}
.trainer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trainer-avatar-placeholder {
  position: relative;
  background: #f8fbff;
}
.trainer-avatar-placeholder::before {
  content: "";
  position: absolute;
  top: 19px;
  width: 31px;
  height: 36px;
  border-radius: 999px 999px 10px 10px;
  background: var(--brand);
}
.trainer-avatar-placeholder::after {
  content: "";
  position: absolute;
  bottom: 10px;
  width: 64px;
  height: 36px;
  border-radius: 999px 999px 18px 18px;
  background: var(--brand);
}
.superadmin-sidebar-profile {
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}
.google-account-avatar {
  width: 88px;
  height: 88px;
  border-width: 2px;
  box-shadow: 0 10px 26px rgba(23, 32, 51, .12);
}
.google-account-avatar-placeholder {
  background: linear-gradient(145deg, #eaf2ff, #fff);
}
.google-account-avatar-placeholder::before,
.google-account-avatar-placeholder::after {
  display: none;
}
.google-account-avatar-placeholder b {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0;
}
.trainer-sidebar-profile strong {
  margin-top: 4px;
  color: #111827;
  font-size: 19px;
  line-height: 1.08;
}
.trainer-sidebar-profile span {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
}
.sidebar nav {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}
.sidebar a {
  min-height: 42px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}
.sidebar a:hover, .sidebar a.is-active {
  color: var(--ink);
  background: #eef4ff;
}
.nav-section {
  margin: 16px 0 7px;
  color: #99a3b5;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f3f6fb;
  color: var(--brand);
  font-size: 14px;
  line-height: 1;
}
.sidebar a.is-active .nav-icon,
.sidebar a:hover .nav-icon {
  background: #fff;
}
.main {
  flex: 1;
  min-width: 0;
  padding: 22px;
  padding-bottom: 96px;
}
.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  min-height: 58px;
}
.search {
  display: flex;
  gap: 8px;
  width: min(560px, 100%);
  margin-right: auto;
}
.search-page-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.search button {
  width: 43px;
  height: 43px;
  min-height: 43px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}
.user-pill, .btn {
  height: 43px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}
.logout-pill span {
  color: var(--brand);
  font-weight: 900;
}
.logout-pill em {
  font-style: normal;
  color: var(--muted);
}
.btn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}
.btn.small {
  height: 43px;
  min-height: 43px;
  padding: 0 11px;
  font-size: 13px;
}
.btn.danger {
  color: #b42318;
  border-color: #ffd4cc;
  background: #fff7f5;
}
.btn-icon {
  color: var(--brand);
  font-weight: 900;
  line-height: 1;
}
.icon-btn {
  width: 43px;
  height: 43px;
  min-height: 43px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23,32,51,.08);
  color: var(--brand);
  cursor: pointer;
}
.notice {
  position: sticky;
  top: 12px;
  z-index: 18;
  width: fit-content;
  max-width: min(520px, 100%);
  margin: 0 0 16px auto;
  padding: 12px 16px;
  border: 1px solid #b9daf8;
  border-radius: 14px;
  background: #ebf5ff;
  box-shadow: 0 14px 38px rgba(23,32,51,.12);
  font-weight: 700;
}
.skeleton {
  min-height: 76px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
  background-size: 220% 100%;
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}
@keyframes skeleton-pulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.auth-card {
  width: min(420px, calc(100vw - 32px));
  margin: 8vh auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}
.auth-card form, .grid-form {
  display: grid;
  gap: 14px;
}
.grid-form {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.grid-form .full, .grid-form.wide label:has(textarea) {
  grid-column: 1 / -1;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 12px 34px rgba(23,32,51,.06);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.metric {
  display: grid;
  gap: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
}
.metric span, .metric small, .muted, .empty {
  color: var(--muted);
}
.metric strong {
  font-size: 24px;
}
.list {
  display: grid;
  gap: 10px;
}
.row-card {
  min-height: 74px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(23,32,51,.05);
}
.row-card > div:first-of-type {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.row-card span {
  color: var(--muted);
  font-size: 13px;
}
.row-actions, .quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.segmented a.is-active {
  border-color: var(--brand);
  background: #eef4ff;
  color: var(--brand);
  font-weight: 900;
}
.tenant-domain-row {
  align-items: flex-start;
}
.domain-form input {
  min-width: 210px;
}
.domain-form select {
  min-width: 130px;
}
.avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.segmented, .chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
}
.segmented a, .chip {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}
.chip.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.money-stack {
  display: grid;
  gap: 4px;
  text-align: right;
}
.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-form input, .inline-form select {
  width: 130px;
}
.toolbar-card .inline-form select {
  width: min(100%, 340px);
  min-width: 260px;
}
.agenda-filter-form {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) 180px auto;
  align-items: end;
}
.agenda-filter-form .btn {
  width: auto;
}
.panel-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-heading h2 {
  margin: 0;
}
.agenda-toggle-panel.is-collapsed-panel {
  padding: 6px 10px;
  margin-bottom: 10px;
}
.agenda-toggle-panel.is-collapsed-panel .panel-heading {
  min-height: 43px;
  margin-bottom: 0;
}
.agenda-toggle-panel.is-collapsed-panel .panel-heading h2 {
  font-size: 17px;
}
.collapsible-body.is-collapsed {
  display: none;
}
.exercise-line {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.mobile-tabbar {
  display: none;
}
.client-tabbar {
  grid-template-columns: repeat(3, 1fr);
}
.role-cliente .sidebar a {
  min-height: 48px;
  display: flex;
  align-items: center;
  font-weight: 700;
}
.toolbar-card, .app-card, .profile-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 12px 34px rgba(23,32,51,.06);
}
.date-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  margin-bottom: 8px;
}
.date-pill {
  min-width: 72px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23,32,51,.05);
}
.date-pill span, .date-pill small {
  color: var(--muted);
  font-size: 12px;
}
.date-pill strong {
  font-size: 22px;
}
.date-pill.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}
.date-pill.is-active span, .date-pill.is-active small {
  color: rgba(255,255,255,.88);
}
.booking-steps {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.slot-list {
  display: grid;
  gap: 10px;
}
.slot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(23,32,51,.07);
}
.slot-card input {
  width: 22px;
  min-height: 22px;
}
.slot-card strong {
  font-size: 26px;
}
.slot-card span {
  display: block;
  color: var(--brand);
  font-weight: 700;
}
.slot-card small {
  color: var(--muted);
}
.slot-card > b {
  color: var(--good);
  white-space: nowrap;
}
.slot-card.is-busy {
  opacity: .58;
  background: #eef1f4;
  box-shadow: none;
}
.slot-card.is-busy > b {
  color: var(--muted);
}
.friendly-empty {
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}
.reserve-btn {
  width: 100%;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.dog-card, .profile-card, .mini-card, .exercise-card {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(23,32,51,.06);
}
.dog-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}
.dog-card .row-actions {
  grid-column: 1 / -1;
}
.dog-card-actions {
  display: flex;
  flex-wrap: nowrap;
}
.dog-card-actions .btn {
  flex: 1 1 0;
}
.client-profile-card {
  display: grid;
  grid-template-columns: 245px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23,32,51,.07);
}
.client-photo-panel {
  min-height: 230px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--brand), #0ea5e9);
}
.client-photo-panel .avatar {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  border: 4px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.18);
}
.client-card-main {
  display: grid;
  gap: 14px;
  padding: 24px;
}
.client-card-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}
.client-card-title h2 {
  margin: 0;
  color: var(--brand);
  font-size: 26px;
}
.client-card-title span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #e7f0ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.client-card-main p {
  margin: 0;
  color: #495266;
  line-height: 1.5;
}
.dog-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.dog-chip {
  min-height: 32px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f6fb;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.dog-profile-row {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}
.dog-profile-row .avatar {
  width: 84px;
  height: 84px;
  flex-basis: 84px;
}
.dog-profile-row > div {
  display: grid;
  gap: 5px;
}
.dog-detail-hero .avatar {
  width: 104px;
  height: 104px;
  flex-basis: 104px;
}
.compact-list {
  display: grid;
  gap: 8px;
}
.compact-row {
  min-height: 42px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.compact-row span {
  color: var(--muted);
}
.agenda-card {
  align-items: flex-start;
}
.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.agenda-meta span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.agenda-meta b {
  color: var(--brand);
}
.calendar-pro {
  overflow: hidden;
}
.calendar-pro-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.calendar-pro-head h2 {
  margin: 0;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays span {
  padding: 8px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.calendar-day {
  min-height: 92px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.calendar-day:hover {
  background: #f8fbff;
}
.calendar-day.is-muted {
  color: #a0a8b8;
  background: #f8fafc;
}
.calendar-day.is-full {
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, .22);
}
.calendar-day-num {
  font-weight: 900;
}
.calendar-day strong {
  width: fit-content;
  min-width: 26px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
}
.cal-dot {
  width: 100%;
  height: 5px;
  display: block;
  border-radius: 999px;
}
.cal-status-cancelled {
  opacity: .38;
}
.cal-status-completed {
  filter: saturate(.75);
}
.cal-status-progress {
  box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset;
}
.profile-card.compact {
  justify-content: space-between;
}
.dog-card div, .profile-card div, .mini-card {
  display: grid;
  gap: 4px;
}
.dog-card span, .dog-card small, .profile-card span, .mini-card span, .exercise-card span {
  color: var(--muted);
  font-size: 13px;
}
.profile-hero {
  display: flex;
  gap: 16px;
  align-items: center;
}
.profile-hero .avatar {
  width: 86px;
  height: 86px;
  flex-basis: 86px;
}
.client-detail-card {
  min-height: 430px;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 14px;
  text-align: center;
  padding: 30px 22px 20px;
}
.client-detail-card .avatar {
  width: 150px;
  height: 150px;
  flex-basis: 150px;
  box-shadow: 0 16px 40px rgba(23,32,51,.12);
}
.client-detail-data {
  display: grid;
  gap: 5px;
}
.client-detail-data h1 {
  margin: 0;
  font-size: 24px;
}
.client-detail-data p,
.client-detail-data strong {
  margin: 0;
  color: #111827;
  font-size: 17px;
}
.client-detail-data strong {
  font-size: 19px;
}
.client-detail-actions {
  justify-content: center;
  margin-top: auto;
}
.wod-hero-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  margin-bottom: 18px;
  box-shadow: 0 18px 48px rgba(23,32,51,.1);
}
.wod-cover {
  min-height: 180px;
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(14,116,144,.95), rgba(37,99,235,.82)),
    linear-gradient(45deg, #172033, #2563eb);
}
.wod-cover h2 {
  font-size: 30px;
  margin: 0;
}
.wod-cover small {
  color: rgba(255,255,255,.86);
  font-weight: 700;
}
.wod-body {
  padding: 18px;
}
.wod-exercise-list {
  display: grid;
  gap: 8px;
}
.wod-exercise-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 120px minmax(160px, 1.2fr) minmax(120px, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.wod-exercise-row span {
  color: var(--brand);
  font-weight: 800;
}
.wod-exercise-row p,
.wod-exercise-row small {
  margin: 0;
  color: var(--muted);
}
.exercise-card {
  align-items: flex-start;
  flex-direction: column;
}
.highlight-note {
  padding: 14px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.invoice-preview {
  border-left: 8px solid var(--brand);
}
.status-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  background: #eef2f7;
  color: #526070;
}
.status-badge.good {
  background: #dcfce7;
  color: #166534;
}
.status-badge.warn {
  background: #fef3c7;
  color: #92400e;
}
.status-badge.danger {
  background: #fee2e2;
  color: #991b1b;
}
.status-badge.gift {
  background: #e0f2fe;
  color: #075985;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}
.contract-row,
.accounting-row {
  align-items: flex-start;
}
.contract-money small {
  color: #8a94a6;
  font-weight: 500;
}
.contract-money .paid {
  color: var(--good);
}
.contract-money .pending {
  color: var(--danger);
}
.detail-panel .status-badge,
.contract-row .status-badge,
.accounting-row .status-badge {
  margin-top: 4px;
}
.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  gap: 16px;
  align-items: start;
}
.ticket-list {
  display: grid;
  gap: 10px;
}
.ticket-row h3 {
  margin: 0;
  font-size: 17px;
}
.ticket-row h3 a {
  color: var(--ink);
}
.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 4px 0;
}
.ticket-meta span {
  color: var(--muted);
  font-size: 13px;
}
.ticket-detail {
  position: sticky;
  top: 18px;
}
.ticket-detail-actions {
  margin: 10px 0 14px;
}
.ticket-message-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}
.ticket-message {
  max-width: 88%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.ticket-message.is-superadmin {
  justify-self: end;
  border-color: rgba(37, 99, 235, .18);
  background: #eef4ff;
}
.ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}
.ticket-message-head strong {
  color: var(--ink);
}
.ticket-message p {
  margin: 0;
  line-height: 1.45;
}
.dog-detail-card {
  min-height: 360px;
}
.dog-detail-card .avatar {
  width: 154px;
  height: 154px;
  flex-basis: 154px;
}
.dog-detail-card a {
  color: var(--brand);
  font-weight: 800;
}
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(8px);
}
.app-modal.is-open {
  display: grid;
}
.app-modal-card {
  position: relative;
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(230,233,239,.9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(15, 23, 42, .22);
}
.app-modal-card h2 {
  margin: 0;
  font-size: 20px;
}
.app-modal-card p {
  margin: 0;
  color: #374151;
  line-height: 1.45;
}
.app-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: #f3f6fb;
  color: var(--muted);
  cursor: pointer;
}
.modal-actions {
  justify-content: flex-end;
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 100vh;
    transform: translateX(-105%);
    box-shadow: 18px 0 44px rgba(23,32,51,.16);
    transition: transform .18s ease;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .main {
    padding: 14px;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    align-items: center;
    flex-direction: row;
    padding: 8px 0;
    background: rgba(246,248,251,.94);
    backdrop-filter: blur(12px);
  }
  .logout-pill b {
    display: none;
  }
  .topbar .search { display: none; }
  .topbar .search.is-open {
    position: absolute;
    left: 0;
    right: 0;
    top: 58px;
    display: flex;
    width: 100%;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(23,32,51,.14);
  }
  .search-page-form {
    grid-template-columns: 1fr;
  }
  .search-page-form .btn {
    width: 100%;
  }
  h1 { font-size: 24px; }
  .row-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .row-card .btn {
    flex: 1;
  }
  .money-stack {
    width: 100%;
    text-align: left;
  }
  .exercise-line {
    grid-template-columns: 1fr;
  }
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(230,233,239,.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
  }
  .mobile-tabbar.client-tabbar {
    grid-template-columns: repeat(3, 1fr);
  }
  .mobile-tabbar a {
    min-height: 58px;
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 18px;
    color: var(--muted);
    font-size: 11px;
  }
  .mobile-tabbar span {
    font-size: 21px;
    line-height: 1;
  }
  .mobile-tabbar a.is-active {
    color: var(--brand);
    background: #eef4ff;
  }
  .profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .client-detail-card {
    align-items: center;
    min-height: 430px;
    padding: 22px 16px 18px;
  }
  .client-detail-card .avatar {
    width: 142px;
    height: 142px;
    flex-basis: 142px;
  }
  .dog-detail-card .avatar {
    width: 142px;
    height: 142px;
    flex-basis: 142px;
  }
  .client-detail-actions {
    width: 100%;
    justify-content: center;
  }
  .client-detail-actions .btn {
    flex: 1 1 130px;
  }
  .client-profile-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .client-photo-panel {
    min-height: 100%;
  }
  .client-photo-panel .avatar {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
  }
  .client-card-main {
    min-width: 0;
    padding: 16px;
  }
  .client-card-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .client-card-title h2 {
    font-size: 21px;
  }
  .dog-profile-row {
    align-items: flex-start;
  }
  .wod-exercise-row {
    grid-template-columns: 1fr;
  }
  .profile-card.compact {
    align-items: flex-start;
    flex-direction: column;
  }
  .dog-card {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .dog-card .avatar {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
  }
  .modal-actions .btn {
    flex: 1;
  }
  .inline-form.pay-form {
    width: 100%;
  }
  .inline-form input, .inline-form select {
    width: 100%;
  }
  .domain-form {
    width: 100%;
  }
  .domain-form input,
  .domain-form select {
    min-width: 0;
  }
  .toolbar-card .inline-form select {
    width: 100%;
    min-width: 0;
  }
  .agenda-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .agenda-filter-form .btn {
    width: 100%;
  }
  .calendar-pro {
    margin-left: -2px;
    margin-right: -2px;
    padding: 12px;
  }
  .calendar-day {
    min-height: 72px;
    padding: 6px;
    font-size: 12px;
  }
  .calendar-weekdays span {
    padding: 6px 2px;
    font-size: 11px;
  }
  .calendar-day strong {
    min-width: 22px;
    height: 20px;
    font-size: 11px;
  }
  .cal-dot {
    height: 4px;
  }
  .ticket-layout {
    grid-template-columns: 1fr;
  }
  .ticket-detail {
    position: static;
  }
  .ticket-message {
    max-width: 100%;
  }
  .ticket-detail-actions {
    align-items: stretch;
  }
  .ticket-detail-actions .btn {
    width: 100%;
  }
}
