
.bootstrap-app .app-mobile-offcanvas {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-strong) 100%);
}

.bootstrap-app .app-footer {
  padding: 1rem 0 6rem;
}

.bootstrap-app .app-footer a {
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 767px) {
  .bootstrap-app .dashboard-search-form {
    grid-template-columns: 1fr;
  }

  .bootstrap-app .panel,
  .bootstrap-app .resting-place-panel,
  .bootstrap-app .animal-hero-card {
    padding: 0.9rem;
    border-radius: 1.1rem;
  }

  .bootstrap-app .animal-hero-meta-grid {
    gap: 0.55rem;
  }

  .bootstrap-app .animal-hero-meta-card {
    padding: 0.75rem 0.8rem;
  }

  .bootstrap-app .animal-thumb {
    width: 46px;
    height: 46px;
  }

  .bootstrap-app .animal-hero-card {
    gap: 0.75rem;
  }

  .bootstrap-app .animal-hero-content {
    display: grid;
    gap: 0.7rem;
  }

  .bootstrap-app .animal-hero-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .bootstrap-app .hero-actions {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 40px;
    gap: 0.55rem;
    width: auto;
  }

.bootstrap-app .hero-actions .btn {
  min-height: 40px;
  width: 40px;
  justify-content: center;
}

  .bootstrap-app .accordion-summary-status {
    justify-self: start;
    width: auto;
    min-width: 0;
  }
}

body.bootstrap-app {
  background:
    radial-gradient(1100px 720px at 0% 0%, rgba(139, 92, 246, 0.16), transparent 58%),
    radial-gradient(920px 620px at 100% 100%, rgba(168, 85, 247, 0.1), transparent 56%),
    linear-gradient(180deg, #09090b 0%, #111114 100%);
  color: var(--text-soft);
}

.bootstrap-app .app-main-container {
  padding-bottom: 6rem;
}

.bootstrap-app .app-sidebar,
.bootstrap-app .app-mobile-offcanvas,
.bootstrap-app .app-mobile-tabbar,
.bootstrap-app .drawer-panel {
  background: rgba(12, 12, 15, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.bootstrap-app .app-mobile-topbar {
  background: rgba(9, 9, 11, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
  min-height: 54px;
  padding-top: calc(0.45rem + env(safe-area-inset-top));
  padding-bottom: 0.45rem;
}

.bootstrap-app .app-mobile-offcanvas .offcanvas-header {
  border-color: var(--surface-border) !important;
}

.bootstrap-app.login-body {
  background:
    radial-gradient(760px 420px at 50% -10%, rgba(139, 92, 246, 0.22), transparent 64%),
    linear-gradient(180deg, #09090b 0%, #111114 100%);
}

.bootstrap-app .page-header,
.bootstrap-app .panel,
.bootstrap-app .animals-empty-detail,
.bootstrap-app .hero-card,
.bootstrap-app .animal-hero-card,
.bootstrap-app .masterdata-section > .accordion-content,
.bootstrap-app .accordion-item,
.bootstrap-app .login-panel {
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.88), rgba(31, 31, 35, 0.96));
  border-color: var(--surface-border);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.bootstrap-app .page-header,
.bootstrap-app .panel,
.bootstrap-app .animals-empty-detail,
.bootstrap-app .login-panel {
  border-radius: 14px;
}

.bootstrap-app h1,
.bootstrap-app h2,
.bootstrap-app h3,
.bootstrap-app strong {
  color: var(--text-strong);
}

.bootstrap-app .page-header h1 {
  color: #fff;
  text-shadow: 0 8px 32px rgba(139, 92, 246, 0.18);
}

.bootstrap-app .help-copy,
.bootstrap-app .empty-state,
.bootstrap-app .table-sub,
.bootstrap-app .brand-text span,
.bootstrap-app .app-sidebar-footer span,
.bootstrap-app .small-label,
.bootstrap-app .app-footer a,
.bootstrap-app p,
.bootstrap-app small {
  color: var(--text-dim);
}

.bootstrap-app .banner-warning,
.bootstrap-app .floating-reminder,
.bootstrap-app .logo-upload-preview,
.bootstrap-app .vet-contact-popover,
.bootstrap-app .global-search-suggestions {
  background: rgba(19, 19, 24, 0.9);
  border: 1px solid var(--surface-border);
}

.bootstrap-app .floating-reminder {
  background:
    radial-gradient(240px 120px at 0% 50%, rgba(251, 191, 36, 0.18), transparent 70%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(24, 24, 27, 0.98));
  border-color: rgba(251, 191, 36, 0.28);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.08),
    0 0 26px rgba(245, 158, 11, 0.16),
    0 12px 32px rgba(0, 0, 0, 0.24);
}

.bootstrap-app .floating-reminder:hover,
.bootstrap-app .floating-reminder:focus-visible {
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.12),
    0 0 34px rgba(245, 158, 11, 0.22),
    0 16px 36px rgba(0, 0, 0, 0.28);
}

.bootstrap-app .drawer-backdrop {
  background: rgba(4, 4, 7, 0.52);
  backdrop-filter: blur(10px);
}

.bootstrap-app .drawer-panel {
  border-left: 1px solid var(--surface-border);
  box-shadow: -24px 0 44px rgba(0, 0, 0, 0.38);
}

.bootstrap-app .drawer-header {
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.bootstrap-app .drawer-close {
  color: var(--text-soft);
  border-color: var(--surface-border);
  background: rgba(255, 255, 255, 0.03);
}

.bootstrap-app .drawer-close:hover {
  background: rgba(139, 92, 246, 0.14);
  color: #fff;
}

.bootstrap-app .banner-warning {
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.22);
}

.bootstrap-app .flash-success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(24, 24, 27, 0.94));
}

