/* =========================================================
   Tims Removals & Storage — Inventory Form
   Palette taken from timsremovals.com.au
   ========================================================= */
:root {
  --primary: #33af00;
  --primary-600: #2a9200;
  --primary-50: #eef8e8;
  --accent: #ffac00;
  --dark: #020e28;
  --dark-2: #06152f;
  --body: #535353;
  --mute: #788094;
  --border: #d8dde1;
  --light: #f7f7f7;
  --shade: #ecf0f1;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 14, 40, .08);
  --font: "DM Sans", sans-serif;
  --font-head: "Rethink Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 20px; overflow-x: hidden; }
body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background: var(--light);
}

h1, h2, h3 { font-family: var(--font-head); color: var(--dark); margin: 0; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--dark);
  color: #cfd6e4;
  border-top: 4px solid var(--primary);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; padding-block: 20px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px;
  background: var(--primary); color: var(--white); font-size: 28px;
}
.brand h1 { color: var(--white); font-size: 28px; font-weight: 800; letter-spacing: -.01em; }
.brand h1 span { color: var(--primary); }
.tagline { margin: 2px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.contact-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; font-size: 14px; }
.contact-strip li { display: flex; align-items: center; gap: 8px; }
.contact-strip .lbl {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(51, 175, 0, .18); color: #7fdc55; padding: 2px 8px; border-radius: 20px;
}
.contact-strip a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(51, 175, 0, .35), transparent 45%),
    linear-gradient(120deg, var(--dark-2), var(--dark));
  color: #cfd6e4; text-align: center; padding: 56px 0 96px;
}
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--primary); background: rgba(51, 175, 0, .12); border: 1px solid rgba(51, 175, 0, .4);
  padding: 4px 14px; border-radius: 30px;
}
.hero h2 { color: var(--white); font-size: clamp(30px, 5vw, 48px); margin: 14px 0 10px; }
.hero p { margin: 0 auto; max-width: 560px; }

/* ---------- Panels ---------- */
main { margin-top: -56px; }
.panel {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px; margin-bottom: 26px;
}
.panel-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel-title h2 { font-size: 24px; }
.step {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--white); font-family: var(--font-head); font-weight: 700;
  box-shadow: 0 0 0 5px var(--primary-50);
}
.hint { margin: -8px 0 20px; font-size: 14px; color: var(--mute); }
.office-key { background: var(--shade); border: 1px dashed var(--border); padding: 0 6px; border-radius: 4px; }

/* ---------- Inputs ---------- */
input, select, textarea {
  width: 100%; font: inherit; color: var(--dark);
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(51, 175, 0, .18);
}
input::placeholder, textarea::placeholder { color: #b0b2b8; }

.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.field span { display: block; font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.office-field input { background: var(--shade); border-style: dashed; }

/* ---------- Room cards ---------- */
.rooms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.rooms-col { display: grid; gap: 22px; }

.room-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.room-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--dark); border-left: 5px solid var(--primary);
}
.room-head h3 { color: var(--white); font-size: 16px; text-transform: uppercase; letter-spacing: .05em; }
.room-icon {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: rgba(51, 175, 0, .2); color: #7fdc55; font-size: 18px; flex: none;
}

.table-wrap { overflow: hidden; }
.inv-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.inv-table col.c-item { width: 34%; }
.inv-table col.c-n { width: 9%; }
.inv-table col.c-sz { width: 17%; }
.inv-table col.c-cm { width: 13%; }

.inv-table thead th {
  background: var(--primary-50); color: var(--dark); font-weight: 700; font-size: 12px;
  text-align: center; padding: 8px 4px; border-bottom: 2px solid var(--primary); line-height: 1.25;
}
.inv-table thead th:first-child { text-align: left; padding-left: 14px; }
.inv-table thead small { display: block; font-weight: 500; color: var(--mute); font-size: 10px; }

