/* ── Base ──────────────────────────────────────────────────── */
[v-cloak] { display: none !important; }

body { -webkit-tap-highlight-color: transparent; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  @apply bg-white rounded-2xl shadow-sm border border-gray-100 p-4;
}
.card-sm {
  @apply bg-gray-50 rounded-xl border border-gray-200 p-3;
}
.card-sm .label {
  @apply text-xs text-gray-400 uppercase tracking-wide mb-0.5;
}
.card-sm .value {
  @apply text-sm font-medium text-gray-800;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  @apply inline-flex items-center justify-center gap-1.5 px-4 py-2 rounded-xl font-medium text-sm transition-all active:scale-95 cursor-pointer;
}
.btn-primary {
  @apply bg-plant-600 text-white hover:bg-plant-700 shadow-sm;
}
.btn-outline {
  @apply bg-white text-gray-700 border border-gray-300 hover:bg-gray-50;
}
.btn-danger {
  @apply bg-red-500 text-white hover:bg-red-600;
}
.btn-sm {
  @apply inline-flex items-center justify-center gap-1 px-3 py-1.5 rounded-lg text-xs font-medium transition-all cursor-pointer;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group { @apply flex flex-col gap-1; }
.form-label { @apply text-sm font-medium text-gray-700; }
.form-input {
  @apply w-full px-3 py-2 border border-gray-300 rounded-xl text-sm
         focus:outline-none focus:ring-2 focus:ring-plant-500 focus:border-transparent
         transition-shadow bg-white;
}
textarea.form-input { @apply resize-none; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  @apply inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium;
}
.badge-green  { @apply bg-plant-100 text-plant-800; }
.badge-gray   { @apply bg-gray-100 text-gray-600; }
.badge-red    { @apply bg-red-100 text-red-700; }
.badge-amber  { @apply bg-amber-100 text-amber-700; }
.badge-blue   { @apply bg-blue-100 text-blue-700; }

/* ── Section titles ─────────────────────────────────────────── */
.section-title {
  @apply text-base font-bold text-gray-800 mb-3;
}

/* ── Tasks ──────────────────────────────────────────────────── */
.task-card {
  @apply bg-white rounded-xl shadow-sm border border-gray-100 px-4 py-3 transition-all;
}
.task-done {
  @apply bg-gray-50 opacity-75;
}
.task-overdue {
  @apply border-red-300 bg-red-50;
}

/* ── Health ring (mini — on plant card) ─────────────────────── */
.health-ring-mini {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: conic-gradient(var(--health-color, #22c55e) var(--health-pct, 80%), #e5e7eb 0%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.health-ring-mini::before {
  content: ''; position: absolute;
  inset: 5px; border-radius: 50%;
  background: white;
}
.health-ring-mini > * { position: relative; z-index: 1; color: #374151; }

/* ── Health ring (large — on detail modal) ──────────────────── */
.health-ring-lg {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--health-color, #22c55e) var(--health-pct, 80%), rgba(255,255,255,0.3) 0%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.health-ring-lg::before {
  content: ''; position: absolute;
  inset: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
}
.health-ring-lg > * { position: relative; z-index: 1; color: #1f2937; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-panel {
  @apply bg-white rounded-t-3xl md:rounded-3xl shadow-2xl p-6;
}

/* ── Toast ──────────────────────────────────────────────────── */
.toast-enter-active, .toast-leave-active { transition: all 0.3s ease; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(100%); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }
