:root {
  --bg: #faf7f1;
  --surface: #fdfbf7;
  --surface-2: #efe9df;
  --line: #e2dbcf;
  --ink: #161411;
  --ink-2: #6b665d;
  --ink-3: #9a9488;
  --sage: #6f8f6c;
  --sage-deep: #4f6d4d;
  --sage-soft: #dfe7dc;
  --amber: #c9a640;
  --blue: #7d9cc0;
  --red: #b5524a;
  --red-soft: #f3dedb;
  --primary-hover: #435e41;
  --nav-bg: rgba(250, 247, 241, .96);
  --toast-bg: #161411;
  --toast-ink: #ffffff;
  --overlay: rgba(30, 28, 24, .82);
  --open-bg: #f4ecd2; --open-ink: #8a6d1a;
  --chip-insp-bg: #f4ecd2; --chip-insp-ink: #8a6d1a;
  --chip-meet-bg: #e0e8f2; --chip-meet-ink: #3d5a7d;
  --chip-sel-bg: #efe0ea; --chip-sel-ink: #7a3d63;
  --chip-del-bg: #ece6dc; --chip-del-ink: #6b5a3d;
  --hero-a: #6f8f6c; --hero-b: #4f6d4d;
  --g-up: #c9d6c5; --g-late: #d9a441; --g-base: #8c8679;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(60, 50, 30, .05), 0 4px 16px rgba(60, 50, 30, .05);
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Outfit", -apple-system, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  min-height: 100vh; padding-bottom: env(safe-area-inset-bottom);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--sage-deep); }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.shell { max-width: 960px; margin: 0 auto; padding: 16px 16px 96px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; max-width: 960px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { height: 30px; width: auto; display: block; color: var(--ink); }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark b { font-weight: 800; font-size: 15px; letter-spacing: .12em; }
.wordmark span { font-weight: 400; font-size: 9px; letter-spacing: .5em; margin-top: 4px; color: var(--ink); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.tagline { text-align: center; color: var(--ink-3); font-size: 13px; margin: 0 0 14px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px;
}
.card h2 { font-size: 17px; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--ink-2); font-size: 13px; margin: 0 0 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }

.hero {
  background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%);
  color: #fff; border-radius: 22px; padding: 22px; margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(79, 109, 77, .25);
}
.hero .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11px; opacity: .8; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: 28px; margin: 4px 0 2px; line-height: 1.15; }
.hero .addr { opacity: .85; font-size: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); font-size: 13px; font-weight: 500;
}
.hero .progress { background: rgba(255, 255, 255, .25); margin-top: 16px; }
.hero .progress > i { background: #fff; }
.hero-pct { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; opacity: .9; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat .label { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; color: var(--ink-2); font-weight: 600; }
.stat .value { font-size: 21px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .value.warn { color: var(--red); }
.stat .value.good { color: var(--sage-deep); }
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }
  .stat .value { font-size: 18px; }
}

/* ---------- progress bars ---------- */
.progress { height: 9px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--sage); transition: width .4s ease; }
.progress > i.amber { background: var(--amber); }
.progress > i.blue { background: var(--blue); }
.progress > i.red { background: var(--red); }

.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink-2); margin: 10px 0 6px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--c); }

