/* ============================================
   PAWCAMP DESIGN SYSTEM
   Earthy woodland palette · sketchy borders · elegant typography
   For dog trainers managing their mobile business
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --forest: #2D4A3E;
  --forest-light: #3D5F50;
  --bark: #5C4A3D;
  --bark-light: #7A6455;
  --tan: #C4A77D;
  --tan-light: #D9C4A0;
  --terracotta: #C66B3D;
  --terracotta-light: #D4845C;
  --cream: #FAF6F1;
  --cream-dark: #EDE6DC;
  --sage: #8BA888;
  --sage-dark: #5A8F5A;
  --charcoal: #3A3632;
  --error: #C45B4A;
  --error-light: #FCEAE7;
  --warning: #D4A03D;
  --warning-light: #FDF6E3;
}

body {
  min-height: 100vh;
  background-color: var(--cream);
  font-family: 'Libre Baskerville', Georgia, serif;
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Focus Rings (keyboard accessibility) --- */
:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.hidden {
  display: none !important;
}


/* ============================================
   TYPOGRAPHY
   ============================================ */

.text-display-xl {
  font-family: 'Caveat', cursive;
  font-size: 52px;
  font-weight: 600;
  color: var(--forest);
  letter-spacing: -1px;
  line-height: 1.1;
}

.text-display-lg {
  font-family: 'Caveat', cursive;
  font-size: 36px;
  font-weight: 600;
  color: var(--forest);
  line-height: 1.2;
}

.text-display-md {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  font-weight: 500;
  color: var(--forest);
  line-height: 1.3;
}

.text-display-sm {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  font-weight: 500;
  color: var(--forest);
  line-height: 1.3;
}

.text-body-lg {
  font-size: 18px;
  line-height: 1.6;
}

.text-body {
  font-size: 16px;
  line-height: 1.6;
}

.text-body-sm {
  font-size: 14px;
  line-height: 1.5;
}

.text-body-xs {
  font-size: 12px;
  line-height: 1.4;
}

.text-label {
  font-size: 12px;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.text-forest { color: var(--forest); }
.text-bark { color: var(--bark); }
.text-terracotta { color: var(--terracotta); }
.text-sage { color: var(--sage); }


/* ============================================
   SKETCHY BORDERS
   Asymmetric border-radius for hand-drawn feel
   ============================================ */

.sketchy-border {
  border-radius: 12px 8px 14px 6px;
}

.hand-drawn-underline {
  position: relative;
}

.hand-drawn-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6'%3E%3Cpath d='M0,3 Q25,0 50,3 T100,3' fill='none' stroke='%23C66B3D' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 100px 6px;
}


/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes wagTail {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ============================================
   NAVIGATION
   ============================================ */

.nav-trainer,
.nav-client,
.nav-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 14px 10px 14px 10px;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-icon {
  font-size: 24px;
}

.nav-logo-text {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  font-weight: 600;
  color: var(--forest);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--bark);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: var(--cream);
  color: var(--forest);
}

.nav-link.active {
  background: var(--forest);
  color: var(--cream);
  font-weight: 700;
}

.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tan);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

/* Mobile bottom nav */
.nav-mobile {
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 16px 0 0;
}

.nav-mobile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--bark-light);
  transition: color 0.2s ease;
}

.nav-mobile-item.active {
  color: var(--forest);
}

.nav-mobile-icon {
  font-size: 20px;
}

.nav-mobile-label {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  font-weight: 500;
}


/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-family: 'Libre Baskerville', serif;
  border: none;
  border-radius: 10px 6px 12px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Variants */
.btn-primary {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 4px 12px rgba(45, 74, 62, 0.25);
}

.btn-primary:hover {
  background: var(--forest-light);
}

.btn-secondary {
  background: var(--terracotta);
  color: var(--cream);
  box-shadow: 0 4px 12px rgba(198, 107, 61, 0.25);
}

.btn-secondary:hover {
  background: var(--terracotta-light);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
  padding: 12px 26px;
}

.btn-outline:hover {
  background: var(--cream);
}

.btn-ghost {
  background: transparent;
  color: var(--bark);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--tan);
  text-underline-offset: 4px;
}

.btn-ghost:hover {
  color: var(--forest);
}

