/* Red Brush Painter Portal — redbrushleads.com
   Visual language follows the homeowner site (V1 Heritage): DM Serif Display
   headings, DM Sans body, Red Brush red on warm white. */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --brand: #c0392b;
  --brand-dark: #962d22;
  --brand-tint: #fdf6f6;
  --ink: #1a0f0e;
  --ink-2: #4a3b39;
  --muted: #7d6e6b;
  --line: #eadfdc;
  --bg: #fbf8f6;
  --card: #ffffff;
  --ok: #2f7a3d;
  --ok-bg: #e9f5ec;
  --warn: #9a5410;
  --warn-bg: #fdf0e3;
  --err-bg: #fbeceb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26,15,14,.05), 0 8px 28px rgba(26,15,14,.07);
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { height: 40px; width: auto; }
.brand .tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); border-left: 1px solid var(--line); padding-left: 12px; }
.top nav { display: flex; align-items: center; gap: 6px; }
.top nav a, .top nav button.link { font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.top nav a:hover, .top nav button.link:hover { background: var(--brand-tint); color: var(--brand); }
.who { font-size: .82rem; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: .95rem; padding: 12px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: #d6c7c3; background: #fffdfc; }
.btn.small { padding: 8px 14px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.top .btn { padding: 9px 16px; font-size: .88rem; }

/* Landing */
.hero { background: radial-gradient(1200px 500px at 85% -10%, #f9e3df 0, transparent 60%), #fff; border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; padding-top: 72px; padding-bottom: 72px; align-items: center; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.hero p.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 560px; margin: 0 0 28px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .fine { margin-top: 16px; font-size: .85rem; color: var(--muted); }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 26px; }
.hero-card h3 { font-size: 1.3rem; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: ""; flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23c0392b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; margin-top: 2px; }
.ticks strong { display: block; }
.ticks span { color: var(--muted); font-size: .88rem; }

.section { padding: 72px 0; }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 14px; }
.step h3 { font-size: 1.25rem; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.perk { padding: 22px; border-radius: var(--radius); background: var(--brand-tint); border: 1px solid #f3dcd8; }
.perk b { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.perk span { font-size: .9rem; color: var(--ink-2); }
.band { background: var(--ink); color: #fff; }
.band h2 { color: #fff; }
.band .sub { color: #cdbfbc; }
.reqs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; max-width: 820px; margin: 0 auto; }
.reqs div { display: flex; gap: 12px; align-items: flex-start; }
.reqs i { font-style: normal; flex: 0 0 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: .9rem; font-weight: 700; color: #ffb3a9; }
.reqs p { margin: 0; color: #e9dedc; font-size: .95rem; }
.reqs strong { color: #fff; display: block; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { color: var(--ink-2); margin: 10px 0 0; }
.cta-final { text-align: center; }
.foot { border-top: 1px solid var(--line); background: #fff; padding: 28px 0; font-size: .85rem; color: var(--muted); }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); margin-left: 16px; }

/* Auth */
.auth-shell { min-height: calc(100vh - 68px - 80px); display: grid; place-items: center; padding: 48px 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.auth-card { width: 100%; max-width: 430px; padding: 34px 32px; }
.auth-card h1 { font-size: 1.9rem; text-align: center; }
.auth-card .intro { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: .95rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f5efed; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.tabs button { font: inherit; font-weight: 700; font-size: .9rem; border: 0; background: none; padding: 9px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: .85rem; }
.auth-links a { cursor: pointer; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.g-ico { width: 18px; height: 18px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .lbl { font-size: .85rem; font-weight: 700; color: var(--ink); }
.hint { font-weight: 500; color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; padding: 11px 13px; border: 1px solid #ddd0cc; border-radius: 9px; background: #fff; color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(192,57,43,.2); border-color: var(--brand); }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--brand); background: #fffafa; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.alert { border-radius: 10px; padding: 11px 14px; font-size: .9rem; margin-bottom: 16px; }
.alert.err { background: var(--err-bg); border: 1px solid #f2cdc9; color: #7d1712; }
.alert.ok { background: var(--ok-bg); border: 1px solid #bfe3c8; color: #1f5a2b; }
.alert.warn { background: var(--warn-bg); border: 1px solid #f3d6b6; color: #6d3c0b; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; padding: 6px 0; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex: 0 0 auto; }
.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.chips label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .9rem; cursor: pointer; background: #fff; transition: border-color .12s, background .12s; }
.chips label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.chips input { accent-color: var(--brand); width: 16px; height: 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Application wizard */
.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: 2.1rem; }
.page-head p { color: var(--muted); margin: 0; }
.wizard { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding: 24px 0 72px; align-items: start; }
.stepper { position: sticky; top: 88px; list-style: none; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stepper li button { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink-2); padding: 11px 12px; border-radius: 9px; border: 0; background: none; cursor: pointer; }
.stepper li button:hover { background: #faf4f3; }
.stepper li button .n { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--muted); }
.stepper li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper li.cur button { background: var(--brand-tint); color: var(--brand); }
.stepper li.cur .n { border-color: var(--brand); color: var(--brand); }
.panel { padding: 30px 32px; }
.panel h2 { font-size: 1.6rem; }
.panel .desc { color: var(--muted); margin: 0 0 24px; }
.panel h3 { font-family: var(--sans); font-weight: 700; font-size: 1rem; margin: 26px 0 12px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.save-state { font-size: .82rem; color: var(--muted); }
.ref-card { border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 4px; margin-bottom: 14px; background: #fffdfc; }
.ref-card .lbl { display: block; margin-bottom: 12px; color: var(--brand); text-transform: uppercase; font-size: .74rem; letter-spacing: .1em; }

/* Upload */
.upload { border: 1.5px dashed #dcc9c4; border-radius: 12px; padding: 18px; background: #fffdfc; display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.upload.has { border-style: solid; border-color: #bfe3c8; background: #f6fbf7; }
.upload .meta { font-size: .9rem; }
.upload .meta b { display: block; }
.upload input[type=file] { display: none; }
.progress { height: 6px; background: #f0e6e3; border-radius: 6px; overflow: hidden; width: 160px; }
.progress > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .15s; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.photo { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: #f3ebe9; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo button { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(26,15,14,.72); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.photo.loading::after { content: "Uploading…"; position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; color: var(--muted); }

/* Review step */
.summary { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.summary h4 { margin: 0; padding: 12px 16px; background: #faf4f3; font-size: .9rem; display: flex; justify-content: space-between; }
.summary h4 button { font: inherit; font-size: .82rem; color: var(--brand); background: none; border: 0; cursor: pointer; font-weight: 700; }
.summary dl { display: grid; grid-template-columns: 200px 1fr; margin: 0; padding: 8px 16px; font-size: .9rem; }
.summary dt { color: var(--muted); padding: 6px 0; }
.summary dd { margin: 0; padding: 6px 0; }

/* Dashboard */
.dash { padding: 36px 0 72px; display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.status-card { padding: 30px 32px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 100px; letter-spacing: .02em; }
.badge.draft { background: #f1ecea; color: var(--ink-2); }
.badge.submitted { background: #e8f0fb; color: #1f4f8a; }
.badge.changes_requested { background: var(--warn-bg); color: var(--warn); }
.badge.approved { background: var(--ok-bg); color: var(--ok); }
.badge.rejected { background: var(--err-bg); color: #7d1712; }
.timeline { list-style: none; margin: 26px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 38px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li .dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.now .dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.timeline b { display: block; }
.timeline span { color: var(--muted); font-size: .88rem; }
.side-card { padding: 22px 24px; margin-bottom: 18px; }
.side-card h3 { font-size: 1.2rem; }
.kv { font-size: .9rem; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f3ecea; }
.kv div:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.note { background: var(--brand-tint); border-left: 3px solid var(--brand); padding: 12px 16px; border-radius: 6px; white-space: pre-line; margin: 16px 0; }
.soon { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.soon div { border: 1px dashed var(--line); border-radius: 10px; padding: 14px; font-size: .88rem; color: var(--muted); }
.soon b { color: var(--ink); display: block; }

.loading-screen { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow); z-index: 100; }

@media (max-width: 900px) {
  .hero .wrap, .dash { grid-template-columns: 1fr; }
  .steps, .perks { grid-template-columns: 1fr 1fr; }
  .wizard { grid-template-columns: 1fr; }
  .stepper { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .stepper li button { white-space: nowrap; }
  .stepper li button .t { display: none; }
  .stepper li.cur button .t { display: inline; }
}
@media (max-width: 620px) {
  .steps, .perks, .reqs, .row2, .row3, .soon { grid-template-columns: 1fr; }
  .brand .tag { display: none; }
  .panel, .status-card { padding: 22px 18px; }
  .summary dl { grid-template-columns: 1fr; }
  .summary dt { padding-bottom: 0; }
  .top nav .hide-sm { display: none; }
  .who { display: none; }
}
