/* Permit Dossiers demo: styles that are specific to this demo only. */

/* "Who has the ball" pills */
.ball { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 99px; font-weight: 750; font-size: 12.5px; color: #fff; white-space: nowrap; letter-spacing: 0.1px; }

/* Progress bar in lists */
.pbar { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.pbar .track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.pbar .fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: 6px; }
.pbar small { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Who-has-the-ball board */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 18px; -webkit-overflow-scrolling: touch; }
.bcol { flex: 0 0 236px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bcol-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; }
.bcol-head b { color: var(--muted); font-size: 13px; }
.bcard { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; min-height: 64px; }
.bcard:hover { background: var(--surface-3); }
.bcard .t { font-weight: 650; font-size: 14.5px; line-height: 1.3; }
.bcard .p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.bcard .flag { display: inline-block; margin-top: 7px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 10px; }
.section-head h3 { margin: 0; font-size: 16px; }
.section-head span { color: var(--muted); font-size: 13px; }

/* Project page */
.crumb { margin-bottom: 14px; }
.pipeline { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.stage { flex: 1 0 auto; min-height: 50px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.stage .n { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.stage.done { color: var(--text); }
.stage.done .n { background: var(--green-soft); color: var(--green-bright); }
.stage.current { background: var(--green-soft); border-color: var(--green); color: var(--green-bright); }
.stage.current .n { background: var(--green); color: #fff; }
.stage.sel { outline: 2px solid var(--blue); outline-offset: 2px; }
.gate { margin-bottom: 16px; }
.gate b { display: block; margin-bottom: 4px; }
.gate ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); }
.tabs { display: flex; gap: 8px; margin: 4px 0 16px; flex-wrap: wrap; }

/* Checklist */
.clist { display: grid; gap: 8px; }
.citem { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 8px 8px; min-height: 60px; }
.citem.done .cname { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(142, 153, 171, 0.5); }
.tick { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line-strong); background: transparent; display: grid; place-items: center; color: transparent; }
.tick svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tick:hover { border-color: var(--green); }
.tick.on { background: var(--green); border-color: var(--green); color: #fff; }
.tick.link { cursor: default; border-style: dashed; color: var(--muted); }
.tick.link.on { border-style: solid; color: #fff; }
.cname { flex: 1; font-weight: 600; }
.cname .sub { color: var(--muted); font-size: 13px; font-weight: 500; margin-top: 2px; }
.cright { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Finance */
.fin-block { margin-top: 22px; }
.num-neg { color: var(--red); }
.tr-over td { background: rgba(234, 106, 87, 0.07); }
.tr-over td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.totals { display: flex; gap: 22px; justify-content: flex-end; padding: 12px 16px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.totals b { color: var(--text); font-variant-numeric: tabular-nums; }

/* Update log (threads) */
.log { display: grid; gap: 0; }
.log-item { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--line-strong); margin-left: 6px; }
.log-item::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); }
.log-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.log-item .when { color: var(--muted); font-size: 13px; }
.log-item .what { font-weight: 650; margin: 2px 0; }
.log-item .move { margin-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.log-item .note { margin-top: 6px; color: var(--text); font-size: 14px; }

/* Quote composer */
.modal.wide { width: min(1120px, 100%); }
.composer { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; padding: 8px 22px 10px; }
.composer .col { min-width: 0; }
.composer .fields { display: grid; gap: 12px; max-height: 58vh; overflow-y: auto; padding-right: 6px; }
.composer .fields .group-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin: 6px 0 -4px; }
.paper { white-space: pre-wrap; font-family: Georgia, "Times New Roman", serif; background: #f6f4ee; color: #1d2330; border-radius: 10px; padding: 22px 24px; line-height: 1.5; font-size: 14px; max-height: 58vh; overflow: auto; }
.paper.small { max-height: none; font-size: 13.5px; }
.composer-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.composer-total b { font-size: 22px; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .composer { grid-template-columns: 1fr; }
  .composer .fields, .paper { max-height: 38vh; }
  .bcol { flex-basis: 220px; }
  .citem { flex-wrap: wrap; }
}

/* Small helpers */
.muted-s { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pad { padding: 16px 18px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.kpis.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.cols-5 .kpi { padding: 16px; }
@media (max-width: 1100px) { .kpis.cols-5 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.chip { min-height: 44px; }
