/* VL Poultry — Custom styles on top of Tailwind CDN */

/* Nav links in sidebar */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #bbf7d0; /* green-200 */
  text-decoration: none;
  transition: background-color 0.15s;
}
.nav-link:hover {
  background-color: rgba(255,255,255,0.08);
  color: #fff;
}
.nav-link-active {
  background-color: rgba(255,255,255,0.15);
  color: #fff;
  font-weight: 600;
}
.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #4ade80; /* green-400 */
  padding: 10px 10px 2px;
}

/* Bottom nav (mobile) */
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #6b7280; /* gray-500 */
  text-decoration: none;
  padding: 4px 8px;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
}
.bottom-nav-active {
  color: #15803d; /* green-700 */
}

/* Form inputs */
.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px; /* prevents zoom on iOS */
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

/* Primary button */
.btn-primary {
  background-color: #15803d;
  color: white;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  border: none;
  cursor: pointer;
  min-height: 48px;
  transition: background-color 0.15s;
}
.btn-primary:hover, .btn-primary:active {
  background-color: #166534;
}

/* Secondary button */
.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  min-height: 48px;
  transition: background-color 0.15s;
}
.btn-secondary:hover {
  background-color: #e5e7eb;
}

/* Danger button */
.btn-danger {
  background-color: #dc2626;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  min-height: 48px;
}

/* Card */
.card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  border: 1px solid #f3f4f6;
}

/* Stat card */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.data-table tr:hover td {
  background: #f9fafb;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-red    { background: #fee2e2; color: #dc2626; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-gray   { background: #f3f4f6; color: #6b7280; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: block;
}

/* Money values */
.money-dr { color: #15803d; font-weight: 600; }
.money-cr { color: #dc2626; font-weight: 600; }
.money-zero { color: #9ca3af; }

/* Safe area for iPhone bottom nav */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}
