:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202630; background: #e9edf3; font-size: 14px; font-synthesis: none;
  --red: #cc0001; --red-dark: #a90009; --ink: #202630; --muted: #596577;
  --line: rgba(61, 74, 98, .16); --paper: #fff; --sidebar: 236px; --rail-gap: 18px;
  --glass: linear-gradient(145deg, #ffffffe0, #ffffff94);
  --surface-line: rgba(255,255,255,.9);
  --surface-shadow: 0 16px 44px -30px #25314d55, inset 0 1px 0 #fff;
  --surface-radius: 19px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh;
  background: radial-gradient(ellipse at 95% 0, rgba(151,176,202,.34), transparent 45rem),
    radial-gradient(ellipse at 6% 28%, rgba(210,172,181,.2), transparent 40rem),
    linear-gradient(145deg,#f3f4f7,#e9edf3 60%,#f4f0f1);
  background-attachment: fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary, select { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--red-dark); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .55; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.045em; line-height: 1.12; font-weight: 700; }
h2 { font-size: 1.28rem; letter-spacing: -.032em; line-height: 1.16; }
h3 { font-size: 1rem; line-height: 1.2; }
small { font-size: .81rem; }
svg { display: inline-block; flex: none; width: 18px; height: 18px; }
.sidebar { position: fixed; inset: var(--rail-gap) auto var(--rail-gap) var(--rail-gap); width: var(--sidebar);
  display: flex; flex-direction: column; padding: 27px 16px 15px; z-index: 2;
  background: var(--glass); border: 1px solid var(--surface-line); border-radius: 25px;
  box-shadow: var(--surface-shadow); backdrop-filter: blur(28px); }
.brand { display: flex; flex-direction: column; gap: 11px; align-items: flex-start; padding: 6px 6px 25px; }
.brand img { display: block; width: 187px; max-width: 100%; height: auto; }
.brand span { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.side-nav { display: grid; gap: 4px; }
.side-link, .side-project { width: 100%; min-height: 42px; border: 1px solid transparent; background: transparent;
  color: #364357; text-align: left; border-radius: 10px; display: flex; align-items: center;
  gap: 10px; padding: 8px 11px; font-weight: 650; }
.side-link:hover,.side-project:hover { background: #ffffffb3; }
.side-link.active { color: var(--red-dark); background: #fff1f0; border-color: #fff; box-shadow: 0 3px 10px -8px #ae0010aa; }
.side-link svg { color: var(--red-dark); }
.side-title { padding: 0 11px; margin: 27px 0 8px; color: var(--muted); font-size: .68rem;
  text-transform: uppercase; letter-spacing: .15em; font-weight: 750; }
.side-project { font-size: .82rem; font-weight: 500; min-height: 36px; line-height: 1.25; }
.side-project span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-project.current { color: var(--red-dark); background: #ffffffd6; border-color: #fff; }
.side-project .dot { height: 7px; width: 7px; border-radius: 50%; background: #a0aab9; flex: none; }
.side-project.current .dot { background: var(--red); }
.profile { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 3px 0 6px; display: flex; align-items: center; gap: 9px; }
.avatar { width: 33px; height: 33px; display: grid; place-items: center; background: #fff1f0; border: 1px solid #fff; border-radius: 50%; color: var(--red-dark); font-weight: 650; flex: none; }
.profile span { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.profile small { display: block; color: var(--muted); font-size: .73rem; margin-top: 2px; }
.profile button { margin-left: auto; }
.workspace { margin-left: calc(var(--sidebar) + 2 * var(--rail-gap)); min-width: 0; }
.topbar { min-height: 58px; margin: var(--rail-gap) 26px 0 16px; padding: 0 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; background: var(--glass); border: 1px solid var(--surface-line);
  border-radius: var(--surface-radius); box-shadow: var(--surface-shadow); }
.crumb { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: .86rem; }
.crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb button { flex: none; }
.link { color: var(--red-dark); border: 0; background: transparent; padding: 2px 0; font-weight: 650; text-decoration: none; }
.link:hover { text-decoration: underline; }
.connection { flex: none; font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.indicator { width: 7px; height: 7px; border-radius: 50%; background: #966727; }
.indicator.on { background: #337a50; }
.content { max-width: 1480px; margin: 0 auto; padding: 30px 26px 48px 16px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.head p { margin-top: 8px; color: var(--muted); line-height: 1.55; }
.kicker { text-transform: uppercase; letter-spacing: .13em; color: var(--red-dark); font-weight: 760; font-size: .71rem; margin-bottom: 9px; }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 13px; font-weight: 650; white-space: nowrap; border: 1px solid var(--surface-line); border-radius: 10px;
  background: linear-gradient(145deg,#fffffff0,#ffffff9c); color: var(--ink); text-decoration: none; box-shadow: 0 3px 8px -6px #29365366; }
.button:hover, .icon-button:hover { background: var(--paper); }
button.primary, a.primary { border-color: #b7000c; background: linear-gradient(145deg,var(--red),#ae0010); color: #fff; }
button.primary:hover, a.primary:hover { background: var(--red-dark); }
.icon-button { padding: 7px; min-width: 35px; }
.icon-button.dark { background: transparent; color: var(--muted); border: 0; box-shadow: none; }
.icon-button.dark:hover { background: #ffffffbf; color: var(--red-dark); }
.button svg { width: 16px; height: 16px; }
.card { background: var(--glass); border: 1px solid var(--surface-line); border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow); min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { padding: 16px 18px 15px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; }
.stat > span { font-size: .83rem; color: var(--muted); font-weight: 650; }
.stat > svg { grid-column: 2; grid-row: 1 / span 2; color: #a33339; background: #f9eded; padding: 7px; box-sizing: content-box; border-radius: 8px; }
.stat > strong { font-size: 1.9rem; grid-column: 1; font-weight: 750; letter-spacing: -.055em; line-height: 1; }
.tabbar { display: flex; gap: 4px; align-items: center; border: 1px solid var(--surface-line); border-radius: 13px;
  background: #ffffff80; margin: 0 0 17px; padding: 4px; overflow-x: auto; }
.tab { background: none; border: 1px solid transparent; border-radius: 9px; display: flex; align-items: center;
  gap: 6px; padding: 9px 8px; white-space: nowrap; font-size: .86rem; color: var(--muted); font-weight: 650; }
.tab.active { background: #fff1f0; border-color: #fff; color: var(--red-dark); }
.tab:hover { color: var(--red-dark); }
.tab svg { width: 15px; height: 15px; }
.panel { padding: 21px; }
.section { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section p,.subtle { color: var(--muted); line-height: 1.5; }
.section p { margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 16px; flex-wrap: wrap; }
.toolbar > div,.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 40px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: #ffffffd9; min-width: 0; }
input[type=checkbox],input[type=radio] { accent-color: var(--red); width: 16px; height: 16px; }
textarea { resize: vertical; max-height: 50vh; }
label.field { display: grid; gap: 5px; align-content: start; font-weight: 650; font-size: .84rem; min-width: 0; }
label.inline { display: flex; align-items: center; gap: 6px; min-height: 30px; font-weight: 550; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
th { color: var(--muted); background: #edf0f6; text-align: left; text-transform: uppercase; letter-spacing: .065em; font-size: .68rem; font-weight: 770; }
th,td { padding: 13px 14px; border-block-end: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffffb0; }
.card > .table-wrap { border-radius: inherit; }
td > small { display: block; margin-top: 4px; color: var(--muted); }
.cell-action { white-space: nowrap; }
.cell-action .actions { flex-wrap: nowrap; }
.item-name { min-width: 170px; }
.item-quantity { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 650; }
.tag { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 100px; background: #e9edf5; color: #414d61; font-weight: 700; font-size: .71rem; white-space: nowrap; }
.tag.good { background: #e3f2e8; color: #20583b; }
.tag.warn { background: #fbefd9; color: #71450c; }
.tag.bad { background: #f8e8e8; color: #87252b; }
.notice { padding: 12px 15px; border: 1px solid #dfd8c6; background: #fff9ec; border-radius: 8px; line-height: 1.5; margin-bottom: 14px; color: #624619; }
.notice.good { border-color: #cde4d4; color: #25523a; background: #f0f8f1; }
.notice.bad { border-color: #ebc8c9; color: #7b262b; background: #fff3f3; }
.notice progress { width: min(100%, 310px); display: block; margin-top: 8px; accent-color: var(--red); }
.empty { text-align: center; padding: 43px 18px; display: grid; justify-items: center; gap: 10px; }
.empty > svg { background: #f9eded; color: var(--red); padding: 12px; box-sizing: content-box; border-radius: 10px; width: 23px; height: 23px; }
.empty p { color: var(--muted); max-width: 470px; line-height: 1.55; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.project-card { display: grid; grid-template-rows: 1fr auto; }
.project-tile { width: 100%; border: 0; border-radius: var(--surface-radius) var(--surface-radius) 0 0; background: transparent; color: inherit;
  cursor: pointer; text-align: left; padding: 20px; display: grid; gap: 12px; }
.project-tile:hover { background: #fcf7f7; }
.project-card-actions { padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); }
.delete-control { color: var(--red-dark); }
.delete-control:hover { background: #f9ecec; }
button.danger { color: #fff; background: var(--red-dark); border-color: var(--red-dark); }
button.danger:hover { background: #72141c; }
.project-danger { border-top: 1px solid var(--line); padding-top: 12px; }
.project-tile .actions { color: var(--muted); font-size: .84rem; gap: 14px; }
.issue { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.issue small { color: var(--muted); font-weight: 700; }
.split { display: grid; grid-template-columns: 1fr minmax(260px, .8fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 13px; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.full { grid-column: 1/-1; }
.upload-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.upload-form .file-field { flex: 1; min-width: min(230px,100%); }
.upload-form input { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 7px; }
dialog { width: min(calc(100% - 28px),560px); max-height: calc(100dvh - 30px); padding: 0; border: 1px solid var(--surface-line);
  border-radius: var(--surface-radius); box-shadow: 0 20px 75px #25314d55; color: var(--ink); background: #f7f8fb; }
dialog.wide { width: min(calc(100% - 28px),1180px); }
dialog::backdrop { background: #26314d66; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 14px 22px; position: sticky; background: #f7f8fb; top: 0; z-index: 1; }
.dialog-body { padding: 18px 22px 21px; }
.pdf-view { width: 100%; height: 54vh; border: 1px solid var(--line); border-radius: 7px; background: #eef0ec; display: block; }
.pdf-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.source-row { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) auto; gap: 6px; align-items: center; }
.source-row input:last-child { grid-column: 1/-1; }
.source-row + .source-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.categories { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.export-option { display: flex; align-items: start; gap: 8px; line-height: 1.45; }
.export-option small { color: var(--muted); display: block; }
.auth { min-height: 100dvh; max-width: 1060px; margin-inline: auto; padding: 26px;
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, .95fr); align-content: center; gap: 24px; }
.auth aside { display: flex; justify-content: center; flex-direction: column; padding: clamp(28px,5vw,64px); }
.auth aside img { width: min(100%,250px); margin-bottom: 32px; }
.auth aside p { max-width: 350px; font-size: 1.08rem; line-height: 1.5; margin-top: 15px; color: var(--muted); }
.auth section { display: grid; align-items: center; justify-items: center; padding: clamp(22px,4vw,45px);
  background: var(--glass); border: 1px solid var(--surface-line); border-radius: var(--surface-radius); box-shadow: var(--surface-shadow); }
.auth form { width: min(100%,400px); }
.auth h2 { font-size: 1.55rem; }
.loading { padding: 32px; }
#notice { position: fixed; right: 16px; bottom: 16px; z-index: 8; max-width: min(440px,calc(100% - 32px)); color: white; background: #26323a; border-radius: 8px; box-shadow: 0 6px 22px #17222237; }
#notice:not(:empty) { padding: 12px 15px; }
.form-error:empty { display: none; }
.form-error { color: #8b1922; margin-top: 7px; font-size: .86rem; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace,monospace; overflow-wrap: anywhere; }
@media (max-width: 1050px) {
  :root { --sidebar: 205px; --rail-gap: 12px; }
  .content { padding-inline: 14px 18px; }
  .topbar { margin-inline: 14px 18px; padding-inline: 14px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat > svg { display: none; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 740px) {
  .sidebar { position: static; width: auto; margin: 10px 13px 0; padding: 11px 13px; border-radius: var(--surface-radius);
    flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
  .brand { padding: 0; gap: 4px; margin-right: auto; }
  .brand img { width: 135px; }
  .brand span { font-size: .58rem; }
  .sidebar .side-title,.sidebar .project-nav,.profile > div { display: none; }
  .side-nav { display: flex; }
  .side-link { width: auto; padding-inline: 8px; gap: 5px; font-size: .8rem; }
  .side-link svg { width: 15px; height: 15px; }
  .profile { border: 0; padding: 0; margin: 0; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 43px; margin: 8px 13px 0; border-radius: 13px; }
  .content { padding-top: 20px; padding-bottom: 32px; }
  .head { align-items: flex-start; flex-direction: column; margin-bottom: 16px; gap: 10px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 14px; }
  .stat > strong { font-size: 1.55rem; }
  .section { align-items: flex-start; flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; align-content: start; padding: 18px; gap: 12px; }
  .auth aside { padding: 20px 14px 12px; }
  .auth aside img { width: 155px; margin-bottom: 12px; }
  .auth aside p { font-size: .93rem; margin-top: 7px; }
}
@media (max-width: 410px) {
  .content,.topbar { padding-inline: 13px; }
  .brand img { width: 117px; }
  .side-link { padding-inline: 6px; font-size: .76rem; }
  .tabbar { gap: 12px; }
  .tab { font-size: .78rem; }
  .tab svg { display: none; }
  .fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar,.topbar,.card,.auth section,.tabbar { background: var(--paper); backdrop-filter: none; }
}

@media (min-width: 1051px) {
  .review-grid > aside { position: sticky; top: 63px; }
}
@media (max-width: 740px) {
  .takeoff-table { overflow: visible; }
  .takeoff-table table, .takeoff-table tbody { display: block; }
  .takeoff-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .takeoff-table tbody tr { padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 8px; border-top: 1px solid var(--line); }
  .takeoff-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .takeoff-table td small { margin-top: 3px; }
  .takeoff-table .item-name { grid-column: 1; grid-row: 1; }
  .takeoff-table .item-quantity { grid-column: 2; grid-row: 1; text-align: right; }
  .takeoff-table .item-category { grid-column: 1 / -1; grid-row: 2; color: var(--muted); }
  .takeoff-table .item-source { grid-column: 1; grid-row: 3; overflow-wrap: anywhere; }
  .takeoff-table .item-status { grid-column: 1; grid-row: 4; }
  .takeoff-table .cell-action { grid-column: 2; grid-row: 3 / span 2; align-self: end; }
}
.document-viewer { background: #e8ebe8; display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; min-height: 0; }
.viewer-tools { padding: 6px 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); background: #fbfbf9; }
.viewer-tools nav:not([hidden]), .viewer-zoom { display: flex; align-items: center; gap: 5px; }
.viewer-tools .button { font-size: .76rem; min-height: 30px; padding: 4px 7px; }
.viewer-zoom [aria-pressed=true] { background: #f7ecec; color: var(--red-dark); border-color: #d9adb0; }
.preview-scroll { overflow: auto; padding: 7px; }
.preview-scroll img { background: #fff; width: 100%; height: auto; box-shadow: 0 3px 12px #20272e28; }
.preview-scroll img:not([hidden]) { display: block; }
.preview-scroll[data-level=large] img { width: 150%; }
.preview-scroll[data-level=larger] img { width: 250%; }
.preview-message { padding: 10px; color: var(--muted); }
.task-panel { margin-bottom: 14px; padding: 14px 17px; display: grid; gap: 8px; justify-items: start; }
.task-panel.good { border-color: #bddec7; }
.task-panel.bad { border-color: #e8babc; }
.task-title { display: flex; justify-content: space-between; gap: 10px; width: 100%; align-items: baseline; }
.task-title strong { overflow-wrap: anywhere; }
.task-title span,.task-panel small { color: var(--muted); font-size: .82rem; flex: none; }
.task-panel progress { display: block; width: 100%; height: 10px; accent-color: var(--red); }
.task-panel.good progress { accent-color: #337a50; }
.task-panel ul { margin: 7px 0; padding-left: 22px; overflow-wrap: anywhere; }
.task-steps { margin: 0; padding: 0; list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 18px; }
.task-steps li { color: var(--muted); font-size: .76rem; }
.task-steps li[aria-current="step"] { color: var(--red-dark); font-weight: 750; }
.task-steps .done { color: #275839; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.notification-button { min-height: 32px; padding: 4px 8px; font-size: .79rem; }
.notification-count:not([hidden]) { display: inline-block; background: var(--red); color: white; font-weight: 700; font-size: .7rem; border-radius: 14px; padding: 2px 5px; }
.inbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.inbox-entry { width: 100%; text-align: left; padding: 11px; display: flex; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.inbox-entry.unread { background: #fcf1f1; border-color: #ead3d3; }
.inbox-entry svg { color: var(--red-dark); }
.inbox-entry span span,.inbox-entry small { display: block; margin-top: 4px; }
.inbox-entry small { color: var(--muted); }
@media (max-width: 740px) {
  .notification-label { display: none; }
  .topbar-actions { gap: 6px; }
  .connection { font-size: .66rem; }
}
@media (max-width: 420px) {
  .connection { display: none; }
}
.document-review-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.document-actions { margin-top: 13px; }
.bid-row { padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.bid-row .section { margin-bottom: 8px; }
.bid-row .section h3 { line-height: 1.4; }
.bid-row .section > div:first-child { min-width: 0; }
.bid-fieldset { min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.bid-fieldset legend { padding: 0 4px; font-weight: 650; }
.bid-links { padding-left: 19px; }
.bid-links li { margin-bottom: 5px; }
.assembly-row { border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.supplier-scope { white-space: pre-wrap; }
.quote-section-heading { margin-bottom: 2px; }
.quote-package { display: grid; min-width: 0; grid-template-columns: minmax(0,1fr); gap: 16px; padding: clamp(14px, 2vw, 24px); }
.quote-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.quote-header > div { min-width: 0; }
.quote-header h3 { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.quote-header p { margin-top: 3px; color: var(--muted); }
.quote-lines { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.quote-line { display: grid; grid-template-columns: minmax(0,1fr) max-content; align-items: baseline; gap: 14px; padding: 11px 14px; }
.quote-line > div { min-width: 0; overflow-wrap: anywhere; }
.quote-line small { display: block; margin-top: 3px; color: var(--muted); }
.quote-lines ul { list-style: none; margin: 0; padding: 0; }
.quote-lines li + li { border-top: 1px solid var(--line); }
.quote-columns { background: #edf0f6; font-weight: 650; color: var(--muted); }
.quote-quantity { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-asks { background: #edf0f6; border-radius: 10px; padding: 12px 14px; }
.quote-asks h4,.quote-details h4 { margin: 0; font-size: .95rem; }
.quote-asks ul,.quote-details ul { margin: 6px 0 0; padding-left: 19px; }
.quote-asks li + li,.quote-details li + li { margin-top: 5px; }
.quote-footer { display: grid; gap: 10px; justify-items: start; }
.quote-details { width: 100%; min-width: 0; }
.quote-details > summary { cursor: pointer; padding: 7px 0; color: var(--muted); font-weight: 600; }
.quote-details > :not(summary) { margin-top: 8px; }
.quote-details li small { display: block; margin: 4px 0; color: var(--muted); }
.quote-source-links { display: flex; flex-wrap: wrap; gap: 6px; }
.quote-preview { min-width: 0; }
.analysis-sheet-picker .fields { margin: 10px 0; }
.takeoff-downloads.section { margin-bottom: 15px; }
.takeoff-category-actions .button { justify-content: flex-start; white-space: normal; text-align: left; }
@media (max-width: 520px) {
  .quote-line { padding: 9px 10px; gap: 8px; }
  .quote-header h3 { font-size: 1.05rem; }
}

.notification-source { display: inline-block; margin: 5px 0 4px 33px; font-size: .83rem; }

.ai-progress { position: relative; width: 100%; height: 10px; overflow: hidden; border-radius: 5px; --ai-progress-fill: var(--red); }
.ai-progress.complete { --ai-progress-fill: #337a50; }
.ai-progress > progress { appearance: none; display: block; width: 100%; height: 100%; border: 0;
  background: #e4e7e2; accent-color: var(--ai-progress-fill); }
.ai-progress > progress::-webkit-progress-bar { background: #e4e7e2; }
.ai-progress > progress::-webkit-progress-value { background: var(--ai-progress-fill); }
.ai-progress > progress::-moz-progress-bar { background: var(--ai-progress-fill); }
@media (prefers-reduced-motion: no-preference) {
  .ai-progress.running::after {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 32%; pointer-events: none;
    background: linear-gradient(100deg, transparent, #e77980, transparent);
    animation: ai-progress-sweep 1.6s linear infinite;
  }
}
@keyframes ai-progress-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(320%); }
}

.activity-panel { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fafbf8; }
.activity-panel > summary { padding: 10px 12px; font-weight: 700; cursor: pointer; }
.activity-panel > summary small { margin-left: 8px; color: var(--muted); font-weight: 550; }
.activity-body { padding: 0 12px 11px; display: grid; gap: 9px; }
.activity-current,.activity-idle { border-top: 1px solid var(--line); padding-top: 9px; }
.activity-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.activity-meta { font-size: .78rem; color: var(--muted); line-height: 1.45; font-variant-numeric: tabular-nums; }
.activity-current .activity-meta { margin: 5px 0; }
.activity-sheets .button { min-height: 28px; font-size: .75rem; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.activity-events { list-style: none; margin: 0; padding: 0; max-height: 195px; overflow: auto; }
.activity-events li { display: grid; grid-template-columns: max-content minmax(0,1fr) auto; gap: 8px; align-items: start;
  border-top: 1px solid var(--line); padding: 7px 0; font-size: .81rem; overflow-wrap: anywhere; }
.activity-events time,.activity-events small { color: var(--muted); font-variant-numeric: tabular-nums; }
.activity-events small { display: block; margin-top: 2px; }
@media (max-width: 520px) {
  .activity-events li { grid-template-columns: minmax(0,1fr) auto; }
  .activity-events time { grid-column: 1/-1; }
}

.review-count { border-radius: 20px; background: var(--red); color: #fff; padding: 2px 6px; font-size: .72rem;
  font-variant-numeric: tabular-nums; line-height: 1.2; }
.review-entry .section { align-items: flex-start; }
.review-reason { color: var(--ink); font-size: .86rem; }
.review-reason ul { margin: 5px 0 0; padding-left: 18px; }
.review-reason li + li { margin-top: 4px; }
.review-sources { margin-top: 9px; }
.review-sources .button { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.analysis-sheet-picker summary { cursor: pointer; }
.analysis-sheet-options { display: grid; gap: 0.4rem; max-height: 16rem; overflow: auto; padding: 0.25rem; }

.category-files { margin-bottom: 16px; }
.category-files .section { margin: 0; }
.category-files > .section + .section { border-top: 1px solid var(--line); padding-top: 10px; }
.category-files > .button { justify-self: start; }
.upload-form > small { flex-basis: 100%; color: var(--muted); }
.tabbar details summary { cursor: pointer; padding: 9px 12px; white-space: nowrap; }

.simple-nav { flex-wrap: wrap; align-items: start; }
.simple-nav details { flex: 1 1 auto; min-width: 130px; }
.other-tools { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 720px) { .simple-nav details[open] { flex-basis: 100%; } }
