/* Small additions for the working app. The design system lives in styles.css — this file only
   covers behaviour the static prototype did not need (forms, toggles, drag states, uploads). */

form.inline { display: inline; margin: 0; }
button.btn, label.btn { font-family: inherit; }
button.icon-btn { font: inherit; font-size: 16px; padding: 0; }
a.sidebar-user:hover strong { color: #f3d57a; }

/* Toggle chips: <label class="chip"><input type="checkbox"> Tank test</label> */
label.chip { cursor: pointer; user-select: none; }
label.chip input { display: none; }
label.chip:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
a.chip:hover { border-color: var(--line-strong); }
select.chip { padding: 0 28px 0 11px; cursor: pointer; }
select.chip.on { background-color: var(--ink); color: #fff; }

/* File inputs rendered as the design's upload buttons */
label.btn input[type=file] { display: none; }
.file-names { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Typeahead / selectable rows */
.suggest strong .hl { background: var(--gold-soft); }
.suggest.disabled { opacity: .55; cursor: not-allowed; }
button.suggest { width: 100%; border: 0; background: none; text-align: left; font: inherit; color: inherit; }

/* Diary drag and drop (public/js/diary.js) */
.job-card[data-movable] { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.job-card.dragging { opacity: .35; border-style: dashed; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.drag-ghost { position: fixed; z-index: 100; pointer-events: none; margin: 0; transform: rotate(-1.5deg);
  box-shadow: 0 18px 40px rgba(16,24,32,.22); opacity: .96; }
.drag-ghost .jn::after { content: attr(data-to); margin-left: 8px; color: var(--gold-deep); font-family: 'Plus Jakarta Sans', sans-serif; }
.drag-ghost .jn[data-to=""]::after { content: ""; }
.day-col.drop-target { border-color: var(--gold); background: #fffbeb; box-shadow: 0 0 0 3px rgba(212,160,23,.18); }
.week-nav .btn.drop-target { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(212,160,23,.18); }
body.is-dragging .week-nav .btn[data-drop-shift] { border-style: dashed; border-color: var(--gold); }
.job-card.just-moved { animation: tt-moved 1.6s ease-out; }
@keyframes tt-moved { 0%, 40% { box-shadow: 0 0 0 4px rgba(212,160,23,.45); } 100% { box-shadow: var(--shadow-sm); } }

/* In-page dialog */
.tt-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(16,24,32,.45); display: grid; place-items: center; padding: 16px; }
.tt-dialog { width: 100%; max-width: 460px; box-shadow: var(--shadow); }

/* Real photos inside the design's photo tiles */
.photo.has-img { background-size: cover; background-position: center; }
.photo .rm { position: absolute; top: 6px; right: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(16,24,32,.6); color: #fff; cursor: pointer; font-size: 12px; line-height: 22px; padding: 0; }
a.photo { color: #fff; }
.photo span { position: relative; z-index: 1; }
label.photo.add-media { cursor: pointer; }
label.photo.add-media input { display: none; }

/* Inline editable table cells (pricing, time) */
table.data input.field, table.data select.select { height: 32px; }
.field.sm { height: 32px; font-size: 12px; }
.text-right { text-align: right; }
.muted { color: var(--muted); }
.err { color: var(--rose); font-size: 12px; margin-top: 4px; }

/* Ack checkboxes in the booking warnings */
.banner .check { margin-top: 8px; }
.banner input.field { margin-top: 8px; width: 100%; }

/* Print the job sheet only */
@media print {
  .sidebar, .topbar, .page-head, .tabs, .banner, .grid-4, .no-print { display: none !important; }
  .tab-panel { display: none !important; }
  #panel-sheet { display: block !important; }
  body { background: #fff; }
}

/* Test pack builder */
.builder { display: grid; grid-template-columns: 230px 1fr; gap: 16px; align-items: start; }
.builder-palette { position: sticky; top: calc(var(--topbar-h) + 16px); }
.palette-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink); cursor: pointer; text-align: left; }
.palette-btn:hover { border-color: var(--gold); background: #fffbeb; }
.palette-btn .ico { width: 24px; height: 24px; border-radius: 7px; background: var(--bg); display: grid; place-items: center; font-size: 13px; }
.bgroup { margin-bottom: 14px; border-left: 4px solid var(--line-strong); }
.bgroup.active { border-left-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,.12); }
.bgroup-h { align-items: flex-start; }
.bgroup-title, .bgroup-desc { display: block; width: 100%; border: 1px solid transparent; border-radius: 8px; background: transparent;
  font: inherit; color: var(--ink); padding: 4px 8px; margin-left: -8px; }
.bgroup-title { font-size: 15px; font-weight: 700; }
.bgroup-desc { font-size: 12.5px; color: var(--muted); }
.bgroup-title:hover, .bgroup-desc:hover { border-color: var(--line); }
.bgroup-title:focus, .bgroup-desc:focus { outline: none; border-color: var(--gold); background: #fff; }
.bfields { padding: 10px; }
.bempty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.bfield { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px; }
.bfield.open { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,23,.12); }
.bfield-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; cursor: pointer; }
.bfield-row:hover { background: #fbfcfe; border-radius: 10px; }
.bfield-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #f3d57a; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.bfield-edit { padding: 12px; border-top: 1px dashed var(--line); background: #fbfcfe; border-radius: 0 0 10px 10px; }
.btn[disabled] { opacity: .35; cursor: default; }
.tp-missing { border-color: var(--rose) !important; box-shadow: 0 0 0 3px rgba(194,65,75,.12); }
@media (max-width: 900px) { .builder { grid-template-columns: 1fr; } .builder-palette { position: static; } }
