/* Payroll dashboard — small custom layer on top of Tailwind Play CDN.
   All layout/spacing/typography is Tailwind; this file holds only the bits
   Tailwind can't express cleanly. */

:root { --chip-radius: 9999px; }

/* Status chips */
.chip {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: var(--chip-radius);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.chip-open        { background: #dbeafe; color: #1e40af; }
.chip-closed      { background: #dcfce7; color: #166534; }
.chip-auto_closed { background: #fef3c7; color: #92400e; }
.chip-active      { background: #dcfce7; color: #166534; }
.chip-inactive    { background: #e2e8f0; color: #475569; }
.chip-terminated  { background: #fee2e2; color: #991b1b; }
.chip-unresolved  { background: #fee2e2; color: #991b1b; }
.chip-resolved    { background: #dcfce7; color: #166534; }

/* Payroll-run statuses (§13) */
.chip-draft       { background: #e2e8f0; color: #475569; }
.chip-submitted   { background: #dbeafe; color: #1e40af; }
.chip-approved    { background: #ede9fe; color: #5b21b6; }
.chip-paid        { background: #dcfce7; color: #166534; }
.chip-voided      { background: #fee2e2; color: #991b1b; }
.chip-failed      { background: #fee2e2; color: #7f1d1d; }
.chip-locked      { background: #fef3c7; color: #92400e; }

/* Run types and worker classification */
.chip-regular     { background: #e0e7ff; color: #3730a3; }
.chip-corrective  { background: #ffedd5; color: #9a3412; }
.chip-w2          { background: #dcfce7; color: #166534; }
.chip-1099        { background: #fef3c7; color: #92400e; }

/* <details> expanders used for event trails / per-employee panels */
details.expander { border: 1px solid #e2e8f0; border-radius: 0.5rem; background: #fff; }
details.expander > summary {
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  font-weight: 600;
  list-style: none;
}
details.expander > summary::-webkit-details-marker { display: none; }
details.expander > summary::before { content: "▸ "; color: #64748b; }
details.expander[open] > summary::before { content: "▾ "; }
details.expander > .expander-body { padding: 0 0.9rem 0.9rem; border-top: 1px solid #f1f5f9; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.data th {
  text-align: left; font-weight: 600; color: #475569;
  border-bottom: 2px solid #e2e8f0; padding: 0.5rem 0.6rem; white-space: nowrap;
}
table.data td { border-bottom: 1px solid #f1f5f9; padding: 0.5rem 0.6rem; vertical-align: top; }
table.data tr:hover td { background: #f8fafc; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Event trail list */
ul.trail { list-style: none; margin: 0; padding: 0; font-size: 0.8rem; }
ul.trail li { padding: 0.25rem 0; border-bottom: 1px dotted #e2e8f0; }
ul.trail li:last-child { border-bottom: none; }
.trail .ev-in  { color: #166534; font-weight: 700; }
.trail .ev-out { color: #92400e; font-weight: 700; }

/* Inline result messages from htmx mutations */
.msg-ok  { color: #166534; font-weight: 600; font-size: 0.8rem; }
.msg-err { color: #991b1b; font-weight: 600; font-size: 0.8rem; }

/* Prominent labor-cost card */
.labor-cost-card { background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #fff; }
.labor-cost-card .est { color: #cbd5e1; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* Nav */
.navlink { padding: 0.4rem 0.75rem; border-radius: 0.375rem; color: #cbd5e1; font-size: 0.9rem; }
.navlink:hover { background: #1e293b; color: #fff; }
.navlink.active { background: #334155; color: #fff; font-weight: 600; }

/* Forms */
.field label { display: block; font-size: 0.75rem; font-weight: 600; color: #475569; margin-bottom: 0.2rem; }
.field input, .field select {
  border: 1px solid #cbd5e1; border-radius: 0.375rem; padding: 0.4rem 0.6rem;
  font-size: 0.875rem; background: #fff; width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid #3b82f6; outline-offset: 0; border-color: #3b82f6; }
.btn {
  display: inline-block; background: #1d4ed8; color: #fff; font-weight: 600;
  padding: 0.45rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; cursor: pointer;
}
.btn:hover { background: #1e40af; }
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.8rem; }
.btn-danger { background: #b91c1c; }
.btn-danger:hover { background: #991b1b; }
.btn-ghost { background: #e2e8f0; color: #1e293b; }
.btn-ghost:hover { background: #cbd5e1; }
.link { color: #1d4ed8; text-decoration: underline; cursor: pointer; font-size: 0.85rem; }