.inv-table tbody th {
  text-align: left; font-weight: 500; color: var(--dark); padding: 6px 8px 6px 14px;
}
.inv-table td { padding: 5px 3px; text-align: center; }
.inv-table tbody tr { border-bottom: 1px solid #eef0f2; }
.inv-table tbody tr:nth-child(even) { background: #fbfcfb; }
.inv-table tbody tr:hover { background: var(--primary-50); }
.inv-table input, .inv-table select { padding: 6px 6px; font-size: 13px; border-radius: 6px; text-align: center; }
.inv-table input[type=text] { text-align: left; }
.inv-table td.office input { background: var(--shade); border-style: dashed; }
.inv-table input, .inv-table select, .inv-table textarea { min-width: 0; max-width: 100%; }
/* hide number spinners so small cells don't overflow */
.inv-table input[type=number] { -moz-appearance: textfield; appearance: textfield; padding-inline: 2px; }
.inv-table input[type=number]::-webkit-inner-spin-button,
.inv-table input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.inv-table tr.boxes { background: #fff8e8 !important; }
.inv-table tr.boxes th { font-weight: 700; }
.box-pair { display: flex; align-items: center; gap: 6px; min-width: 0; }
.box-pair input { flex: 1 1 0; width: auto; min-width: 0; }
.box-pair span { flex: none; font-size: 11px; font-weight: 700; color: #a86f00; white-space: nowrap; }
.inv-table tr.all-other textarea { font-size: 13px; padding: 6px 8px; }

.other-table td.item-in input { text-align: left; }

/* ---------- Access ---------- */
.access-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.access-card { background: var(--light); border-radius: 12px; padding: 20px; border: 1px solid var(--border); }
.access-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.green { background: var(--primary); }
.dot.amber { background: var(--accent); }
.access-row {
  display: grid; grid-template-columns: 1fr 200px; align-items: center; gap: 14px;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.access-row:last-child { border-bottom: 0; }
.access-row p { margin: 0; font-size: 14px; }
.access-row strong { color: var(--dark); }
.office-row input { background: var(--shade); border-style: dashed; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips label { flex: 1; cursor: pointer; position: relative; }
.chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.chips span {
  display: block; text-align: center; font-size: 13px; font-weight: 700; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--white); color: var(--dark);
  transition: all .2s;
}
.chips label:hover span { border-color: var(--primary); }
.chips input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--white); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(51, 175, 0, .25); }

/* ---------- Buttons ---------- */
.submit-bar { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--primary); color: var(--white); border: 2px solid var(--primary);
  padding: 14px 38px; border-radius: 50px; box-shadow: 0 10px 24px rgba(51, 175, 0, .3);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn:hover { background: var(--primary-600); transform: translateY(-2px); }
.btn svg { font-size: 18px; }
.btn-ghost { background: transparent; color: var(--dark); border-color: var(--dark); box-shadow: none; }
.btn-ghost:hover { background: var(--dark); color: var(--white); }

/* ---------- Process ---------- */
.process { border-top: 4px solid var(--accent); }
.process p { margin: 0 0 12px; }
.process .or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-weight: 700; text-transform: uppercase; font-size: 12px; }
.process .or::before, .process .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.signoff { margin-top: 18px !important; color: var(--dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #aab3c5; text-align: center; padding: 22px 0; font-size: 14px; border-bottom: 4px solid var(--primary); }
.site-footer strong { color: var(--white); }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
img, svg, video { max-width: 100%; }
.panel, .room-card, .access-card, .field, .access-row > * { min-width: 0; }
.access-row p, .room-head h3, .site-footer p { overflow-wrap: anywhere; }

/* Laptops: two room columns get too cramped for 7 table columns */
@media (max-width: 1200px) {
  .rooms-grid { grid-template-columns: 1fr; }
}

/* Tablets */
@media (max-width: 1100px) {
  .access-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .hero { padding: 44px 0 84px; }
  .panel { padding: 24px 20px; }
  .panel-title h2 { font-size: 22px; }
  .access-row { grid-template-columns: 1fr minmax(160px, 200px); }
}

/* Phones */
@media (max-width: 680px) {
  .container { width: calc(100% - 20px); }
  .hero { padding: 36px 0 76px; }
  .hero p { font-size: 14px; }
  .eyebrow { font-size: 11px; letter-spacing: .12em; }
  main { margin-top: -50px; }
  .details-grid { grid-template-columns: 1fr; gap: 14px; }
  .panel { padding: 20px 14px; border-radius: 12px; margin-bottom: 18px; }
  .panel-title { gap: 10px; margin-bottom: 16px; }
  .panel-title h2 { font-size: 20px; }
  .step { width: 32px; height: 32px; flex: none; }
  .hint { font-size: 13px; }
  .rooms-grid, .rooms-col, .access-grid { gap: 16px; }
  .room-head { padding: 10px 12px; }
  .room-head h3 { font-size: 14px; }
  .access-card { padding: 16px 14px; }
  .access-card h3 { font-size: 16px; }
  .access-row { grid-template-columns: 1fr; gap: 8px; }
  .chips span { padding: 9px 8px; }
  .header-inner { justify-content: center; text-align: center; }
  .contact-strip { justify-content: center; }
  .brand h1 { font-size: 22px; }
  /* 16px stops iOS zooming into inputs on focus */
  input, select, textarea, .inv-table input, .inv-table select, .inv-table tr.all-other textarea { font-size: 16px; }
  .submit-bar { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; padding: 14px 20px; }
  .site-footer { font-size: 13px; padding: 18px 0; }

  /* item tables become stacked rows on phones */
  .inv-table, .inv-table tbody { display: block; }
  .inv-table colgroup, .inv-table thead { display: none; }
  .inv-table tbody tr {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
    padding: 10px 12px;
  }
  .inv-table tbody th, .inv-table tbody td { display: block; padding: 0; }
  .inv-table tbody th { grid-column: 1 / -1; padding: 0; font-weight: 700; }
  .inv-table td:empty { display: none; }
  /* size + CM3 share the last line */
  .inv-table tr > td:nth-last-child(2):not([colspan]) { grid-column: span 2; }
  .inv-table tr > td.office { grid-column: span 2; }
  .inv-table td[colspan] { grid-column: span 2; }
  .inv-table tr.sz td[colspan], .inv-table tr.bed td[colspan] { grid-column: span 3; }
  .inv-table tr.all-other td[colspan] { grid-column: 1 / -1; }
  .other-table td.item-in { grid-column: 1 / -1; }
}

/* ---------- Print (for the "print the two sheets" process) ---------- */
@media print {
  body { background: #fff; font-size: 11px; }
  .hero, .submit-bar, .site-footer { display: none; }
  main { margin-top: 0; }
  .panel { box-shadow: none; padding: 10px 0; }
  .rooms-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .room-card { break-inside: avoid; }
  .inv-table { min-width: 0; }
  .table-wrap { overflow: visible; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
