/* ─── Global Reset ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, #root {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f4f6f9;
  color: #1a202c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ─── Remove number input arrows ───────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* ─── Select appearance ────────────────────────────────── */
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23718096'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px !important;
}

/* ─── Table ────────────────────────────────────────────── */
table {
  table-layout: fixed;
}

td, th {
  word-break: break-word;
}

/* ─── Transitions ──────────────────────────────────────── */
button {
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}
button:hover {
  opacity: 0.92;
}
button:active {
  transform: scale(0.98);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── Details/Summary ──────────────────────────────────── */
details summary {
  list-style: none;
  cursor: pointer;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::before {
  content: "▶ ";
  font-size: 11px;
  color: #94a3b8;
}
details[open] summary::before {
  content: "▼ ";
}

/* ─── Print ────────────────────────────────────────────── */
@media print {
  body { background: white; }
  button { display: none; }
}
