/* Pferred app surfaces: client portal and owner dashboard. */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - var(--bar-h)); background: var(--paper); }
.side { background: var(--white); border-right: 1px solid var(--line-2); padding: 22px 18px; position: sticky; top: var(--bar-h); height: calc(100vh - var(--bar-h)); overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.side .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 8px; }
.side .brand img { height: 54px; width: auto; }
.side .brand span { display: flex; flex-direction: column; line-height: 1.1; }
.side .brand b { font-size: 13px; }
.side .brand small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.side-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 14px 8px 4px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink-2); transition: background .15s; }
.side nav a:hover { background: var(--stone); }
.side nav a.is-active { background: var(--ink); color: #fff; }
.side nav a .cnt { margin-left: auto; font-size: 11.5px; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 7px; min-width: 20px; text-align: center; }
.side nav a.is-active .cnt { background: var(--accent); }
.side nav a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side .who { margin-top: auto; padding: 14px; background: var(--stone); border-radius: 12px; font-size: 13px; }
.side .who b { display: block; font-size: 14px; }
.side .who small { color: var(--muted); display: block; margin-top: 2px; }
.app > div { min-width: 0; }
.main { padding: 28px 36px 80px; min-width: 0; }
.main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.main-head h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.main-head .sub { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.main-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-banner { display: flex; align-items: flex-start; gap: 12px; background: var(--sgl-foam); border: 1px solid var(--sgl-sand); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; color: #35432b; margin-bottom: 24px; }
.demo-banner .sgl-mark { width: 24px; height: 24px; flex: 0 0 auto; }
.demo-banner b { color: var(--sgl-ink); }
.mobile-tabs { display: none; }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line-2); padding: 14px 16px; flex-direction: row; align-items: center; justify-content: space-between; }
  .side nav, .side-label, .side .who { display: none; }
  .main { padding: 20px 16px 70px; }
  .mobile-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: var(--white); border-bottom: 1px solid var(--line-2); position: sticky; top: var(--bar-h); z-index: 90; scrollbar-width: none; }
  .mobile-tabs::-webkit-scrollbar { display: none; }
  .mobile-tabs a { white-space: nowrap; text-decoration: none; font-size: 13px; font-weight: 700; padding: 8px 12px; border-radius: 999px; background: var(--stone); color: var(--ink-2); }
  .mobile-tabs a.is-active { background: var(--ink); color: #fff; }
  .main-head h1 { font-size: 28px; }
}

/* Stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.tile { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-height: 118px; position: relative; text-align: left; font: inherit; color: inherit; transition: transform .2s var(--ease), box-shadow .2s; }
button.tile, a.tile { cursor: pointer; text-decoration: none; }
button.tile:hover, a.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .lbl { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile .val { font-family: var(--serif); font-size: 34px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.tile .val small { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 6px; }
.tile .hint { font-size: 13px; color: var(--muted); margin-top: auto; }
.tile .hint.go { color: var(--accent); font-weight: 700; }
.tile.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.tile.accent .lbl, .tile.accent .hint { color: #c8ccd4; }
.tile.warn-tile { border-color: #e9d6a8; background: #fffaf0; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile { padding: 14px; min-height: 100px; } .tile .val { font-size: 26px; } }

/* Panels */
.panel { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); margin-bottom: 22px; scroll-margin-top: calc(var(--bar-h) + 16px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel-head .desc { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; width: 100%; }
.panel-body { padding: 20px 22px; }
.panel-body.flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.grid-3-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .grid-2, .grid-3-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .panel-head, .panel-body { padding-left: 16px; padding-right: 16px; } }

/* Progress */
.bar { height: 10px; background: var(--stone); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .8s var(--ease); }
.bar.ok > span { background: var(--ok); }
.bar.ink > span { background: var(--ink); }
.bar-row { display: grid; grid-template-columns: 140px 1fr 56px; gap: 12px; align-items: center; font-size: 14px; margin-bottom: 10px; }
.bar-row b { text-align: right; }
@media (max-width: 480px) { .bar-row { grid-template-columns: 100px 1fr 48px; } }

