:root {
  color-scheme: light;
  font-family: "Avenir Next", Avenir, Inter, "Segoe UI", sans-serif;
  color: #173747;
  background: #f7f6f4;
  font-size: 14px;
  font-synthesis: none;
  --ink: #173747;
  --muted: #566976;
  --line: #e2ddd8;
  --paper: #fff;
  --brand-blue: #043c54;
  --brand-warm: #bbb0a4;
  --warm-surface: #f1eeeb;
  --focus: #0984b9;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 310px; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.layout { min-height: 100vh; display: grid; grid-template-columns: 222px minmax(0,1fr); }
.sidebar {
  background: var(--brand-blue);
  color: #e3edf1;
  position: sticky;
  inset: 0 auto auto 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 30px 14px 17px;
  z-index: 4;
}
.brand {
  background: transparent; border: 0; color: white; text-align: left;
  display: block; width: min(150px, calc(100% - 22px)); padding: 0; margin: 0 11px 32px;
}
.brand-logo { display: block; width: 100%; height: auto; }
.navlist { display: grid; gap: 4px; }
.navitem {
  display: flex; align-items: center; gap: 11px; width: 100%; background: transparent;
  border: 1px solid transparent; padding: 10px 10px; border-radius: 7px; color: #c6d6dc;
  text-align: left; font-size: .94rem; font-weight: 560; min-height: 42px;
}
.navitem > span { width: 19px; text-align: center; font-size: 17px; color: #d2cac2; }
.navitem:hover, .navitem.current { background: #1c5066; color: #fff; }
.navitem.current { border-color: #557687; }
.navitem.current > span { color: #e8e5e1; }
.navitem i {
  margin-left: auto; border-radius: 999px; background: #2c5e72; color: #fff;
  font-size: 11px; padding: 2px 6px; font-style: normal;
}
.sidefoot { margin-top: auto; }
.demo-label {
  margin-top: 12px; border-top: 1px solid #3b6578; font-size: 11px; color: #b7cbd4; padding: 16px 10px 0;
  display: flex; align-items: center; gap: 7px;
}
.demo-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-warm); }
.workspace { min-width: 0; }
.topbar {
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 clamp(20px,3.1vw,52px); background: #fff; border-bottom: 1px solid var(--line);
}
.crumb, .top-actions, .actions, .rolepick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumb { color: #586b77; font-size: 13px; }
.crumb strong { color: var(--ink); }
.slash { color: #8fa1ad; }
.searchbutton {
  border: 1px solid #dce5e8; border-radius: 7px; background: var(--warm-surface); color: #405361;
  padding: 6px 8px; display: flex; align-items: center; gap: 7px; min-height: 33px;
}
.searchbutton span:first-child { font-size: 19px; line-height: 1; }
kbd { color: #556975; padding: 1px 4px; font-family: inherit; font-size: 11px; border: 1px solid #dbe4e7; border-radius: 4px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--warm-surface); color: var(--brand-blue); font-size: 11px; font-weight: 780;
}
.rolepick { gap: 6px; }
.rolepick select { width: auto; border: 0; background: none; padding: 4px; font-weight: 600; font-size: 12px; }
.menu { display: none; }
main { margin: 0 auto; padding: 29px clamp(20px,3.1vw,52px) 45px; max-width: 1630px; }
.pagehead {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  margin: 0 0 25px;
}
.pagehead h1, .publichero h1 { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: clamp(28px,3vw,40px); letter-spacing: -.035em; line-height: 1.09; margin: 0 0 8px; font-weight: 760; }
.pagehead p { margin: 0; color: var(--muted); line-height: 1.5; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px;
  background: #fff; color: #264553; border: 1px solid #cfdce1; border-radius: 7px;
  padding: 7px 11px; text-align: center; font-weight: 630; font-size: 12px; line-height: 1.25;
}
.button:hover { background: #f0f5f5; border-color: #9bb8bd; }
.button.primary { color: #fff; background: var(--brand-blue); border-color: var(--brand-blue); padding-inline: 14px; }
.button.primary:hover { background: #075374; }
.button.small { padding: 4px 8px; min-height: 28px; font-size: 11px; }
.button.white { background: transparent; color: white; border-color: #d2cac2; }
td .button + .button, .cardhead .button + .button { margin-left: 6px; }
.textbutton {
  display: inline; color: var(--brand-blue); border: 0; background: none; padding: 0; text-align: left;
  font-weight: 650; line-height: inherit;
}
.textbutton:hover { text-decoration: underline; text-underline-offset: 3px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.metric {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 16px 14px; min-width: 0;
}
.metric-label { color: #4f6673; font-size: 12px; font-weight: 650; margin-bottom: 8px; }
.metric strong { display: block; font-size: clamp(20px,2.6vw,33px); letter-spacing: -.045em; line-height: 1.07; white-space: nowrap; }
.metric small { display: block; color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.4; }
.dashboard { display: grid; grid-template-columns: minmax(0,2.04fr) minmax(240px,1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 0; overflow: hidden; }
main > .card + .card { margin-top: 15px; }
.cardhead { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid #e7edef; padding: 13px 16px; }
.cardhead h2 { font-size: 15px; margin: 0 auto 0 0; letter-spacing: -.014em; }
.cardhead > .textbutton { font-size: 12px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 13px; vertical-align: middle; line-height: 1.4; }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
th { background: #f8fafb; font-size: 11px; font-weight: 660; color: #566b78; white-space: nowrap; }
td { font-size: 12px; border-top: 1px solid #e9eef0; }
.dashboard th, .dashboard td { padding-inline: 9px; }
.dashboard th:first-child, .dashboard td:first-child { padding-left: 15px; }
.dashboard th:last-child, .dashboard td:last-child { padding-right: 13px; }
.sub { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.35; }
.badge {
  display: inline-block; white-space: nowrap; border-radius: 999px; padding: 3px 7px;
  font-size: 10px; font-weight: 680; background: #edf2f4; color: #495f6c; line-height: 1.35;
}
.badge.blue { background: #e6eff5; color: #2e596d; }
.badge.green { background: #e0f0e9; color: #256254; }
.badge.amber { background: #fff0d8; color: #7b4d14; }
.badge.red { background: #fce7e6; color: #8f292a; }
.late { color: #a02732; font-weight: 650; }
.positive { color: #216358; }
.pipeline { padding: 11px 15px 16px; display: grid; gap: 13px; }
.pipeline > div { display: grid; grid-template-columns: 1fr auto; gap: 5px; font-size: 12px; color: #405a68; }
.pipeline b { color: var(--ink); }
.bar { height: 7px; border-radius: 999px; overflow: hidden; background: #edf1f2; }
.pipeline .bar { grid-column: 1 / -1; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--bar,#286782); }
.activity { padding: 14px 16px; display: grid; gap: 14px; }
.activity > div { display: flex; align-items: flex-start; gap: 9px; }
.activity i,.dot { display: block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #48768a; margin-top: 5px; }
.activity strong { display: block; font-size: 12px; font-weight: 630; }
.activity small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.listrow { display: flex; align-items: center; gap: 10px; padding: 11px 15px; }
.listrow + .listrow { border-top: 1px solid #e9eef0; }
.listrow > div { flex: 1; min-width: 0; }
.channel,.object-icon {
  width: 31px; height: 31px; flex: none; border-radius: 8px; background: #e8f0f5;
  color: #325f77; display: grid; place-items: center; font-size: 16px;
}
.channel.wa { background: #e4f1e8; color: #2d6655; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #cedce1; margin-bottom: 17px; }
.tabs button { border: 0; background: none; color: #586d79; font-size: 13px; font-weight: 650; padding: 10px 12px; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--brand-blue); border-color: var(--brand-blue); }
.tabs button:hover { background: #ebf1f2; }
.filterbar { display: flex; flex-wrap: wrap; gap: 10px 13px; margin-bottom: 16px; align-items: end; }
.filterbar label { min-width: 120px; }
.filterbar label:has(input) { flex: 1 1 180px; max-width: 380px; }
label { display: grid; gap: 5px; font-size: 12px; color: #405967; font-weight: 640; min-width: 0; }
input, select, textarea {
  width: 100%; min-width: 0; border: 1px solid #cfdce1; border-radius: 7px; background: white;
  color: var(--ink); padding: 8px 10px; line-height: 1.3; font-size: 13px; font-weight: 480;
}
textarea { resize: vertical; }
input[type="file"] { font-size: 12px; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: #216358; }
.check { display: flex; align-items: center; gap: 8px; line-height: 1.35; }
.board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; align-items: start; }
.lane { background: #eaf0f2; border: 1px solid #dce6e9; border-radius: 9px; padding: 9px; min-width: 0; }
.lane h2 { margin: 3px 0 10px; padding: 3px; display: flex; align-items: center; gap: 5px; font-size: 12px; }
.lane h2 span { margin-left: auto; color: #566b78; background: #dce6e9; border-radius: 12px; padding: 1px 6px; }
.dot { margin-top: 0; }
.dot0 { background: #748c9a; } .dot1 { background: #5780a0; } .dot2 { background: #b17a2d; } .dot3 { background: #408273; }
.lane-items { display: grid; gap: 8px; }
.taskcard { background: #fff; border: 1px solid #dbe5e9; padding: 10px; border-radius: 7px; min-width: 0; }
.taskcard .textbutton { font-size: 13px; color: var(--ink); }
.taskmeta { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.taskfoot,.projectfooter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 9px; margin: 10px 0 8px; font-size: 11px; color: var(--muted); }
.empty { padding: 17px; color: var(--muted); font-size: 13px; }
.inboxgrid { display: grid; grid-template-columns: minmax(205px,1fr) minmax(0,1.8fr); gap: 14px; align-items: start; }
.message { width: 100%; border: 0; border-bottom: 1px solid #e5ecef; display: flex; align-items: center; gap: 9px; text-align: left; padding: 12px 10px; background: #fff; color: var(--ink); }
.message:last-child { border-bottom: 0; }
.message.selected { background: #ebf4f1; }
.message:hover { background: #f1f7f6; }
.message > span:nth-child(2) { min-width: 0; flex: 1; }
.message strong,.message small { display: block; }
.message strong { font-size: 12px; }
.message small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.message i { width: 7px; height: 7px; border-radius: 50%; background: #387c73; flex: none; }
.message-detail { padding: 18px; }
.message-detail h2 { margin: 10px 0 5px; font-size: 21px; letter-spacing: -.025em; }
.message-body,.document-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.message-body { margin: 20px 0; }
.object-select { max-width: 310px; margin: 0 0 13px; }
.callout { margin: 0 0 14px; padding: 11px; border-radius: 7px; background: #edf5f2; color: #2e564c; line-height: 1.5; }
.callout p { margin-bottom: 0; white-space: pre-wrap; }
.objectgrid,.projectgrid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.objectcard { display: flex; flex-direction: column; }
.object-top { display: flex; justify-content: space-between; align-items: center; gap: 7px; flex-wrap: wrap; }
.objectcard .object-top { padding: 13px 14px 0; }
.object-icon { width: 37px; height: 37px; background: var(--warm-surface); color: var(--brand-blue); font-size: 20px; }
.object-main { padding: 10px 14px 13px; flex: 1; }
.muted { color: var(--muted); line-height: 1.5; }
.object-main .muted { font-size: 11px; }
.object-main h2, .project h2 { margin: 5px 0; font-size: 17px; }
.object-main h2 .textbutton, .project h2 .textbutton { color: var(--ink); }
.object-main p,.project p { color: var(--muted); line-height: 1.5; font-size: 12px; margin: 0 0 13px; }
.object-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.object-stats small,.object-stats b { display: block; }
.object-stats small { color: var(--muted); margin-bottom: 3px; }
.object-foot { padding: 9px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.object-actions { margin: 14px 0; }
.detail-sections { display: grid; gap: 10px; }
.pad { padding: 13px 16px; }
.pad p:first-child { margin-top: 0; }
.publichero { color: white; background: var(--brand-blue); border-radius: 12px; padding: clamp(20px,5vw,65px); margin-bottom: 19px; }
.public-logo { display: block; width: min(190px, 52vw); height: auto; margin-bottom: 26px; }
.publichero .button.primary { background: #e8e5e1; border-color: #e8e5e1; color: var(--brand-blue); }
.publichero .button.primary:hover { background: #fff; border-color: #fff; }
.publichero > div { margin-top: 15px; line-height: 1.5; }
.publichero h1 { max-width: 620px; }
.forecast { display: grid; gap: 14px; padding: 0 16px 20px; }
.forecast > div { display: grid; grid-template-columns: 80px minmax(24px,1fr) 92px; gap: 12px; align-items: center; font-size: 12px; }
.forecast b { text-align: right; }
.forecast .bar { height: 11px; }
.inlineform { display: flex; align-items: end; gap: 10px; }
.inlineform label { flex: 1; }
.source-results { display: grid; gap: 9px; margin-top: 12px; }
.source-results > div { border-radius: 7px; border: 1px solid var(--line); padding: 10px; }
.source-results p { margin: 7px 0 0; line-height: 1.5; }
.document-text { background: #f6f8f9; border: 1px solid #e0e8eb; border-radius: 7px; padding: 12px; margin: 10px 0 14px; }
.project { padding: 13px; }
.project h2 { margin-block: 9px 5px; }
.project > .textbutton { display: block; font-size: 12px; margin-top: 8px; }
dialog {
  width: min(660px,calc(100vw - 30px)); max-height: calc(100dvh - 24px); padding: 0;
  border: 1px solid #cfdee2; border-radius: 12px; background: white; color: var(--ink);
  box-shadow: 0 16px 65px #10263148;
}
dialog::backdrop { background: #122d3b78; }
.dialoghead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 17px; border-bottom: 1px solid var(--line); background: white; }
.dialoghead h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.close { background: #edf2f4; color: #355564; border: 0; border-radius: 6px; width: 29px; height: 29px; font-size: 20px; flex: none; }
.dialogbody { padding: 15px 17px; }
.dialogbody > p:first-child { margin-top: 0; }
.editform { display: grid; gap: 11px; }
.formgrid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.editform footer { border-top: 1px solid var(--line); padding-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.formerror { color: #912b35; font-size: 13px; margin: 0; }
#toast { z-index: 10; position: fixed; bottom: 18px; right: 18px; max-width: calc(100vw - 36px); border-radius: 8px; padding: 11px 15px; background: var(--brand-blue); color: #fff; box-shadow: 0 4px 25px #043c5440; opacity: 0; pointer-events: none; transition: opacity .15s; }
#toast.show { opacity: 1; }
:where(td,.taskcard,.message,.objectcard,.project) { overflow-wrap: anywhere; }
@media (max-width: 1150px) {
  .layout { grid-template-columns: 189px minmax(0,1fr); }
  .sidebar { padding-inline: 10px; }
  .dashboard { grid-template-columns: minmax(0,1.75fr) minmax(205px,1fr); }
  .objectgrid,.projectgrid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .dashboard { grid-template-columns: 1fr; }
  .dashboard > :last-child { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 690px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; width: min(230px,75vw); top: 54px; height: calc(100dvh - 54px); box-shadow: 0 8px 30px #10263155; padding-top: 14px; overflow-y: auto; }
  .sidebar .brand { margin-bottom: 15px; }
  .topbar { height: 54px; padding-inline: 12px; position: sticky; top: 0; z-index: 3; }
  .menu { display: inline-flex; border: 0; background: #edf3f3; color: var(--ink); border-radius: 5px; padding: 5px 7px; }
  .crumb { gap: 5px; }
  .crumb > span,.search-label,kbd,.avatar { display: none; }
  .top-actions { gap: 3px; }
  main { padding: 19px 12px 28px; }
  .pagehead { align-items: flex-start; margin-bottom: 15px; flex-direction: column; }
  .metrics { gap: 8px; margin-bottom: 12px; }
  .metric { padding: 10px; }
  .metric small { font-size: 10px; }
  .inboxgrid { grid-template-columns: 1fr; }
  .message-list { max-height: 26vh; overflow-y: auto; }
  .filterbar { gap: 7px; }
  .filterbar label { min-width: 108px; }
  .filterbar label:has(input) { flex-basis: 100%; max-width: none; }
}
@media (max-width: 430px) {
  .dashboard > :last-child,.objectgrid,.projectgrid { grid-template-columns: 1fr; }
  .board { gap: 7px; }
  .lane { padding: 5px; }
  .formgrid { grid-template-columns: 1fr; }
  .tabs button { padding-inline: 7px; font-size: 12px; }
}
.checklist { margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 7px; display: grid; gap: 7px; }
.checklist legend { padding: 0 5px; font-size: 12px; font-weight: 650; color: var(--muted); }
