/* Tech Book — Broadcast Utility */

body.bu-app.tb-tool:not(.bu-at-home) .av-home-main-col {
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 20px 24px 32px;
}

body.bu-app.tb-tool:not(.bu-at-home) .bu-hub-stage {
  max-width: none;
  width: 100%;
}

.tb-workspace-inner {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.tb-panel-wrap {
  min-height: 200px;
  background: #e8eaed;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--bdr2, rgba(17, 24, 39, 0.11));
}

.tb-panel.on {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Sheet toolbar above each document page */
.tb-sheet-toolbar {
  width: 100%;
  max-width: 11in;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.tb-sheet-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink3, #6b7280);
}

.tb-sheet-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tb-hint-inline {
  margin: 0;
}

.tb-sheet-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Document pages — match PDF dimensions */
.tb-page {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 12px rgba(17, 24, 39, 0.12), 0 0 0 1px rgba(17, 24, 39, 0.08);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  color: #111;
  line-height: 1.35;
}

.tb-page-portrait {
  max-width: 8.5in;
  padding: 0.28in;
}

.tb-page-landscape {
  max-width: 11in;
  padding: 0.28in;
}

.tb-page-compact {
  padding: 0.4in 0.28in;
}

.tb-print-doc {
  width: 100%;
}

/* ── Crew list page (matches the PDF) ─────────────────────────────────── */
.tb-cl-doc {
  padding: 0;
  overflow: hidden;
}

.tb-cl-banner {
  background: #666;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  padding: 14px 10px;
  letter-spacing: 0.02em;
  border: 1px solid #4d4d4d;
  border-bottom: 0;
}

.tb-cl-body {
  display: flex;
  align-items: stretch;
  border: 1px solid #1f4e79;
  border-top: 0;
}

.tb-cl-main {
  flex: 1;
  min-width: 0;
}

.tb-cl-avail {
  width: 210px;
  flex-shrink: 0;
  border-left: 1px solid #1f4e79;
  display: flex;
  flex-direction: column;
}

/* Meta info grid */
.tb-cl-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.tb-cl-grid td {
  border: 1px solid #94a3b8;
  padding: 2px 4px;
  vertical-align: middle;
  font-size: 11px;
}

.tb-cl-packaged {
  font-weight: 700;
}

.tb-cl-match .tb-ta-center,
.tb-ta-center {
  text-align: center;
  font-weight: 700;
}

.tb-cl-when-inps {
  display: flex;
  gap: 2px;
}

.tb-cl-when-inps .tb-sheet-inp {
  flex: 1;
  min-width: 0;
  text-align: center;
}

/* Navy band labels + gray subheaders inside the grid */
.tb-cl-band {
  background: #1f4e79;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
  white-space: nowrap;
  padding: 5px 6px !important;
}

.tb-cl-sub {
  background: #d5d9de;
  color: #1f2937;
  font-weight: 800;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Full-width section band with an inline add button (editor only) */
.tb-cl-band-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #1f4e79;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 7px 10px;
  border: 1px solid #1f4e79;
  border-top: 0;
}

.tb-band-add {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f4e79;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.tb-band-add:hover {
  background: #fff;
}

.tb-cl-empty,
.tb-cl-empty-row {
  padding: 10px;
  text-align: center;
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  border: 1px solid #94a3b8;
  border-top: 0;
  background: #fafbfc;
}

/* Site contacts columns */
.tb-cl-kc-wrap {
  width: 100%;
}

.tb-cl-kc {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.tb-cl-kc th,
.tb-cl-kc td {
  border: 1px solid #94a3b8;
  padding: 3px 5px;
  vertical-align: middle;
  font-size: 10px;
  text-align: center;
}

.tb-cl-kc-hdr {
  background: #d5d9de;
  text-align: center;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  vertical-align: middle;
}

.tb-kc-hdr-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.tb-kc-role {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  padding: 2px 4px;
}

.tb-kc-role::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.tb-kc-color {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.tb-kc-del {
  width: 18px;
  height: 18px;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  color: #1f2937;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.tb-kc-del:hover {
  background: #fff;
}

/* Main crew table */
.tb-cl-crew {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.tb-cl-crew th,
.tb-cl-crew td {
  border: 1px solid #94a3b8;
  padding: 2px 5px;
  vertical-align: middle;
  font-size: 11px;
}

.tb-cl-crew th {
  background: #1f4e79;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
}

.tb-cl-crew .tb-cl-crew-role {
  width: 24%;
}

.tb-cl-crew .tb-cl-crew-time {
  width: 13%;
}

.tb-cl-crew .tb-cl-role {
  text-transform: uppercase;
  font-size: 10px;
}

.tb-cl-crew .tb-cl-time {
  font-weight: 700;
}

.tb-cl-crew-del,
.tb-cl-avail-del {
  width: 26px;
  text-align: center;
  padding: 0 !important;
}

.tb-cl-small {
  font-size: 9px;
  word-break: break-word;
}

/* Availability side table */
.tb-cl-avail-hdr {
  border-left: 0;
}

.tb-cl-avail-tbl {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.tb-cl-avail-tbl th,
.tb-cl-avail-tbl td {
  border: 1px solid #94a3b8;
  border-left: 0;
  padding: 2px 4px;
  font-size: 10px;
  vertical-align: middle;
}

.tb-cl-avail-tbl th {
  background: #d5d9de;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
}

/* Rundown pages */
.tb-rd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 3px solid #1a1916;
  flex-wrap: wrap;
}

.tb-rd-title {
  flex: 1;
  min-width: 140px;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: #111;
  padding: 4px 0;
}

.tb-rd-title:focus {
  outline: none;
  border-bottom: 2px solid var(--accent, #e63946);
}

.tb-rd-trt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.tb-rd-actions {
  display: flex;
  gap: 6px;
}

.tb-rd-table {
  width: 100%;
  border-collapse: collapse;
}

.tb-rd-table th,
.tb-rd-table td {
  border: 1px solid #334155;
  padding: 6px 8px;
  vertical-align: top;
  font-size: 9px;
}

.tb-rd-table th {
  background: #1a1916;
  color: #fff;
  font-size: 8px;
  text-transform: uppercase;
}

.tb-rd-table .tb-rd-slug {
  width: 14%;
  font-weight: 700;
}

.tb-trt-cell {
  width: 8%;
  text-align: center;
  position: relative;
}

/* Generic doc section headers */
.tb-doc-h2 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 10px;
  text-transform: uppercase;
  border-bottom: 2px solid #1a1916;
  padding-bottom: 4px;
  color: #111;
}

/* Gear, specs, tear down tables */
.tb-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}

.tb-data-table th,
.tb-data-table td {
  border: 1px solid #334155;
  padding: 6px 8px;
  font-size: 10px;
  vertical-align: top;
}

.tb-data-table thead th {
  background: #e8edf2;
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 800;
}

.tb-data-table-specs th {
  background: #e8edf2;
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 800;
  width: 28%;
}

.tb-muted {
  color: #64748b;
  font-style: italic;
}

/* Inline inputs that blend into the sheet */
.tb-sheet-inp {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: #111;
  padding: 3px 4px;
  border-radius: 3px;
  line-height: 1.35;
}

.tb-sheet-inp:hover {
  border-color: rgba(51, 65, 85, 0.25);
  background: rgba(255, 255, 255, 0.6);
}

.tb-sheet-inp:focus {
  outline: none;
  border-color: var(--accent, #e63946);
  background: #fff;
  box-shadow: 0 0 0 2px var(--accentDim, rgba(230, 57, 70, 0.12));
}

.tb-sheet-textarea {
  resize: vertical;
  min-height: 36px;
  line-height: 1.4;
}

.tb-sheet-select {
  height: 28px;
  cursor: pointer;
}

.tb-sheet-read {
  color: #111;
  line-height: 1.35;
  padding: 3px 4px;
}

/* Role / slug cell with color picker */
.tb-role-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tb-role-color {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(51, 65, 85, 0.35);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.tb-role-inp {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  text-transform: uppercase;
}

.tb-trt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  text-align: center;
  min-width: 48px;
}

.tb-row-del {
  width: 22px;
  height: 22px;
  border: 0;
  background: rgba(17, 24, 39, 0.06);
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  margin-top: 4px;
}

.tb-row-del:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.tb-cl-side-edit .tb-row-del {
  position: absolute;
  top: 4px;
  right: 4px;
}

.tb-trt-cell .tb-row-del {
  display: block;
  margin: 4px auto 0;
}

.tb-data-table td:last-child {
  width: 32px;
  text-align: center;
  vertical-align: middle;
}

.tb-event-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--bdr2, rgba(17, 24, 39, 0.11));
  border-radius: 14px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(17, 24, 39, 0.05));
  flex-wrap: wrap;
}

.tb-event-bar-main {
  flex: 1;
  min-width: 200px;
}

.tb-event-title {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--bdr2);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, #18181b);
  background: #fff;
  margin-bottom: 6px;
}

.tb-event-title:focus {
  outline: none;
  border-color: var(--accent, #e63946);
  box-shadow: 0 0 0 3px var(--accentDim, rgba(230, 57, 70, 0.1));
}

.tb-event-sub {
  font-size: 13px;
  color: var(--ink3, #6b7280);
  line-height: 1.4;
}

.tb-event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tb-status {
  font-size: 12px;
  color: var(--ink3, #6b7280);
  min-width: 72px;
  text-align: right;
}

.tb-tabs-wrap {
  background: #fff;
  border: 1px solid var(--bdr2);
  border-radius: 14px;
  padding: 12px 14px 0;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.tb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.tb-tab {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink3, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.tb-tab:hover {
  background: var(--bg3, #f5f5f7);
  color: var(--ink, #18181b);
}

.tb-tab.on {
  background: #000;
  color: #fff;
}

.tb-panel {
  display: none;
}

.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--bdr2);
  background: #fff;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.tb-btn:hover {
  background: var(--bg3);
  border-color: var(--bdr3);
}

.tb-btn-primary {
  background: var(--accent, #e63946);
  border-color: var(--accent, #e63946);
  color: #fff;
}

.tb-btn-primary:hover {
  background: var(--accent2, #f04d59);
  border-color: var(--accent2, #f04d59);
}

.tb-btn-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.25);
}

.tb-btn-danger:hover {
  background: #fef2f2;
  border-color: #b91c1c;
}

.tb-btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.tb-btn-del {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-weight: 700;
}

.tb-section {
  background: #fff;
  border: 1px solid var(--bdr2);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.tb-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tb-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink3);
}

.tb-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.tb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}

@media (max-width: 900px) {
  .tb-grid-2,
  .tb-grid-3 {
    grid-template-columns: 1fr;
  }

  .tb-event-bar {
    flex-direction: column;
  }

  .tb-event-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.tb-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink4, #9ca3af);
  margin-bottom: 6px;
}

.tb-field input,
.tb-field textarea,
.tb-field select {
  width: 100%;
  border: 1px solid var(--bdr2);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}

.tb-field textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}

.tb-field input:focus,
.tb-field textarea:focus,
.tb-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accentDim);
}

.tb-table-wrap {
  overflow: auto;
  border: 1px solid var(--bdr2);
  border-radius: 10px;
  background: #fff;
}

.tb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tb-table th,
.tb-table td {
  border: 1px solid var(--bdr2);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}

.tb-table th {
  background: var(--bg3, #f5f5f7);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink3);
  white-space: nowrap;
  padding: 10px;
}

.tb-table tbody tr:hover td {
  background: rgba(245, 245, 247, 0.6);
}

.tb-table input,
.tb-table textarea,
.tb-table select {
  width: 100%;
  min-width: 60px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  padding: 6px 4px;
  font-family: inherit;
  border-radius: 6px;
}

.tb-table textarea {
  min-height: 40px;
  resize: vertical;
  line-height: 1.4;
}

.tb-table input:focus,
.tb-table textarea:focus,
.tb-table select:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 2px var(--accentDim);
}

.tb-table .tb-trt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  min-width: 72px;
  text-align: center;
}

.tb-name-cell {
  min-width: 160px;
}

.tb-name-cell .tb-crew-pick {
  margin-bottom: 6px;
  font-size: 12px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--bdr2);
  border-radius: 6px;
  background: var(--bg3);
}

.tb-crew-pick-full {
  width: 100%;
  min-width: 160px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid var(--bdr2);
  border-radius: 8px;
  background: #fff;
}

.tb-readonly {
  padding: 8px 6px;
  color: var(--ink2);
  font-size: 13px;
  line-height: 1.35;
  min-width: 88px;
}

.tb-color-cell {
  width: 40px;
  min-width: 40px;
  padding: 4px !important;
  vertical-align: middle;
}

.tb-row-color {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--bdr2);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}

.tb-rundown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tb-rundown-section {
  margin-bottom: 18px;
  border: 1px solid var(--bdr2);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.tb-rundown-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--bdr2);
  flex-wrap: wrap;
}

