/* Luma Sphere look: near-black surfaces, off-white type, one warm gold accent, Montserrat
   (matching lumaspherelighting.com). Quotes/invoices (.paper) keep their own white-paper palette. */
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --nav: #050505;
  --panel: #131313;
  --panel-2: #1a1a1a;      /* table heads, group rows */
  --hover: #1f1f1f;
  --text: #f3f3f3;
  --muted: #a3a3a3;
  --line: #262626;
  --input-bg: #0e0e0e;
  --input-line: #3a3a3a;
  --accent: #d4a24c;       /* Luma Sphere gold */
  --accent-light: #ecd193;
  --accent-soft: rgba(212, 162, 76, .14);
  --on-accent: #0a0a0a;
  --ok: #5cc98f;
  --ok-soft: rgba(92, 201, 143, .14);
  --warn: #f2a65a;
  --warn-soft: rgba(242, 166, 90, .15);
  --bad: #f06a5f;
  --bad-soft: rgba(240, 106, 95, .15);
  --radius: 4px;
  --radius-lg: 8px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 14px/1.55 Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); text-decoration: none; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 0; line-height: 1.2; }
h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* Layout & sidebar */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; flex-shrink: 0; background: var(--nav); border-right: 1px solid var(--line); color: var(--muted); padding: 20px 12px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); padding: 0 6px 22px; }
.sidebar .brand:hover { background: none; color: var(--text); }
.sidebar .brand span { font-weight: 800; font-size: 14px; letter-spacing: .6px; text-transform: uppercase; line-height: 1.25; }
.sidebar .brand small { display: block; font-size: 9.5px; font-weight: 600; color: var(--accent); letter-spacing: 2px; }
.sidebar a { display: block; color: #d6d6d6; padding: 8px 12px; border-radius: var(--radius); font-weight: 500; border-left: 2px solid transparent; }
.sidebar a:hover { background: var(--hover); color: var(--text); }
.sidebar a.active { color: var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }
.sidebar .bottom { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; }
.sidebar form button { background: none; border: 0; color: var(--muted); padding: 8px 12px; cursor: pointer; font: inherit; }
.sidebar form button:hover { color: var(--text); }
.main { flex: 1; padding: 28px 32px; min-width: 0; }

/* Login */
.login-page { min-height: 100vh; background: radial-gradient(ellipse 70% 55% at 50% -10%, rgba(212, 162, 76, .22), transparent 70%), var(--bg); }
.login { max-width: 380px; margin: 0 auto; padding: 7vh 16px; }
.login-logo { display: block; width: 220px; height: auto; margin: 0 auto 28px; }
.login .panel { padding: 24px; }
.login h1 { font-size: 20px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }

/* Panels & common */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px; }
.panel.flush { padding: 0; overflow-x: auto; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.warn-text { color: var(--warn); }
.bad-text { color: var(--bad); }

/* Buttons: gold primary, grey-outline secondary (as on the website) */
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent); border-radius: var(--radius);
  padding: 7px 16px; font: inherit; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--text); border-color: #555; }
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(240, 106, 95, .6); }
.btn.danger:hover { background: var(--bad); color: var(--on-accent); border-color: var(--bad); }
.btn.small { padding: 3px 10px; font-size: 12px; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; background: var(--panel-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .015); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius-lg); padding: 14px 16px; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat .label { color: var(--muted); font-size: 12.5px; }

