/* ============================================================
 * HalalCore — Design System (on top of Tailwind CDN)
 * Palette: #0F766E primary · #14B8A6 secondary · #22C55E accent
 * ============================================================ */

:root {
  --hc-primary: #0F766E;
  --hc-primary-dark: #115E59;
  --hc-secondary: #14B8A6;
  --hc-accent: #22C55E;
}

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

/* ---------- Inputs ---------- */
.hc-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.hc-input:focus {
  outline: none;
  border-color: var(--hc-secondary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* ---------- Buttons ---------- */
.hc-btn-primary {
  background: var(--hc-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  transition: background .15s;
}
.hc-btn-primary:hover { background: var(--hc-primary-dark); }
.hc-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.hc-btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  transition: background .15s;
}
.hc-btn-secondary:hover { background: #f8fafc; }

.hc-btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
}
.hc-btn-danger:hover { background: #fef2f2; }

/* ---------- Cards & tables ---------- */
.hc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.hc-table { width: 100%; font-size: 0.875rem; }
.hc-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  white-space: nowrap;
}
.hc-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}
.hc-table tbody tr:hover { background: #f8fafc; }

/* ---------- Sidebar ---------- */
.hc-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  transition: background .12s, color .12s;
}
.hc-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.hc-nav-item.active { background: rgba(255,255,255,0.14); color: #fff; }

/* ---------- Toast ---------- */
.hc-toast { animation: hcToastIn .25s ease; }
.hc-toast-out { opacity: 0; transform: translateX(8px); transition: all .3s; }
@keyframes hcToastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Signature pad ---------- */
.hc-signature {
  border: 1.5px dashed #94a3b8;
  border-radius: 0.5rem;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  height: 140px;
}

/* ---------- KPI cards ---------- */
.hc-kpi-value { font-size: 1.9rem; font-weight: 800; color: #0f172a; line-height: 1.1; }
.hc-kpi-label { font-size: 0.78rem; font-weight: 600; color: #64748b; letter-spacing: .03em; text-transform: uppercase; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Focus visibility ---------- */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--hc-secondary);
  outline-offset: 2px;
}
