/* VetConnect all-pages polish layer — keeps the existing St. Clare palette and layout. */
:root {
  --vc-focus-ring: 0 0 0 3px rgba(18,149,211,.17);
  --vc-card-shadow: 0 4px 18px rgba(24,59,78,.055);
  --vc-card-shadow-hover: 0 10px 26px rgba(24,59,78,.10);
}
html { scroll-padding-top: 88px; }
body { text-rendering: optimizeLegibility; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button, .btn, .nav-links a, .admin-nav a, .calendar-view-btn, .time-slot,
.service-select-card label, .svc-card, .about-value-card, .loc-feature-card {
  -webkit-tap-highlight-color: transparent;
}
button, .btn { transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease; }
.btn { min-height: 42px; font-weight: 700; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(18,149,211,.42); outline-offset: 3px;
}
@media (hover:hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: translateY(0); }
}
/* Public pages */
.site-header { box-shadow: 0 3px 16px rgba(8,80,125,.16); }
.site-header .nav-row { min-height: 72px; }
.nav-links a { transition: background-color .16s ease, color .16s ease; }
.landing-hero, .about-hero, .loc-hero, .svc-hero { isolation: isolate; }
.landing-hero-grid, .about-container, .loc-container, .svc-container { min-width: 0; }
.hero-copy h1 { text-wrap: balance; }
.hero-copy .lede, .about-lede, .loc-lede, .svc-lede { line-height: 1.7; }
.svc-card, .about-value-card, .loc-feature-card, .loc-info-card, .about-photo-card,
.about-vet-card, .dash-card, .booking-card, .auth-card, .admin-panel, .admin-stat-card,
.staff-schedule-panel, .admin-stat-grid .admin-stat-card {
  transition: box-shadow .18s ease, border-color .18s ease;
}
.svc-card, .about-value-card, .loc-feature-card, .loc-info-card { min-width: 0; }
.svc-card { overflow: hidden; }
.svc-card img, .svc-media img { object-fit: cover; }
.svc-card:focus-within, .about-value-card:focus-within, .loc-feature-card:focus-within { border-color: var(--color-blue); }
.svc-filter, .svc-filters { flex-wrap: wrap; }
.svc-dialog { max-height: min(88vh, 820px); overflow-y: auto; overscroll-behavior: contain; }
.about-photo-card img, .about-vet-photo, .about-clinic-photo { max-width: 100%; }
.loc-map iframe, .loc-map > * { max-width: 100%; }
/* Authentication pages */
.auth-page-main { min-width: 0; }
.auth-card { box-shadow: 0 12px 34px rgba(24,59,78,.09); }
.auth-card input, .auth-card select, .auth-card textarea,
.form-field input, .form-field select, .form-field textarea {
  min-height: 44px; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.auth-card input:focus, .auth-card select:focus, .auth-card textarea:focus,
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--color-blue); box-shadow: var(--vc-focus-ring);
}
.form-status, .booking-feedback { overflow-wrap: anywhere; }
.login-role-card { cursor: pointer; }
.login-role-card:focus-within { outline: 3px solid rgba(18,149,211,.25); outline-offset: 2px; }
/* Booking and client pages */
.booking-card, .booking-intro, .success-card, .auth-gate { box-shadow: var(--vc-card-shadow); }
.booking-section-head { align-items: flex-start; }
.booking-feedback:empty { display: none; }
.booking-summary-item, .schedule-info, .review-group { overflow-wrap: anywhere; }
.time-slot:disabled, .service-select-card input:disabled + label { cursor: not-allowed; opacity: .52; }
.dash-card, .dashboard-next-card, .dashboard-info-card { min-width: 0; }
.dashboard-actions .btn, .quick-actions .btn { min-height: 44px; }
/* Staff/admin dashboards and appointment-management pages */
.admin-shell { min-width: 0; }
.admin-sidebar, .staff-sidebar { min-width: 0; }
.admin-main, .admin-content, .admin-dashboard-main { min-width: 0; }
.admin-topbar, .admin-dashboard-header, .admin-overview-header { gap: 16px; }
.admin-panel, .staff-schedule-panel { min-width: 0; }
.admin-panel h2, .panel-heading h2, .staff-panel-heading h2 { text-wrap: balance; }
.admin-stat-card { min-width: 0; }
.admin-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.admin-table { border-collapse: separate; border-spacing: 0; }
.admin-table th { white-space: nowrap; }
.admin-table td { overflow-wrap: anywhere; }
.admin-table tbody tr { transition: background-color .12s ease; }
.admin-table tbody tr:hover { background: #f7fbfd; }
.admin-nav a { border-radius: 10px; }
.admin-nav a:focus-visible { outline-offset: 1px; }
.admin-filter-row, .admin-toolbar, .calendar-toolbar { min-width: 0; }
.admin-search input, .admin-filter-row input, .admin-filter-row select { min-height: 42px; }
.calendar-grid { max-width: 100%; }
.calendar-day, .month-day { overflow-wrap: anywhere; }
.badge, [class*="badge-"] { max-width: 100%; }
.admin-notification-menu, .admin-profile-menu { max-width: min(360px, calc(100vw - 24px)); }
/* Better empty states and action layouts */
.admin-panel-empty, .next-appt-empty { line-height: 1.65; }
.admin-panel .btn, .staff-panel-heading .btn { white-space: normal; }
/* Consistent small-screen behavior */
@media (max-width: 900px) {
  .admin-shell { min-width: 0; }
  .admin-sidebar, .staff-sidebar { max-width: 100%; }
  .admin-topbar, .admin-dashboard-header { align-items: flex-start; }
  .admin-table-wrap { border-radius: 10px; }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .site-header .nav-row { gap: 10px; }
  .auth-card { width: min(100%, 520px); }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-filters { gap: 8px; }
  .admin-dashboard-page .admin-overview-middle { grid-template-columns: minmax(0,1fr); }
  .admin-table { font-size: .84rem; }
  .admin-table th, .admin-table td { padding: 11px 12px; }
  .calendar-toolbar { align-items: stretch; }
  .calendar-range-label { overflow-wrap: anywhere; }
  .booking-card { padding: clamp(16px, 4vw, 24px); }
  .auth-gate { margin: 28px auto; padding: 30px 20px; }
}
@media (max-width: 420px) {
  .site-header .brand-name-full { max-width: 58vw; }
  .site-header .brand-name-full strong { overflow-wrap: anywhere; }
  .site-header .nav-actions .btn { min-height: 40px; }
  .admin-overview-title h1, .admin-dashboard-header h1 { overflow-wrap: anywhere; }
  .admin-panel, .staff-schedule-panel { padding: 14px !important; }
  .admin-stat-card .label { overflow-wrap: anywhere; }
  .booking-summary-grid { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
