/* Colour Crew Estimator — mobile-first, navy/white, big tap targets. */
:root {
  --navy: #0a2540;
  --navy2: #123a63;
  --ink: #111;
  --line: #cfd8e3;
  --bg: #f4f6f9;
  --card: #fff;
  --accent: #0a2540;
  --good: #146c2e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.4;
}
.appbar {
  background: var(--navy); color: #fff; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 10;
}
.brand-name { font-weight: 700; font-size: 18px; }
.brand-sub { font-size: 13px; opacity: .85; letter-spacing: .08em; text-transform: uppercase; }
.net-status { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.15); }
.net-status.offline { background: #8a5a00; }

.tabbar {
  display: flex; background: var(--navy2); position: sticky; top: 57px; z-index: 10;
}
.tab {
  flex: 1; appearance: none; border: 0; background: transparent; color: #dbe6f2;
  min-height: 48px; font-size: 15px; font-weight: 600; cursor: pointer; padding: 6px 2px;
}
.tab.active { color: #fff; box-shadow: inset 0 -3px 0 #fff; }

main { max-width: 860px; margin: 0 auto; padding: 14px 12px 40px; }
.view h2 { font-size: 20px; margin: 8px 0 12px; color: var(--navy); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; margin-bottom: 14px;
}
.card h3 { margin: 0 0 10px; font-size: 17px; color: var(--navy); }
label { display: block; font-size: 13px; font-weight: 600; color: #33475e; margin: 10px 0 4px; }
input[type="text"], input[type="number"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px;
  background: #fff; color: #000; border: 1px solid var(--line); border-radius: 8px;
}
input[type="number"] { text-align: right; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--navy);
  background: var(--navy); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn.secondary { background: #fff; color: var(--navy); }
.btn.danger { background: #fff; color: #a11; border-color: #a11; }
.btn.small { min-height: 40px; font-size: 14px; padding: 6px 12px; }
.btn.block { width: 100%; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 6px; }
.check {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  font-size: 16px; font-weight: 500; color: var(--ink); margin: 0;
}
.check input[type="checkbox"] { width: 24px; height: 24px; flex: none; }

.jobcard { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.jobcard .jc-name { font-size: 17px; font-weight: 700; }
.jobcard .jc-sub { font-size: 14px; color: #55677c; }
.jobcard .jc-total { font-size: 17px; font-weight: 700; color: var(--navy); white-space: nowrap; }

table.totals { width: 100%; border-collapse: collapse; font-size: 16px; }
table.totals td, table.totals th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.totals td.num, table.totals th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.totals tr.grand td { font-weight: 800; font-size: 18px; border-top: 2px solid var(--navy); border-bottom: 0; }
.muted { color: #55677c; font-size: 14px; }
.note { background: #eef3f9; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.empty { text-align: center; color: #55677c; padding: 24px 10px; }
.appfoot { text-align: center; color: #77879a; font-size: 13px; padding: 14px; }

/* Proposal sheet */
#proposalSheet { background: #fff; color: #000; padding: 8px 4px; }
#proposalSheet .p-head { border-bottom: 3px solid var(--navy); padding-bottom: 10px; margin-bottom: 12px; }
#proposalSheet .p-biz { font-size: 24px; font-weight: 800; color: var(--navy); }
#proposalSheet .p-tag { font-style: italic; color: #33475e; }
#proposalSheet .p-contact { font-size: 14px; color: #33475e; }
#proposalSheet h3 { color: var(--navy); margin: 16px 0 6px; }
#proposalSheet ul { margin: 6px 0; padding-left: 20px; }
#proposalSheet .p-terms { font-size: 13.5px; color: #222; }

@media print {
  .no-print, .appbar, .tabbar, .appfoot { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .view { display: none !important; }
  #view-proposal { display: block !important; }
  #proposalSheet { padding: 0; }
}
