:root {
  color-scheme: light;
  --ink: #20271f;
  --muted: #586455;
  --line: #dde4d9;
  --accent: #225740;
  --accent-dark: #173f30;
  --wash: #e8efe3;
  --nav: #edf1e9;
  background: #f7f8f3;
  color: var(--ink);
  font: 100%/1.5 Inter, 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1,h2,h3,p { margin: 0; }
button,input,textarea,select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #72945f; outline-offset: 3px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 194px minmax(0,1fr); }
.sidebar { background: var(--nav); border-right: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; padding: 28px 15px 20px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 7px; font-family: Georgia, serif; font-size: 1.34rem; font-weight: 700; line-height: 1.05; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; flex: none; border-radius: 12px 12px 12px 4px; color: #e5f1d1; background: var(--accent-dark); }
.brand-mark span { display: block; width: 19px; height: 15px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.brand-mark span::before,.brand-mark span::after { position: absolute; content: ''; height: 1.5px; background: currentColor; left: 3px; top: 4px; width: 10px; }
.brand-mark span::after { top: 8px; width: 7px; }
.brand-sub { display: block; margin-top: 4px; color: var(--muted); font: 500 .8rem/1.2 'Segoe UI',system-ui,sans-serif; }
.side-nav { display: grid; gap: 4px; margin-top: 34px; }
.side-nav button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 43px; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; color: #4a5849; background: transparent; font-weight: 630; font-size: .93rem; }
.side-nav button:hover { background: #e3eadf; }
.side-nav button[aria-current] { color: #174631; background: #dfeadb; border-color: #d3e1cf; }
.nav-icon { width: 19px; text-align: center; color: #547050; }
.nav-count { margin-left: auto; min-width: 21px; padding: 1px 5px; border-radius: 5px; text-align: center; color: #305642; background: #d0dfce; font-size: .78rem; }
.sidebar-foot { margin: auto 5px 0; padding-top: 32px; color: var(--muted); font-size: .82rem; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin: 0 6px 1px 0; background: #528662; }
main { min-width: 0; width: 100%; max-width: 1500px; margin: 0 auto; padding: 24px clamp(20px,3.1vw,43px) 43px; }
.section-head,.page-head,.actions,.tabs,.meta-row,.record-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.page-head { align-items: end; margin-bottom: 18px; }
.page-head p { margin-top: 5px; color: var(--muted); }
h1 { font: 700 clamp(2rem,3.9vw,3rem)/1.07 Georgia,serif; letter-spacing: -.055em; }
h2 { font-size: 1.19rem; letter-spacing: -.025em; line-height: 1.25; }
h3 { font-size: 1rem; line-height: 1.35; }
.btn,.text-button { min-height: 39px; padding: 7px 12px; border: 1px solid #cbd8cb; border-radius: 7px; color: #254a38; background: white; font-weight: 660; font-size: .88rem; }
.btn:hover { background: #eff5eb; }
.primary { color: white; background: var(--accent); border-color: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.text-button { padding: 4px 8px; border-color: transparent; color: var(--accent); }
.text-button:hover { text-decoration: underline; }
.trial { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(250px,.75fr) minmax(0,1.35fr); align-items: center; gap: 16px; margin-bottom: 15px; padding: 16px 18px; border-radius: 12px; color: #fbfff5; background: radial-gradient(ellipse at 100% 10%,#355f42 0%,transparent 65%),#193c30; }
.trial h2 { font: 700 clamp(1.24rem,2vw,1.55rem)/1.12 Georgia,serif; }
.trial p { margin-top: 6px; color: #d1e3d3; font-size: .9rem; }
.trial-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.trial-option { min-width: 0; min-height: 51px; display:flex; flex-direction: column; justify-content:center; color: #f5f9ee; background: #ffffff13; border: 1px solid #abc5a05e; border-radius: 7px; padding: 6px 9px; text-align: left; }
.trial-option:hover { background: #ffffff28; }
.trial-option:focus-visible { outline-color: #d8efaf; }
.trial-option strong { line-height: 1.2; font-size: .89rem; }
.trial-option span { margin-top: 3px; color: #d1e3d3; font-size: .78rem; }
.summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-bottom: 16px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.stat { display: flex; align-items: center; gap: 8px; padding: 7px 13px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { min-width: 27px; display: grid; place-items: center; aspect-ratio: 1; border-radius: 5px; background: var(--wash); color: var(--accent-dark); font-size: 1.05rem; }
.stat span { color: var(--muted); font-weight: 620; font-size: .9rem; }
.inbox { display: grid; grid-template-columns: minmax(265px,.76fr) minmax(0,1.42fr); gap: 12px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
.list-head { padding: 16px 15px 12px; }
.tabs { justify-content: flex-start; gap: 4px; margin-top: 12px; }
.tabs button { color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: .84rem; padding: 5px 7px; font-weight: 630; }
.tabs button[aria-pressed="true"] { color: var(--accent-dark); background: var(--wash); border-color: #dce7d6; }
.inquiry-list { display: grid; }
.inquiry-row { min-width: 0; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items:start; gap: 9px; text-align: left; border: 0; border-top: 1px solid var(--line); background: white; color: var(--ink); padding: 11px 12px; width: 100%; border-left: 3px solid transparent; }
.inquiry-row:hover { background: #f7faf5; }
.inquiry-row[aria-current] { background: #eef5eb; border-left-color: #4b825e; }
.row-avatar { display: grid; width: 34px; height: 34px; place-items: center; color: #245340; background: #e0eddf; border: 1px solid #d0e0cf; border-radius: 8px; font-size: .78rem; font-weight: 720; }
.inquiry-row[aria-current] .row-avatar { background: #d6e8d4; }
.row-body { display: block; min-width: 0; }
.row-title { display: block; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 5px; color: var(--muted); font-size: .87rem; }
.meta-row { color: var(--muted); margin: 6px 0 0; font-size: .8rem; justify-content: flex-start; gap: 7px; }
.badge { display: inline-block; width: fit-content; border-radius: 99px; padding: 3px 8px; background: #edf1ea; color: #455445; font-size: .79rem; font-weight: 670; }
.badge.new { color: #225842; background: #e3f0e5; }
.badge.done { color: #176549; background: #dff4ea; }
.badge.match { color: #754717; background: #fff0d9; }
.detail { padding: 16px 18px; }
.detail-title { align-items: start; margin-bottom: 13px; }
.meta { color: var(--muted); font-size: .88rem; }
.message { margin-top: 8px; padding: 10px 12px; background: #f6f8f3; border: 1px solid #e3eae0; border-left: 3px solid #b3c9b1; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fields-head { margin: 19px 0 10px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.facts div { padding: 7px 9px; background: white; border: 1px solid var(--line); border-radius: 7px; }
.facts dt { color: var(--muted); font-size: .81rem; }
.facts dd { margin: 2px 0 0; font-weight: 640; overflow-wrap: anywhere; }
.callout { margin-top: 12px; padding: 9px 11px; border-radius: 7px; color: #5d381a; background: #fff2df; font-size: .9rem; overflow-wrap: anywhere; }
.callout.done { background: #e5f5ee; color: #155640; }
.record-footer { justify-content: flex-start; margin-top: 14px; }
.empty { padding: 18px; color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(4,minmax(175px,1fr)); gap: 12px; overflow-x: auto; padding: 1px 1px 8px; }
.stage { min-height: 180px; padding: 11px; border: 1px solid var(--line); background: #edf2ea; border-radius: 9px; }
.stage .section-head { align-items: baseline; margin: 2px 1px 12px; }
.deal { min-width: 0; padding: 11px; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.deal h3,.deal p,.task p,.task h3 { overflow-wrap: anywhere; }
.deal p { margin-top: 4px; }
.deal button { margin-top: 6px; }
.list-panel { padding: 16px 18px; }
.task { padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task p { margin-top: 3px; }
.task.done h3 { color: var(--muted); }
dialog { width:min(92vw,625px); max-height:90dvh; overflow:auto; padding: 19px; border:1px solid var(--line); border-radius: 12px; color:var(--ink); box-shadow:0 18px 70px #17352555; }
dialog::backdrop { background: #182e24a8; }
.dialog-head { margin-bottom: 12px; }
form,.form-grid { display: grid; gap: 9px; }
.form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field { display: grid; gap: 3px; min-width: 0; font-weight: 650; font-size: .87rem; }
input,textarea,select { display: block; width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid #bacbbd; border-radius: 7px; color: var(--ink); background: white; font-weight: 400; }
textarea { min-height: 130px; resize: vertical; }
.form-error { color: #9a284b; }
.notification { position: fixed; bottom: 16px; right: 16px; z-index: 3; max-width: min(90vw,420px); padding: 9px 13px; color: white; background: #204434; border-radius: 8px; box-shadow: 0 3px 16px #253c2d44; }
.notification:empty { display: none; }
@media (max-width:1050px) { .shell { grid-template-columns: 169px minmax(0,1fr); } .inbox { grid-template-columns: minmax(190px,.75fr) minmax(0,1.2fr); } main { padding-inline: 18px; } .trial { grid-template-columns: 1fr; gap: 9px; } }
@media (max-width:760px) { .shell { display: block; } .sidebar { padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); } .side-nav { display: flex; flex-wrap: wrap; margin-top: 8px; } .side-nav button { width: auto; } .sidebar-foot { display: none; } main { padding: 18px 13px 36px; } }
@media (max-width:565px) { .inbox { grid-template-columns: 1fr; } .summary { grid-template-columns: 1fr; } .stat { padding: 6px 9px; } .stat + .stat { border-left: 0; border-top: 1px solid var(--line); } .facts,.form-grid { grid-template-columns: 1fr; } .detail { padding: 14px; } .trial-options { grid-template-columns: 1fr; } .trial-option { min-height: 42px; } }