/* Milestones */
.ms { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; position: relative; margin: 10px 0 4px; }
.ms::before { content: ""; position: absolute; left: 8%; right: 8%; top: 13px; height: 2px; background: var(--line); }
.ms div { text-align: center; padding: 0 6px; position: relative; }
.ms .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: #fff; margin: 0 auto 10px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); position: relative; }
.ms .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.ms .next .dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 5px var(--accent-soft); }
.ms b { display: block; font-size: 13px; line-height: 1.25; }
.ms small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
@media (max-width: 900px) { .ms { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 18px 0; } .ms::before { display: none; } }

/* Tables and lists */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-weight: 700; white-space: nowrap; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.row-link { cursor: pointer; transition: background .12s; }
.tbl tr.row-link:hover, .tbl tr.row-link:focus-within { background: var(--paper); }
.tbl tr.is-new td { background: #fff8ee; }
.tbl tr.is-highlight td { background: var(--accent-soft); animation: flash 1.8s var(--ease) 1; }
@keyframes flash { 0% { background: #ffd9b8; } 100% { background: var(--accent-soft); } }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .muted { color: var(--muted); }
.tbl .link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.tbl .link:hover { text-decoration-color: var(--ink); }
.tbl-wrap { overflow-x: auto; position: relative; }
.date { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.date .tag { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; padding: 2px 6px; border-radius: 5px; }
.date .tag.est { background: var(--warn-soft); color: var(--warn); }
.date .tag.conf { background: var(--ok-soft); color: var(--ok); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.empty { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.list li:last-child { border-bottom: 0; }
.list .when { color: var(--muted); font-size: 12.5px; white-space: nowrap; min-width: 56px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.list .ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--stone); color: var(--ink-2); }
.list .ico.approval { background: var(--ok-soft); color: var(--ok); }
.list .ico.order { background: var(--info-soft); color: var(--info); }
.list .ico.punch { background: var(--accent-soft); color: #8a4a1b; }
.list .ico.milestone { background: var(--ink); color: #fff; }
.list .ico.inquiry { background: var(--warn-soft); color: var(--warn); }
.list .ico svg { width: 15px; height: 15px; }
.list .tx { flex: 1; }
.list .tx small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.list li.is-new { background: #fff8ee; margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
.list li.is-new .tx::after { content: "New"; margin-left: 8px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 5px; vertical-align: middle; }

/* Selections and compare */
.sel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sel-card { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); transition: box-shadow .2s; }
.sel-card.is-approved { background: var(--ok-soft); border-color: #bfe0c9; }
.sel-card h3 { font-size: 16px; }
.sel-card .meta { color: var(--muted); font-size: 13px; }
.sel-card .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sel-card .opt { background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.sel-card .opt b { display: block; font-size: 13.5px; }
.sel-card .opt .price { font-weight: 800; font-variant-numeric: tabular-nums; }
.sel-card .opt.is-rec { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sel-card .opt.is-chosen { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.sel-card .rec { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: var(--accent); }
.sel-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.cmp th { width: 150px; color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.cmp thead th { color: var(--ink); font-size: 15px; text-transform: none; letter-spacing: 0; width: auto; }
.cmp .is-rec { background: #fff8ee; }
.cmp ul { margin: 0; padding-left: 16px; }
.cmp .big { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.cmp .delta { font-size: 12.5px; color: var(--ok); font-weight: 700; }
.cmp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cmp-actions .btn { width: 100%; }
@media (max-width: 600px) { .cmp th { width: 100px; } .cmp-actions { grid-template-columns: 1fr; } }

/* Documents */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.doc { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-2); background: var(--paper); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.doc:hover { border-color: var(--ink); transform: translateY(-2px); }
.doc .ic { width: 42px; height: 50px; border-radius: 6px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: var(--accent); flex: 0 0 auto; }
.doc b { display: block; font-size: 14px; line-height: 1.25; }
.doc small { color: var(--muted); font-size: 12.5px; }
.preview-doc { font-family: var(--sans); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: var(--shadow); }
.preview-doc h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin-bottom: 4px; }
.preview-doc .ph { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }
.preview-doc table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.preview-doc th, .preview-doc td { padding: 8px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.preview-doc td.num, .preview-doc th.num { text-align: right; font-variant-numeric: tabular-nums; }
.preview-doc tfoot td { font-weight: 800; }
.preview-doc svg { width: 100%; height: auto; }
.preview-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* Punch list */
.punch { list-style: none; margin: 0; padding: 0; }
.punch li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.punch li:last-child { border-bottom: 0; }
.punch li.is-done .tx { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.punch .chk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: #fff; transition: all .15s; }
.punch .chk:hover { border-color: var(--ok); }
.punch li.is-done .chk { background: var(--ok); border-color: var(--ok); }
.punch .tx small { display: block; color: var(--muted); font-size: 12.5px; text-decoration: none; }
.punch .btn { justify-self: end; }
@media (max-width: 520px) { .punch li { grid-template-columns: auto 1fr; } .punch .btn { grid-column: 2; justify-self: start; } }

/* Dashboard specifics */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1200px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; } }
.proj-card { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 16px; background: var(--paper); display: grid; gap: 10px; }
.proj-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.proj-card h3 { font-size: 15.5px; }
.proj-card .meta { color: var(--muted); font-size: 13px; }
.proj-card .fig { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.proj-card .fig b { color: var(--ink); }
.proj-cards { display: grid; gap: 12px; }
.src { display: grid; gap: 10px; }
.src-row { display: grid; grid-template-columns: 130px 1fr 44px; gap: 12px; align-items: center; font-size: 14px; }
.src-row .bar { height: 14px; }
.src-row b { text-align: right; font-variant-numeric: tabular-nums; }
.search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1 1 100%; }
.search input, .search select { font: inherit; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; flex: 1 1 200px; min-width: 0; max-width: 360px; }
.search input:focus, .search select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 24, 31, .1); }
.mfr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mfr { border: 1px solid var(--line-2); background: var(--paper); border-radius: var(--radius-sm); padding: 16px; display: grid; gap: 6px; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.mfr:hover { border-color: var(--ink); transform: translateY(-2px); }
.mfr b { font-size: 15px; }
.mfr .cat { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.mfr .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.mfr .row span:last-child { color: var(--ink); font-weight: 600; }
.mfr .prods { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.mfr .prods span { font-size: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 8px; }
.mfr mark { background: #ffe9a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.status-select { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 28px 6px 10px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235e6470' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; cursor: pointer; }
.status-select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(21, 24, 31, .1); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; font-size: 14px; }
.detail-grid div { border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.detail-grid small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.detail-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .detail-grid { grid-template-columns: 1fr; } }
.future { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 700px) { .tbl td, .tbl th { white-space: nowrap; } .tbl td.muted, #veTable td:last-child { white-space: normal; min-width: 200px; } }
@media (max-width: 600px) { .dlg-body { padding: 14px 12px; } .cmp { font-size: 13px; } .cmp th, .cmp td { padding: 8px 7px; } .cmp th { width: 64px; font-size: 10.5px; } .cmp thead th { font-size: 13.5px; } .cmp .big { font-size: 18px; } .cmp ul { padding-left: 14px; } }

/* ---------- v2 additions ---------- */
.dlg.xl { width: min(100%, 1180px); }
.demo-info { background: var(--sgl-foam); border: 1px solid var(--sgl-sand); border-radius: 12px; margin-bottom: 20px; font-size: 13.5px; color: #35432b; }
.demo-info summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600; color: var(--sgl-ink); }
.demo-info summary::-webkit-details-marker { display: none; }
.demo-info summary .sgl-mark { width: 22px; height: 22px; flex: 0 0 auto; }
.demo-info summary span:first-of-type { flex: 1; }
.demo-info-more { font-size: 12.5px; color: var(--sgl-leaf); text-decoration: underline; white-space: nowrap; }
.demo-info[open] .demo-info-more { visibility: hidden; }
.demo-info > div { padding: 0 14px 14px 46px; line-height: 1.55; }
@media (max-width: 600px) { .demo-info > div { padding-left: 14px; } }

.foryou { border-color: #d9d3c6; background: linear-gradient(180deg, #fff, #fcfaf6); }
.fy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fy { background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 16px 18px; min-height: 160px; }
.fy h3 { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.fy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.fy-list li a { font-weight: 700; text-decoration: none; }
.fy-list li a:hover { text-decoration: underline; }
.fy-list li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fy-list.plain li { padding-left: 12px; position: relative; line-height: 1.45; }
.fy-list.plain li::before { content: ""; position: absolute; left: 0; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.fy-list.plain li.is-warn::before { background: var(--warn); }
.fy-list.plain li.is-ok::before { background: var(--ok); }
.fy-empty { color: var(--muted); font-size: 14px; margin: 0; }
.fy-more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--accent); }
.fy-big { margin: 0 0 10px; font-size: 16px; line-height: 1.3; }
.fy-big small { color: var(--muted); font-size: 13px; }
@media (max-width: 1200px) { .fy-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fy-grid { grid-template-columns: 1fr; } .fy { min-height: 0; } }



/* option thumbnails and swatches */
.opt-ph { aspect-ratio: 9 / 6; border-radius: 6px; overflow: hidden; margin-bottom: 8px; background: var(--stone); }
.opt-ph img { width: 100%; height: 100%; object-fit: cover; }
.sw { display: inline-flex; gap: 4px; margin: 6px 0; vertical-align: middle; }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); display: inline-block; }
.opt-sched { display: block; font-size: 11.5px; font-weight: 700; margin-top: 4px; }
.opt-sched.ok { color: var(--ok); } .opt-sched.tight { color: var(--warn); } .opt-sched.miss { color: var(--danger); }
.sel-card .opts { grid-template-columns: 1fr 1fr; }
.sel-card .opt .price { display: block; margin-top: 2px; }

/* comparison */
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-card { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.cmp-card.is-rec { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cmp-card.is-chosen { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.cmp-ph { position: relative; aspect-ratio: 9 / 5; background: var(--stone); }
.cmp-ph img { width: 100%; height: 100%; object-fit: cover; }
.cmp-ph-note { position: absolute; left: 10px; bottom: 10px; font-size: 11px; background: rgba(21, 24, 31, .7); color: #fff; padding: 3px 8px; border-radius: 6px; }
.cmp-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.cmp-body h3 { font-size: 19px; }
.cmp-mfr { color: var(--muted); font-size: 13.5px; margin-top: -6px; }
.cmp-price .big { font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.02em; display: block; line-height: 1; }
.cmp-price small { color: var(--muted); font-size: 13px; display: block; margin-top: 4px; }
.cmp-sched { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--stone); }
.cmp-sched.ok { background: var(--ok-soft); } .cmp-sched.tight { background: var(--warn-soft); } .cmp-sched.miss { background: var(--danger-soft); }
.cmp-dl { margin: 4px 0 6px; display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13.5px; }
.cmp-dl dt { color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding-top: 2px; }
.cmp-dl dd { margin: 0; }
.cmp-dl dd ul { margin: 0; padding-left: 16px; }
.cmp-dl .sw { margin: 0 6px 0 0; }
.cmp-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.cmp-summary div { background: var(--stone); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.cmp-summary small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; margin-bottom: 3px; }
.why { margin-top: 16px; background: linear-gradient(135deg, #fff8ee, #fff); border: 1px solid #f0dcc6; border-radius: 14px; padding: 18px 20px; }
.why-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.why-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.why-head b { display: block; font-size: 15px; }
.why-head small { color: var(--muted); font-size: 12.5px; }
.why p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.cmp-actions3 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (max-width: 760px) { .cmp-grid { grid-template-columns: 1fr; } .cmp-summary { grid-template-columns: 1fr; } .cmp-actions3 { grid-template-columns: 1fr; } .cmp-dl { grid-template-columns: 84px 1fr; } }

/* by space */
.space-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.floor h3 { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.space { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, transform .15s; }
.space:hover { border-color: var(--ink); transform: translateX(3px); }
.space b { display: block; font-size: 15px; }
.space small { color: var(--muted); font-size: 13px; }
.space-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.space-chips span { font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 9px; }
.space-chips span.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.space-chips span.accent { background: var(--accent-soft); color: #8a4a1b; border-color: transparent; }
.space-chips span.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.space-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.space-detail section h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.space-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.space-detail li small { color: var(--muted); font-size: 12.5px; }
.space-detail p { font-size: 14px; margin: 0; }
@media (max-width: 800px) { .space-grid, .space-detail { grid-template-columns: 1fr; } }

/* issues */
.issue-card { display: grid; grid-template-columns: 260px 1fr; gap: 20px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 16px; background: var(--paper); }
.issue-card + .issue-card { margin-top: 12px; }
.issue-ph { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 9 / 7; background: var(--stone); }
.issue-ph img { width: 100%; height: 100%; object-fit: cover; }
.issue-ph span { position: absolute; left: 8px; bottom: 8px; font-size: 11px; background: rgba(21, 24, 31, .7); color: #fff; padding: 3px 8px; border-radius: 6px; }
.issue-note { font-size: 15px; margin: 10px 0; color: var(--ink-2); }
.issue-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.issue-steps li { display: flex; gap: 10px; }
.issue-steps .when { color: var(--muted); min-width: 52px; font-variant-numeric: tabular-nums; }
.issue-steps small { color: var(--muted); }
@media (max-width: 700px) { .issue-card { grid-template-columns: 1fr; } }

/* order cards on phones */
.order-cards { display: none; }
@media (max-width: 700px) {
  .order-table { display: none; }
  .order-cards { display: grid; gap: 10px; padding: 14px 16px; }
  .ocard { text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; cursor: pointer; }
  .ocard.is-new { background: #fff8ee; }
  .ocard-top { display: flex; justify-content: space-between; align-items: center; }
  .ocard-id { font-size: 12px; font-weight: 800; color: var(--muted); }
  .ocard b { font-size: 15px; }
  .ocard small { color: var(--muted); font-size: 12.5px; }
  .ocard-dates { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; margin-top: 4px; }
}

/* dashboard priorities */
.prio { display: grid; gap: 10px; }
.prio-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 14px 16px; }
.prio-item.is-overdue { border-color: #ead1cc; background: #fff7f5; }
.prio-item .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--stone); color: var(--ink-2); }
.prio-item .ico svg { width: 18px; height: 18px; }
.prio-item .ico.issue { background: var(--danger-soft); color: var(--danger); }
.prio-item .ico.discrepancy { background: var(--warn-soft); color: var(--warn); }
.prio-item .ico.approval, .prio-item .ico.quote { background: var(--accent-soft); color: #8a4a1b; }
.prio-item .ico.inquiry { background: var(--info-soft); color: var(--info); }
.prio-item .ico.release, .prio-item .ico.ack { background: var(--ok-soft); color: var(--ok); }
.prio-item b { font-size: 15px; display: block; }
.prio-item p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-2); }
.prio-item .meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.prio-item .meta span + span::before { content: "\00b7"; margin: 0 6px; }
.prio-item .meta .due-soon { color: var(--danger); font-weight: 700; }
@media (max-width: 640px) { .prio-item { grid-template-columns: 40px 1fr; } .prio-item .btn { grid-column: 2; justify-self: start; } }
.disc-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 14px; }
.disc-table th, .disc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.disc-table th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.disc-table td.bad { color: var(--danger); font-weight: 700; }
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 4px 0 18px; }
.pipeline span { text-align: center; font-size: 12px; font-weight: 700; padding: 8px 6px; border-radius: 8px; background: var(--stone); color: var(--muted); }
.pipeline span.is-on { background: var(--ink); color: #fff; }
.pipeline span.is-done { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 560px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
.inq-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.inq-edit label { font-size: 12px; font-weight: 700; display: block; margin-bottom: 4px; }
.inq-edit input, .inq-edit select, .inq-edit textarea { font: inherit; width: 100%; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; }
.inq-edit .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .inq-edit { grid-template-columns: 1fr; } }
.history { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.history li { display: flex; gap: 10px; }
.history .when { color: var(--muted); min-width: 52px; }
.history small { color: var(--muted); }
.proj-card.is-new { border-color: var(--accent); }

/* library */
.mfr .prodrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.mfr .prodrow img { width: 44px; height: 34px; object-fit: cover; border-radius: 6px; }
.mfr .prodrow .noimg { width: 44px; height: 34px; border-radius: 6px; background: var(--stone); }
.mfr .prodrow b { font-weight: 600; }
.mfr .prodrow small { color: var(--muted); display: block; font-size: 12px; }
.mfr .verified { font-size: 12px; color: var(--muted); }
.prod-detail { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.prod-detail img { width: 100%; border-radius: 10px; aspect-ratio: 9 / 7; object-fit: cover; }
@media (max-width: 600px) { .prod-detail { grid-template-columns: 1fr; } }
.prio-item > div { min-width: 0; }
.prio-item .btn { white-space: normal; }