.line-item { padding: 12px 0; border-top: 1px solid var(--line); }
.line-item:first-of-type { border-top: 0; }
.line-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.line-row strong { font-weight: 600; }
.line-row .amt { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-note { font-size: 12px; color: var(--ink-3); margin-top: 5px; display: flex; justify-content: space-between; gap: 8px; }
.line-actions { display: inline-flex; gap: 10px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font-size: 12px; }
.linkbtn.danger { color: var(--red); }
.tag { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 2px 6px; border-radius: 5px; background: var(--sage-soft); color: var(--sage-deep); font-weight: 600; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
textarea { resize: vertical; min-height: 84px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 140px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.inline-form > input, .inline-form > select { flex: 1 1 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--ink-2); background: transparent;
  cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--ink);
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.small { padding: 7px 13px; font-size: 13px; }
.btn.ghost { border-color: transparent; }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.block { width: 100%; }

.error { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }
.notice { background: var(--sage-soft); color: var(--sage-deep); padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 12px; }
.muted { color: var(--ink-3); }
.empty { text-align: center; color: var(--ink-3); padding: 28px 12px; font-size: 14px; }
.empty .ico { font-size: 28px; margin-bottom: 6px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 400px; }
.auth .brand { justify-content: center; margin-bottom: 18px; }
.auth h1 { font-family: var(--display); font-weight: 500; font-size: 28px; text-align: center; margin: 0 0 6px; }
.auth .lead { text-align: center; color: var(--ink-2); margin: 0 0 22px; }
.auth-foot { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 18px; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px;
  margin-bottom: 14px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1 0 auto; border: 0; background: transparent; padding: 9px 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; position: relative;
}
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; margin-left: 4px;
}

.bottomnav { display: none; }
@media (max-width: 720px) {
  .tabs.desktop { display: none; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--nav-bg); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav button {
    flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; font-weight: 600; color: var(--ink-3); padding: 6px 0; cursor: pointer; position: relative;
  }
  .bottomnav button svg { width: 22px; height: 22px; }
  .bottomnav button.active { color: var(--sage-deep); }
  .bottomnav .badge { position: absolute; top: 0; left: 50%; margin-left: 6px; }
}

/* ---------- project list ---------- */
.proj { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; color: inherit; }
.proj:hover { border-color: var(--sage); }
.proj h3 { margin: 0 0 2px; font-size: 16px; }
.proj .meta { font-size: 13px; color: var(--ink-2); }
.proj .right { text-align: right; min-width: 90px; }
.proj .progress { margin-top: 6px; width: 100%; }

/* ---------- photos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; border: 0; padding: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .q { position: absolute; left: 6px; top: 6px; background: rgba(255, 255, 255, .92); color: #161411; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.day-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 600; margin: 16px 0 8px; }
.day-label:first-child { margin-top: 0; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.drop {
  border: 2px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--ink-2);
  cursor: pointer; display: block; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--sage); background: var(--sage-soft); }
.drop input { display: none; }
.preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

/* ---------- lightbox / modal ---------- */
.overlay {
  position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex;
  align-items: center; justify-content: center; padding: 16px;
}
.lightbox { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-height: 78vh; border-radius: 12px; object-fit: contain; }
.lightbox .cap { color: #fff; text-align: center; font-size: 14px; max-width: 600px; }
.lightbox .cap small { display: block; opacity: .7; margin-top: 2px; }
.lightbox .actions { display: flex; gap: 8px; }
.lightbox .btn { color: #fff; border-color: rgba(255, 255, 255, .5); }
.close-x {
  position: fixed; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; cursor: pointer;
}
.modal {
  background: var(--surface); border-radius: 20px; padding: 22px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.modal h3 { margin: 0 0 14px; font-size: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- calendar ---------- */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-head h2 { margin: 0; }
.cal-nav { display: flex; gap: 4px; }
.cal-nav button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: 11px; text-align: center; color: var(--ink-3); font-weight: 600; padding-bottom: 4px; }
.cal .day {
  min-height: 62px; border-radius: 10px; background: var(--bg); padding: 5px; font-size: 12px;
  display: flex; flex-direction: column; gap: 3px; border: 1px solid transparent;
}
.cal .day.out { opacity: .35; }
.cal .day.today { border-color: var(--sage); }
.cal .day .n { font-weight: 600; color: var(--ink-2); }
.cal .chip { font-size: 10.5px; line-height: 1.2; padding: 2px 4px; border-radius: 4px; background: var(--sage-soft); color: var(--sage-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal .chip.inspection { background: var(--chip-insp-bg); color: var(--chip-insp-ink); }
.cal .chip.meeting, .cal .chip.walkthrough { background: var(--chip-meet-bg); color: var(--chip-meet-ink); }
.cal .chip.selection { background: var(--chip-sel-bg); color: var(--chip-sel-ink); }
.cal .chip.delivery { background: var(--chip-del-bg); color: var(--chip-del-ink); }
@media (max-width: 560px) {
  .cal .day { min-height: 44px; padding: 3px; }
  .cal .chip { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
}

.event { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.event:first-child { border-top: 0; }
.datebox { width: 52px; flex: none; text-align: center; background: var(--sage-soft); color: var(--sage-deep); border-radius: 12px; padding: 6px 0; }
.datebox .mo { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.datebox .d { font-size: 20px; font-weight: 700; line-height: 1.1; }
.event .info { flex: 1; min-width: 0; }
.event .info strong { display: block; }
.event .info .meta { font-size: 13px; color: var(--ink-2); }
.event .info .notes { font-size: 13px; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; }
.kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--ink-3); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 260px); min-height: 420px; padding: 0; overflow: hidden; }
@media (max-width: 720px) { .chat { height: calc(100vh - 230px); } }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg .bubble { padding: 10px 14px; border-radius: 18px; background: var(--surface-2); white-space: pre-wrap; word-wrap: break-word; }
.msg.me .bubble { background: var(--sage-deep); color: #fff; border-bottom-right-radius: 6px; }
.msg:not(.me) .bubble { border-bottom-left-radius: 6px; }
.msg .who { font-size: 11px; color: var(--ink-3); padding: 0 6px; }
.msg img { border-radius: 14px; max-width: 240px; max-height: 260px; object-fit: cover; cursor: pointer; }
.chat-day { align-self: center; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; margin: 6px 0; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; gap: 8px; align-items: flex-end; background: var(--surface); }
.composer textarea { min-height: 44px; max-height: 140px; padding: 11px 14px; border-radius: 22px; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--bg);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn.send { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.icon-btn svg { width: 20px; height: 20px; }
.attach-preview { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; font-size: 13px; color: var(--ink-2); }
.attach-preview img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }

/* ---------- tables ---------- */
.tx { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx td { padding: 10px 4px; border-top: 1px solid var(--line); }
.tx tr:first-child td { border-top: 0; }
.tx td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx .status { white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tx .status.open { background: var(--open-bg); color: var(--open-ink); }
.tx .status.paid { background: var(--sage-soft); color: var(--sage-deep); }

.member { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.member:first-child { border-top: 0; }
.copybox { display: flex; gap: 6px; margin-top: 6px; width: 100%; }
.copybox input { font-size: 12px; padding: 8px 10px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-ink);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 60; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  animation: rise .2s ease;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

.install-banner { display: flex; align-items: center; gap: 12px; }
.install-banner .ico { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-banner div { flex: 1; font-size: 14px; }
.install-banner strong { display: block; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--sage-soft); border-top-color: var(--sage); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col > .card { margin-bottom: 0; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.see-all { font-size: 13px; font-weight: 600; background: none; border: 0; color: var(--sage-deep); cursor: pointer; }

/* ---------- dark mode: follows the phone unless the person picks Light or Dark ---------- */
:root[data-theme="dark"] {
  --bg: #121211;
  --surface: #1b1a18;
  --surface-2: #26241f;
  --line: #34312b;
  --ink: #f3f0ea;
  --ink-2: #b8b2a6;
  --ink-3: #888276;
  --sage: #86a882;
  --sage-deep: #5f805b;
  --sage-soft: #26321f;
  --amber: #d6b555;
  --blue: #8faed2;
  --red: #e0796f;
  --red-soft: #3b2220;
  --primary-hover: #6d9168;
  --nav-bg: rgba(18, 18, 17, .94);
  --toast-bg: #f3f0ea;
  --toast-ink: #161411;
  --overlay: rgba(0, 0, 0, .85);
  --open-bg: #3a3218; --open-ink: #e3c76a;
  --chip-insp-bg: #3a3218; --chip-insp-ink: #e3c76a;
  --chip-meet-bg: #1f2c3b; --chip-meet-ink: #9fc0e6;
  --chip-sel-bg: #36202f; --chip-sel-ink: #e0a6cb;
  --chip-del-bg: #2f2a20; --chip-del-ink: #d2bf98;
  --hero-a: #4d6a4a; --hero-b: #2f452d;
  --g-up: #3a4a36; --g-late: #d6a94a; --g-base: #7d776b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --surface: #1b1a18;
    --surface-2: #26241f;
    --line: #34312b;
    --ink: #f3f0ea;
    --ink-2: #b8b2a6;
    --ink-3: #888276;
    --sage: #86a882;
    --sage-deep: #5f805b;
    --sage-soft: #26321f;
    --amber: #d6b555;
    --blue: #8faed2;
    --red: #e0796f;
    --red-soft: #3b2220;
    --primary-hover: #6d9168;
    --nav-bg: rgba(18, 18, 17, .94);
    --toast-bg: #f3f0ea;
    --toast-ink: #161411;
    --overlay: rgba(0, 0, 0, .85);
    --open-bg: #3a3218; --open-ink: #e3c76a;
    --chip-insp-bg: #3a3218; --chip-insp-ink: #e3c76a;
    --chip-meet-bg: #1f2c3b; --chip-meet-ink: #9fc0e6;
    --chip-sel-bg: #36202f; --chip-sel-ink: #e0a6cb;
    --chip-del-bg: #2f2a20; --chip-del-ink: #d2bf98;
    --hero-a: #4d6a4a; --hero-b: #2f452d;
  --g-up: #3a4a36; --g-late: #d6a94a; --g-base: #7d776b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

.theme-pick { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin: 4px 0 16px; }
.theme-pick button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.theme-pick button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; display: block; background: var(--bg); }
.choice label:has(input:checked) { border-color: var(--sage); background: var(--sage-soft); }
.choice input { margin: 0 8px 0 0; accent-color: var(--sage-deep); }
.choice strong { font-size: 15px; }
.choice small { display: block; color: var(--ink-2); margin-top: 4px; font-size: 13px; line-height: 1.35; }
@media (max-width: 560px) { .choice { grid-template-columns: 1fr; } }

/* fast taps: no double-tap-zoom delay on buttons, instant press feedback */
button, .btn, a, [data-tab], label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bottomnav button:active, .tabs button:active { transform: scale(.94); }
.bottomnav button, .tabs button { transition: color .12s, background .12s, transform .08s; }

/* ---------- schedule: timeline (Gantt) ---------- */
.view-switch { margin: 0 4px 12px; }
.g-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.g-zoom { flex: none; }
.g-legend .lg-base::before { height: 3px !important; width: 14px !important; background: var(--g-base) !important; vertical-align: 3px !important; }
.g-legend .lg-ms::before { transform: rotate(45deg); background: var(--ink-3) !important; width: 9px !important; height: 9px !important; }
.status.done, .status.co-approved { background: var(--sage-soft); color: var(--sage-deep); }
.status.active { background: var(--sage-soft); color: var(--sage-deep); }
.status.late, .status.co-pending { background: var(--open-bg); color: var(--open-ink); }
.status.upcoming, .status.co-draft, .status.co-void { background: var(--surface-2); color: var(--ink-2); }
.status.co-declined { background: var(--red-soft); color: var(--red); }
.status { white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; display: inline-block; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span { color: var(--ink-2); }
.kv strong.good { color: var(--sage-deep); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 2px 0 12px; line-height: 1.35; }
.check input { margin-top: 2px; accent-color: var(--sage-deep); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }

/* ---------- change orders ---------- */
.co-card.attention { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), var(--shadow); }
.co-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); }
.co-row:first-of-type { border-top: 0; }
.co-row:hover { background: var(--surface-2); }
.co-num { font-weight: 700; color: var(--ink-3); width: 30px; flex: none; }
.co-main { flex: 1; min-width: 0; }
.co-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-main small { color: var(--ink-2); font-size: 12.5px; }
.co-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.co-right .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.co-desc { margin-top: 12px; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.co-sig { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.co-signbox { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.co-alert { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-color: var(--amber); background: var(--open-bg); }
.co-alert .muted { color: var(--open-ink); }

/* ---- schedule menu colors ---- */
.g-legend.g-colors { margin-bottom: -6px; }
.g-legend .lg-late::before { background: transparent !important; box-shadow: inset 0 0 0 2px var(--g-late); }
.pick { display: flex; align-items: center; gap: 8px; }
.pick select { flex: 1; min-width: 0; }
.swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; border: 1px solid var(--line); }
.menu-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding: 2px; }
.menu-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; }
.menu-row input[type=color] { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.menu-row input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.menu-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.menu-row input[type=text] { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; min-width: 0; }
.menu-row .mini { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); }
.menu-row .mini input[type=number] { width: 48px; height: 34px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.menu-btns { display: flex; gap: 2px; }
.menu-btns button { width: 30px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 13px; }
.menu-btns button:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) {
  .menu-row { grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "c n b" "c d a"; row-gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .menu-row input[type=color] { grid-area: c; align-self: start; }
  .menu-row [data-k=name] { grid-area: n; }
  .menu-row .menu-btns { grid-area: b; }
  .menu-row .mini:not(.alongside) { grid-area: d; }
  .menu-row .alongside { grid-area: a; justify-self: end; }
}


/* ---- timeline: black Gantt (month / W1–W4 grid, thick phase bars, thin task bars, elbow links) ---- */
.gantt-card.night { --surface: #0c0c0d; --surface-2: #19191b; --ink: #f4f4f5; --ink-2: #c7c7cc; --ink-3: #8e8e93; --line: #2a2a2e;
  --g-line: #5a5a60; --g-grid: rgba(255,255,255,.13); --g-late: #e0a33a; --g-base: #9a9aa0;
  background: #000; border-color: #1f1f22; color: var(--ink); color-scheme: dark; }
.gantt-card.night .sub { color: var(--ink-2); }
.gantt-card.night .btn { background: #141416; color: var(--ink); border-color: #333338; }
.gantt-card.night .btn.primary { background: #f4f4f5; color: #000; border-color: #f4f4f5; }
.gantt-card.night .segmented { background: #141416; }
.gantt-card.night .segmented button { color: var(--ink-3); }
.gantt-card.night .segmented button.active { background: #2a2a2e; color: #fff; }
.gantt-card.night .tag { background: #2a2a2e; color: var(--ink-2); }
.gantt { --lw: 200px; overflow-x: auto; overflow-y: hidden; border: 1px solid #2c2c31; border-radius: 14px; background: #000; position: relative; -webkit-overflow-scrolling: touch; }
@media (max-width: 560px) { .gantt { --lw: 128px; } }
.g-inner { position: relative; min-width: 100%; }
.g-row { display: flex; position: relative; z-index: 2; }
.g-label { position: sticky; left: 0; z-index: 3; flex: none; width: var(--lw); display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 0 16px 0 10px; background: #000; border: 0; border-right: 1px solid #2c2c31; text-align: right; color: var(--ink); cursor: pointer; font: inherit; }
.g-label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.g-phase .g-label { font-size: 16px; font-weight: 500; letter-spacing: .005em; align-items: flex-end; padding-bottom: 6px; }
.g-task .g-label { font-size: 13px; color: var(--ink-2); }
.g-label .chev { color: var(--ink-3); font-size: 10px; width: 10px; flex: none; }
.g-track { position: relative; flex: none; width: var(--tw, 100%); }
.g-phase .g-track::after { content: ""; position: absolute; left: 0; right: 0; bottom: 13px; height: 1px; background: var(--g-grid); }
.g-head { height: 62px; border-bottom: 1px solid #2c2c31; }
.g-head .g-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); cursor: default; align-items: center; }
.g-head .g-label .nm { white-space: normal; line-height: 1.25; text-align: right; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.g-mo { position: absolute; top: 10px; text-align: center; font-size: 16px; font-weight: 400; color: var(--ink); white-space: nowrap; overflow: hidden; border-left: 1px solid #2c2c31; height: 52px; box-sizing: border-box; }
.g-head.months .g-mo { top: 0; height: 62px; line-height: 62px; font-size: 13px; }
.g-wk { position: absolute; bottom: 9px; text-align: center; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.g-body { position: relative; padding-bottom: 14px; }
.g-grid { position: absolute; top: 0; bottom: 0; left: var(--lw); pointer-events: none; z-index: 0; }
.g-grid .g-vm { position: absolute; top: 0; bottom: 0; width: 1px; background: #2c2c31; }
.g-grid .g-vw { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.045); }
.g-links { position: absolute; top: 0; left: var(--lw); z-index: 1; pointer-events: none; overflow: visible; }
.g-links path { fill: none; stroke-width: 1.5; opacity: .9; }
/* thick phase bar + caption */
.g-cap { position: absolute; top: 6px; font-size: 12.5px; color: var(--ink); white-space: nowrap; pointer-events: none; }
.g-pill { --c: #a0a4ab; position: absolute; bottom: 5px; height: 17px; border: 0; padding: 0; border-radius: 99px; overflow: hidden; z-index: 2;
  background: color-mix(in srgb, var(--c) 58%, #000); cursor: pointer; }
div.g-pill { cursor: default; }
.g-pill i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 82%, #fff); border-radius: 99px; }
.g-pill.done, .g-pill.done i { background: color-mix(in srgb, var(--c) 82%, #fff); }
.g-pill.done { background: var(--c); }
/* thin task bar */
.g-thin { --c: #a0a4ab; position: absolute; top: 11px; height: 9px; border: 0; padding: 0; border-radius: 99px; overflow: hidden; z-index: 2; cursor: pointer;
  background: color-mix(in srgb, color-mix(in srgb, var(--c) 72%, #fff) 50%, #000); }
.g-thin i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 72%, #fff); border-radius: 99px; }
.g-thin.done { background: color-mix(in srgb, var(--c) 72%, #fff); }
.g-pill.late, .g-thin.late { box-shadow: 0 0 0 2px var(--g-late); }
.g-pill:focus-visible, .g-thin:focus-visible, .g-ms:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* milestones */
.g-ms { --c: #c7c7cc; position: absolute; width: 14px; height: 14px; border: 0; padding: 0; transform: rotate(45deg); border-radius: 3px; z-index: 2; cursor: pointer;
  background: color-mix(in srgb, var(--c) 45%, #000); box-shadow: inset 0 0 0 2px var(--c); }
.g-ms.done { background: var(--c); }
.g-ms.late { box-shadow: inset 0 0 0 2px var(--c), 0 0 0 2px var(--g-late); }
.g-ms.small { width: 10px; height: 10px; top: 10px; }
.g-base { position: absolute; height: 2px; border-radius: 2px; background: var(--g-base); opacity: .6; z-index: 1; }
.g-today { position: absolute; top: 0; bottom: 0; width: 1.5px; background: #ff5a4f; z-index: 4; pointer-events: none; }
.g-today span { position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 700; color: #fff; background: #ff5a4f; padding: 1px 5px; border-radius: 4px; }
.g-zoom { flex: none; }
.gantt-card.night .g-legend { color: var(--ink-2); }
.g-legend .lg-base::before { height: 3px !important; width: 14px !important; background: var(--g-base) !important; vertical-align: 3px !important; }
.g-legend .lg-ms::before { transform: rotate(45deg); background: transparent !important; box-shadow: inset 0 0 0 2px #c7c7cc; width: 9px !important; height: 9px !important; }
.g-legend .lg-late::before { background: transparent !important; box-shadow: inset 0 0 0 2px var(--g-late); }
.g-legend.g-colors { margin-bottom: -6px; }

/* ---- project colors ---- */
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.swatches input[type=color] { width: 44px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.swatches .sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); background: var(--c); cursor: pointer; padding: 0; }
.proj .pdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--pc, var(--sage)); }
.proj[style*="--pc"] .progress > i { background: var(--pc); }

/* ---- drag to reschedule (builder) ---- */
.gantt.can-drag .g-pill[data-task], .gantt.can-drag .g-thin, .gantt.can-drag .g-ms { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gantt.can-drag .dragging { cursor: grabbing; z-index: 6; box-shadow: 0 0 0 2px #fff, 0 6px 18px rgba(0,0,0,.6); }
.g-grip { position: absolute; top: 0; right: 0; bottom: 0; width: 12px; cursor: ew-resize; z-index: 2; }
.g-grip::after { content: ""; position: absolute; top: 50%; right: 4px; width: 2px; height: 60%; transform: translateY(-50%); border-radius: 2px; background: rgba(255,255,255,.55); opacity: 0; transition: opacity .15s; }
.g-pill:hover .g-grip::after, .g-thin:hover .g-grip::after, .dragging .g-grip::after { opacity: 1; }
.g-thin .g-grip { width: 10px; }
@media (pointer: coarse) { .g-grip { width: 18px; } .g-grip::after { opacity: .8; } }
.g-tip { position: absolute; z-index: 7; white-space: nowrap; font-size: 12px; font-weight: 600; color: #000; background: #fff; padding: 3px 8px; border-radius: 6px; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.5); }

/* ---- header photo ---- */
.hero.has-photo { background-size: cover; background-position: center; background-color: var(--hero-b); text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.hero.has-photo .pill { background: rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cover-row { display: flex; flex-direction: column; gap: 12px; }
.cover-prev { height: 120px; border-radius: 14px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.cover-prev span { color: #fff; font-size: 13px; opacity: .85; }
label.btn { cursor: pointer; display: inline-flex; align-items: center; }
label.btn.busy { opacity: .6; pointer-events: none; }

/* ---- documents ---- */
.doc-filter { margin: 4px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-filter button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.doc-filter button.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.doc-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 18px 0 4px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc-ico { width: 40px; height: 46px; flex: none; border-radius: 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; box-sizing: border-box;
  font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff; background: #6b6b70; position: relative; }
.doc-ico::before { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 11px 11px 0; border-color: var(--surface) var(--surface) rgba(255,255,255,.35) rgba(255,255,255,.35); }
.doc-ico.pdf { background: #c0453a; } .doc-ico.img { background: #3e7cb1; } .doc-ico.cad { background: #2e7d7a; } .doc-ico.xls { background: #2f7d45; } .doc-ico.doc { background: #2f5d8a; }
.doc-main { flex: 1; min-width: 0; }
.doc-name { display: block; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.doc-name:hover { text-decoration: underline; }
.doc .meta { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.doc-act { display: flex; gap: 6px; flex: none; align-items: center; }
.btn.icon-only { width: 38px; padding: 7px 0; justify-content: center; font-size: 13px; letter-spacing: 1px; }
@media (max-width: 720px) { .bottomnav button { font-size: 10px; } .bottomnav button svg { width: 21px; height: 21px; } }

/* ---- slim alerts line (clients) ---- */
.push-slim { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--ink-2); }
.push-slim-act { display: flex; align-items: center; gap: 12px; flex: none; }
.push-slim .linkbtn { font-size: 13px; font-weight: 600; }
.push-slim .linkbtn.x { color: var(--ink-3); font-weight: 400; }
/* ---- documents drop zone ---- */
.dropzone { display: block; width: 100%; margin: 10px 0 4px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 12px; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; text-align: center; }
.dropzone span { color: var(--ink-3); font-size: 13px; }
.dropzone:hover { border-color: var(--sage); color: var(--ink); }
.dropzone .dz-t { display: none; }
@media (pointer: coarse) { .dropzone .dz-d { display: none; } .dropzone .dz-t { display: inline; } }
.card.drop-on { outline: 2px dashed var(--sage); outline-offset: -6px; background: color-mix(in srgb, var(--sage) 8%, var(--surface)); }
.card.drop-on .dropzone { border-color: var(--sage); background: color-mix(in srgb, var(--sage) 14%, transparent); color: var(--ink); }
.drop-list { margin: -4px 0 12px; padding-left: 18px; font-size: 13.5px; max-height: 160px; overflow: auto; }

/* ---- people on this project: roles + alert switches ---- */
.people-h { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 18px 0 2px; }
.people-empty { font-size: 13.5px; padding: 8px 0; }
.member-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.me-row { border-bottom: 1px solid var(--line); }
.role-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); vertical-align: 1px; }
.role-tag.builder { background: var(--sage-soft); color: var(--sage-deep); }
.alert-sw { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); margin-right: 4px; min-height: 36px; }
.alert-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.alert-sw .sw-track { width: 36px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.alert-sw .sw-track i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.alert-sw input:checked + .sw-track { background: var(--sage-deep); }
.alert-sw input:checked + .sw-track i { transform: translateX(14px); }
.alert-sw input:focus-visible + .sw-track { outline: 2px solid var(--sage); outline-offset: 2px; }
.invite-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.invite-note { font-size: 12.5px; margin: -4px 0 12px; }
.device-alerts { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
@media (max-width: 560px) { .device-alerts { grid-template-columns: 1fr; gap: 4px; } }

/* ---- QuickBooks status chip (dashboard) ---- */
.head-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.qb-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.qb-chip .linkbtn { font-size: 12.5px; font-weight: 600; }
.qb-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.qb-chip.on i { background: #2ca01c; }
.qb-chip.ready i { background: var(--amber, #d9a441); }

/* ---- calendar colors ---- */
.cal .chip.tinted { background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: color-mix(in srgb, var(--c) 72%, var(--ink)); border-left: 3px solid var(--c); padding-left: 3px; }
@media (max-width: 560px) { .cal .chip.tinted { background: var(--c); border-left: 0; padding: 0; } }
.cal-legend { margin: -4px 4px 14px; align-items: center; }
.cal-legend .linkbtn { font-size: 12px; margin-left: auto; }
.event .datebox.tinted { background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.event .kind.tinted { display: inline-flex; align-items: center; gap: 5px; color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.kdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.ev-color { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.ev-color input[type=color] { width: 44px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
.ev-color input[type=color]:disabled { opacity: .45; cursor: default; }
.menu-row.kinds { grid-template-columns: 34px minmax(0, 1fr) auto; }
@media (max-width: 560px) { .menu-row.kinds { grid-template-areas: none; grid-template-columns: 34px minmax(0, 1fr) auto; } .menu-row.kinds > * { grid-area: auto !important; } }

/* ---- address suggestions ---- */
.addr-wrap { position: relative; }
.addr-wrap > input { width: 100%; }
.addr-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.18); max-height: 260px; overflow: auto; }
.addr-list li { padding: 9px 10px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--ink); }
.addr-list li.on, .addr-list li:hover { background: var(--surface-2); }
.addr-list li.addr-credit { font-size: 10.5px; color: var(--ink-3); cursor: default; padding: 4px 10px 2px; text-align: right; }
.addr-list li.addr-credit:hover { background: none; }

/* ---- builder dashboard nav + company documents ---- */
.dash-nav { display: inline-flex; margin: 4px 4px 14px; }
.dash-nav a { text-decoration: none; }
.cdoc-top .head-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cdoc-alert { margin-top: 10px; font-size: 13.5px; }
.exp { font-weight: 600; }
.exp.soon { color: var(--amber, #b07a1f); }
.exp.expired { color: var(--red, #c0453a); }
.cdoc-sec { padding-top: 10px; padding-bottom: 10px; transition: outline-color .1s; }
.cdoc-sec.drop-on, .cdoc-top.drop-on { outline: 2px dashed var(--sage); outline-offset: -6px; background: color-mix(in srgb, var(--sage) 8%, var(--surface)); }
.cdoc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.cdoc-toggle { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; background: none; border: 0; padding: 4px 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.cdoc-toggle h3 { margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdoc-toggle .chev { width: 12px; color: var(--ink-3); font-size: 12px; flex: none; }
.cdoc-toggle .count { font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-radius: 99px; padding: 1px 8px; }
.cdoc-tools { display: flex; gap: 4px; flex: none; }
.cdoc-tools .btn.icon-only { width: 34px; }
.cdoc-body { margin-top: 4px; }
.cdoc-empty { font-size: 13.5px; padding: 10px 0 4px; }
.cdoc-sec .doc[draggable=true] { cursor: grab; }
.cdoc-sec .doc.dragging { opacity: .45; }
.segmented a { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.segmented a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---- small "Get app" button in the top bar ---- */
.app-btn { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: var(--ink-3); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.app-btn svg { width: 14px; height: 14px; }
.app-btn:hover { color: var(--ink); background: var(--surface-2); }
.app-btn.hidden { display: none; }
