/* style.css — colors, sizes and spacing for the web page. */
/* Colors: black background, white text, red (#C8102E) for buttons and lines.
   Red is too dark for small text on black, so links are white and errors use a lighter red. */

:root {
  color-scheme: dark;
  --bg: #000; --card: #141414; --field: #1c1c1c; --ink: #fff; --muted: #a3a3a3; --line: #333;
  --brand: #C8102E; --brand-ink: #fff; --error: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 24px; background: #000; color: #fff; border-bottom: 3px solid var(--brand); }
header .brand { font-weight: 700; }
header .who { color: var(--muted); font-size: 14px; }
header nav { margin-left: auto; display: flex; gap: 16px; align-items: center; }
header nav a, header nav .link { color: #fff; text-decoration: none; font-size: 15px; }
header nav a:hover, header nav .link:hover { text-decoration: underline; }
main { max-width: 960px; margin: 0 auto; padding: 24px; }
main.center { display: grid; place-items: center; min-height: 100vh; }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 24px 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card h2:first-child { margin-top: 0; }
.narrow { width: 100%; max-width: 400px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; margin-bottom: 4px; }
.field small { color: var(--muted); }
input, select, textarea { width: 100%; padding: 9px 11px; font: inherit; color: var(--ink); border: 1px solid #555; border-radius: 7px; background: var(--field); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.check input { width: auto; }
button { font: inherit; font-weight: 600; padding: 9px 16px; border: 0; border-radius: 7px; background: var(--brand); color: var(--brand-ink); cursor: pointer; }
button:hover { filter: brightness(1.15); }
button.small { padding: 5px 10px; font-size: 14px; }
button.link { background: none; padding: 0; font-weight: 400; }
/* Delete: outline only, so it does not look like the normal red buttons. */
button.danger { background: transparent; border: 2px solid var(--brand); color: var(--error); margin-left: auto; }
.error { color: var(--error); font-weight: 600; }
.muted { color: var(--muted); }
.loading { padding: 24px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #1c1c1c; }
tr.click { cursor: pointer; }
tr.click:hover { background: #222; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs a { padding: 6px 14px; border-radius: 999px; text-decoration: none; border: 1px solid #555; background: var(--card); color: var(--ink); }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #262626; }
.s-new { background: #0b2a55; color: #9cc3ff; }
.s-in-progress { background: #4a2a00; color: #ffcc80; }
.s-waiting-for-parts { background: #4d0a12; color: #ff9aa5; }
.s-ready { background: #0b3d22; color: #86efac; }
.s-on-hold { background: #2e1a52; color: #c4b5fd; }
.s-done { background: #262626; color: #d4d4d4; }
.s-cancelled { background: #1f1f1f; color: #8a8a8a; text-decoration: line-through; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 16px; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
.pre { white-space: pre-wrap; }
.timeline { list-style: none; padding: 0; margin: 0 0 16px; }
.timeline li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.timeline .meta { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.invite input { margin: 8px 0; font-family: ui-monospace, monospace; font-size: 13px; }
@media (max-width: 640px) {
  header nav { margin-left: 0; width: 100%; }
  main { padding: 16px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .items th:nth-child(3), .items td:nth-child(3) { display: table-cell; } /* keep Part number on the job page */
}

/* Version 2: units, photos */
td.unit, dd.unit { font-weight: 700; white-space: nowrap; }
select.inline { width: auto; margin-left: auto; padding: 6px 10px; }
.tabs { align-items: center; flex-wrap: wrap; }
.sub { border-left: 3px solid var(--line); padding-left: 14px; margin-bottom: 6px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { position: relative; display: block; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--field); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .remove { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: rgba(0,0,0,.75); line-height: 1; }
input[type=file] { padding: 7px; }
td.actions { white-space: nowrap; }
.items td.actions { white-space: normal; }
.items td { overflow-wrap: anywhere; }
td.actions a + a { margin-left: 12px; }
button:disabled { opacity: .6; cursor: wait; }

/* Version 3: service menu */
.small { font-size: 13px; }
.menu { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #0d0d0d; }
.menu-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.menu-title { font-weight: 700; font-size: 17px; }
.menu input[type=search] { margin-bottom: 10px; }
.menu details { border-top: 1px solid var(--line); padding: 6px 0; }
.menu summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.menu .item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 7px; }
.menu .item:hover { background: #1f1f1f; }
.menu .item.on { background: #3a0a14; }
.menu .item label { display: flex; gap: 10px; align-items: flex-start; flex: 1; cursor: pointer; }
.menu .item input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--brand); }
.menu .item .desc { display: block; }
.menu .parts { display: block; color: var(--muted); }
.menu .qty { width: 80px; flex: none; }
.tabs a.on { cursor: pointer; }

/* Fleets: the customer always sees which fleet they work in. */
.fleet-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 24px; background: #1a0508; border-bottom: 1px solid var(--brand); font-size: 17px; }
.fleet-bar a { font-weight: 600; }
.fleet-list { display: grid; gap: 12px; }
.fleet-list button { width: 100%; padding: 18px; font-size: 20px; text-align: left; }
.fleet-list button small { display: block; font-weight: 400; font-size: 14px; opacity: .85; }

/* The two main buttons (Jobs, New request): big and in the center. */
.big-nav { display: flex; justify-content: center; gap: 16px; max-width: 960px; margin: 0 auto; padding: 20px 24px 0; }
.big-nav a { flex: 1; max-width: 280px; padding: 16px 20px; text-align: center; font-size: 20px; font-weight: 700; text-decoration: none; color: #fff; border: 2px solid var(--brand); border-radius: 12px; }
.big-nav a:hover { background: #2a0a10; }
.big-nav a.on { background: var(--brand); }
@media (max-width: 640px) {
  .big-nav { padding: 16px 16px 0; gap: 12px; }
  .big-nav a { font-size: 18px; padding: 14px 12px; }
}