.bootstrap-app .flash-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(24, 24, 27, 0.94));
}

.bootstrap-app .btn {
  min-height: 38px;
  border-radius: var(--radius-ui);
  font-weight: 700;
  padding-top: 0.42rem;
  padding-bottom: 0.42rem;
}

.bootstrap-app .btn.icon-button {
  min-width: 38px;
  min-height: 38px;
  padding-inline: 0.65rem;
}

.bootstrap-app .btn-success,
.bootstrap-app .btn.btn-success {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(109, 40, 217, 0.3);
}

.bootstrap-app .btn-success:hover,
.bootstrap-app .btn.btn-success:hover {
  color: #fff;
  background: linear-gradient(135deg, #9f77ff 0%, #7c3aed 100%);
}

.bootstrap-app .btn-outline-secondary,
.bootstrap-app .btn.btn-outline-secondary {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--surface-border);
}

.bootstrap-app .btn-outline-secondary:hover,
.bootstrap-app .btn.btn-outline-secondary:hover {
  color: var(--text-strong);
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--surface-border-strong);
}

.bootstrap-app .btn-outline-danger,
.bootstrap-app .btn.btn-outline-danger {
  color: #fda4af;
  background: rgba(127, 29, 29, 0.18);
  border-color: rgba(239, 68, 68, 0.22);
}

.bootstrap-app .btn-outline-danger:hover,
.bootstrap-app .btn.btn-outline-danger:hover {
  color: #ffe4e6;
  background: rgba(239, 68, 68, 0.16);
}

.bootstrap-app .table-wrap {
  border-radius: var(--radius-ui);
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: rgba(15, 15, 19, 0.7);
}

.bootstrap-app .table-wrap table {
  margin: 0;
}

.bootstrap-app .table-wrap thead th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bootstrap-app .table-wrap tbody tr + tr td {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.bootstrap-app .table-wrap tbody tr:hover td {
  background: rgba(139, 92, 246, 0.05);
}

.bootstrap-app .table-wrap td,
.bootstrap-app .table-wrap th {
  padding: 0.7rem 0.8rem;
  vertical-align: top;
}

.bootstrap-app input,
.bootstrap-app select,
.bootstrap-app textarea,
.bootstrap-app .form-control,
.bootstrap-app .form-select {
  color: var(--text-soft);
  background: rgba(10, 10, 13, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-ui);
}

.bootstrap-app input::placeholder,
.bootstrap-app textarea::placeholder {
  color: rgba(161, 161, 170, 0.72);
}

.bootstrap-app input:focus,
.bootstrap-app select:focus,
.bootstrap-app textarea:focus,
.bootstrap-app .form-control:focus,
.bootstrap-app .form-select:focus {
  color: var(--text-strong);
  background: rgba(15, 15, 19, 0.92);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 0.24rem rgba(139, 92, 246, 0.16);
}

.bootstrap-app .status-chip,
.bootstrap-app .pill,
.bootstrap-app .counter,
.bootstrap-app .subtle-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.bootstrap-app .status-chip,
.bootstrap-app .pill,
.bootstrap-app .subtle-pill {
  min-height: 2.05rem;
  padding: 0.38rem 0.82rem;
  border-radius: var(--radius-ui);
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bootstrap-app .status-chip {
  justify-content: center;
}

.bootstrap-app .pill strong,
.bootstrap-app .subtle-pill strong {
  color: #fff;
}

.bootstrap-app .setup-status-chip.status-ok,
.bootstrap-app .service-status-chip.status-active,
.bootstrap-app .status-ok,
.bootstrap-app .status-active,
.bootstrap-app .status-complete {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.28);
  color: #fff;
}

.bootstrap-app .setup-status-chip.status-muted,
.bootstrap-app .service-status-chip.status-muted,
.bootstrap-app .status-muted,
.bootstrap-app .status-inactive {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
}

.bootstrap-app .status-warning,
.bootstrap-app .status-attention {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.2);
  color: #fde68a;
}

