/* ─── Reset / Base ──────────────────────────────────────────── */
* { -webkit-font-smoothing: antialiased; }

/* ─── Forms ─────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  background: white;
  color: #111827;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.12);
}
input[type="checkbox"] { width: auto; display: inline; }
textarea { resize: vertical; }
select { appearance: auto; cursor: pointer; }

/* ─── Navigation ─────────────────────────────────────────────── */
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #6b7280;
  transition: background-color 0.1s, color 0.1s;
  text-decoration: none;
}
.nav-link:hover  { background: #f9fafb; color: #111827; }
.nav-link.active { background: #f3f4f6; color: #111827; font-weight: 500; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #1f2937; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover { background: #f9fafb; color: #111827; }
.btn-sm { padding: 4px 10px; font-size: 0.6875rem; }

/* ─── Table ──────────────────────────────────────────────────── */
.th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.td { padding: 12px 16px; }

/* ─── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}
.modal-overlay.is-open { display: flex; }

.modal-box {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid #f3f4f6;
}
.modal-title  { font-size: 0.875rem; font-weight: 600; color: #111827; }
.modal-close  {
  color: #9ca3af;
  cursor: pointer;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.1s;
}
.modal-close:hover { color: #374151; }

/* ─── Form helpers ───────────────────────────────────────────── */
.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.form-error-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
}

/* ─── Status badges ──────────────────────────────────────────── */
.status-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pending   { background: #fef9c3; color: #a16207; }
.status-approved  { background: #dbeafe; color: #1d4ed8; }
.status-completed { background: #dcfce7; color: #15803d; }
.status-rejected  { background: #fee2e2; color: #b91c1c; }
.status-draft     { background: #f3f4f6; color: #6b7280; }
.status-sent      { background: #eff6ff; color: #2563eb; }
.status-paid      { background: #f0fdf4; color: #16a34a; }
