/* ============================================================
   Lactamira — Modern UI styles
   ============================================================ */

:root {
  --brand-50:  #fdf2f8;
  --brand-100: #fce7f3;
  --brand-200: #fbcfe8;
  --brand-300: #f9a8d4;
  --brand-400: #f472b6;
  --brand-500: #ec4899;
  --brand-600: #db2777;
  --brand-700: #be185d;
  --brand-800: #9d174d;
  --brand-900: #831843;

  --accent-purple: #a855f7;
  --accent-blue:   #3b82f6;
  --accent-amber:  #f59e0b;
  --accent-green:  #10b981;
  --accent-red:    #ef4444;

  --shadow-soft:  0 2px 8px -2px rgba(219, 39, 119, 0.08), 0 4px 16px -4px rgba(219, 39, 119, 0.06);
  --shadow-card:  0 4px 20px -4px rgba(219, 39, 119, 0.12), 0 8px 32px -8px rgba(219, 39, 119, 0.08);
  --shadow-hover: 0 8px 32px -4px rgba(219, 39, 119, 0.18), 0 16px 48px -12px rgba(219, 39, 119, 0.12);
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv01', 'cv02', 'cv03';
  background:
    radial-gradient(ellipse at top left, rgba(252, 231, 243, 0.5), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(243, 232, 255, 0.4), transparent 50%),
    linear-gradient(180deg, #fdf2f8 0%, #faf5ff 100%);
  min-height: 100vh;
  background-attachment: fixed;
  color: #1f2937;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f9a8d4, #ec4899);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #db2777; background-clip: padding-box; }

/* ─── Glass effect ──────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-dark {
  background: rgba(157, 23, 77, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

/* ─── Card variations ───────────────────────────────────── */
.card-modern {
  background: white;
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(252, 231, 243, 0.5);
}
.card-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-gradient {
  background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

/* ─── Buttons ──────────────────────────────────────────── */
.btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-modern:hover::before { opacity: 1; }
.btn-modern:active { transform: scale(0.97); }

.btn-pink {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.4);
}
.btn-pink:hover {
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
  transform: translateY(-1px);
}

.btn-purple {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.4);
}

.btn-soft {
  background: white;
  color: #db2777;
  border: 2px solid #fbcfe8;
}
.btn-soft:hover { background: #fdf2f8; border-color: #f9a8d4; }

.btn-red-pulse {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
  animation: red-pulse 2s ease-in-out infinite;
}
@keyframes red-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5); }
  50%      { box-shadow: 0 4px 28px rgba(239, 68, 68, 0.8); }
}

/* ─── Input fields ─────────────────────────────────────── */
.input-modern,
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form input[type="tel"],
form select,
form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #fce7f3;
  border-radius: 0.875rem;
  background: white;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}
.input-modern:focus,
form input:focus,
form select:focus,
form textarea:focus {
  outline: none;
  border-color: #ec4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

/* ─── Badges / Pills ────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.pill-red    { background: #fee2e2; color: #991b1b; }
.pill-yellow { background: #fef3c7; color: #92400e; }
.pill-green  { background: #d1fae5; color: #065f46; }
.pill-pink   { background: #fce7f3; color: #9d174d; }
.pill-purple { background: #ede9fe; color: #5b21b6; }
.pill-blue   { background: #dbeafe; color: #1e40af; }

/* ─── Zone cards ───────────────────────────────────────── */
.zone-red {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 2px solid #fca5a5;
  border-left: 6px solid #ef4444;
}
.zone-yellow {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fcd34d;
  border-left: 6px solid #f59e0b;
}
.zone-green {
  background: linear-gradient(135deg, #f0fdf4 0%, #d1fae5 100%);
  border: 2px solid #86efac;
  border-left: 6px solid #10b981;
}

/* ─── Animations ───────────────────────────────────────── */
.fade-in     { animation: fadeIn 0.4s ease-out; }
.fade-in-up  { animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.fade-in-down{ animation: fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.slide-in    { animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.bounce-in   { animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.gentle-pulse{ animation: gentlePulse 3s ease-in-out infinite; }

@keyframes fadeIn       { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp     { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown   { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn      { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes bounceIn     { 0% { opacity: 0; transform: scale(0.5); } 100% { opacity: 1; transform: scale(1); } }
@keyframes gentlePulse  { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* Stagger child animations */
.stagger > * { animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.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; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.40s; }

/* ─── Floating blobs (decorative) ──────────────────────── */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ─── Bottom nav (mobile) ──────────────────────────────── */
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  color: #6b7280;
  transition: all 0.2s ease;
  border-radius: 0.75rem;
}
.nav-tab:hover { color: #db2777; background: rgba(252, 231, 243, 0.5); }
.nav-tab.active { color: #db2777; background: linear-gradient(135deg, #fdf2f8, #fce7f3); }
.nav-tab .icon { font-size: 1.5rem; line-height: 1; }
.nav-tab .label { font-size: 0.7rem; font-weight: 600; }

/* ─── Triage radio cards ───────────────────────────────── */
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}
.radio-card:hover { border-color: #f9a8d4; transform: translateX(2px); }
.radio-card input[type="radio"] { margin-top: 0.25rem; accent-color: #ec4899; }
.radio-card.red:hover    { border-color: #fca5a5; background: #fef2f2; }
.radio-card.yellow:hover { border-color: #fcd34d; background: #fffbeb; }
.radio-card.green:hover  { border-color: #86efac; background: #f0fdf4; }
.radio-card:has(input:checked) { border-color: #ec4899; background: #fdf2f8; box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.08); }
.radio-card.red:has(input:checked)    { border-color: #ef4444; background: #fef2f2; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1); }
.radio-card.yellow:has(input:checked) { border-color: #f59e0b; background: #fffbeb; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1); }
.radio-card.green:has(input:checked)  { border-color: #10b981; background: #f0fdf4; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }

/* ─── Stat cards ───────────────────────────────────────── */
.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(252, 231, 243, 0.5);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.stat-card .stat-icon {
  font-size: 1.75rem;
  display: inline-flex;
  width: 3.25rem;
  height: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
}

/* ─── Hero gradient text ───────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #ec4899 0%, #a855f7 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─── Avatar ───────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #fce7f3, #ede9fe);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ─── Kanban column ────────────────────────────────────── */
.kanban-col {
  border-radius: 1.25rem;
  padding: 1rem;
  min-height: 16rem;
}
.kanban-col.red    { background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%); border-top: 4px solid #ef4444; }
.kanban-col.yellow { background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%); border-top: 4px solid #f59e0b; }
.kanban-col.green  { background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%); border-top: 4px solid #10b981; }
.kanban-col.new    { background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%); border-top: 4px solid #9ca3af; }

.kanban-card {
  background: white;
  border-radius: 0.875rem;
  padding: 0.875rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}
.kanban-card:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.kanban-card.red    { border-left-color: #ef4444; }
.kanban-card.yellow { border-left-color: #f59e0b; }
.kanban-card.green  { border-left-color: #10b981; }

/* ─── Divider ──────────────────────────────────────────── */
.divider-soft {
  height: 1px;
  background: linear-gradient(90deg, transparent, #fbcfe8, transparent);
  margin: 1.5rem 0;
}

/* ─── Loading / shimmer ────────────────────────────────── */
.shimmer {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ─── Mobile tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
  .card-modern { padding: 1.25rem; border-radius: 1rem; }
  .stat-card { padding: 0.875rem; }
}
