/* MyInquiry — staff app styles. Forest palette, high legibility, phone-first. */
[hidden] { display: none !important; }
:root {
  --bg: #f4f1ea; --surface: #fffdf8; --ink: #1d231f; --muted: #66706a; --line: #e2ddd0;
  --brand: #1f3d2b; --brand-2: #2f5e40; --accent: #c8862a; --accent-ink: #5b3a07;
  --ok: #2f7a45; --warn: #b26b00; --bad: #b3261e; --wa: #128c4a;
  --radius: 10px; --shadow: 0 1px 2px rgba(30,40,30,.06), 0 4px 14px rgba(30,40,30,.05);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
a { color: var(--brand-2); }
h1, h2 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.05rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
code { font-size: .85em; }
.muted { color: var(--muted); } .small { font-size: .82rem; }
.pre { white-space: pre-wrap; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.2rem;
  background: var(--brand); color: #fff; padding: .55rem 1rem; }
.brand { color: #fff; text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: .45rem; letter-spacing: .2px; }
.brand img { width: 26px; height: 26px; }
.mainnav { display: flex; gap: .2rem; flex: 1; }
.mainnav a { color: #dfe9e1; text-decoration: none; padding: .4rem .7rem; border-radius: 6px; }
.mainnav a.on, .mainnav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.who .menu { position: relative; }
.who summary { cursor: pointer; list-style: none; padding: .35rem .6rem; border-radius: 6px; }
.who summary::-webkit-details-marker { display: none; }
.who .role { font-size: .72rem; background: var(--accent); color: #fff; border-radius: 4px; padding: 0 .35rem; margin-left: .25rem; }
.menu-pop { position: absolute; right: 0; top: 2.3rem; background: var(--surface); color: var(--ink); min-width: 220px;
  border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem; display: grid; gap: .4rem; border: 1px solid var(--line); }
.linklike { background: none; border: 0; padding: 0; color: var(--bad); cursor: pointer; font: inherit; }

.page { max-width: 1180px; margin: 0 auto; padding: 1.1rem 1rem 6rem; }
.pagehead { margin: .2rem 0 1rem; }
.pagehead-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.pagehead-row .pagehead { margin-bottom: .3rem; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.crumbs { margin: 0; font-size: .85rem; }
.count { font-size: .8rem; background: var(--line); border-radius: 99px; padding: .05rem .55rem; vertical-align: middle; color: var(--muted); font-weight: 600; }
.count.warn { background: #fbe3c2; color: var(--accent-ink); }

/* cards & layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.1rem; margin: 0 0 1rem; }
.card.narrow { max-width: 440px; margin: 2rem auto; }
.card.center { text-align: center; }
.card.link { display: block; text-decoration: none; color: inherit; }
.card.link:hover { border-color: var(--brand-2); }
.card.disabled { opacity: .55; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
fieldset.card { min-width: 0; }
legend { font-weight: 700; padding: 0 .3rem; font-size: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem 1rem; }
.grid.guests { margin-top: .75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid2c { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid3c { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; align-items: end; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.settings-grid .card { margin: 0; }
.detail { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
.stack { display: grid; gap: .8rem; }
.stack.compact { gap: .6rem; }
.wide { grid-column: 1 / -1; }

/* forms */
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.lbl { font-size: .82rem; font-weight: 600; color: #3b443e; }
.req { color: var(--bad); }
.hint { font-size: .76rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=url],
input[type=datetime-local], input[type=password], input[type=search], select, textarea {
  font: inherit; color: inherit; width: 100%; padding: .55rem .65rem; border: 1px solid #cfc9ba; border-radius: 8px;
  background: #fff; min-height: 42px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-2); outline-offset: 0; border-color: var(--brand-2); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); background: #fff8f7; }
.field-error { color: var(--bad); font-size: .8rem; font-weight: 600; }
.check { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-2); }
.check.strong { background: #fff4df; border: 1px solid #f0cf96; border-radius: 8px; padding: .6rem .8rem; margin-bottom: 1rem; font-weight: 600; }
.check.perm.dim { opacity: .45; }
.readout { display: block; padding: .55rem 0; font-weight: 700; font-size: 1.1rem; }
.formbar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: .6rem; padding: .8rem 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
.inline-form input, .inline-form select { flex: 1 1 200px; width: auto; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid #cfc9ba; border-radius: 99px; padding: .3rem .75rem; cursor: pointer; font-size: .86rem; background: #fff; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip:focus-within { outline: 2px solid var(--accent); }
details.more { margin-top: .9rem; border-top: 1px dashed var(--line); padding-top: .7rem; }
details.more summary { cursor: pointer; font-weight: 600; color: var(--brand-2); }
details.more.danger summary { color: var(--bad); }
details.more[open] summary { margin-bottom: .6rem; }
.roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .7rem; }
.rolecard { display: grid; gap: .2rem; border: 1px solid #cfc9ba; border-radius: 8px; padding: .7rem .8rem; cursor: pointer; }
.rolecard:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #f1f6f1; }
.logo-preview { max-height: 64px; max-width: 220px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 42px; padding: .5rem 1rem;
  border-radius: 8px; border: 1px solid #c4bdac; background: #fff; color: var(--ink); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--brand-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.small { min-height: 32px; padding: .2rem .7rem; font-size: .85rem; }
.btn.block { width: 100%; }
.iconbtn { font-size: .78rem; font-weight: 700; text-decoration: none; border: 1px solid #c4bdac; border-radius: 6px; padding: .2rem .45rem; color: var(--ink); background: #fff; }
.iconbtn.wa { color: var(--wa); border-color: #9fd1b4; }
.fab { position: fixed; right: 1.1rem; bottom: 4.6rem; z-index: 30; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; border-radius: 99px; padding: .8rem 1.15rem; box-shadow: 0 6px 18px rgba(120,70,0,.35); font-size: 1rem; }
.contactbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }

/* badges & tags */
.badge { display: inline-block; font-size: .74rem; font-weight: 700; border-radius: 99px; padding: .12rem .6rem; white-space: nowrap;
  border: 1px solid transparent; }
.s-new { background: #e4effa; color: #174c80; } .s-contacted { background: #e7f2ea; color: #245c36; }
.s-quote { background: #efe8fb; color: #4d2f8a; } .s-due { background: #fde9c8; color: #7a4600; border-color: #f2c57b; }
.s-nego { background: #fbe7f0; color: #87224f; } .s-won { background: #2f7a45; color: #fff; }
.s-lost { background: #ece9e4; color: #6b625a; } .s-hold { background: #eeeeee; color: #555; }
.tag { font-size: .7rem; font-weight: 700; background: #fff1d6; color: var(--accent-ink); border-radius: 4px; padding: .05rem .4rem; vertical-align: middle; }

/* flashes */
.flashes { display: grid; gap: .5rem; margin-bottom: 1rem; }
.flash { border-radius: 8px; padding: .65rem .9rem; font-weight: 600; border: 1px solid; }
.flash-ok { background: #e9f5ec; border-color: #b7dcc2; color: #1d5a31; }
.flash-error { background: #fdecea; border-color: #f2b8b2; color: #8a1c15; }
.flash-warn { background: #fff4df; border-color: #f0cf96; color: #6d4300; }
.warnbox { border-color: #f0cf96; background: #fffaf0; }
.lostbox { border-color: #d9d2c6; background: #f8f6f2; }
.hint-box { background: #eef6f0; border: 1px solid #bcdcc6; border-radius: 8px; padding: .55rem .75rem; font-size: .88rem; }
.hint-box.dup { background: #fff4df; border-color: #f0cf96; }

/* dashboard */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--brand); }
.tile span { font-size: .82rem; color: var(--muted); }
.tile-warn b { color: var(--warn); }
.pipeline { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.pipeline a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; padding: .3rem .2rem; border-bottom: 1px solid #f0ece2; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.bars li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 2.5rem; gap: .6rem; align-items: center; }
.bars .bar { height: 10px; border-radius: 5px; background: var(--accent); width: 0; }
.bars b { text-align: right; }

/* rows (mobile-friendly lists) */
.rows { list-style: none; padding: 0; margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 0; border-bottom: 1px solid #f0ece2; }
.row:last-child { border-bottom: 0; }
.row.overdue .t::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-right: .4rem; vertical-align: middle; }
.rowmain { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; flex: 1; }
.rowmain .t { font-weight: 600; } .rowmain .s { font-size: .84rem; color: var(--muted); }
.rowacts { display: flex; gap: .35rem; align-items: center; }
.seg { display: inline-flex; border: 1px solid #c4bdac; border-radius: 8px; overflow: hidden; }
.seg a { padding: .4rem .9rem; text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--brand); color: #fff; }

/* detail */
.fu-now { border-left: 4px solid var(--brand-2); background: #f1f6f1; padding: .6rem .8rem; border-radius: 6px; margin-bottom: .8rem; }
.fu-now.overdue { border-color: var(--warn); background: #fff4df; }
.kv { display: grid; grid-template-columns: 7.5rem 1fr; gap: .35rem .8rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .84rem; } .kv dd { margin: 0; }
.kv.big dd { font-size: 1.05rem; }
.secret { font-size: 1.2rem; background: #fff4df; padding: .2rem .5rem; border-radius: 6px; user-select: all; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
.ev { position: relative; padding: 0 0 1rem .6rem; }
.ev::before { content: ""; position: absolute; left: -1.42rem; top: .35rem; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-2); }
.ev-status_change::before, .ev-assignment::before { border-color: var(--accent); }
.ev-system::before { border-color: #999; }
.ev-followup_set::before, .ev-followup_done::before { background: var(--brand-2); }
.ev-head { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.ev-body { white-space: pre-wrap; }

/* tables (become cards on phones) */
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 1rem; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8f5ee; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
table.list td { padding: .6rem .7rem; border-bottom: 1px solid #f0ece2; vertical-align: top; }
table.list tr.overdue td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
table.list .num { text-align: right; }
table.list .empty { text-align: center; padding: 2rem; }
table.list.edit input[type=number] { max-width: 90px; }
code.wrap { white-space: pre-wrap; word-break: break-word; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin-bottom: 1rem; }
.filters input[type=search] { flex: 1 1 260px; width: auto; }
.morefilters { flex-basis: 100%; order: 3; }
.morefilters summary { cursor: pointer; color: var(--brand-2); font-weight: 600; font-size: .9rem; }
.filtergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin-top: .5rem; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 1rem 0; }

/* auth */
body.auth { background: var(--brand); }
.login { text-align: center; margin-top: 12vh; }
.login form { text-align: left; }
.login-mark { width: 56px; height: 56px; }

.bottomnav { display: none; }
.mlist { display: none; }
@media (min-width: 681px) { .fab { bottom: 1.5rem; } }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .page { padding: .8rem .75rem 7.5rem; }
  .mainnav { display: none; }
  .topbar { justify-content: space-between; }
  .bottomnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { text-align: center; padding: .75rem 0; text-decoration: none; color: var(--muted); font-size: .82rem; font-weight: 600; }
  .bottomnav a.on { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
  .fab span { display: none; }
  .fab { font-size: 1.6rem; padding: .35rem 1.05rem; bottom: 4.8rem; }
  .hide-sm { display: none; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .grid2c, .grid3c { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 6.5rem 1fr; }
  .desk-only { display: none; }
  .mlist { display: block; padding: .2rem 1rem; }
  .tablewrap { background: none; border: 0; box-shadow: none; }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; width: 100%; }
  table.list tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; padding: .4rem .2rem; }
  table.list td { border: 0; padding: .25rem .7rem; display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; }
  table.list td::before { content: attr(data-l); color: var(--muted); font-size: .78rem; font-weight: 600; }
  table.list td.num { text-align: left; }
  table.list .empty { display: block; }
  table.list .empty::before { content: none; }
  .bars li { grid-template-columns: 1fr 2rem; }
  .bars .bar { grid-column: 1 / -1; grid-row: 2; }
  .formbar { bottom: 3.4rem; }
}
@media print {
  .topbar, .bottomnav, .fab, .filters, .formbar, .pager { display: none !important; }
  body { background: #fff; } .card, .tablewrap { box-shadow: none; }
}

/* ---------- v1.1: multi-business, catalogue, vendor console, install ---------- */
.vendorbar { background: #2b2440; }
.brandname { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner { display: block; text-align: center; background: #fff1d6; color: var(--accent-ink); font-weight: 600; padding: .55rem 1rem; text-decoration: none; border-bottom: 1px solid #f0cf96; }
.banner.warn { background: #fdecea; color: #8a1c15; border-color: #f2b8b2; }
.warntext { color: #8a1c15; }
.center { text-align: center; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tag.off { background: #ece9e4; color: #6b625a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.card.signup, .card.download { max-width: 620px; margin: 1.5rem auto; }
.login-mark.big { width: 88px; height: 88px; border-radius: 20px; }
.typecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.typecard { display: grid; gap: .15rem; border: 1px solid #cfc9ba; border-radius: 10px; padding: .7rem .8rem; cursor: pointer; background: #fff; }
.typecard input { position: absolute; opacity: 0; pointer-events: none; }
.typecard:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); background: #f1f6f1; }
.typecard:has(input:disabled) { opacity: .5; }
.typecard:focus-within { outline: 2px solid var(--accent); }
.getstarted { border-color: #c9dccb; background: #f6faf5; }
.checklist { margin: .3rem 0 .6rem; padding-left: 1.3rem; display: grid; gap: .35rem; }
.checklist li.done a { color: var(--muted); text-decoration: line-through; }
.checklist li.done::marker { content: "✓  "; color: var(--ok); font-weight: 700; }
.modlist { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .2rem; }
.modlist li { border-bottom: 1px solid #f0ece2; }
.modlist li.soon { opacity: .6; }
.modlist .check { align-items: flex-start; }
.catgroup h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .8rem 0 .4rem; }
.itempicks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem; }
.itempick { display: flex; align-items: center; gap: .5rem; border: 1px solid #d6d0c2; border-radius: 8px; padding: .35rem .5rem; background: #fff; cursor: pointer; }
.itempick.on { border-color: var(--brand-2); background: #f1f6f1; }
.itempick .nm { flex: 1; min-width: 0; }
.itempick .qty { width: 4.2rem; min-height: 34px; padding: .25rem .4rem; }
.itempick input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand-2); }
.switch { width: 46px; height: 26px; border-radius: 99px; border: 0; background: #cfc9ba; position: relative; cursor: pointer; padding: 0; flex: none; }
.switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--ok); }
.switch.on span { left: 23px; }
.inline-form.grow { flex: 1; margin: 0; }
.plancards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; }
.plancard { border: 1px solid var(--line); border-radius: 10px; padding: .8rem; background: #fff; }
.plancard.current { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.plancard ul { padding-left: 1.1rem; margin: .3rem 0 0; }
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.platform { border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; background: #fff; }
.steps { padding-left: 1.2rem; margin: .4rem 0 0; display: grid; gap: .3rem; }
.sharelink { display: inline-block; background: #fff4df; padding: .3rem .6rem; border-radius: 6px; user-select: all; word-break: break-all; }
.ok-installed { color: var(--ok); font-weight: 700; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; width: 100%; }
@media (max-width: 680px) {
  .platforms { grid-template-columns: 1fr; }
  .tiles.two { grid-template-columns: 1fr; }
  .itempicks { grid-template-columns: 1fr; }
}