.btn-destructive {
  background: var(--error);
  color: #fff;
  box-shadow: 0 4px 12px rgba(196, 91, 74, 0.25);
}

.btn-destructive:hover {
  background: #B34A3A;
}

/* Sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 6px 8px 6px 8px;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 18px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Specific small-button colors (for confirm/edit/cancel actions) */
.btn-confirm {
  background: var(--sage);
  color: #fff;
}

.btn-confirm:hover {
  background: var(--sage-dark);
}

.btn-edit {
  background: var(--cream-dark);
  color: var(--bark);
}

.btn-edit:hover {
  background: var(--tan-light);
}

.btn-cancel-outline {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
}

.btn-cancel-outline:hover {
  background: var(--error-light);
}


/* ============================================
   FORM INPUTS
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: var(--bark);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: 'Libre Baskerville', serif;
  border: 2px solid var(--tan-light);
  border-radius: 8px 6px 10px 8px;
  background: var(--cream);
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--bark-light);
  opacity: 0.6;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.12);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: var(--cream-dark);
  color: var(--bark-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235C4A3D' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-hint {
  font-size: 13px;
  color: var(--bark-light);
  margin-top: 6px;
  font-style: italic;
}

.form-error {
  font-size: 13px;
  color: var(--error);
  margin-top: 6px;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error);
}

/* Form row for side-by-side fields */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}


/* ============================================
   CARDS
   ============================================ */

.card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(45, 74, 62, 0.15);
}

.card-static {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
}

.card-body {
  padding: 24px;
}

.card-dark {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}


/* ============================================
   STATUS BADGES
   ============================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.status-confirmed {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-pending {
  background: #FFF8E1;
  color: #F57F17;
}

.status-awaiting {
  background: #FFF3E0;
  color: #E65100;
}

.status-waitlisted {
  background: #E3F2FD;
  color: #1565C0;
}

.status-cancelled {
  background: var(--error-light);
  color: var(--error);
}

.status-expired {
  background: var(--cream-dark);
  color: var(--bark-light);
}


/* ============================================
   CREDIT BADGE
   ============================================ */

.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}

.credit-badge-positive {
  background: #E8F5E9;
  color: #2E7D32;
}

.credit-badge-zero {
  background: var(--error-light);
  color: var(--error);
}


/* ============================================
   BOOKING CARD
   ============================================ */

.booking-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 12px 8px 14px 10px;
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.booking-card:hover {
  box-shadow: 0 4px 16px rgba(45, 74, 62, 0.1);
}

.booking-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.booking-card-title {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--forest);
}

.booking-card-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--bark);
  margin-bottom: 12px;
}

.booking-card-dog {
  display: flex;
  align-items: center;
  gap: 8px;
}

.booking-card-dog-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.booking-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--cream-dark);
}


/* ============================================
   COURSE CARD
   ============================================ */

.course-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(45, 74, 62, 0.15);
}

.course-card-header {
  background: var(--forest);
  padding: 20px 24px;
  position: relative;
}

.course-card-title {
  font-family: 'Caveat', cursive;
  font-size: 26px;
  color: var(--cream);
}

.course-card-label {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: var(--sage);
  margin-bottom: 4px;
}

.course-card-body {
  padding: 20px 24px;
}

.course-card-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--bark);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.course-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.course-card-waitlist-count {
  font-size: 13px;
  color: var(--bark-light);
  font-style: italic;
}

.course-card-cancelled {
  opacity: 0.6;
}

.course-card-cancelled .course-card-title {
  text-decoration: line-through;
}

/* Lock icon for approval-required */
.course-card-lock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--sage);
  margin-top: 4px;
}


/* ============================================
   CAPACITY INDICATOR
   ============================================ */

.capacity-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.capacity-bar {
  width: 80px;
  height: 8px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}

.capacity-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.capacity-bar-fill.low {
  background: var(--sage);
}

.capacity-bar-fill.medium {
  background: var(--warning);
}

.capacity-bar-fill.high {
  background: var(--terracotta);
}

.capacity-text {
  font-size: 13px;
  color: var(--bark);
  font-weight: 700;
  white-space: nowrap;
}

.capacity-indicator.full .capacity-text {
  color: var(--terracotta);
}


/* ============================================
   WAITLIST BADGE
   ============================================ */

