/* Hide Alpine.js uninitialized templates to prevent text flash & overlap */
[x-cloak] {
  display: none !important;
}

/* Prevent text collisions and overlapping */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.35 !important;
}

header nav a, header nav button {
  line-height: 1.25;
}

/* Modern Executive Dashboard & Universal ERP Styling */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg-main: #f8fafc;
}

body {
  background-color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
}

/* Card aesthetics */
.stat-card, .card-modern {
  background: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover, .card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

/* Gradients */
.gradient-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

.gradient-blue {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
}

.gradient-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.gradient-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.gradient-rose {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Table styling */
.custom-table th {
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* Badges */
.badge-chip {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

/* Form controls */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

/* Table row interactive transition */
tbody tr {
  transition: background-color 0.15s ease-in-out;
}
tbody tr:hover {
  background-color: rgba(239, 246, 255, 0.5) !important;
}