/* Badges */
.badge { display: inline-block; white-space: nowrap; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge.inquiry, .badge.draft { background: #242424; color: #c4c4c4; }
.badge.option { background: var(--warn-soft); color: var(--warn); }
.badge.confirmed, .badge.accepted, .badge.paid { background: var(--ok-soft); color: var(--ok); }
.badge.completed, .badge.sent { background: var(--accent-soft); color: var(--accent); }
.badge.cancelled, .badge.short, .badge.declined, .badge.void { background: var(--bad-soft); color: var(--bad); }

/* Forms */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 4px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
input, select, textarea { font: inherit; padding: 7px 10px; border: 1px solid var(--input-line); border-radius: var(--radius); background: var(--input-bg); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: #6b6b6b; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
textarea { width: 100%; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; }
.field input:not([type=checkbox]), .field select { width: 100%; }
.field.wide { grid-column: 1 / -1; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.field .error, .errorlist { color: var(--bad); font-size: 12px; margin: 3px 0 0; padding: 0; list-style: none; }
.field ul { list-style: none; padding: 0; margin: 0; columns: 2; }  /* checkbox lists */

.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); margin-bottom: 6px; border-left: 3px solid var(--ok); }
.messages li.error { background: var(--bad-soft); color: var(--bad); border-left-color: var(--bad); }
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }

/* Availability grid */
.grid td, .grid th { padding: 6px 4px; text-align: center; }
.grid th.item, .grid td.item { text-align: left; padding-left: 12px; position: sticky; left: 0; background: var(--panel); min-width: 220px; z-index: 1; }
.grid th.item { background: var(--panel-2); }
.grid th.day { font-size: 10.5px; letter-spacing: .05em; min-width: 34px; line-height: 1.25; }
.grid th.weekend { background: #202020; }
.cell { display: inline-block; min-width: 28px; padding: 3px 2px; border-radius: var(--radius); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell.full { background: var(--ok-soft); color: var(--ok); }
.cell.part { background: var(--warn-soft); color: var(--warn); }
.cell.none { background: #222; color: var(--muted); }
.cell.over { background: var(--bad); color: var(--on-accent); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }

/* Show builder */
.builder { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.builder .panel { margin-bottom: 0; }
.library { padding: 12px; position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 24px); }
.library-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.library-tools input { flex: 1; min-width: 0; }
.library-tools .btn:disabled { opacity: .4; cursor: default; }
.library-head { display: grid; grid-template-columns: 22px 52px 1fr auto 26px; gap: 6px; padding: 4px 6px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.library-head span:nth-child(1) { grid-column: 2; }
.library-head span:nth-child(3) { grid-column: 4; }
.library-tree { overflow-y: auto; flex: 1; min-height: 200px; }
.library-hint { margin: 8px 2px 0; }
.folder-head { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-weight: 600;
  padding: 6px 6px 6px calc(6px + var(--depth, 0) * 14px); cursor: pointer; color: var(--text); border-radius: var(--radius); }
.folder-head:hover { background: var(--hover); }
.caret { display: inline-block; width: 10px; color: var(--accent); transition: transform .12s; }
.folder.open > .folder-head .caret { transform: rotate(90deg); }
.folder-body { display: none; }
.folder.open > .folder-body { display: block; }
.lib-item { display: grid; grid-template-columns: 22px 52px 1fr auto 26px; gap: 6px; align-items: center; padding: 3px 6px;
  padding-left: calc(6px + var(--depth, 0) * 14px); border-radius: var(--radius); cursor: grab; }
.lib-item:hover { background: var(--hover); }
.lib-item.picked { background: var(--accent-soft); }
.lib-item .qty { width: 52px; padding: 3px 5px; }
.lib-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.free { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: var(--radius); background: var(--ok-soft); color: var(--ok); text-align: center; min-width: 30px; }
.free.part { background: var(--warn-soft); color: var(--warn); }
.free.none { background: var(--bad-soft); color: var(--bad); }
.free.xrent, .free.sale { background: #222; color: var(--muted); font-weight: 500; }
.add-one { width: 24px; height: 24px; border: 1px solid var(--input-line); background: transparent; border-radius: var(--radius); cursor: pointer;
  font-weight: 700; color: var(--accent); padding: 0; }
.add-one:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.lines-panel { position: relative; min-height: 300px; }
.lines-panel.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; }
.drop-hint { display: none; }
.lines-panel.drop-target .drop-hint { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center;
  font-weight: 700; color: var(--accent); background: rgba(10, 10, 10, .8); z-index: 2; pointer-events: none; border-radius: var(--radius-lg); }
.rate-bar { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--input-line); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 6px 12px; font: inherit; font-weight: 500; cursor: pointer; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button + button { border-left: 1px solid var(--input-line); }
.seg button.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.room-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.room-bar input { width: 240px; padding: 4px 8px; }
.room-chip { padding: 2px 10px; border: 1px solid var(--input-line); border-radius: 999px; font-size: 12px; font-weight: 600; }
.add-to { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); }
.add-to select { flex: 1; text-transform: none; letter-spacing: 0; font-size: 13px; }
table.lines tr.room-head td { background: #0f0f0f; border-top: 2px solid var(--accent); font-weight: 800; font-size: 15px; padding: 10px 8px; }
table.lines tbody.room-section.drop-room tr.room-head td { background: var(--accent-soft); }
table.lines tbody.room-section.drop-room { outline: 2px dashed var(--accent); outline-offset: -2px; }
table.lines td.small-empty { padding: 14px; font-size: 12.5px; }
.link-btn { background: none; border: 0; padding: 0 0 0 10px; font: inherit; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; }
.link-btn:hover { color: var(--accent); }
.link-btn.danger:hover { color: var(--bad); }
.room-move { display: block; margin-top: 3px; padding: 1px 4px; font-size: 11.5px; color: var(--muted); max-width: 170px; }
table.lines td { padding: 5px 8px; }
table.lines td:first-child { min-width: 180px; }
table.lines th { padding: 8px; }
table.lines tr.group td { background: var(--panel-2); font-weight: 700; padding: 8px; color: var(--accent); }
table.lines td.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.cell-in { width: 100%; padding: 4px 6px; border-color: transparent; background: transparent; text-align: right; }
.cell-in:hover { border-color: var(--input-line); }
.cell-in:focus { background: var(--input-bg); }
.cell-in.qty { width: 60px; }
.cell-in.price { width: 80px; }
.cell-in.small-num { width: 56px; }
.cell-in.remark { text-align: left; min-width: 110px; }
.remove { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: var(--radius); }
.remove:hover { color: var(--bad); background: var(--bad-soft); }
.lines-panel .crossrent { margin: 12px; padding: 12px; border: 1px solid rgba(242, 166, 90, .35); background: rgba(242, 166, 90, .05); border-radius: var(--radius-lg); }
.lines-panel .crossrent th { background: transparent; }

/* Quotes & invoices: screen chrome */
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline-flex; gap: 8px; }
details.panel summary { cursor: pointer; }
.docs-panel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.docs-panel table { flex: 1 1 100%; }
.docs-panel table td { background: none; }
.docs-panel h2 { margin: 0; }

/* The document itself is white paper in every theme, and prints as-is. */
.paper { background: #fff; color: #111; max-width: 860px; margin: 0 auto 24px; padding: 44px 48px; border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5); font-size: 13px; }
.paper .muted { color: #666; }
.paper th, .paper td { background: none !important; }
.paper-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid #111; }
.paper-head .co { display: flex; gap: 16px; align-items: center; }
.paper-head .co-logo { width: 96px; height: 96px; flex-shrink: 0; }
.co-name { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.co-details { color: #555; margin-top: 4px; line-height: 1.5; }
.doc-title { text-align: right; }
.doc-kind { font-size: 26px; font-weight: 300; letter-spacing: .2em; text-transform: uppercase; }
.doc-meta { width: auto; margin-left: auto; margin-top: 6px; }
.doc-meta th, .doc-meta td { padding: 1px 0 1px 14px; border: 0; text-transform: none; letter-spacing: 0; font-size: 13px; color: #111; }
.doc-meta th { color: #777; font-weight: 400; text-align: right; }
.paper-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px 0; line-height: 1.5; }
.paper-parties .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .15em; color: #8a6a2c; font-weight: 600; margin-bottom: 2px; }
.paper-lines th { border-bottom: 1.5px solid #111; color: #111; padding: 6px 8px; font-size: 10.5px; }
.paper-lines td { padding: 5px 8px; border-bottom: 1px solid #eee; }
.paper-lines tr.group td { font-weight: 700; padding-top: 14px; border-bottom: 1px solid #ccc; }
.paper-lines tbody.room { break-after: avoid; }
.paper-lines tr.room-head td { font-size: 15px; font-weight: 800; padding: 22px 8px 6px; border-bottom: 2px solid #c79a46; text-transform: uppercase;
  letter-spacing: .08em; }
.paper-lines .remark { font-size: 11px; color: #777; }
.paper-totals { width: 300px; margin: 16px 0 0 auto; }
.paper-totals th, .paper-totals td { border: 0; padding: 4px 8px; text-transform: none; letter-spacing: 0; font-size: 13px; color: #111; }
.paper-totals th { text-align: left; font-weight: 400; }
.paper-totals td { text-align: right; font-variant-numeric: tabular-nums; }
.paper-totals tr.grand th, .paper-totals tr.grand td { font-weight: 800; font-size: 15px; border-top: 2px solid #111; padding-top: 8px; }
.paper-notes { margin-top: 24px; padding: 12px; background: #f6f4ef; border-radius: var(--radius); }
.paper-foot { margin-top: 28px; padding-top: 12px; border-top: 1px solid #ddd; color: #666; font-size: 12px; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #111; }
  .sidebar, .no-print, .messages { display: none !important; }
  .main { padding: 0; }
  .paper { box-shadow: none; padding: 0; max-width: none; margin: 0; }
  .paper-lines tbody { break-inside: avoid; }
}

/* Project Details tab */
.details-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.details-layout aside .panel { margin-bottom: 16px; }
.details-layout iframe.map { display: block; width: 100%; height: 210px; border: 0; border-radius: var(--radius); margin: 10px 0 6px;
  filter: grayscale(.25) contrast(1.05); }
@media (max-width: 1000px) { .details-layout { grid-template-columns: 1fr; } }

/* Open-project tabs across the top */
.open-tabs { display: flex; gap: 2px; align-items: flex-end; margin: -28px -32px 22px; padding: 8px 32px 0; background: var(--nav);
  border-bottom: 1px solid var(--line); overflow-x: auto; position: sticky; top: 0; z-index: 20; }
.otab { display: flex; align-items: center; max-width: 230px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0;
  border-top: 2px solid transparent; border-radius: 6px 6px 0 0; }
.otab a { display: flex; gap: 7px; align-items: baseline; padding: 7px 4px 7px 12px; color: var(--muted); font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.otab a:hover { color: var(--text); }
.otab-num { color: #6f6f6f; font-weight: 500; font-size: 11px; }
.otab.on { background: var(--bg); border-top-color: var(--accent); margin-bottom: -1px; padding-bottom: 1px; }
.otab.on a { color: var(--text); }
.otab.on .otab-num { color: var(--accent); }
.otab form { display: flex; }
.otab button { border: 0; background: none; color: #6f6f6f; cursor: pointer; font-size: 15px; line-height: 1; padding: 4px 8px 4px 4px; }
.otab button:hover { color: var(--bad); }
.otab-new { padding: 6px 12px; color: var(--muted); font-weight: 700; }
.otab-new:hover { color: var(--accent); }
@media (max-width: 760px) { .open-tabs { margin: -16px -16px 16px; padding: 6px 16px 0; } }

/* Project Quotes & invoices tab */
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.docs-layout .panel-title .inline-form { margin-left: auto; }
table.money th, table.money td { background: none; border: 0; padding: 5px 0; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
table.money th { color: var(--muted); font-weight: 500; }
table.money td { text-align: right; font-variant-numeric: tabular-nums; }
table.money tr.sub th, table.money tr.sub td { border-top: 1px solid var(--line); padding-top: 8px; color: var(--text); font-weight: 600; }
table.money tr.grand th, table.money tr.grand td { border-top: 2px solid var(--accent); padding-top: 8px; color: var(--text); font-weight: 800; font-size: 15px; }
.progress { height: 6px; background: #222; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress span { display: block; height: 100%; background: var(--accent); }
.tab-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: 11px; line-height: 18px; text-align: center; }
@media (max-width: 1000px) { .docs-layout { grid-template-columns: 1fr; } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 18px; }
.tabs a { padding: 9px 16px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Crew & transport */
.panel-title { padding: 12px 14px; font-weight: 700; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.slots td { padding: 5px 8px; }
.slots input { width: 100%; padding: 4px 6px; }
.slots .add-row td { background: var(--panel-2); }
.crew-builder { grid-template-columns: minmax(260px, 320px) 1fr; }
.role-section { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); padding: 12px 6px 4px; }
.role-row { display: grid; grid-template-columns: 52px 1fr auto 26px; gap: 6px; align-items: center; padding: 3px 6px; border-radius: var(--radius); }
.role-row:hover { background: var(--hover); }
.role-row .qty { width: 52px; padding: 3px 5px; }
.functions tbody.fn td { border-bottom: 0; }
.functions tbody.fn { border-bottom: 1px solid var(--line); }
.functions .remark { display: block; margin-top: 2px; font-size: 12px; text-align: left; max-width: 240px; }
.functions select { padding: 3px 6px; max-width: 170px; }
tr.staffing td { padding: 0 8px 10px; }
tr.staffing td > * { vertical-align: middle; margin: 2px 4px 2px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip button:hover { background: rgba(255, 255, 255, .1); }
.chip.clash { background: var(--bad-soft); color: var(--bad); }
.clash-note { font-weight: 400; font-size: 11px; }
.vehicle-sep { font-size: 12px; color: var(--muted); margin-left: 8px !important; }

/* Crew planner */
.planner td.day { vertical-align: top; text-align: left; min-width: 92px; padding: 4px; }
.planner .booking { display: block; font-size: 11px; line-height: 1.3; background: var(--accent-soft); color: var(--accent); border-radius: var(--radius); padding: 2px 5px; margin-bottom: 2px; }
.planner .booking:hover { color: var(--accent-light); }
.planner td.clash .booking { background: var(--bad-soft); color: var(--bad); }
.planner tr.idle td.item { color: var(--muted); }

.toast { position: fixed; bottom: 20px; right: 20px; background: #1c1c1c; color: var(--text); border-left: 3px solid var(--accent);
  padding: 10px 16px; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); z-index: 50; }
.toast.error { border-left-color: var(--bad); color: var(--bad); }

@media (max-width: 1100px) {
  .builder { grid-template-columns: 1fr; }
  .library { position: static; max-height: 60vh; }
}

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .sidebar { width: auto; display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { width: 100%; padding-bottom: 6px; }
  .sidebar .bottom { margin: 0; border: 0; padding: 0; }
  .main { padding: 16px; }
}