.waitlist-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: #E3F2FD;
  border-radius: 20px;
  font-size: 13px;
  color: #1565C0;
}

.waitlist-badge-position {
  font-weight: 700;
}


/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 10px 6px 10px 8px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease;
}

.toast-icon {
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
}

.toast-success {
  background: #E8F5E9;
  color: #2E7D32;
  border-left: 4px solid #2E7D32;
}

.toast-error {
  background: var(--error-light);
  color: var(--error);
  border-left: 4px solid var(--error);
}

.toast-warning {
  background: var(--warning-light);
  color: #8B6914;
  border-left: 4px solid var(--warning);
}

.toast-info {
  background: #E3F2FD;
  color: #1565C0;
  border-left: 4px solid #1565C0;
}


/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 74, 62, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal {
  background: #fff;
  border-radius: 18px 12px 16px 14px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(45, 74, 62, 0.25);
  animation: modalIn 0.25s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid var(--cream-dark);
}

.modal-title {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--forest);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--bark);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: var(--cream-dark);
}

.modal-section {
  padding: 16px 24px;
  background: var(--cream);
  border-bottom: 2px solid var(--cream-dark);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 2px solid var(--cream-dark);
}

/* Confirm modal (centered, icon-driven) */
.modal-confirm {
  text-align: center;
  padding: 32px 24px;
  max-width: 420px;
}

.modal-confirm .modal-confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-confirm-title {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--forest);
  margin-bottom: 12px;
}

.modal-confirm-message {
  font-size: 14px;
  color: var(--bark);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-confirm-actions {
  display: flex;
  gap: 12px;
}

/* Dog selection in booking modal */
.dog-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--cream-dark);
  border-radius: 10px 8px 12px 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dog-option:hover {
  border-color: var(--tan);
  background: var(--cream);
}

.dog-option.selected {
  border-color: var(--forest);
  background: #E8F5E9;
}

.dog-option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--tan-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dog-option.selected .dog-option-radio {
  border-color: var(--forest);
}

.dog-option-radio-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s ease;
}

.dog-option.selected .dog-option-radio-inner {
  background: var(--forest);
}

.dog-option-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dog-option-info {
  flex: 1;
}

.dog-option-name {
  font-weight: 700;
  color: var(--charcoal);
  font-size: 15px;
}

.dog-option-breed {
  font-size: 13px;
  color: var(--bark);
}


/* ============================================
   TABS
   ============================================ */

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--cream-dark);
  margin-bottom: 20px;
}

.tab-item {
  padding: 12px 20px;
  font-family: 'Libre Baskerville', serif;
  font-size: 14px;
  color: var(--bark);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
  margin-bottom: -2px;
}

.tab-item:hover {
  color: var(--forest);
}

.tab-item.active {
  color: var(--forest);
  border-bottom-color: var(--terracotta);
  font-weight: 700;
}

.tab-panel {
  padding: 20px 0;
}


/* ============================================
   SEGMENTED CONTROL
   ============================================ */

.segmented-control {
  display: inline-flex;
  gap: 0;
  background: var(--cream-dark);
  border-radius: 10px;
  padding: 4px;
}

.segmented-option {
  padding: 10px 20px;
  font-family: 'Libre Baskerville', serif;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--bark);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.segmented-option.active {
  background: #fff;
  color: var(--forest);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}


/* ============================================
   TOGGLE SWITCHES
   ============================================ */

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.toggle-label {
  font-size: 15px;
  color: var(--charcoal);
  font-weight: 700;
  margin-bottom: 2px;
}

.toggle-description {
  font-size: 13px;
  color: var(--bark-light);
}

.toggle-switch {
  width: 52px;
  height: 28px;
  border-radius: 14px;
  background: var(--cream-dark);
  border: 2px solid var(--tan-light);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  padding: 0;
}

.toggle-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.toggle-switch.active {
  background: var(--forest);
  border-color: var(--forest);
}

.toggle-switch.active .toggle-switch-knob {
  transform: translateX(24px);
}


/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--cream);
  border: 2px dashed var(--cream-dark);
  border-radius: 16px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-title {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--forest);
  margin-bottom: 8px;
}

.empty-state-description {
  font-size: 14px;
  color: var(--bark);
  margin-bottom: 20px;
}


