/*
 * Minimal application stylesheet — only things Tailwind can't express.
 */

/* ─── Base ───────────────────────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.5;
}

/* ─── Table: remove border from last row ─────────────────────────────────── */
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* ─── Scrollable table with sticky header ───────────────────────────────── */
.scrollable-table {
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: auto;
}

.scrollable-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.scrollable-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}

.scrollable-table thead tr.sticky-row-2 th {
  top: 31px;
}

/* ─── Rails field_with_errors wrapper ────────────────────────────────────── */
.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
  border-color: #ef4444 !important;
}

.field_with_errors label {
  color: #ef4444;
}

/* ─── Detail field empty state ───────────────────────────────────────────── */
.detail-value:empty::after {
  content: "—";
  color: #64748b;
  font-style: italic;
}

/* ─── Dialog backdrop ────────────────────────────────────────────────────── */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

/* ─── Hidden utility (used by Stimulus) ──────────────────────────────────── */
.hidden { display: none !important; }