.bootstrap-app .status-error,
.bootstrap-app .status-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fda4af;
}

.bootstrap-app .status-chip.status-muted,
.bootstrap-app .status-chip.status-pending,
.bootstrap-app .status-chip.status-skipped {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
}

.bootstrap-app .status-chip.status-warning {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.26);
}

.bootstrap-app .status-chip.status-error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.24);
}

.bootstrap-app .accordion:not(.nav-accordion) {
  --bs-accordion-bg: rgba(19, 19, 24, 0.9);
  --bs-accordion-border-color: var(--surface-border);
  --bs-accordion-border-radius: var(--radius-ui);
  --bs-accordion-inner-border-radius: var(--radius-ui);
  --bs-accordion-btn-bg: linear-gradient(180deg, rgba(24, 24, 27, 0.84), rgba(31, 31, 35, 0.96));
  --bs-accordion-btn-color: var(--text-strong);
  --bs-accordion-active-bg: linear-gradient(180deg, rgba(24, 24, 27, 0.92), rgba(31, 31, 35, 0.98));
  --bs-accordion-active-color: #fff;
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.24rem rgba(139, 92, 246, 0.16);
  --bs-accordion-btn-focus-border-color: rgba(139, 92, 246, 0.45);
  --bs-accordion-btn-icon: none;
  --bs-accordion-btn-active-icon: none;
}

.bootstrap-app .accordion:not(.nav-accordion) .accordion-button {
  display: grid;
  gap: 0.1rem;
  align-items: start;
  padding: 0.7rem 0.85rem;
  box-shadow: none;
}

.bootstrap-app .accordion:not(.nav-accordion) .accordion-button::after {
  content: "+";
  width: auto;
  height: auto;
  margin-left: auto;
  background-image: none;
  color: var(--text-dim);
  transform: none;
}

.bootstrap-app .accordion:not(.nav-accordion) .accordion-button:not(.collapsed)::after {
  content: "−";
  transform: none;
}

.bootstrap-app .accordion:not(.nav-accordion) .accordion-body {
  display: grid;
  gap: 0.6rem;
  color: var(--text-soft);
  background: rgba(19, 19, 24, 0.94);
  padding: 0.85rem;
}

.bootstrap-app .accordion:not(.nav-accordion) .accordion-item + .accordion-item {
  margin-top: 0.5rem;
}

.bootstrap-app .animal-record-accordion .accordion-item + .accordion-item {
  margin-top: 0.35rem;
}

.bootstrap-app .accordion-item > summary {
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.84), rgba(31, 31, 35, 0.96));
}

.bootstrap-app .nav-accordion .accordion-button::after {
  color: var(--text-dim);
}

.bootstrap-app .app-mobile-tabbar {
  background: rgba(9, 9, 11, 0.88);
  border-color: var(--surface-border) !important;
  padding-bottom: env(safe-area-inset-bottom);
  min-height: 58px;
}

.bootstrap-app .app-mobile-tabbar .nav-link,
.bootstrap-app .app-mobile-tabbar button.nav-link {
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 0.38rem 0.2rem calc(0.38rem + env(safe-area-inset-bottom));
  border-radius: var(--radius-ui);
}

.bootstrap-app .app-mobile-tabbar .nav-link.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.22);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.2);
}

.bootstrap-app .banner-warning,
.bootstrap-app .flash-success,
.bootstrap-app .flash-error,
.bootstrap-app .service-status-chip,
.bootstrap-app .setup-status-chip,
.bootstrap-app .counter,
.bootstrap-app .drawer-close,
.bootstrap-app .app-mobile-offcanvas .offcanvas-body,
.bootstrap-app .app-mobile-offcanvas .offcanvas-header {
  border-radius: var(--radius-ui);
}

.bootstrap-app .banner-warning,
.bootstrap-app .flash-success,
.bootstrap-app .flash-error {
  min-height: 44px;
  padding: 0.9rem 1rem;
  border-width: 1px;
}