/* ============================================
   FILE UPLOAD
   ============================================ */

.file-upload {
  display: block;
  border: 2px dashed var(--tan-light);
  border-radius: 12px 8px 14px 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: var(--cream);
  overflow: hidden;
}

.file-upload:hover {
  border-color: var(--forest);
  background: #fff;
}

.file-upload.has-preview {
  padding: 0;
  border-style: solid;
}

.file-upload.large {
  padding: 16px;
}

.file-upload-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.file-upload-title {
  font-family: 'Caveat', cursive;
  font-size: 18px;
  color: var(--bark);
  margin-bottom: 4px;
}

.file-upload-hint {
  font-size: 13px;
  color: var(--bark-light);
}

.file-upload.has-preview .file-upload-title,
.file-upload.has-preview .file-upload-hint {
  padding: 0 16px;
}

.file-upload.has-preview .file-upload-title {
  padding-top: 12px;
}

.file-upload.has-preview .file-upload-hint {
  padding-bottom: 12px;
}

.file-upload.has-preview .file-upload-icon {
  display: none;
}

.file-upload-preview {
  border-radius: 0;
  overflow: hidden;
}

.file-upload-preview img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 200px;
  object-fit: cover;
}

.file-upload-filename {
  font-size: 13px;
  color: var(--bark);
  margin-bottom: 8px;
}


/* ============================================
   LOADING STATES
   ============================================ */

.spinner {
  animation: spin 0.8s linear infinite;
}

.spinner-tiny {
  width: 16px;
  height: 16px;
}

.spinner-small {
  width: 24px;
  height: 24px;
}

.spinner-medium {
  width: 40px;
  height: 40px;
}

.spinner-large {
  width: 56px;
  height: 56px;
}

/* Skeleton loading */
.skeleton-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skeleton {
  background: linear-gradient(90deg, var(--cream-dark) 25%, var(--cream) 50%, var(--cream-dark) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-line {
  height: 14px;
  width: 100%;
}

.skeleton-line-lg {
  height: 20px;
}

.skeleton-line-medium {
  width: 80%;
}

.skeleton-line-short {
  width: 40%;
}


/* ============================================
   CALENDAR — MONTH VIEW
   ============================================ */

.calendar-month {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 12px 14px 10px;
  overflow: hidden;
}

.calendar-month-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 2px solid var(--cream-dark);
}

.calendar-month-title {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--forest);
}

.calendar-month-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--cream-dark);
  background: #fff;
  color: var(--bark);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.calendar-month-nav:hover {
  background: var(--cream);
}

.calendar-month-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--cream-dark);
}

.calendar-month-day-header {
  padding: 10px;
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: var(--bark-light);
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-month-cell {
  min-height: 72px;
  padding: 6px;
  border-right: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}

.calendar-month-cell:nth-child(7n) {
  border-right: none;
}

.calendar-month-cell.today {
  background: #E8F5E9;
}

.calendar-month-cell-date {
  font-size: 14px;
  color: var(--bark);
  margin-bottom: 4px;
}

.calendar-month-cell.today .calendar-month-cell-date {
  color: var(--forest);
  font-weight: 700;
}

.calendar-month-cell-events {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.calendar-month-cell-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Course pills (for month view with text) */
.calendar-month-cell-pill {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--forest);
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.calendar-month-cell-pill.cancelled {
  opacity: 0.5;
  text-decoration: line-through;
}


/* ============================================
   CALENDAR — WEEK VIEW
   ============================================ */

.calendar-week {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 12px 14px 10px;
  overflow: hidden;
}

.calendar-week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 2px solid var(--cream-dark);
}

.calendar-week-title {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--forest);
}