.tb-rundown-hdr input {
  flex: 1;
  min-width: 160px;
  height: 36px;
  border: 1px solid var(--bdr2);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 700;
  background: #fff;
}

.tb-rundown-total {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  white-space: nowrap;
  padding: 6px 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--bdr2);
}

.tb-rundown-grand {
  margin-top: 8px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--bdr2);
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink2);
}

.tb-rundown-grand strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  color: var(--ink);
}

.tb-hint {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.5;
  margin: 0 0 14px;
}

.tb-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(2px);
}

.tb-modal-overlay[hidden] {
  display: none !important;
}

.tb-modal {
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--bdr2);
  box-shadow: var(--shadow-lift);
  overflow: auto;
}

.tb-modal-wide {
  max-width: 760px;
}

.tb-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--bdr);
}

.tb-modal-hdr h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.tb-modal-x {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--bg3);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink3);
}

.tb-modal-body {
  padding: 18px 20px 22px;
}

/* Home cards: ⋮ menu button */
.tb-proj {
  position: relative;
  padding-right: 34px;
}

.tb-card-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink3, #6b7280);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tb-card-menu-btn:hover {
  background: var(--bg3, #f0f0f2);
  color: var(--ink, #18181b);
}

.tb-menu-pop {
  position: fixed;
  z-index: 4000;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--bdr2, rgba(17, 24, 39, 0.12));
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.18);
  padding: 6px;
}