.bootstrap-app .service-status-chip,
.bootstrap-app .setup-status-chip,
.bootstrap-app .status-chip,
.bootstrap-app .pill,
.bootstrap-app .subtle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.bootstrap-app button.status-chip,
.bootstrap-app button.service-status-chip,
.bootstrap-app button.setup-status-chip {
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius-ui);
}

.bootstrap-app .app-mobile-offcanvas .offcanvas-header {
  padding: calc(0.7rem + env(safe-area-inset-top)) 0.95rem 0.7rem;
}

.bootstrap-app .app-mobile-offcanvas .offcanvas-body {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem 0.95rem calc(1rem + env(safe-area-inset-bottom));
}

.bootstrap-app .status-chip,
.bootstrap-app .pill,
.bootstrap-app .subtle-pill,
.bootstrap-app .service-status-chip,
.bootstrap-app .setup-status-chip {
  border-width: 1px;
  border-style: solid;
}

@media (max-width: 640px) {
  .bootstrap-app .animal-hero-card {
    grid-template-columns: 1fr !important;
    align-items: start;
  }

  .bootstrap-app .animal-hero-profile,
  .bootstrap-app .animal-hero-content,
  .bootstrap-app .hero-actions {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .bootstrap-app .animal-hero-profile {
    order: 0;
  }

  .bootstrap-app .animal-hero-content {
    order: 1;
  }

  .bootstrap-app .hero-actions {
    order: 2;
    justify-content: start;
  }

  .bootstrap-app .animal-hero-head {
    grid-template-columns: 1fr !important;
  }

  .bootstrap-app .masterdata-section > .accordion-content {
    background: rgba(19, 19, 24, 0.94) !important;
    border-color: var(--surface-border) !important;
  }
}

/* Bootstrap-first reset layer */
[data-bs-theme="dark"] {
  --bs-body-bg: #121218;
  --bs-body-color: #ececf3;
  --bs-primary: #7c3aed;
  --bs-primary-rgb: 124, 58, 237;
  --bs-secondary-color: #a7a7b4;
  --bs-secondary-bg-subtle: rgba(255, 255, 255, 0.04);
  --bs-tertiary-bg: #1a1a22;
  --bs-tertiary-bg-rgb: 26, 26, 34;
  --bs-border-color: rgba(255, 255, 255, 0.1);
  --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
  --bs-card-bg: #1a1a22;
  --bs-card-cap-bg: transparent;
  --bs-emphasis-color: #ffffff;
  --bs-link-color: #c4b5fd;
  --bs-link-hover-color: #ddd6fe;
  --bs-warning: #f59e0b;
  --bs-warning-rgb: 245, 158, 11;
}

.bootstrap-app .nav-link {
  color: var(--bs-body-color);
}

.bootstrap-app .nav-link.text-body-secondary {
  color: var(--bs-secondary-color) !important;
}

.bootstrap-app .nav-link.active {
  background-color: rgba(var(--bs-primary-rgb), 0.18);
  color: #fff !important;
}

.bootstrap-app .nav-accordion .accordion-button {
  background: transparent;
  color: var(--bs-body-color);
  box-shadow: none;
}

.bootstrap-app .nav-accordion .accordion-button:not(.collapsed) {
  background-color: rgba(var(--bs-primary-rgb), 0.18);
  color: #fff;
}

.bootstrap-app .nav-accordion .accordion-button::after {
  filter: invert(1) grayscale(1);
  opacity: 0.8;
}

.bootstrap-app .nav-accordion .accordion-body {
  padding-right: 0;
}

.bootstrap-app .card {
  background: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 0.9rem;
  box-shadow: none !important;
}

.bootstrap-app .card-img-top {
  border-top-left-radius: 0.9rem;
  border-top-right-radius: 0.9rem;
}

.bootstrap-app .list-group-item {
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

.bootstrap-app .list-group-item.active {
  background-color: rgba(var(--bs-primary-rgb), 0.16);
  border-color: rgba(var(--bs-primary-rgb), 0.45);
  color: #fff;
}

.bootstrap-app .dashboard-stat-primary strong {
  display: block;
  margin: 0.5rem 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  font-weight: 700;
}

.bootstrap-app .floating-reminder {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  color: #fde68a;
  text-decoration: none;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.5);
  border-radius: 0.75rem;
}

.bootstrap-app .floating-reminder:hover {
  color: #fff3c4;
}

@media (max-width: 991.98px) {
  .bootstrap-app .app-main-container {
    padding: 0 1rem 5.5rem;
  }

  .bootstrap-app .page-header-body {
    min-height: auto;
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
  }
}