.calendar-week-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--cream-dark);
  background: #fff;
  color: var(--bark);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.calendar-week-nav:hover {
  background: var(--cream);
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-week-day {
  border-right: 1px solid var(--cream-dark);
  min-height: 140px;
}

.calendar-week-day:last-child {
  border-right: none;
}

.calendar-week-day-header {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid var(--cream-dark);
  background: var(--cream);
}

.calendar-week-day-name {
  font-family: 'Caveat', cursive;
  font-size: 14px;
  color: var(--bark-light);
}

.calendar-week-day-date {
  font-size: 18px;
  font-weight: 700;
  color: var(--charcoal);
}

.calendar-week-day.today .calendar-week-day-header {
  background: #E8F5E9;
}

.calendar-week-day.today .calendar-week-day-date {
  color: var(--forest);
}

.calendar-week-day-events {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-week-event {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--forest);
  color: var(--cream);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.calendar-week-event:hover {
  opacity: 0.85;
}

.calendar-week-event-time {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.calendar-week-event.cancelled {
  opacity: 0.4;
  text-decoration: line-through;
}


/* ============================================
   APPROVAL CARD (Trainer)
   ============================================ */

.approval-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-left: 5px solid var(--terracotta);
  border-radius: 4px 12px 12px 4px;
  padding: 20px;
  transition: box-shadow 0.2s ease;
}

.approval-card:hover {
  box-shadow: 0 4px 16px rgba(45, 74, 62, 0.1);
}

.approval-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.approval-card-course {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--forest);
}

.approval-card-meta {
  font-size: 13px;
  color: var(--bark);
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.approval-card-details {
  display: flex;
  gap: 24px;
  padding: 12px 16px;
  background: var(--cream);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.approval-card-detail-group {
  flex: 1;
  min-width: 120px;
}

.approval-card-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sage);
  margin-bottom: 4px;
}

.approval-card-detail-value {
  font-size: 14px;
  color: var(--charcoal);
  font-weight: 700;
}

.approval-card-detail-sub {
  font-size: 12px;
  color: var(--bark-light);
}

.approval-card-notes {
  font-size: 13px;
  color: var(--bark);
  font-style: italic;
  padding: 10px 14px;
  background: var(--warning-light);
  border-radius: 8px;
  margin-bottom: 16px;
}

.approval-card-actions {
  display: flex;
  gap: 8px;
}


/* ============================================
   STAT CARDS
   ============================================ */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 12px 8px 14px 10px;
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 12px rgba(45, 74, 62, 0.1);
}

.stat-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: 'Caveat', cursive;
  font-size: 36px;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 13px;
  color: var(--bark);
}


/* ============================================
   PROFILE / SETTINGS FORM
   ============================================ */

.profile-form {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
  overflow: hidden;
}

.profile-form-header {
  padding: 24px;
  border-bottom: 2px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-form-title {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--forest);
}

.profile-form-body {
  padding: 24px;
}

.profile-form-footer {
  padding: 16px 24px;
  border-top: 2px solid var(--cream-dark);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cream-dark);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--tan);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Caveat', cursive;
  flex-shrink: 0;
}

.profile-avatar-info {
  flex: 1;
}

.form-field-disabled {
  position: relative;
}

.form-field-disabled::after {
  content: '🔒';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
}


/* ============================================
   CREDIT HISTORY
   ============================================ */

.credit-history {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
  overflow: hidden;
}

.credit-history-header {
  padding: 20px 24px;
  border-bottom: 2px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.credit-history-title {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--forest);
}

.credit-history-filters {
  display: flex;
  gap: 4px;
}

.credit-filter-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-family: 'Libre Baskerville', serif;
  border: 1.5px solid var(--cream-dark);
  border-radius: 20px;
  background: #fff;
  color: var(--bark);
  cursor: pointer;
  transition: all 0.2s ease;
}

.credit-filter-btn:hover {
  border-color: var(--tan);
}

.credit-filter-btn.active {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--cream);
}

.credit-history-list {
  list-style: none;
}

.credit-history-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s ease;
}

.credit-history-item:last-child {
  border-bottom: none;
}

.credit-history-item:hover {
  background: var(--cream);
}

.credit-history-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.credit-history-icon.available {
  background: #E8F5E9;
}

.credit-history-icon.used {
  background: #E3F2FD;
}

.credit-history-icon.expired {
  background: var(--cream-dark);
}

.credit-history-info {
  flex: 1;
  min-width: 0;
}

.credit-history-status {
  font-weight: 700;
  font-size: 14px;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.credit-history-detail {
  font-size: 12px;
  color: var(--bark-light);
}

.credit-history-meta {
  text-align: right;
  flex-shrink: 0;
}

.credit-history-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--charcoal);
}

