/* ============================================================
   MASCODATA — Custom Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

body { font-family: 'Inter', system-ui, sans-serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8b5cf6; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.animate-fade-in   { animation: fadeIn   0.35s ease both; }
.animate-fade-left { animation: fadeInLeft 0.35s ease both; }
.animate-slide-up  { animation: slideUp  0.35s ease both; }
.animate-scale-in  { animation: scaleIn  0.25s ease both; }
.animate-spin-slow { animation: spin 1s linear infinite; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* Progress stepper */
.step-connector {
  position: absolute; top: 50%; left: 50%; width: 100%;
  height: 2px; background: #e2e8f0; z-index: 0;
  transform: translateY(-50%);
}
.step-connector.active { background: #8b5cf6; }

/* Calendar grid */
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.calendar-day {
  min-height: 80px; padding: 6px; border-radius: 8px;
  background: #fff; border: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.calendar-day:hover { background: #f5f3ff; cursor: pointer; }
.calendar-day.today { border-color: #8b5cf6; background: #f5f3ff; }
.calendar-day.other-month { background: #fafafa; color: #cbd5e1; }

/* Pet avatar */
.pet-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 3px solid #ede9fe;
}
.pet-avatar-lg {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; border: 4px solid #ede9fe;
}
.pet-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  font-size: 2rem; border-radius: 50%;
}

/* Card hover */
.card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(124,58,237,0.15);
}

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 500;
}

/* Input focus ring override */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
  border-color: #8b5cf6;
}

/* Toggle switch */
.toggle-switch {
  position: relative; display: inline-block; width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #cbd5e1; border-radius: 24px; transition: 0.3s;
}
.toggle-slider:before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: #8b5cf6; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* Gradient backgrounds */
.bg-brand-gradient {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #0d9488 100%);
}
.bg-brand-gradient-soft {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

/* Sidebar nav item active */
.nav-item-active {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #7c3aed; font-weight: 600;
}

/* Tag input */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: #ede9fe; color: #7c3aed;
  border-radius: 999px; font-size: 0.75rem; font-weight: 500; cursor: pointer;
}
.tag.selected { background: #7c3aed; color: white; }

/* Modal overlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-box {
  background: white; border-radius: 20px; width: 100%;
  max-width: 520px; max-height: 90vh; overflow-y: auto;
  animation: scaleIn 0.25s ease;
}

/* Toast */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: white; padding: 10px 20px; border-radius: 999px;
  font-size: 0.875rem; z-index: 2000; animation: slideUp 0.3s ease;
  white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.toast.success { background: #059669; }
.toast.error   { background: #dc2626; }

@media (min-width: 768px) {
  .toast { bottom: 24px; }
  .calendar-day { min-height: 100px; }
}
