/* Welldone Contractor Portal — brand tokens from welldone_website refresh.css / PPR */
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 700; font-style: normal; font-display: swap; src: url(fonts/hanken-grotesk.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400 700; font-style: italic; font-display: swap; src: url(fonts/hanken-grotesk-italic.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 600; font-display: swap; src: url(fonts/spectral-600.woff2) format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 700; font-display: swap; src: url(fonts/spectral-700.woff2) format("woff2"); }

:root {
  --night: #071d14; --night-soft: #103428;
  --primary: #08783f; --primary-hover: #045f31; --accent: #b7ef3a;
  --ink: #092419; --body: #29483b; --muted: #61786d; --muted-soft: #8ca096;
  --paper: #ffffff; --paper-deep: #edf7f1; --canvas: #f3f8f5;
  --rule: #c9ded2; --rule-subtle: #e1eee7;
  --shadow-sm: 0 8px 24px rgba(9, 36, 25, 0.07);
  --radius: 14px; --radius-sm: 8px;
  --st-ok-ink: #1c691c; --st-ok-wash: #e9f6e9; --st-ok: #0ca30c;
  --st-watch-ink: #8f6000; --st-watch-wash: #fdf3d8; --st-watch: #fab219;
  --st-action-ink: #9c4a1a; --st-action-wash: #fdece3; --st-action: #ec835a;
  --st-esc-ink: #c02f2f; --st-esc-wash: #fbecec; --st-esc: #d03b3b;
  --st-new-ink: #0b4f8a; --st-new-wash: #e6f0fa;
  --focus: #d8a900;
  --font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Spectral", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--body); font-family: var(--font); font-size: 15px; line-height: 1.45; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 8px; }
h1 { font-family: var(--display); font-weight: 700; font-size: 26px; }
h2 { font-size: 17px; margin-top: 4px; }
h3 { font-size: 15px; margin-top: 18px; }
p { margin: 0 0 10px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.small { font-size: 12.5px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.dim { opacity: .6; }
.hidden-row[hidden] { display: none; }

/* top bar */
.topbar { background: var(--night); color: #fff; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 30px; width: auto; }
.brand .eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; font-size: 14px; }
.nav a, .nav .linklike { color: #cfe3d8; text-decoration: none; padding: 6px 4px; border-bottom: 2px solid transparent; }
.nav a.on { color: #fff; border-bottom-color: var(--accent); }
.nav a:hover { color: #fff; }
.nav .who { color: #8ca096; font-size: 13px; margin-left: 8px; }
.nav .logout { color: #8ca096; }
form.inline { display: inline; }
.linklike { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-decoration: underline; }
.linklike.danger { color: var(--st-esc-ink); }

/* layout */
.wrap { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 20px 40px; }
.wrap.narrow { max-width: 760px; }
.foot { text-align: center; color: var(--muted-soft); font-size: 12px; padding: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.crumb { margin: 0 0 10px; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 18px; }
.grid-2.top { align-items: start; margin-bottom: 16px; }
.card { background: var(--paper); border: 1px solid var(--rule-subtle); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.card.sub { box-shadow: none; padding: 12px 14px; margin: 0; background: var(--paper-deep); border-color: var(--rule); }
.card.ok { border-left: 5px solid var(--st-ok); }
.card.warn { border-left: 5px solid var(--st-watch); }
.card.locked { border-left: 5px solid var(--muted-soft); background: #f7faf8; }
.card ul { margin: 6px 0 0 18px; padding: 0; }
.count { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }
.facts.compact { font-size: 13.5px; margin-bottom: 8px; }
.prose { white-space: normal; line-height: 1.55; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--rule-subtle); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--paper-deep); color: var(--body); margin-right: 4px; }
.tag-ok { background: var(--st-ok-wash); color: var(--st-ok-ink); }

/* pills */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; vertical-align: middle; }
.st-ok { background: var(--st-ok-wash); color: var(--st-ok-ink); }
.st-watch { background: var(--st-watch-wash); color: var(--st-watch-ink); }
.st-action { background: var(--st-action-wash); color: var(--st-action-ink); }
.st-esc { background: var(--st-esc-wash); color: var(--st-esc-ink); }
.st-new { background: var(--st-new-wash); color: var(--st-new-ink); }
.st-muted { background: #eef1ef; color: var(--muted); }

/* stats */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; text-decoration: none; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--rule-subtle); }
.stat .n { font-size: 26px; font-weight: 700; line-height: 1; }
.stat .l { font-size: 12.5px; margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule-subtle); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.table.small { font-size: 12.5px; }
.table.small th, .table.small td { padding: 5px 8px; }

/* forms */
.form .field { display: block; margin-bottom: 12px; }
.field .label { display: block; font-size: 13px; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.field .label em { color: var(--st-esc); font-style: normal; }
.field .help, .help { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--primary); }
input[type=file] { font: inherit; font-size: 14px; padding: 8px 0; max-width: 100%; }
textarea { resize: vertical; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.check input, .radio input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; }
.check.big { font-size: 16px; padding: 10px 12px; background: var(--paper-deep); border-radius: var(--radius-sm); margin-bottom: 10px; }
.check-row { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.form.compact { padding-top: 10px; }
.form.compact .field { margin-bottom: 8px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input, .inline-form select { width: auto; min-width: 180px; }
.sub-fields { padding: 10px 14px; margin: 6px 0 10px; border-left: 3px solid var(--rule); }
details.add > summary { list-style: none; display: inline-block; cursor: pointer; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: 8px; }
details.row-details { padding: 8px 0; border-bottom: 1px solid var(--rule-subtle); }
details.row-details summary { cursor: pointer; }
details.waive summary { cursor: pointer; }
.preview { margin-top: -6px; margin-bottom: 12px; font-size: 13.5px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--paper-deep); }
.preview.ok { background: var(--st-ok-wash); color: var(--st-ok-ink); }
.preview.bad { background: var(--st-esc-wash); color: var(--st-esc-ink); }

/* buttons */
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: 14.5px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-deep); }
.btn-ghost.danger { color: var(--st-esc-ink); }
.btn-danger { background: var(--st-esc-wash); color: var(--st-esc-ink); border-color: #f1c9c9; }
.btn-sm { font-size: 13px; padding: 7px 12px; }
.btn-block { display: block; width: 100%; padding: 13px 18px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* flashes */
.flashes { margin-bottom: 14px; }
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid transparent; }
.flash-success { background: var(--st-ok-wash); color: var(--st-ok-ink); border-color: #cfe9cf; }
.flash-error { background: var(--st-esc-wash); color: var(--st-esc-ink); border-color: #f1c9c9; }
.flash-warning { background: var(--st-watch-wash); color: var(--st-watch-ink); border-color: #f3dfa6; }
.flash-info { background: var(--st-new-wash); color: var(--st-new-ink); }
.flash ul { margin: 4px 0 0 18px; }

/* login */
.login-wrap { display: flex; justify-content: center; padding: 30px 0; }
.login-card { background: #fff; border-radius: var(--radius); padding: 34px 30px; max-width: 420px; width: 100%; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--rule-subtle); }
.login-card img.logo { width: 220px; max-width: 80%; margin-bottom: 10px; }
.login-card .eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.login-card h1 { font-size: 24px; margin: 4px 0 16px; }
.login-card .form { text-align: left; }
.login-card .hint { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* checklist (staff) */
.checklist { list-style: none; padding: 0; margin: 0 0 10px; }
.check-item { padding: 10px 12px; border-left: 4px solid var(--rule); margin-bottom: 8px; background: #fbfdfc; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.check-item.complete { border-left-color: var(--st-ok); }
.check-item.pending { border-left-color: var(--st-action); }
.check-item.waived, .check-item.not_required { border-left-color: var(--muted-soft); }
.ci-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ci-detail { font-size: 13.5px; margin-top: 2px; }

/* checklist cards (contractor) */
.check-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--rule-subtle); border-left: 6px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--body); box-shadow: var(--shadow-sm); }
.check-card.complete { border-left-color: var(--st-ok); }
.check-card.pending { border-left-color: var(--st-action); }
.check-card.waived, .check-card.not_required { border-left-color: var(--muted-soft); opacity: .8; }
.check-card:hover { border-color: var(--primary); }
.cc-main { display: flex; flex-direction: column; gap: 2px; }
.cc-main b { color: var(--ink); font-size: 16px; }
.cc-main .muted { font-size: 13.5px; }
.cc-state { display: flex; align-items: center; gap: 10px; flex: none; }
.chev { font-size: 22px; color: var(--muted-soft); }
.job-card { display: block; background: #fff; border: 1px solid var(--rule-subtle); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: var(--body); box-shadow: var(--shadow-sm); }
.job-card:hover { border-color: var(--primary); }
.jc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--ink); font-size: 16px; }
.jc-cust { margin-top: 2px; }

/* photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { margin: 0; display: block; text-decoration: none; color: var(--body); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--rule-subtle); display: block; }
.photo .cap, .photo figcaption { font-size: 12.5px; margin-top: 4px; }
.photo-edit { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; }
.photo-edit select, .photo-edit input { width: auto; font-size: 12.5px; padding: 4px 6px; flex: 1 1 60px; }
.photo-edit .linklike { font-size: 12.5px; }
.progress { margin-top: 10px; background: var(--paper-deep); border-radius: 999px; height: 22px; position: relative; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.progress .ptext { position: absolute; inset: 0; text-align: center; font-size: 12.5px; line-height: 22px; color: var(--ink); }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.timeline li { padding: 5px 0; border-bottom: 1px solid var(--rule-subtle); }
.timeline .when { display: inline-block; min-width: 150px; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { padding: 16px 14px 32px; }
  .card { padding: 14px 14px; }
  h1 { font-size: 22px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { margin-top: 6px; font-size: 12.5px; }
  .topbar-inner { padding: 8px 14px; }
  .brand .eyebrow { display: none; }
  .nav .who { display: none; }
  .timeline .when { display: block; min-width: 0; }
}