.credit-history-date {
  font-size: 12px;
  color: var(--bark-light);
}


/* ============================================
   COURSE DETAIL (Expanded View)
   ============================================ */

.course-detail {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
  overflow: hidden;
}

.course-detail-hero {
  position: relative;
  background: var(--forest);
  padding: 32px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.course-detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.course-detail-hero-content {
  position: relative;
  z-index: 1;
}

.course-detail-title {
  font-family: 'Caveat', cursive;
  font-size: 36px;
  color: var(--cream);
  margin-bottom: 4px;
}

.course-detail-trainer {
  font-size: 14px;
  color: var(--sage);
}

.course-detail-body {
  padding: 24px;
}

.course-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.course-detail-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.course-detail-info-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.course-detail-info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sage);
  margin-bottom: 2px;
}

.course-detail-info-value {
  font-size: 14px;
  color: var(--charcoal);
  font-weight: 700;
}

.course-detail-description {
  font-size: 15px;
  color: var(--bark);
  line-height: 1.7;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cream-dark);
}

.course-detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.course-detail-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.course-detail-tag-approval {
  background: #FFF3E0;
  color: #E65100;
}

.course-detail-tag-waitlist {
  background: #E3F2FD;
  color: #1565C0;
}

.course-detail-tag-credits {
  background: #E8F5E9;
  color: #2E7D32;
}

.course-detail-footer {
  padding: 16px 24px;
  border-top: 2px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}


/* ============================================
   COURSE CREATE / EDIT FORM
   ============================================ */

.course-form {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 16px 10px 14px 12px;
  overflow: hidden;
}

.course-form-header {
  padding: 24px;
  border-bottom: 2px solid var(--cream-dark);
}

.course-form-title {
  font-family: 'Caveat', cursive;
  font-size: 28px;
  color: var(--forest);
}

.course-form-body {
  padding: 24px;
}

.course-form-section {
  margin-bottom: 28px;
}

.course-form-section-title {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--bark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--cream-dark);
}

.course-form-footer {
  padding: 16px 24px;
  border-top: 2px solid var(--cream-dark);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Location input with autocomplete */
.location-input-wrapper {
  position: relative;
}

.location-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 2px solid var(--tan-light);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.location-autocomplete-item {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--charcoal);
  cursor: pointer;
  border-bottom: 1px solid var(--cream-dark);
  transition: background 0.15s ease;
}

.location-autocomplete-item:last-child {
  border-bottom: none;
}

.location-autocomplete-item:hover,
.location-autocomplete-item.highlighted {
  background: var(--cream);
}

/* Use my location button */
.location-detect-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'Libre Baskerville', serif;
  color: var(--forest);
  background: var(--cream);
  border: 1.5px solid var(--forest);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.location-detect-btn:hover {
  background: var(--forest);
  color: var(--cream);
}

.location-detect-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.location-detect-btn .detect-icon {
  font-size: 15px;
  line-height: 1;
}

/* Lat/Lon display */
.coords-display {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.coords-field {
  flex: 1;
}

.coords-field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sage);
}

.coords-field input {
  font-size: 12px;
  padding: 6px 10px;
  background: var(--cream-dark);
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  width: 100%;
  color: var(--bark);
  font-family: monospace;
}


/* ============================================
   DOG PROFILE CARD
   ============================================ */

.dog-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 12px 14px 10px 16px;
  padding: 24px;
  transition: box-shadow 0.2s ease;
}

.dog-card:hover {
  box-shadow: 0 4px 16px rgba(45, 74, 62, 0.1);
}

.dog-card-header {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.dog-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid var(--tan);
  flex-shrink: 0;
  overflow: hidden;
}

.dog-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dog-card-name {
  font-family: 'Caveat', cursive;
  font-size: 26px;
  color: var(--forest);
  margin-bottom: 2px;
}

.dog-card-breed {
  font-size: 14px;
  color: var(--bark);
}

.dog-card-notes {
  background: var(--cream);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.dog-card-notes p {
  font-size: 13px;
  color: var(--bark);
  font-style: italic;
}

.dog-card-actions {
  display: flex;
  gap: 8px;
}


/* ============================================
   SCHEDULE ROW (for dashboard today view)
   ============================================ */

.schedule-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: var(--cream);
  border-radius: 10px 8px 12px 6px;
  border: 1px solid var(--cream-dark);
  flex-wrap: wrap;
  transition: box-shadow 0.2s ease;
}