.tb-menu-pop[hidden] {
  display: none !important;
}

.tb-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink2, #333);
  cursor: pointer;
}

.tb-menu-item:hover {
  background: var(--bg3, #f0f0f2);
}

.tb-menu-item-danger {
  color: #b91c1c;
}

.tb-menu-item-danger:hover {
  background: #fef2f2;
}

/* Sidebar secondary CTA */
.av-home-cta-ghost {
  background: transparent;
  border: 1px solid var(--bdr2, rgba(17, 24, 39, 0.14));
  color: var(--ink2, #333);
}

.av-home-cta-ghost:hover {
  background: var(--bg3, #f0f0f2);
}

/* Contact-sheet modal footer */
.tb-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--bdr, rgba(17, 24, 39, 0.08));
  position: sticky;
  bottom: 0;
  background: #fff;
}

.tb-modal-foot-note {
  font-size: 12px;
  color: var(--ink3, #6b7280);
}

.tb-modal-foot-actions {
  display: flex;
  gap: 8px;
}

/* ── Named-color dropdown control ─────────────────────────────────────── */
.tb-color-ctl {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tb-color-select {
  height: 24px;
  max-width: 84px;
  font-size: 11px;
  border: 1px solid var(--bdr2, #cbd5e1);
  border-radius: 5px;
  background: #fff;
  color: #111;
  padding: 0 4px;
  cursor: pointer;
}
.tb-color-custom {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--bdr2, #cbd5e1);
  border-radius: 5px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Role/slug cell: text on top, color dropdown beneath */
.tb-role-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
}

/* ── Deletable tabs + add-page menu ───────────────────────────────────── */
.tb-tab-wrap {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}
.tb-tab-wrap.on {
  background: #000;
}
.tb-tab-wrap .tb-tab.on {
  background: transparent;
  color: #fff;
}
.tb-tab-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 9px 0 2px;
  opacity: 0.55;
  color: var(--ink3, #6b7280);
}
.tb-tab-wrap.on .tb-tab-x {
  color: #fff;
  opacity: 0.8;
}
.tb-tab-x:hover {
  opacity: 1;
  color: #fca5a5;
}
.tb-tab-add-wrap {
  position: relative;
  display: inline-flex;
}
.tb-tab-add {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px dashed var(--bdr2, #cbd5e1);
  background: transparent;
  color: var(--ink3, #6b7280);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tb-tab-add:hover {
  background: var(--bg3, #f0f0f2);
  color: var(--ink, #18181b);
}
.tb-add-page-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
}

/* ── Gear list: color-coded cart sections ─────────────────────────────── */
.tb-gear-doc {
  overflow: hidden;
}
.tb-gear-sec {
  margin-bottom: 2px;
}
.tb-gear-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1f4e79;
  color: #fff;
  padding: 5px 8px;
  border: 1px solid #1f4e79;
  border-top: 0;
}
.tb-gear-sec-name {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  padding: 2px;
}
.tb-gear-sec-name::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
.tb-gear-sec-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Shared editor tables for gear / specs / teardown */
.tb-gear-table,
.tb-spec-table,
.tb-td-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.tb-gear-table th,
.tb-gear-table td,
.tb-spec-table th,
.tb-spec-table td,
.tb-td-table th,
.tb-td-table td {
  border: 1px solid #94a3b8;
  padding: 2px 5px;
  font-size: 11px;
  vertical-align: middle;
}
.tb-gear-table th {
  background: #c9ced4;
  color: #1f2937;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
}
.tb-spec-table th,
.tb-td-table th {
  background: #1f4e79;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: left;
}
.tb-spec-table {
  margin-bottom: 2px;
}
.tb-gear-qty,
.tb-spec-table .tb-ta-center-cell {
  width: 12%;
  text-align: center;
}
.tb-gear-packed {
  width: 14%;
  text-align: center;
}
.tb-gear-packed input,
.tb-td-chk input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.tb-gear-del,
.tb-td-table .tb-gear-del {
  width: 26px;
  text-align: center;
  padding: 0 !important;
}
.tb-specs-audio {
  margin-top: 10px;
}
.tb-specs-notes {
  width: 100%;
  border: 1px solid #94a3b8;
  border-top: 0;
  min-height: 40px;
}

/* Tear down */
.tb-td-doc {
  overflow: hidden;
}
.tb-td-table .tb-td-chk {
  width: 42px;
  text-align: center;
}
.tb-td-table .tb-td-assignee {
  width: 32%;
}

/* In the stacked role/slug cell the color dropdown fills the width (no overflow) */
.tb-role-cell .tb-color-ctl {
  width: 100%;
}
.tb-role-cell .tb-color-select {
  flex: 1;
  min-width: 0;
  max-width: none;
}

/* Ensure borders don't push 100%-width tables past the page edge */
.tb-panel .tb-page,
.tb-panel .tb-page * {
  box-sizing: border-box;
}
