:root {
  color-scheme: light;
  --canvas: #f7f5f1;
  --paper: #fffefa;
  --surface: #fcfaf7;
  --ink: #282023;
  --muted: #6f6268;
  --line: #e9e1df;
  --accent: #7a3c55;
  --accent-deep: #632d43;
  --accent-light: #f3e7eb;
  --rose: #f4e6ea;
  --shadow: 0 5px 24px #493a3910;
  --radius: 15px;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1, .brand strong { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { line-height: 1.06; font-size: clamp(2.25rem, 4vw, 3.4rem); letter-spacing: -.048em; overflow-wrap: anywhere; }
h2 { font-size: 1.19rem; line-height: 1.3; letter-spacing: -.025em; }
h3 { font-size: .98rem; letter-spacing: -.014em; }
small { color: var(--muted); }
svg { flex-shrink: 0; vertical-align: middle; }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  display: flex; flex-direction: column; min-height: 100dvh; height: 100dvh; position: sticky; top: 0;
  background: var(--paper); border-right: 1px solid var(--line); padding: 26px 17px 17px; z-index: 2;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; margin-bottom: 42px; width: fit-content; }
.brand-mark { position: relative; display: grid; place-items: center; width: 41px; height: 41px; flex-shrink: 0; border-radius: 11px;
  background: var(--accent); color: #fff6ef; font: 26px/1 Georgia, serif; }
.brand-mark small { position: absolute; color: #ffdbbd; font: 13px/1 system-ui; top: 5px; right: 5px; }
.brand strong { display: block; font-size: 1.69rem; line-height: 1; letter-spacing: -.065em; }
.brand strong span { color: var(--accent); }
.brand div > small:not(.brand-mark small) { display: block; font-size: .58rem; letter-spacing: .13em; font-weight: 700; margin-top: 5px; }
.nav-caption { padding: 0 11px; margin-bottom: 11px; color: #796a72; font-weight: 750; letter-spacing: .13em; font-size: .62rem; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 9px 11px; border-radius: 9px; color: #675760; font-weight: 600; font-size: .9rem; }
.nav-link:hover { background: #f7f0f2; color: var(--accent-deep); }
.nav-link.current { background: var(--accent-light); color: var(--accent-deep); font-weight: 700; }
.sidebar-bottom { margin-top: auto; }
.private-tag { display: flex; gap: 9px; align-items: center; margin: 16px 5px 0; padding: 16px 6px 2px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.main { min-width: 0; }
.topbar { height: 67px; padding: 0 clamp(18px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--paper); border-bottom: 1px solid var(--line); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; }
.crumb strong { color: var(--ink); font-weight: 650; }
.slash { color: #a28f99; }
.content { max-width: 1450px; margin: 0 auto; padding: 29px clamp(18px, 4vw, 48px) 48px; }
.btn { border: 1px solid transparent; min-height: 39px; padding: 8px 13px; border-radius: 8px; display: inline-flex; gap: 7px;
  align-items: center; justify-content: center; font-weight: 650; line-height: 1.15; font-size: .84rem; transition: background .14s, border-color .14s; }
.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: var(--accent-deep); }
.btn.secondary { background: var(--paper); border-color: #e2d5dc; color: var(--accent-deep); }
.btn.secondary:hover, .btn.ghost:hover { background: var(--accent-light); }
.btn.ghost { color: var(--accent-deep); background: transparent; padding-inline: 9px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--accent-deep); font-size: .85rem; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero { min-height: 241px; position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; padding: 29px 35px;
  background: linear-gradient(104deg, #f6e7e8 4%, #f4e3e8 54%, #efd9df 100%); border: 1px solid #ebd7df; border-radius: 19px; }
.hero-content { position: relative; z-index: 1; max-width: 64%; }
.hero h1 { color: #452735; font-size: clamp(2.25rem, 5vw, 4rem); margin: 14px 0 9px; }
.hero h1 span { color: var(--accent); }
.hero p { line-height: 1.5; color: #644957; margin: 0 0 20px; font-size: .98rem; max-width: 34rem; }
.hero-tag { display: inline-flex; gap: 6px; align-items: center; padding: 5px 9px; border: 1px solid #e0c2cc; border-radius: 999px;
  background: #fff8f760; color: var(--accent-deep); font-size: .64rem; font-weight: 800; letter-spacing: .14em; }
.hero-art { position: absolute; width: min(43%, 390px); right: 10px; height: 102%; top: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 18px 0 22px; }
.stat, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { position: relative; padding: 17px 17px 15px; }
.stat-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; }
.rose { background: #f4e5eb; color: #7e3b58; }
.sand { background: #f3ede0; color: #79633d; }
.peach { background: #faebdf; color: #894a2e; }
.mint { background: #e8f0e9; color: #42604e; }
.stat-label { margin: 11px 0 5px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.stat-value { font-size: clamp(1.42rem, 2.2vw, 1.95rem); font-weight: 700; line-height: 1.16; letter-spacing: -.045em; overflow-wrap: anywhere; }
.stat p { margin-top: 5px; color: var(--muted); font-size: .75rem; line-height: 1.4; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 13px; padding: 19px 20px 16px; }
.section-head p, .intro p { color: var(--muted); line-height: 1.5; margin-top: 5px; }
.section-head p { font-size: .85rem; }
.section-head > .btn, .section-head > .text-link { flex-shrink: 0; }
.section-head > .text-link { margin-top: 4px; }
.list-head, .order-row { display: grid; grid-template-columns: minmax(210px, 2.5fr) minmax(100px, 1.12fr) minmax(112px, 1.25fr) minmax(65px, .8fr) 18px;
  gap: 11px; align-items: center; padding: 13px 20px; }
.list-head { font-size: .73rem; color: var(--muted); font-weight: 700; background: var(--surface); border-block: 1px solid var(--line); }
.order-row { border-bottom: 1px solid var(--line); min-height: 69px; font-size: .83rem; }
.order-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.order-row:hover { background: #faf3f5; }
.order-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.order-identity > div { min-width: 0; }
.order-identity strong, .file-row strong { overflow-wrap: anywhere; display: block; }
.order-identity small, .file-row small { display: block; margin-top: 4px; line-height: 1.4; font-size: .74rem; }
.order-icon { display: inline-grid; place-items: center; flex-shrink: 0; width: 39px; height: 39px; border-radius: 10px;
  color: var(--accent); background: var(--accent-light); }
.demo { display: inline-block; border: 1px solid #e6dbd8; padding: 0 5px; border-radius: 5px; font-size: .65rem; margin-left: 3px; }
.pill, .tag { display: inline-flex; align-items: center; justify-self: start; padding: 4px 8px; border-radius: 999px; font-size: .72rem;
  line-height: 1.28; font-weight: 700; color: #62565e; background: #eee9eb; }
.pill.brief, .pill.review { background: #f6ecdf; color: #7b552d; }
.pill.quote { background: #f0e6f2; color: #714579; }
.pill.doing { background: #e7edf7; color: #425781; }
.pill.done { background: #e8f1e8; color: #365c43; }
.due { display: flex; align-items: center; gap: 5px; line-height: 1.4; font-size: .75rem; }
.muted { color: var(--muted); }
.danger { color: #9b3545; }
.warn { color: #8c581f; }
.row-price { font-weight: 700; }
.row-arrow { color: var(--accent); }
.workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 21px 0 0; background: #efeae4; border-radius: var(--radius); }
.workflow div { position: relative; padding: 13px 14px 13px 57px; min-height: 62px; }
.workflow div + div { border-left: 1px solid #e1d9d5; }
.workflow span { position: absolute; left: 17px; top: 12px; color: var(--accent); font: 1.55rem/1.3 Georgia, serif; }
.workflow strong, .workflow small { display: block; }
.workflow strong { font-size: .83rem; }
.workflow small { font-size: .75rem; margin-top: 4px; }
.intro { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; margin: 6px 0 24px; }
.eyebrow { font-size: .66rem; font-weight: 800; letter-spacing: .15em; color: var(--accent-deep); line-height: 1.4; }
.intro h1 { margin: 7px 0 0; }
.intro p { font-size: .93rem; }
.filters { display: flex; gap: 11px; align-items: center; padding: 17px 20px; }
.search { display: flex; align-items: center; color: var(--muted); gap: 9px; background: var(--surface); border-radius: 8px;
  border: 1px solid var(--line); padding: 0 10px; flex: 1; max-width: 420px; }
.search input { padding-inline: 0; min-width: 0; background: transparent; border: 0; }
.empty { display: grid; place-items: center; gap: 10px; padding: 29px 18px; text-align: center; color: var(--muted); font-size: .89rem; }
.empty.small { padding: 15px 8px; background: var(--surface); border-radius: 8px; }
.back { margin-bottom: 11px; }
.order-intro { margin-bottom: 16px; }
.order-intro .btn { flex-shrink: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 12px; border-bottom: 1px solid #e4d9dd; margin-bottom: 20px; }
.tabs a { padding: 10px 11px 12px; color: var(--muted); font-weight: 650; font-size: .87rem; border-bottom: 2px solid transparent; }
.tabs a:hover, .tabs a.active { color: var(--accent-deep); }
.tabs a.active { border-color: var(--accent); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
.order-aside { display: grid; gap: 13px; }
.aside-card { padding: 16px; }
.aside-card dl { margin: 12px 0 16px; font-size: .84rem; }
.aside-card dt { color: var(--muted); margin: 11px 0 3px; font-size: .75rem; }
.aside-card dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.aside-card p { margin-top: 9px; font-size: .88rem; line-height: 1.5; overflow-wrap: anywhere; }
.aside-card .aside-price { font-size: 1.39rem; letter-spacing: -.04em; font-weight: 750; }
.aside-card .text-link { display: flex; margin-top: 10px; }
.next-card { background: #faf0f3; border-color: #ebdce3; }
.next-card .tag { margin-top: 9px; color: var(--accent-deep); background: #f1e1e7; }
.form-panel { margin-bottom: 14px; }
.form-panel .section-head { padding-bottom: 12px; }
.panel-body { padding: 0 20px 19px; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.field { display: grid; gap: 6px; margin-bottom: 13px; min-width: 0; }
.field > span { font-size: .8rem; font-weight: 650; color: #564650; }
input, textarea, select { min-width: 0; min-height: 39px; padding: 8px 10px; border: 1px solid #e1d8dc; border-radius: 7px;
  background: #fffefa; color: var(--ink); font-size: .87rem; line-height: 1.35; }
input, textarea { width: 100%; }
textarea { resize: vertical; line-height: 1.55; }
::placeholder { color: #857982; }
.hint { color: var(--muted); font-size: .84rem; line-height: 1.5; margin-bottom: 10px; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.scope-group { padding: 12px 0 10px; border-top: 1px solid var(--line); }
.scope-group:first-child { padding-top: 5px; border: 0; }
.group-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; margin-bottom: 8px; }
.group-head p { color: var(--muted); font-size: .77rem; line-height: 1.45; margin-top: 3px; }
.group-head .btn { flex-shrink: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; background: #7d7479; vertical-align: .1em; }
.dot.confirmed { background: #6f8c71; }.dot.pending { background: #aa744c; }
.scope-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 29px; align-items: start; gap: 7px; padding: 8px; margin-bottom: 6px;
  border-radius: 9px; border: 1px solid #efe7e9; background: var(--surface); }
.scope-fields { display: grid; gap: 4px; }
.scope-source { color: var(--muted); min-height: 32px; font-size: .76rem; padding: 5px 8px; }
.scope-status { padding-left: 6px; font-size: .79rem; }
.icon-btn { border: 0; border-radius: 7px; background: transparent; color: var(--muted); min-width: 29px; min-height: 37px;
  display: inline-grid; place-items: center; padding: 4px; }
.icon-btn:hover { background: var(--accent-light); color: var(--accent-deep); }
.form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 5px 1px 10px; }
.form-footer span { color: var(--muted); font-size: .78rem; }
.suggestion { padding: 11px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.suggestion > div { min-width: 0; }
.suggestion p { margin: 5px 0 2px; line-height: 1.45; overflow-wrap: anywhere; }
.suggestion small { overflow-wrap: anywhere; }
.suggestion button { flex-shrink: 0; }
.quote-heading, .quote-row { display: grid; grid-template-columns: minmax(115px, 2.7fr) minmax(52px, .7fr) minmax(65px, .75fr)
  minmax(84px, 1.1fr) minmax(68px, 1fr) 26px; gap: 6px; align-items: center; }
.quote-heading { font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.quote-row { margin-bottom: 6px; }
.quote-row input, .quote-row select { padding-inline: 6px; }
.row-amount { font-size: .77rem; text-align: right; overflow-wrap: anywhere; }
.quote-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, .66fr); align-items: start; gap: 14px; }
.totals { border-radius: 10px; background: #f7edf1; padding: 13px 11px; }
.totals > div { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; padding: 6px 0; font-size: .8rem; }
.totals > div strong { text-align: right; overflow-wrap: anywhere; }
.totals .total { font-size: .92rem; font-weight: 700; color: var(--accent-deep); border-top: 1px solid #e6ceda; margin-top: 5px; padding-top: 11px; }
.file-row { display: flex; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-row > div { flex: 1; min-width: 0; }
.file-row small { overflow-wrap: anywhere; }
.file-row a:hover { color: var(--accent-deep); }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.template { padding: 17px; display: flex; align-items: flex-start; flex-direction: column; }
.template h2 { margin: 10px 0 7px; }
.template p { color: var(--muted); line-height: 1.52; font-size: .88rem; margin-bottom: 13px; }
.template .btn { margin-top: auto; }
.boot { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.boot p { color: var(--muted); }
.access-gate { min-height: 100dvh; display: grid; place-items: center; padding: 22px;
  background: radial-gradient(ellipse at 50% 25%, #f1e1e7, var(--canvas) 65%); }
.gate-card { width: min(100%, 460px); padding: clamp(24px, 6vw, 40px); }
.gate-card .brand-mark { margin-bottom: 21px; }
.gate-card h1 { font-size: clamp(2rem, 6vw, 2.9rem); margin: 7px 0 13px; }
.gate-card p { color: var(--muted); line-height: 1.55; }
.gate-card .gate-account { color: var(--accent-deep); font-weight: 700; margin: 0 0 8px; overflow-wrap: anywhere; }
.gate-card .actions { margin-top: 20px; }
.account-line { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; overflow-wrap: anywhere; }
.account-line > strong { align-self: center; }
.account-line .field { width: min(100%, 350px); margin: 0; }
.member-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  padding: 11px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.member-row small { display: block; margin-top: 4px; }
.member-row .actions { margin: 0; }
#toast { position: fixed; right: 16px; bottom: 16px; z-index: 5; max-width: min(450px, calc(100% - 32px));
  background: #402735; color: white; padding: 11px 15px; border-radius: 9px; box-shadow: var(--shadow); visibility: hidden; }
#toast.visible { visibility: visible; }
#toast.error { background: #8b3444; }
dialog { width: min(100% - 26px, 520px); max-height: 90dvh; border: 1px solid var(--line); color: var(--ink); padding: 0;
  border-radius: 15px; background: var(--paper); box-shadow: 0 16px 64px #25161e50; }
dialog::backdrop { background: #34212a69; }
.modal-head, .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-body { padding: 15px 16px 0; }
.modal-actions { justify-content: flex-end; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }
@media (max-width: 1150px) {
  .shell { grid-template-columns: 190px minmax(0, 1fr); }
  .content, .topbar { padding-inline: 23px; }
  .sidebar { padding-inline: 12px; }
  .order-grid { grid-template-columns: minmax(0, 1fr) 188px; }
  .quote-bottom { grid-template-columns: 1fr; }
  .list-head, .order-row { grid-template-columns: minmax(185px, 2.2fr) minmax(86px, 1fr) minmax(100px, 1.1fr) minmax(63px, .76fr) 16px; gap: 8px; }
}
@media (max-width: 930px) {
  .shell { grid-template-columns: 157px minmax(0, 1fr); }
  .sidebar { padding-inline: 8px; }
  .brand { padding-inline: 4px; gap: 6px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand strong { font-size: 1.4rem; }
  .nav-link { font-size: .8rem; gap: 7px; padding-inline: 7px; }
  .nav-caption { font-size: .54rem; padding-left: 5px; }
  .order-grid { grid-template-columns: 1fr; }
  .order-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 12px; }
  .stats { gap: 9px; }
  .content, .topbar { padding-inline: 16px; }
  .hero { padding: 23px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 710px) {
  .shell { display: block; }
  .sidebar { height: auto; min-height: 0; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px;
    padding: 9px 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 auto 0 0; padding: 0; }
  .nav-caption, .private-tag { display: none; }
  .sidebar nav { display: flex; gap: 3px; order: 3; width: 100%; }
  .sidebar nav a { flex: 1; justify-content: center; white-space: nowrap; }
  .sidebar-bottom { margin: 0; }
  .topbar { height: 55px; }
  .content { padding-top: 17px; }
  .hero { min-height: 210px; }
  .hero-art { right: -22px; width: 53%; }
  .hero-content { max-width: 69%; }
  .hero h1 { font-size: clamp(2.05rem, 6.2vw, 3rem); }
  .hero p { font-size: .87rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-head { display: none; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px; gap: 6px 9px; }
  .row-arrow { display: none; }
  .due { padding-left: 49px; }
  .row-price { text-align: right; }
  .order-row .pill { justify-self: end; }
  .workflow div { padding: 11px 7px 11px 32px; }
  .workflow span { font-size: 1.13rem; left: 8px; }
  .workflow small { font-size: .69rem; }
  .section-head { padding-inline: 14px; }
  .panel-body { padding-inline: 14px; }
}
@media (max-width: 620px) {
  .quote-heading { display: none; }
  .quote-row { grid-template-columns: minmax(44px, .72fr) minmax(57px, .85fr) minmax(67px, 1fr) minmax(48px, 1fr) 24px;
    border-bottom: 1px solid var(--line); padding-bottom: 8px; gap: 4px; }
  .quote-row .row-name { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .content, .topbar { padding-inline: 12px; }
  .hero { padding: 16px; min-height: 200px; }
  .hero-content { max-width: 80%; }
  .hero-art { opacity: .38; right: -36px; }
  .hero p { max-width: 255px; }
  .hero-tag { font-size: .55rem; }
  .intro { align-items: flex-start; flex-direction: column; gap: 10px; }
  .tabs { gap: 0 3px; }
  .tabs a { font-size: .79rem; padding-inline: 6px; }
  .fields-2, .template-grid { grid-template-columns: 1fr; }
  .order-aside { grid-template-columns: 1fr; }
  .form-panel .section-head { flex-wrap: wrap; }
  .scope-row { grid-template-columns: minmax(0, 1fr) 90px 25px; gap: 4px; padding: 5px; }
  .scope-status { font-size: .68rem; padding-inline: 3px; }
  .scope-row input { font-size: .8rem; }
  .suggestion { flex-wrap: wrap; }
  .workflow { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