.schedule-item:hover {
  box-shadow: 0 2px 8px rgba(45, 74, 62, 0.08);
}

.schedule-time {
  font-family: 'Caveat', cursive;
  font-size: 24px;
  color: var(--terracotta);
  min-width: 60px;
}

.schedule-info {
  flex: 1;
  min-width: 150px;
}

.schedule-course-name {
  font-size: 16px;
  color: var(--forest);
  font-weight: 500;
  margin-bottom: 4px;
}

.schedule-location {
  font-size: 13px;
  color: var(--bark);
}

.schedule-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--bark);
}


/* ============================================
   UTILITY CLASSES
   ============================================ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .text-display-xl {
    font-size: 36px;
  }

  .text-display-lg {
    font-size: 28px;
  }

  .nav-trainer,
  .nav-client,
  .nav-admin {
    padding: 12px 16px;
  }

  .nav-links {
    gap: 4px;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 13px;
  }

  .modal {
    max-width: 100%;
    border-radius: 14px;
    margin: 8px;
  }

  .calendar-week-grid {
    grid-template-columns: 1fr;
  }

  .calendar-week-day {
    border-right: none;
    border-bottom: 1px solid var(--cream-dark);
    min-height: auto;
  }

  .calendar-week-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
  }

  .calendar-week-day-events {
    padding: 8px 16px;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .approval-card-details {
    flex-direction: column;
    gap: 12px;
  }

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

@media (max-width: 480px) {
  .stat-row {
    grid-template-columns: 1fr;
  }

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

  .modal-footer,
  .modal-confirm-actions {
    flex-direction: column;
  }
}


/* ============================================
   MOBILE-NATIVE ENHANCEMENTS
   All styles below apply only on mobile (< 768px)
   ============================================ */

/* -- Global mobile/desktop utility classes -- */
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 767px) {
  .desktop-only { display: none !important; }
}

/* -- Bottom Nav -- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: #fff;
  border-top: 2px solid var(--cream-dark);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px;
  text-decoration: none;
  color: var(--bark-light);
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
  color: var(--forest);
}

.bottom-nav-icon {
  font-size: 22px;
  line-height: 1;
}

.bottom-nav-label {
  font-family: 'Caveat', cursive;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

body.has-bottom-nav {
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .bottom-nav { display: none !important; }
  body.has-bottom-nav { padding-bottom: 0; }
}

/* Hide top nav on mobile when bottom nav is present */
@media (max-width: 767px) {
  body.has-bottom-nav .nav-trainer,
  body.has-bottom-nav .nav-client,
  body.has-bottom-nav .nav-admin {
    display: none !important;
  }
}

/* Tab content toggle (admin dashboard) */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* -- Bottom Sheet Modals (mobile) -- */
@media (max-width: 767px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    backdrop-filter: blur(4px);
  }

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    margin: 0;
    animation: bottomSheetIn 0.3s ease;
  }

  .modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--cream-dark);
    border-radius: 2px;
    margin: 10px auto 4px;
  }

  .modal-confirm {
    border-radius: 20px 20px 0 0;
    padding-top: 24px;
  }

  .modal-confirm::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--cream-dark);
    border-radius: 2px;
    margin: 0 auto 12px;
  }
}

@keyframes bottomSheetIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes bottomSheetOut {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

/* -- FAB (Floating Action Button) -- */
.fab {
  position: fixed;
  z-index: 80;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  border: none;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(198, 107, 61, 0.35);
  cursor: pointer;
  right: 20px;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(198, 107, 61, 0.25);
}

@media (min-width: 768px) {
  .fab { display: none !important; }
}

/* -- Swipe Panels (enhanced) -- */
.swipe-wrapper {
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  overscroll-behavior: none;
}

.swipe-track {
  display: flex;
  will-change: transform;
}

.swipe-track.snapping {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.swipe-panel {
  flex: 0 0 100%;
  min-width: 0;
  overflow-y: auto;
}

/* -- Segmented Tab Control (mobile pill toggle) -- */
@media (max-width: 767px) {
  .mobile-segmented {
    display: flex;
    background: var(--cream-dark);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
  }

  .mobile-segmented .tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border: none;
    border-bottom: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Libre Baskerville', serif;
    background: transparent;
    color: var(--bark);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0;
  }

  .mobile-segmented .tab-item.active {
    background: #fff;
    color: var(--forest);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border-bottom-color: transparent;
  }
}

/* -- Quick Stats Pills (mobile trainer dashboard) -- */
.stat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 8px;
  scrollbar-width: none;
}

