/* Guild Marine customer app: the website's look (ink, brass, bone, Instrument Serif + Inter), light and dark. */
@font-face { font-family: "GM Inter"; src: url("fonts/inter-light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "GM Inter"; src: url("fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "GM Inter"; src: url("fonts/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "GM Inter"; src: url("fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
:root {
  --bg: #f8f9fb; --surface: #fff; --ink: #0b1a2c; --text: #1a2738; --muted: #5c6b7c; --line: #dde2e8; --soft: #eef1f4;
  --brass: #c3a26a; --brass-text: #8a6a33; --btn: #0b1a2c; --btn-ink: #f8f9fb; --ok: #2f6b4f; --warn: #b8701e; --err: #b42318;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif; --sans: "GM Inter", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
html.dark { --bg: #0b1a2c; --surface: #112640; --ink: #f8f9fb; --text: #e3e8ee; --muted: #9ba8b6; --line: #24384f; --soft: #16304f; --brass-text: #d7bb87; --btn: #c3a26a; --btn-ink: #0b1a2c; --ok: #7fd1a3; --warn: #f0b867; --err: #ff9d96; color-scheme: dark; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { padding: env(safe-area-inset-top) 0 0; }
#app { max-width: 640px; margin: 0 auto; padding: 0 18px calc(96px + env(safe-area-inset-bottom)); min-height: 100vh; }
a { color: var(--ink); text-decoration-color: var(--brass); text-underline-offset: 4px; }
h1 { font: 400 38px/1.05 var(--serif); color: var(--ink); margin: 22px 0 6px; letter-spacing: -.01em; }
h1 em { font-style: italic; color: var(--brass); }
h2 { font: 500 11px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 28px 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 13.5px; }
.lead { color: var(--muted); font-size: 16px; margin-bottom: 18px; }
.boot, .closed { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.biglogo { width: 220px; max-width: 70%; height: auto; }
html.dark .biglogo { filter: brightness(0) invert(.94); }
/* cards and rows */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--stripe, var(--line)); border-radius: 6px; padding: 14px 14px 14px 14px; margin-bottom: 10px; font: inherit; color: inherit; cursor: pointer; }
.row:active { background: var(--soft); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font: 400 21px/1.15 var(--serif); color: var(--ink); }
.row .s { color: var(--muted); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .num { font-size: 11px; letter-spacing: .14em; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.row .r { text-align: right; flex: 0 0 auto; }
.row .amt { font-weight: 500; font-size: 17px; color: var(--ink); }
.row .chev { color: var(--muted); font-size: 22px; line-height: 1; margin-left: 2px; }
.attn { --stripe: var(--brass); }
.st-run { --stripe: var(--brass); } .st-ok { --stripe: var(--ok); } .st-wait { --stripe: var(--warn); } .st-off { --stripe: var(--line); }
.chip { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.run { background: var(--ink); color: var(--bg); } .chip.ok { background: var(--ok); color: #fff; } .chip.wait { background: var(--brass); color: #0b1a2c; }
html.dark .chip.ok { color: #0b1a2c; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
/* forms and buttons */
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 17px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; min-height: 50px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(195,162,106,.3); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 4px; border: 1px solid var(--btn); background: var(--btn); color: var(--btn-ink); font: 500 16px var(--sans); letter-spacing: .02em; margin-top: 14px; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #0b1a2c; }
.btn:disabled { opacity: .55; }
.link { background: none; border: 0; padding: 12px 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 4px; cursor: pointer; min-height: 44px; }
.err { background: rgba(180,35,24,.08); color: var(--err); border-radius: 4px; padding: 12px 14px; margin-top: 12px; font-size: 15px; }
.ok-note { background: rgba(47,107,79,.1); color: var(--ok); border-radius: 4px; padding: 12px 14px; margin-top: 12px; font-size: 15px; }
.sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 18px 0 4px; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* header with back */
.top { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.back { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 22px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hello img { width: 46px; height: 46px; border-radius: 10px; margin-top: 18px; }
/* job page */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 15px; }
.kv dt { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; color: var(--text); }
.lines { width: 100%; border-collapse: collapse; font-size: 15px; }
.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td.a { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.lines .sub { color: var(--muted); font-size: 13px; }
.totals { margin-top: 10px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.totals .big { color: var(--ink); font-weight: 600; font-size: 19px; border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.totals .owe { color: var(--brass-text); font-weight: 600; }
.pre { white-space: pre-wrap; }
.status-hero { background: var(--ink); color: var(--bg); border-radius: 6px; padding: 18px; margin: 14px 0 12px; }
html.dark .status-hero { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.status-hero .lbl { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--brass); }
.status-hero .big { font: 400 30px/1.1 var(--serif); margin-top: 4px; }
.status-hero .s { opacity: .8; font-size: 14px; margin-top: 4px; }
.status-hero .btn { background: var(--brass); border-color: var(--brass); color: #0b1a2c; }
/* tab bar */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 96%, transparent); border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); backdrop-filter: blur(10px); z-index: 30; }
#tabs[hidden] { display: none; }
#tabs button { background: none; border: 0; color: var(--muted); font: 500 11px var(--sans); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; cursor: pointer; position: relative; }
#tabs button svg { width: 24px; height: 24px; }
#tabs button.on { color: var(--ink); }
#tabs button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--brass); }
#tabs .dot { position: absolute; top: 4px; left: calc(50% + 7px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--brass); color: #0b1a2c; font-size: 10px; line-height: 16px; padding: 0 4px; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 6px; font-size: 15px; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
.tip { background: var(--soft); border-radius: 6px; padding: 14px 16px; margin: 14px 0; font-size: 14.5px; }
.tip strong { display: block; color: var(--ink); margin-bottom: 2px; }
@media (min-width: 760px) { h1 { font-size: 46px; } }

/* v113 maintenance log, coming due, printable service history */
.hist { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-top: 14px; }
.hist-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.hist-logo { width: 72px; height: auto; flex: none; }
html.dark .hist-logo { filter: invert(1) hue-rotate(180deg); }
.hist-t { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.hist-t th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 6px; }
.hist-t td { vertical-align: top; border-bottom: 1px solid var(--line); padding: 10px 6px; }
.hist-t td:first-child { white-space: nowrap; width: 1%; } .hist-t td:last-child { white-space: nowrap; text-align: right; width: 1%; }
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  html.dark .hist-logo { filter: none; }
  #tabs, .noprint, .toast { display: none !important; }
  #app { padding: 0 !important; max-width: none !important; }
  .hist { border: 0; padding: 0; margin: 0; background: #fff; color: #000; }
  .hist .muted { color: #444 !important; }
  .hist-t td, .hist-t th { border-color: #ccc; }
  .hist-t tr { break-inside: avoid; }
}
.row.due .s { white-space: normal; overflow: visible; }
.row.due .chip { align-self: flex-start; }
.kv dd { white-space: pre-line; overflow-wrap: anywhere; }
