/* Board layout shared by jobs.html and stack.html: rail with a list, Needs attention, detail card and fields. */
a { color: var(--ink); }

.app { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100vh; }

/* --- rail: the list of jobs or sites --- */
.rail { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.rail header { padding: 20px 16px 12px; }
.rail h1 { margin: 0 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.rail-tools { display: flex; gap: 8px; }
.rail-tools input { flex: 1; min-width: 0; padding: 8px 14px; border: 1px solid var(--field-edge); border-radius: 100px; background: var(--surface); }
#list { flex: 1; overflow: auto; padding: 0 8px 16px; }
#list h2 { display: flex; justify-content: space-between; margin: 16px 8px 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
#list button { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; line-height: 1.35; }
#list button:hover { background: var(--desk); }
#list button[aria-current] { background: var(--accent); color: #fff; }
#list small { grid-column: 1; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list button[aria-current] small { color: #dfe4ff; }
.dot { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.dot.late { background: var(--late); }
#list .none { padding: 8px; color: var(--muted); }
.rail footer { padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.rail footer nav { display: flex; gap: 14px; margin-bottom: 10px; }
.rail footer .btn { height: 32px; padding: 0 12px; font-size: 13px; }

.btn-danger:hover { color: var(--late); border-color: var(--late); }

/* --- main --- */
main { background: var(--desk); overflow: auto; min-height: 0; padding: 24px 40px 56px; }
.wrap { max-width: 860px; margin: 0 auto; }
section + section { margin-top: 32px; }
.section-title { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.alerts { margin: 0; padding: 0; list-style: none; }
.alerts button, .alerts a { display: flex; gap: 12px; width: 100%; margin-bottom: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--black); text-align: left; cursor: pointer; }
.alerts button:hover, .alerts a:hover { border-color: var(--field-edge); }
.alerts .dot { flex: 0 0 8px; height: 8px; margin-top: 7px; }
.alerts strong { font-weight: 600; }
.alerts a { text-decoration: none; }
.quiet { color: var(--muted); }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.page-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--muted); }


.card { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--black); }
.page-head + .card { margin-top: 20px; }
.card + section { margin-top: 32px; }
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.actions .push { margin-left: auto; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.fields label { display: block; font-size: 12.5px; font-weight: 500; }
.fields .wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--field-edge); border-radius: 8px; background: var(--surface); font-weight: 400; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 400 !important; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }
.empty .btn { margin-top: 12px; }

@media (max-width: 860px) {
  .app { display: block; height: auto; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
  #list { max-height: 40vh; }
  main { overflow: visible; padding: 20px 16px 40px; }
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