.stat-pills::-webkit-scrollbar { display: none; }

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1.5px solid var(--cream-dark);
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-pill-icon { font-size: 16px; }
.stat-pill-value { font-weight: 700; color: var(--forest); }
.stat-pill-label { color: var(--bark); }

/* -- Swipe-to-Action -- */
.swipe-action-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 8px;
}

.swipe-action-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Libre Baskerville', serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.swipe-action-destructive {
  background: var(--error);
  color: #fff;
}

.swipe-action-warning {
  background: var(--terracotta);
  color: #fff;
}

.swipe-action-wrapper > :last-child {
  position: relative;
  z-index: 1;
  background: #fff;
  transition: transform 0.25s ease;
}

/* -- Mobile form overflow fix -- */
@media (max-width: 767px) {
  .swipe-panel .card-static {
    overflow: hidden;
  }

  .swipe-panel .form-input,
  .swipe-panel .form-textarea,
  .swipe-panel .form-select {
    max-width: 100%;
    min-width: 0;
  }

  .swipe-panel .coords-display {
    flex-wrap: wrap;
  }
}

/* -- Step Wizard -- */
.wizard-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 12px;
}

.wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: 2px solid var(--cream-dark);
  transition: all 0.2s ease;
}

.wizard-dot.active {
  background: var(--forest);
  border-color: var(--forest);
  transform: scale(1.2);
}

.wizard-dot.completed {
  background: var(--sage);
  border-color: var(--sage);
}

.wizard-step-actions {
  display: flex;
  gap: 12px;
  padding: 16px 0;
}

.wizard-step-actions .btn {
  flex: 1;
}

/* -- Touch Feedback (mobile only) -- */
@media (max-width: 767px) {
  .btn:active {
    transform: scale(0.96) !important;
  }

  .card:active,
  .card-static:active,
  .booking-card:active,
  .course-card:active,
  .approval-card:active,
  .dog-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  /* Larger touch targets */
  .btn {
    min-height: 48px;
  }

  .btn-sm {
    min-height: 44px;
  }

  /* Remove hover effects on touch to prevent sticky states */
  .btn:hover { transform: none; }
  .card:hover { transform: none; box-shadow: none; }
  .course-card:hover { transform: none; box-shadow: none; }
  .booking-card:hover { box-shadow: none; }
  .approval-card:hover { box-shadow: none; }
  .dog-card:hover { box-shadow: none; }

  /* Page entrance animation */
  main {
    animation: fadeInUp 0.25s ease;
  }

  /* Reposition toasts above bottom nav */
  .toast-container {
    top: auto;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    left: 16px;
    max-width: 100%;
  }
}

/* -- Profile page mobile tweaks -- */
@media (max-width: 767px) {
  .profile-avatar-section {
    flex-direction: column;
    text-align: center;
  }

  .profile-avatar {
    width: 96px;
    height: 96px;
    font-size: 36px;
  }

  .profile-avatar-info {
    text-align: center;
  }

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

  .credit-history-filters {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .credit-history-filters::-webkit-scrollbar { display: none; }

  .credit-history-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-card-icon {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .stat-card-value {
    font-size: 28px;
  }

  .stat-card-label {
    font-size: 11px;
  }
}

/* -- Dog cards single column on mobile -- */
@media (max-width: 767px) {
  #dogsList {
    grid-template-columns: 1fr !important;
  }

  .dog-card-avatar {
    width: 72px;
    height: 72px;
    font-size: 32px;
  }
}


/* ============================================
   PRINT
   ============================================ */

@media print {
  nav, .toast-container, .modal-overlay,
  button, .btn, .toggle-switch, .file-upload {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card, .card-static, .booking-card, .course-card,
  .approval-card, .stat-card, .profile-form,
  .credit-history, .course-detail, .course-form {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
