/* Boss Roofing Job Application — compact, mobile-first, light theme with a
   navy header. Tight spacing on purpose (owner's standing preference). */
:root {
  --navy: #0f2a43;
  --navy2: #16395c;
  --accent: #c98a1b;
  --ink: #1c2733;
  --muted: #64748b;
  --line: #dbe2ea;
  --bg: #eef2f6;
  --card: #ffffff;
  --good: #12805c;
  --bad: #c0392b;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.4;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.req { color: var(--bad); }

/* header */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 6px rgba(0,0,0,.25); }
.topbar-in { max-width: 760px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 800; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.brand-name { font-weight: 800; letter-spacing: .06em; font-size: 17px; line-height: 1.1; }
.brand-sub { font-size: 12px; color: #bcd0e4; letter-spacing: .04em; }

/* layout */
.wrap { max-width: 760px; margin: 0 auto; padding: 12px 10px 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.card h1 { font-size: 20px; margin: 2px 0 6px; }
.card h2 { font-size: 15px; margin: 2px 0 8px; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.card p { margin: 4px 0; }
.intro h1 { text-transform: none; letter-spacing: 0; color: var(--ink); }

/* form */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.grid .span2 { grid-column: span 2; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } .grid .span2 { grid-column: span 1; } }
label { display: block; font-size: 13px; font-weight: 600; color: #33424c; }
label input, label select {
  display: block; width: 100%; margin-top: 3px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
  font-weight: 400; color: var(--ink); background: #fff;
}
label input:focus, label select:focus { outline: 2px solid var(--navy2); outline-offset: 0; border-color: var(--navy2); }
.lbl { font-size: 13px; font-weight: 600; color: #33424c; margin: 10px 0 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.check { display: flex; align-items: flex-start; gap: 7px; font-weight: 500; padding: 4px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.check.cert { margin-bottom: 10px; }
.yn-grid { margin-top: 4px; }

.filebox { border: 1.5px dashed #a9bccd; border-radius: 10px; padding: 12px; background: #f6f9fc; cursor: pointer; }
.filebox-title { display: block; font-size: 15px; font-weight: 700; color: var(--navy); }
.filebox-sub { display: block; font-weight: 400; margin: 2px 0 8px; }
.filebox input { border: none; padding: 0; background: transparent; }
.file-name { display: block; margin-top: 6px; font-weight: 600; color: var(--good); }

.error { color: var(--bad); font-weight: 600; font-size: 14px; margin: 8px 0; }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 8px 14px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:disabled { opacity: .55; cursor: wait; }
.btn.wide { width: 100%; }
.btn.big { padding: 13px; font-size: 16px; margin-top: 8px; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }

/* success */
.success { text-align: center; padding: 28px 18px; }
.success-mark { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: var(--good); color: #fff; font-size: 28px; display: flex; align-items: center; justify-content: center; }

/* owner */
.auth { max-width: 420px; margin: 18px auto; }
.auth label { margin-bottom: 10px; }
.auth-alt { text-align: center; margin-top: 10px; }
.auth-alt a { color: var(--navy2); }
.owner-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.owner-head h1 { margin: 0; }
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 8px; border-top: 1px solid var(--line); cursor: pointer; }
.app-row:hover { background: #f6f9fc; }
.app-row .nm { font-weight: 700; }
.app-row .meta { font-size: 12.5px; color: var(--muted); }
.pill { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #e2e8f0; color: #33424c; }
.pill.st-new { background: #dbeafe; color: #1d4ed8; }
.pill.st-ref { background: #fef3c7; color: #92400e; }
.pill.st-ok { background: #dcfce7; color: #166534; }
.pill.st-no { background: #fee2e2; color: #991b1b; }
.detail-grid { display: grid; grid-template-columns: 150px 1fr; gap: 4px 12px; font-size: 14px; }
.detail-grid dt { color: var(--muted); font-weight: 600; }
.detail-grid dd { margin: 0; font-weight: 500; word-break: break-word; }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 118px 1fr; } }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.detail-actions select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; }

/* footer */
.footer { text-align: center; padding: 6px 12px 26px; }
.foot-brand { font-weight: 800; letter-spacing: .06em; color: var(--navy); }
.owner-link { margin-top: 10px; }
.owner-link a { color: #9db2c6; font-size: 12.5px; text-decoration: none; }
.owner-link a:hover { text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-weight: 600; font-size: 14px; box-shadow: 0 4px 18px rgba(0,0,0,.3); z-index: 50;
}
