:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #14283b;
  background: #f3f6f9;
  font-size: 14px;
  --navy: #112a41;
  --teal: #006975;
  --teal-dark: #00545e;
  --muted: #4c6072;
  --line: #d8e1ea;
  --soft-line: #e6ecf2;
  --panel: #fff;
  --shade: #f7f9fb;
  --danger: #933843;
  --focus: #086f99;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
html:has(dialog[open]) { overflow: hidden; }
h1,h2,h3,p { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); }
a { color: var(--teal-dark); text-underline-offset: .22em; }
.sr-only { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.topbar { color: #fff; background: var(--navy); border-bottom: 3px solid #176477; }
.top-inner { max-width: 1510px; min-height: 61px; margin: auto; padding: 0 35px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mark { flex: 0 0 auto; }
.brand { font-size: 15px; font-weight: 650; letter-spacing: -.012em; }
.product { color: #cad8e5; border-left: 1px solid #496075; margin-left: 4px; padding-left: 13px; font-size: 12px; white-space: nowrap; }
.staff { display: flex; align-items: center; gap: 15px; font-size: 13px; }
.staff span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dbe6ee; }
.quiet { background: transparent; border: 1px solid #647e95; padding: 8px 10px; color: #fff; border-radius: 5px; white-space: nowrap; }
.quiet:hover { background: #28465e; }
.quiet:focus-visible { outline-color: #90dcf8; }
.workspace { max-width: 1510px; margin: auto; padding: 36px 35px 48px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
h1 { font-size: clamp(23px, 3.05vw, 32px); line-height: 1.16; font-weight: 650; letter-spacing: -.047em; }
.primary,.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; min-height: 42px; border-radius: 5px; font-weight: 650; white-space: nowrap; }
.primary { color: #fff; background: var(--teal); border: 1px solid var(--teal); }
.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.secondary { color: #203a4f; border: 1px solid #bacad9; background: #fff; }
.secondary:hover { background: #edf3f8; }
.add span { font-size: 18px; line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric { text-align: left; min-width: 0; min-height: 91px; display: grid; align-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--muted); padding: 14px 17px; }
.metric:hover { border-color: #92b9c0; }
.metric[aria-pressed="true"] { border-color: #78aeb8; box-shadow: inset 0 -3px var(--teal); background: #fbfefe; }
.metric span { font-size: 12px; font-weight: 600; }
.metric strong { color: #18354b; font-size: 24px; line-height: 1; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric[data-term="due"] strong { color: #865407; }
.metric[data-term="expired"] strong { color: #953340; }
.card { border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 1px 2px #12354c0c; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 15px 17px; }
.search { position: relative; width: min(320px,100%); }
.search svg { position: absolute; top: 12px; left: 11px; color: #607589; pointer-events: none; }
.search input { padding-left: 38px; }
input, select, textarea { color: #14283b; background: #fff; min-width: 0; width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #bfcdd9; border-radius: 5px; }
input::placeholder { color: #53687b; }
textarea { resize: vertical; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
th,td { text-align: left; vertical-align: top; padding: 13px 12px; overflow-wrap: anywhere; }
th { color: #40566a; background: #f1f5f9; border-block: 1px solid var(--soft-line); font-size: 12px; font-weight: 650; }
td { border-bottom: 1px solid var(--soft-line); padding-top: 15px; padding-bottom: 15px; }
th:first-child,td:first-child { padding-inline-start: 17px; }
th:last-child,td:last-child { padding-inline-end: 17px; }
th:nth-child(1) { width: 23%; } th:nth-child(2) { width: 12%; } th:nth-child(3) { width: 11%; }
th:nth-child(4) { width: 17%; } th:nth-child(5) { width: 15%; } th:nth-child(6) { width: 22%; }
tbody tr:hover { background: #fcfdff; }
.record-link { word-break: normal; display: inline-block; font-weight: 650; color: var(--teal-dark); text-decoration: none; }
.record-link:hover { text-decoration: underline; }
.cell-hint { margin-top: 5px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tag { padding: 4px 8px; border-radius: 4px; font-size: 12px; display: inline-block; font-weight: 600; background: #eef2f6; color: #40576c; }
.tag.current,.tag.customer { background: #e9f4ee; color: #22613f; }
.tag.due { background: #fff3dc; color: #745006; }
.tag.expired { background: #fbecef; color: #8c3040; }
.tag.demo,.tag.evaluation { background: #e9f3f6; color: #20576a; }
.tag.opportunity { background: #eef0fa; color: #414e82; }
.follow-up { margin-top: 6px; font-size: 12px; color: var(--muted); }
.follow-up.overdue { color: var(--danger); font-weight: 650; }
.follow-up.today { color: #745006; font-weight: 650; }
td .tag { margin-top: 3px; }
.action-text { white-space: pre-line; line-height: 1.45; color: #3a4d60; }
.value-empty { color: var(--muted); }
.empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 13px; border-top: 1px solid var(--soft-line); padding: 30px 12px; }
.table-footer { color: var(--muted); font-size: 12px; padding: 13px 17px; }
.banner { margin-bottom: 15px; padding: 11px 14px; border: 1px solid #d7abb1; border-radius: 6px; background: #fff4f5; color: #7b2531; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.loading { text-align: center; margin: 54px 20px; color: var(--muted); }
.login { width: min(406px,calc(100% - 32px)); margin: 9vh auto 35px; padding: 24px; }
.login h1 { font-size: 26px; margin-bottom: 24px; }
.login form { display: grid; gap: 15px; }
.login .primary { margin-top: 2px; }
label:not(.search,.filter) { display: grid; gap: 6px; color: #273e51; font-size: 13px; font-weight: 600; min-width: 0; }
label input,label select,label textarea { font-weight: 400; }
label.check { display:flex; align-items:center; gap:8px; min-height:36px; }
label.check input { width:16px; height:16px; min-height:0; margin:0; accent-color:var(--teal); }
.form-error { padding: 9px 10px; border-radius: 4px; color: #842c3b; background: #fff1f3; line-height: 1.4; }
dialog { border: 0; border-left: 1px solid var(--line); box-shadow: -10px 0 35px #14283b22; margin: 0 0 0 auto; max-width: 100%; width: min(100%, 570px); max-height: 100dvh; height: 100dvh; padding: 0; inset: 0 0 0 auto; }
dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
dialog::backdrop { background: #10293e66; }
.dialog-head { padding: 14px 20px; border-bottom: 1px solid var(--soft-line); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
h2 { font-size: 21px; letter-spacing: -.025em; line-height: 1.23; overflow-wrap: anywhere; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; color: #2e4a61; border: 1px solid transparent; background: transparent; border-radius: 5px; font-size: 27px; font-weight: 350; }
.icon-button:hover { background: #f1f5f9; border-color: var(--soft-line); }
.dialog-body { overflow: auto; padding: 18px 20px 22px; }
.dialog-foot { display: flex; gap: 9px; justify-content: flex-end; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--soft-line); }
.form-section + .form-section { border-top: 1px solid var(--soft-line); margin-top: 18px; padding-top: 17px; }
h3 { margin-bottom: 12px; color: #233c52; font-size: 14px; font-weight: 650; }
.fields,.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 13px; }
.wide { grid-column: 1 / -1; }
dl { margin: 0; }
dt { color: var(--muted); font-weight: 600; font-size: 12px; padding: 0 0 5px; }
dd { margin: 0; overflow-wrap: anywhere; line-height: 1.45; white-space: pre-line; }
#record-error { margin-top: 14px; }
.activity { margin-top: 18px; padding: 17px; }
.activity-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.activity-head h2 { font-size: 17px; }
.subtle { margin-top: 5px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 5px; padding: 2px; gap: 2px; }
.segmented button { padding: 7px 10px; min-height: 38px; border:0; border-radius:4px; background: #fff; color: #203a4f; }
.segmented button[aria-pressed="true"] { background: #e4f1f4; color: #00545e; font-weight:650; }
.activity-bars, .people { list-style:none; margin: 14px 0 0; padding:0; }
.activity-bars li { display:grid; grid-template-columns: minmax(130px,1fr) minmax(120px,2fr) 94px; align-items:center; gap:12px; padding:8px 0; }
.activity-bars svg { display:block; width:100%; height:10px; }
.bar-track { fill:#edf2f7; }
.bar-value { fill:#007483; }
.measure { justify-self:end; color:#24394f; font-variant-numeric:tabular-nums; }
.people li { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--soft-line); }
.people li:last-child { margin-bottom:16px; }
.person-copy { min-width:0; overflow-wrap:anywhere; }
.person-access { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.staff-note { margin-top:0; padding:8px 10px; background:#f1f6f9; border-radius:5px; }
.invite-submit { margin-top:12px; }
#staff-dialog[open] { grid-template-rows:auto minmax(0,1fr); }
@media(max-width: 750px){
  .people li { flex-direction:column; align-items:stretch; gap:8px; }
  .top-inner { padding: 0 16px; }
  .workspace { padding: 24px 16px 30px; }
  .page-heading { align-items: flex-start; }
  .brand { font-size: 13px; }
  .product { padding-left: 8px; margin-left: 0; font-size: 11px; }
  .staff span { display: none; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap: 7px; margin-bottom: 14px; }
  .metric { min-height: 81px; padding: 10px; }
  .metric span { font-size: 11px; line-height: 1.22; }
  .metric strong { font-size: 21px; }
  .toolbar { padding: 12px; }
  .search { flex: 1 1 160px; }
  .filter { flex: 0 1 138px; }
  table,tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 13px; padding: 14px 12px; border-top: 1px solid var(--soft-line); }
  td,td:first-child,td:last-child { padding: 0; border: 0; display: block; }
  td:first-child,td:last-child { grid-column: 1 / -1; }
  td:not(:first-child)::before { content: attr(data-label); display: block; padding-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
  .table-footer { border-top: 1px solid var(--soft-line); }
  .activity-bars li { grid-template-columns:minmax(0,1fr) minmax(0,92px); gap:5px 10px; }
  .activity-bars svg { grid-column:1 / -1; grid-row:2; }
  .staff { gap:5px; }
  .quiet { padding-inline:6px; }
}
@media(max-width: 375px){
  .top-inner,.workspace { padding-inline: 11px; }
  .identity { gap: 5px; }
  .product { display:none; }
  .page-heading h1 { max-width: 170px; }
  .add { padding-inline: 9px; }
  .toolbar > * { flex-basis: 100%; }
  .toolbar .filter { flex: 1 1 100%; }
  .fields,.detail-grid { grid-template-columns: 1fr; }
}
