/* لوحة العميل. تبني على brand.css وتشارك لوحة المالك الهيكل نفسه. */
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ---------- الدخول */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login .card { width: min(440px, 100%); padding: 32px; margin: 0; }
.login h1 { font-size: 22px; margin: 16px 0 4px; }

/* ---------- الهيكل */
.shell { display: flex; min-height: 100vh; }
.side { flex: 0 0 236px; background: var(--side); color: var(--side-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.brandrow { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; color: #fff; text-decoration: none; }
.brandrow img { width: 34px; height: 34px; border-radius: 9px; background: #fff; padding: 5px; }
.brandrow b { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.brandrow small { color: var(--side-faint); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button { display: flex; align-items: center; gap: 12px; font: inherit; font-size: 15px; color: var(--side-ink); background: none; border: 0; text-align: start; padding: 0 14px; min-height: 44px; border-radius: 10px; cursor: pointer; }
.nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav button.on { background: var(--side-on); color: #fff; font-weight: 500; }
.nav svg { flex: 0 0 18px; }
.nav .badge { margin-inline-start: auto; background: #F4C77A; color: var(--navy); border-radius: 999px; font-family: var(--mono); font-size: 12px; padding: 0 8px; line-height: 20px; }
.sidebox { margin-top: auto; background: rgba(255,255,255,.08); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.sidebox small { color: var(--side-faint); font-size: 12px; }
.sidebox b { color: #fff; font-size: 16px; font-weight: 500; }
.sidebox .pill { align-self: flex-start; margin-top: 6px; }
.side .foot { border-top: 1px solid rgba(255,255,255,.12); margin-top: 12px; padding: 12px 10px 0; font-size: 12px; color: var(--side-faint); display: flex; flex-direction: column; gap: 6px; }
.side .foot b { color: #fff; font-weight: 400; word-break: break-all; text-align: start; unicode-bidi: isolate; }
.side .foot button { font: inherit; font-size: 12px; background: none; border: 0; color: var(--side-faint); padding: 0; cursor: pointer; text-align: start; }
.side .foot select { font: inherit; font-size: 13px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 4px 8px; min-height: 36px; margin-bottom: 4px; }
.main { flex: 1 1 auto; min-width: 0; padding: 28px 36px 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; }
.top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.top .t { flex: 1 1 260px; min-width: 0; }
.top .crumb { font-size: 13px; color: var(--faint); }
.top h1 { margin: 2px 0 0; font-size: 28px; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- عناصر */
.card { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.bars .r { display: grid; grid-template-columns: 140px 1fr 40px; gap: .6rem; align-items: center; font-size: .9rem; padding: .3rem 0; }
.bars .r .meter { margin: 0; }
#colorsRow > * { flex: 1 1 80px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: middle; border: 1px solid var(--line); margin-inline-end: .25rem; }
.steps-list { margin: 0; padding: 0 1.2rem 0 0; display: flex; flex-direction: column; gap: 12px; }
.steps-list b { display: block; font-weight: 500; }
.steps-list span { font-size: 14px; color: var(--faint); }

/* ---------- يحتاج تصرفك */
.inbox .it { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.inbox .it:first-of-type { border-top: 0; }
.inbox .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.inbox .tx { flex: 1 1 240px; min-width: 0; }
.inbox .tx b { display: block; font-size: 15px; font-weight: 500; }
.inbox .tx span { font-size: 13px; color: var(--faint); }

/* ---------- بطاقة المناقصة */
.tcard { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.tcard .dl { flex: 0 0 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 12px 6px; border-radius: 12px; background: var(--canvas); color: var(--ink); text-align: center; }
.tcard .dl.urgent { background: var(--warn-bg); color: var(--warn-fg); }
.tcard .dl.over { background: var(--bad-bg); color: var(--bad-fg); }
.tcard .dl.none { color: var(--ghost); }
.tcard .dl b { font-family: var(--mono); font-size: 30px; font-weight: 500; line-height: 1; }
.tcard .dl small { font-size: 12px; opacity: .9; }
.tcard .dl i { font-style: normal; font-size: 11px; opacity: .75; margin-top: 2px; }
.tcard .body { flex: 999 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.tcard .ttl { font-size: 16px; font-weight: 600; line-height: 1.4; }
.tcard .sub { font-size: 13px; color: var(--faint); margin-top: 2px; }
.tcard .sub .mono { color: var(--ghost); font-size: 12px; }
.prog { display: flex; align-items: center; gap: 6px; max-width: 460px; }
.prog > div { flex: 1 1 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.prog i { display: block; height: 5px; border-radius: 3px; background: var(--line); }
.prog i.done { background: var(--green); } .prog i.now { background: var(--navy); }
.prog span { font-size: 11px; color: var(--ghost); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog span.done { color: var(--ok-fg); } .prog span.now { color: var(--ink); font-weight: 500; }
.tcard .next { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--canvas); }
.tcard .next small { font-size: 12px; color: var(--faint); font-weight: 500; }
.tcard .next p { margin: 0; font-size: 14px; line-height: 1.5; }
.tcard .next .ac { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.tcard .next .ac .muted { font-size: 12px; }
.tcard details { flex: 1 1 100%; }
.tcard summary { cursor: pointer; font-size: 13px; color: var(--faint); list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.tcard summary::-webkit-details-marker { display: none; }
.tcard .more { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px solid var(--line-2); }
.tcard .more select { width: auto; min-height: 36px; padding: 4px 10px; font-size: 14px; }

/* ---------- الحوار والتنبيه */
dialog { max-width: 620px; width: 92vw; }
dialog .in { padding: 1.5rem; }
dialog h2 { font-size: 19px; margin-bottom: .5rem; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 100; font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ---------- ملف الشركة */
.cobar { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-bottom: 14px; }
.cobar .score { flex: 1 1 220px; min-width: 0; }
.cobar .score b { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.cobar .facts { display: flex; flex-wrap: wrap; gap: 8px; }
.cobar .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-inline-start: auto; }
.needs-mark { outline: 2px solid var(--warn); outline-offset: 1px; background: #fffaf0; }
label .tq { font-size: 11px; font-weight: 600; padding: 0 .45rem; border-radius: 6px; background: #f8f0dc; color: #8a6a1e; margin-inline-start: .35rem; }
.needs-note { background: #fffaf0; border: 1px solid #f1e2bb; border-radius: 10px; padding: .55rem .8rem; }
details.more { border-top: 1px solid var(--line-2); padding-top: 10px; margin-top: 6px; }
details.more > summary { cursor: pointer; font-size: 14px; color: var(--faint); min-height: 40px; display: inline-flex; align-items: center; }
details.more[open] > summary { margin-bottom: 8px; }
.rep { display: flex; flex-direction: column; gap: 10px; }
.rep .it { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--canvas); }
.rep .it .row { align-items: flex-start; }
.rep .it .hd { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rep .it .hd b { font-size: 14px; }
.proofs { display: flex; flex-direction: column; gap: 6px; }
.proofs .pr { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.proofs .pr select, .proofs .pr input { flex: 1 1 180px; min-width: 0; }
.chkgrid { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.chkgrid label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.chkgrid input { width: auto; }
.doc-type { font-size: 12px; color: var(--faint); }

/* ---------- tenders desk: one row per tender, its eight stages as dots */
table.pipe td { vertical-align: middle; }
table.pipe .trow { cursor: pointer; }
table.pipe .trow:focus-within td, table.pipe .trow:hover td { background: var(--canvas); }
table.pipe .ttl { display: block; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.45; }
table.pipe .ttl:hover { text-decoration: underline; }
table.pipe small { display: block; font-size: 12px; }
table.pipe td.actions { text-align: left; white-space: nowrap; }
table.pipe td.actions .btn + .btn, .tnext .ac .btn + .btn { margin-inline-start: 6px; }
.sdots { display: flex; gap: 5px; align-items: center; margin-bottom: 4px; }
.sd { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid var(--line-3); background: #fff; box-sizing: border-box; }
.sd.done { background: var(--green); border-color: var(--green); }
.sd.skip { background: var(--line); border-color: var(--line); }
.sd.live, .sd.part { border-color: var(--green); background: linear-gradient(90deg, var(--green) 50%, #fff 50%); }
.sd.live { animation: rspulse 1.8s infinite; }
.sd.ask, .sd.wait { border-color: var(--warn); background: var(--warn); }
.sd.fail { border-color: var(--bad); background: var(--bad); }
.dlp { display: inline-flex; flex-direction: column; gap: 1px; padding: 4px 10px; border-radius: 10px; background: var(--canvas); white-space: nowrap; }
.dlp b { font-size: 13px; font-weight: 600; } .dlp small { font-size: 11px; color: var(--faint); }
.dlp.soon { background: var(--warn-bg); color: var(--warn-fg); }
.dlp.urgent, .dlp.over { background: var(--bad-bg); color: var(--bad-fg); }
.dlp.none { color: var(--ghost); }
/* ---------- one tender */
#tenderView .back { color: var(--faint); text-decoration: none; font-size: 14px; align-self: flex-start; }
#tenderView .back:hover { color: var(--ink); }
.thead2 { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; }
.thead2 .th-main { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.thead2 h2 { font-size: 21px; line-height: 1.4; text-wrap: balance; }
.tnext { margin-top: 6px; padding: 14px 16px; border-radius: 12px; background: var(--canvas); display: flex; flex-direction: column; gap: 6px; }
.tnext small { font-size: 12px; color: var(--faint); font-weight: 500; } .tnext p { margin: 0; }
.tnext .ac { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tdl { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 10px; border-radius: 14px; background: var(--canvas); text-align: center; }
.tdl b { font-family: var(--mono); font-size: 40px; font-weight: 500; line-height: 1; } .tdl small { font-size: 12px; color: var(--faint); }
.tdl.soon { background: var(--warn-bg); } .tdl.urgent, .tdl.over { background: var(--bad-bg); }
.tdl.over b, .tdl.none b { font-size: 24px; font-family: var(--font); }
.stgs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .stgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stg { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: #fff; }
.stg-h { display: flex; gap: 8px; align-items: center; }
.stg-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-family: var(--mono); background: var(--canvas); color: var(--faint); }
.stg.done .stg-n { background: var(--green); color: #fff; }
.stg.live, .stg.part { border-color: var(--green); } .stg.ask, .stg.wait { border-color: var(--warn); background: var(--warn-bg); } .stg.fail { border-color: var(--bad); }
.stg small { font-size: 12px; }
.stg-h { flex-wrap: wrap; width: 100%; } .stg-h .pill { margin-inline-start: auto; }
.stg-rec { font-weight: 600; font-size: 15px; padding: 4px 10px; border-radius: 8px; }
.stg-rec.ok { background: var(--ok-bg); color: var(--ok-fg); } .stg-rec.warn { background: var(--warn-bg); color: var(--warn-fg); } .stg-rec.bad { background: var(--bad-bg); color: var(--bad-fg); }
.stg-kv { margin: 0; display: flex; flex-direction: column; gap: 3px; width: 100%; }
.stg-kv div { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.stg-kv dt { color: var(--faint); } .stg-kv dd { margin: 0; font-weight: 600; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.stg-ac { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
table.pipe .pill.dec { margin-inline-start: 8px; font-size: 11px; vertical-align: middle; }
dialog.wide { max-width: 760px; }
#newDlg #pNew .card { margin: 0; }

/* ---------- running tasks: the strip on every page and the details panel */
.runstrip { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; box-shadow: 0 4px 16px rgba(14,30,40,.06); font-size: 14px; }
.runstrip.ask { background: var(--warn-bg); border-color: #F4DDB0; }
.runstrip .rs-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: 0 0 8px; animation: rspulse 1.8s infinite; }
.runstrip.ask .rs-dot { background: var(--warn); }
.runstrip .rs-what { color: var(--faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.runstrip .rs-st { color: var(--faint); font-variant-numeric: tabular-nums; margin-inline-end: auto; }
.runstrip.ask .rs-st { color: var(--warn-fg); font-weight: 500; }
.runstrip .rs-more { background: var(--ok-bg); color: var(--green); border-radius: 999px; padding: 0 8px; font-size: 12px; font-family: var(--mono); line-height: 20px; }
@keyframes rspulse { 0% { box-shadow: 0 0 0 0 rgba(0,106,62,.4); } 70% { box-shadow: 0 0 0 7px rgba(0,106,62,0); } 100% { box-shadow: 0 0 0 0 rgba(0,106,62,0); } }
.run-scrim { position: fixed; inset: 0; background: rgba(14,30,40,.35); z-index: 40; }
.run-drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(900px, 100%); z-index: 41; background: var(--canvas, #f5f6f4); box-shadow: 8px 0 32px rgba(14,30,40,.18); transform: translateX(-104%); transition: transform .22s ease; overflow-y: auto; padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px)); padding-left: max(20px, env(safe-area-inset-left, 0px)); visibility: hidden; }
.run-drawer.open { transform: none; visibility: visible; }
body.drawer-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .run-drawer { transition: none; } .runstrip .rs-dot { animation: none; } }

/* ---------- الجوال */
.bnav { display: none; }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .side { display: none; }
  .main { padding: 14px 14px 96px; }
  .runstrip { flex-wrap: nowrap; padding: 6px 10px; gap: 8px; }
  .tdl { flex: 1 1 100%; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; }
  .tdl b { font-size: 28px; }
  table.pipe td.actions { text-align: start; }
  .runstrip .rs-what { display: none; }
  .runstrip b { white-space: nowrap; }
  .runstrip .rs-st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .runstrip .btn { flex: 0 0 auto; }
  .run-drawer { padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .top h1 { font-size: 22px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tcard .dl { flex: 0 0 84px; } .tcard .dl b { font-size: 24px; }
  .bnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bnav button { font: inherit; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--faint); min-width: 56px; min-height: 44px; justify-content: center; cursor: pointer; }
  .bnav button.on { color: var(--green); font-weight: 500; }
  .bars .r { grid-template-columns: 100px 1fr 32px; }
  th:nth-child(n+5), td:nth-child(n+5) { display: table-cell !important; } table { font-size: .85rem; }
  /* company lists: one card per row on phones, actions always visible */
  table.stacked thead { display: none; }
  table.stacked, table.stacked tbody { display: block; }
  table.stacked tr { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.stacked td, table.stacked td:nth-child(n+5) { display: block !important; border: 0; padding: 0; }
  table.stacked td:first-child { flex: 1 1 100%; }
  table.stacked td.actions { flex: 1 1 100%; display: flex !important; flex-wrap: wrap; gap: 6px; justify-content: flex-start; padding-top: 4px; }
}

/* ---------- platform dialogs (ui.js): replace the browser's confirm/alert/prompt */
dialog.ui-dlg { max-width: 460px; }
.ui-in { padding: 1.4rem 1.5rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.ui-in h2 { font-size: 18px; margin: 0 0 .1rem; line-height: 1.5; }
.ui-in p { margin: 0; color: var(--sub); line-height: 1.8; }
.ui-in p.ui-cost { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .75rem; color: var(--ink); font-weight: 600; font-size: 14px; }
.ui-in.ui-bad h2 { color: var(--bad-fg); }
.ui-in label { display: flex; flex-direction: column; gap: .35rem; font-weight: 500; }
.ui-bar { display: flex; gap: .5rem; justify-content: flex-start; flex-direction: row-reverse; margin-top: .4rem; }

/* ---------- the stage card of a task that is running now */
.stg.live { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 6px 18px -8px rgba(18,116,81,.45); animation: stgPulse 2s ease-in-out infinite; position: relative; overflow: hidden; }
@keyframes stgPulse { 0%, 100% { box-shadow: 0 0 0 1px var(--green), 0 6px 18px -8px rgba(18,116,81,.45); } 50% { box-shadow: 0 0 0 3px rgba(18,116,81,.35), 0 6px 22px -6px rgba(18,116,81,.55); } }
.stg-bar { position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--ok-bg); overflow: hidden; }
.stg-bar i { display: block; height: 100%; background: var(--green); transition: width .6s ease; }
.stg-bar.ind i { width: 35%; animation: stgSlide 1.6s ease-in-out infinite; }
@keyframes stgSlide { from { transform: translateX(120%); } to { transform: translateX(-300%); } }
.stg-now { font-size: 13px; color: var(--ink); line-height: 1.6; width: 100%; }
.stg-now small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.pill .ldot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-inline-end: 5px; animation: ldot 1.2s ease-in-out infinite; vertical-align: middle; }
@keyframes ldot { 50% { opacity: .25; } }
.stg.flash { animation: stgFlash 1.2s ease-out 1; }
@keyframes stgFlash { 0% { box-shadow: 0 0 0 4px rgba(18,116,81,.45); } 100% { box-shadow: 0 0 0 0 rgba(18,116,81,0); } }
@media (prefers-reduced-motion: reduce) {
  .stg.live, .stg-bar.ind i, .pill .ldot, .stg.flash { animation: none; }
  .stg-bar.ind i { width: 100%; opacity: .5; }
}

/* ---------- Batch 2: operations desk (search bar, board, alerts, status panel, follow-ups, activity) */
.tbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; margin: 4px 0 10px; }
.tbar .tq { grid-column: 1 / -1; }
.tbar .field { margin: 0; } .tbar .fgo { display: flex; align-items: flex-end; }
@media (max-width: 700px) { .tbar { grid-template-columns: 1fr 1fr; } .tbar .tq { grid-column: 1 / -1; } }
#tCount { font-size: 13px; margin: 2px 0 8px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 12px; }
.pager .btn[disabled] { opacity: .45; cursor: default; }

/* needs-action list */
.attn .it { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.attn .it .tx { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attn .it .tx a { color: var(--ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.attn .it .tx small { color: var(--faint); }
.attn .rs { display: flex; gap: 6px; flex-wrap: wrap; }
.attn .cnt { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }

/* board */
.board { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; align-items: flex-start; }
.bcol { flex: 0 0 min(280px, 82vw); scroll-snap-align: start; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.bcol.over { outline: 2px dashed var(--green); }
.bcol h3 { margin: 0; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.bcol h3 .n { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.bcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; cursor: grab; }
.bcard.drag { opacity: .45; }
.bcard a.ttl { color: var(--ink); font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
.bcard small { color: var(--faint); overflow-wrap: anywhere; }
.bcard .bm { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bcard select { font: inherit; font-size: 13px; min-height: 36px; width: 100%; }
.bcol .empty { padding: 12px 4px; font-size: 13px; }

/* status panel on a tender page */
.stp { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stp .box { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.stp .box h3 { margin: 0; font-size: 14px; } .stp .box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.stp .box dt { color: var(--faint); } .stp .box dd { margin: 0; overflow-wrap: anywhere; }
.stp .ac { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.banner { border: 1px solid #F4DDB0; background: var(--warn-bg); color: var(--warn-fg); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* follow-ups and activity */
.fu { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.fu .tx { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; } .fu.done .tx b { text-decoration: line-through; color: var(--faint); font-weight: 400; }
.fu small { display: block; color: var(--faint); }
.tl { list-style: none; margin: 0; padding: 0; } .tl li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.tl li i { flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 8px; }
.tl .tx { min-width: 0; overflow-wrap: anywhere; } .tl small { display: block; color: var(--faint); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 560px) { .fgrid { grid-template-columns: 1fr; } }
.btn:focus-visible, .chip:focus-visible, .bcard a:focus-visible, .bcard select:focus-visible, .tbar :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.tbar .field { min-width: 0; } .tbar input, .tbar select { width: 100%; box-sizing: border-box; min-width: 0; }

/* section review dialog (Issue #70) */
dialog.rv-dlg { max-width: min(720px, calc(100vw - 24px)); width: 100%; }
.rv { gap: .75rem; }
.rv-box { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem 1rem; background: var(--canvas); line-height: 1.9; }
.rv-box h3, .rv-box h4, .rv-box h5 { margin: .6rem 0 .2rem; }
.rv-box p { margin: .25rem 0; color: var(--ink); }
.rv-tw { overflow-x: auto; margin: .4rem 0; }
.rv-confirm { flex-direction: row !important; align-items: center; gap: .5rem !important; }
.rv-bar { flex-wrap: wrap; }
.stg-help { display: block; }
.bad-link { color: var(--bad-fg); font-weight: 600; }
@media (max-width: 480px) { dialog.rv-dlg { max-width: calc(100vw - 16px); } .rv-bar .btn { flex: 1 1 100%; } }
