:root {
  --pet-primary: #696cff;
  --pet-ink: #233446;
  --pet-muted: #607187;
  --pet-border: #e9ecf4;
  --pet-radius: 1rem;
}

body { background: #f4f5fb; color: var(--pet-ink); }
.pet-skip { position: fixed; z-index: 1200; top: .5rem; left: .5rem; padding: .5rem 1rem; background: #fff; }
#pet-app[hidden], #pet-signed-out[hidden], #pet-confirm-logout[hidden] { display: none; }

#layout-menu .app-brand { min-height: 78px; padding-inline: 1.25rem; }
.pet-brand { gap: .75rem; color: var(--pet-ink); line-height: 1.15; }
.pet-brand strong { display: block; font-size: 1.2rem; }
.pet-brand small { display: block; color: var(--pet-muted); font-size: .8rem; margin-top: .2rem; }
.pet-brand-icon, .pet-avatar, .pet-icon { display: inline-grid; place-items: center; flex: none; }
.pet-brand-icon { width: 2.55rem; height: 2.55rem; border-radius: .75rem; color: #fff; background: #5557db; font-size: 1.45rem; }
#layout-menu .menu-header { margin-top: .7rem; color: var(--pet-muted); font-size: .76rem; font-weight: 700; }
#layout-menu .menu-inner .menu-link { min-height: 2.5rem; font-size: .875rem; }
#layout-menu .menu-inner button.menu-link { width: calc(100% - 2rem); border: 0; background: transparent; text-align: left; }
#layout-menu .menu-inner button.menu-link:hover { background: #f0f0ff; color: #4d50c9; }

#layout-navbar.pet-navbar { display: flex; flex-wrap: nowrap; gap: clamp(.35rem, 1.2vw, 1rem); z-index: 10; }
.pet-nav-button, .pet-account {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 2.6rem; border: 0; border-radius: .6rem; background: transparent; color: var(--pet-ink);
}
.pet-nav-button { width: 2.55rem; padding: 0; font-size: 1.35rem; }
.pet-account { padding: .15rem .2rem; font-size: .875rem; }
.pet-nav-button:hover, .pet-account:hover { background: #f1f1fe; }
.pet-avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #e7e7ff; color: #4448ba; font-weight: 700; }
.pet-notification-dot { position: absolute; top: .48rem; right: .52rem; width: .55rem; height: .55rem; border: 1px solid #fff; border-radius: 50%; background: #e45264; }
.pet-notifications { width: min(22rem, calc(100vw - 2rem)); }
.pet-search { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; gap: .55rem; color: var(--pet-muted); }
.pet-search > i { font-size: 1.25rem; }
.pet-search input { min-width: 0; width: 100%; min-height: 2.4rem; padding: .35rem .25rem; border: 0; border-radius: .3rem; color: var(--pet-ink); background: transparent; }
.pet-search input::placeholder { color: var(--pet-muted); opacity: 1; }
.pet-search-results { position: absolute; z-index: 2; top: calc(100% + .5rem); left: 0; width: min(24rem, calc(100vw - 4.75rem)); background: #fff; border: 1px solid var(--pet-border); border-radius: .65rem; padding: .35rem; }
.pet-search-results button { display: block; width: 100%; border: 0; border-radius: .4rem; text-align: left; padding: .55rem .7rem; background: #fff; color: var(--pet-ink); }
.pet-search-results button:hover, .pet-search-results button:focus-visible { background: #eeeeff; }
.pet-search-results p { padding: .55rem .7rem; margin: 0; }
:is(.pet-nav-button, .pet-account, .pet-record, .pet-search input, .menu-link, .pet-search-results button, .table-responsive):focus-visible { outline: 2px solid #4f53d6; outline-offset: 2px; }

.pet-dashboard { padding-top: 1.4rem; }
.pet-hero {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center;
  min-height: 10rem; margin-bottom: 1.25rem; padding: 1.5rem clamp(1.25rem, 3vw, 2.1rem); border-radius: var(--pet-radius);
  background: linear-gradient(110deg, #4749bf, #5f5ee6 67%, #626cf1); color: #fff;
}
.pet-hero h1 { margin: .4rem 0 .85rem; color: inherit; font-weight: 750; font-size: clamp(1.55rem, 2.8vw, 2.25rem); letter-spacing: -.025em; }
.pet-hero-label { margin: 0; color: #eeedff; font-size: .875rem; font-weight: 600; }
.pet-hero-date { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .9rem; }
.pet-hero-art {
  position: absolute; z-index: -1; inset: 50% 5% auto auto; transform: translateY(-50%);
  width: 11rem; height: 11rem; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #ffffff4d; color: #fff; box-shadow: 0 0 0 1.8rem #ffffff14, 0 0 0 3.5rem #ffffff0c;
}
.pet-hero-art .bx-clinic { font-size: 4.25rem; }
.pet-hero-art .bx-plus, .pet-hero-art .bx-heart { position: absolute; font-size: 1.65rem; }
.pet-hero-art .bx-plus { top: 17%; right: 14%; }
.pet-hero-art .bx-heart { bottom: 16%; left: 13%; }

.pet-metrics, .pet-charts, .pet-operations { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.pet-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pet-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pet-operations { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.pet-metric, .pet-panel { min-width: 0; border: 1px solid var(--pet-border); border-radius: var(--pet-radius); box-shadow: 0 3px 10px #26325208; }
.pet-metric { display: grid; justify-items: start; align-content: start; gap: .45rem; padding: 1rem; }
.pet-metric dt { color: var(--pet-muted); font-size: .875rem; font-weight: 600; }
.pet-metric dd { margin: 0; color: var(--pet-ink); font-size: clamp(1.15rem, 1.65vw, 1.55rem); font-weight: 750; line-height: 1.2; }
.pet-icon { width: 2.35rem; height: 2.35rem; border-radius: .65rem; font-size: 1.25rem; }
.pet-purple { color: #4e51ce; background: #ecebff; }
.pet-blue { color: #096d96; background: #e7f6ff; }
.pet-green { color: #187254; background: #e4f7ee; }
.pet-amber { color: #8d5500; background: #fff3dc; }
.pet-panel-heading { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: .6rem; padding: 1.15rem 1.15rem .65rem; }
.pet-panel-heading h2 { margin: 0 0 .25rem; color: var(--pet-ink); font-size: 1.075rem; font-weight: 750; }
.pet-panel-heading p { margin: 0; color: var(--pet-muted); font-size: .875rem; }
.pet-period { width: auto; min-height: 2rem; font-size: .875rem; }
.pet-chart { min-height: 240px; padding-inline: .5rem; }
.pet-table { font-size: .875rem; color: var(--pet-ink); }
.pet-table > :not(caption) > * > * { padding: .75rem .85rem; }
.pet-table thead th { background: #f7f8fc; color: var(--pet-muted); white-space: nowrap; font-size: .78rem; }
.pet-table tbody tr:last-child td { border-bottom: 0; }
.pet-table .badge { white-space: nowrap; }
.pet-table small, .pet-upcoming small { display: block; color: var(--pet-muted); font-size: .81rem; }
.pet-record { padding: 0; border: 0; background: transparent; color: #484cc4; font-weight: 700; }
.pet-record:hover { text-decoration: underline; }
.pet-upcoming { padding: 0 1.15rem .55rem; }
.pet-upcoming li { display: flex; align-items: center; gap: .65rem; padding-block: .75rem; font-size: .875rem; }
.pet-upcoming li + li { border-top: 1px solid var(--pet-border); }
.pet-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .2rem 0 1.3rem; color: var(--pet-muted); font-size: .875rem; }
.pet-signed-out { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }

@media (max-width: 1440px) {
  .pet-operations { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 991.98px) {
  .pet-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .pet-charts { grid-template-columns: minmax(0, 1fr); }
  .pet-hero-art { right: -1.75rem; opacity: .3; }
}
@media (max-width: 575.98px) {
  #layout-navbar.pet-navbar { padding-inline: .65rem; }
  .pet-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .pet-metric:last-child { grid-column: 1 / -1; }
  .pet-hero { min-height: 8.5rem; }
  .pet-search { gap: .25rem; }
  .pet-search input { font-size: .875rem; }
  .pet-search-results { left: -1.5rem; }
  #layout-navbar .pet-notifications { position: fixed; inset: 5rem .75rem auto auto !important; transform: none !important; }
}
