/* Calaviro Hub — black & signal yellow, taken from the Calaviro mark */
:root {
  --ink: #141414;
  --night: #0E0E0E;
  --signal: #F2DC00;
  --ground: #F3F3EF;
  --paper: #FFFFFF;
  --line: #E2E2DC;
  --line-soft: #EFEFEA;
  --muted: #6B6B66;
  --ok: #165C3B; --ok-bg: #DDF1E6;
  --warn: #5C5000; --warn-bg: #FFF6BF;
  --bad: #B42318; --bad-bg: #FDE7E4;
  --display: "Barlow Condensed", "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "Barlow", "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
[dir="rtl"] body, [dir="rtl"] .btn, [dir="rtl"] input, [dir="rtl"] select, [dir="rtl"] textarea { font-family: "Noto Sans Arabic", var(--body); }

/* ---------- shell ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--night); color: #D9D9D4; padding: 24px 18px; display: flex; flex-direction: column; gap: 24px; }
.brand img { width: 150px; height: auto; display: block; }
.navlist, .navfoot { display: flex; flex-direction: column; gap: 3px; }
.navlist a, .navlist .off, .navfoot a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 7px; color: #D9D9D4; text-decoration: none; font-size: 15px; }
.navlist a:hover, .navfoot a:hover { background: #1E1E1C; color: #fff; }
.navlist a.on, .navfoot a.on { background: var(--signal); color: var(--night); font-weight: 700; }
.navlist .off { color: #77776F; cursor: default; }
.navlist .off small { font-size: 11px; border: 1px solid #3A3A36; border-radius: 99px; padding: 1px 7px; }
.navfoot { margin-top: auto; border-top: 1px solid #2A2A28; padding-top: 14px; }
.linkbtn { background: none; border: 0; padding: 10px 12px; font: inherit; color: #A3A39D; cursor: pointer; text-align: start; }
.linkbtn:hover { color: #fff; }
.main { flex: 999 1 560px; min-width: 0; padding: 22px clamp(16px, 3vw, 36px) 48px; display: flex; flex-direction: column; gap: 20px; }

.topbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.search { flex: 1 1 260px; max-width: 420px; }
.search input, .inlinesearch input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); padding: 0 14px; font: inherit; }
.lang { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.lang a { padding: 7px 12px; border-radius: 6px; text-decoration: none; font-size: 13px; }
.lang a.on { background: var(--ink); color: #fff; font-weight: 600; }

/* ---------- page parts ---------- */
.pagehead { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: flex-end; }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; text-wrap: balance; }
h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 22px; }
.eyebrow { display: block; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.count { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--muted); background: var(--line-soft); border-radius: 99px; padding: 2px 9px; vertical-align: middle; }
.back { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 4px; }
.flash { padding: 12px 16px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.flash.err { background: var(--bad-bg); color: var(--bad); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid #CFCFC8; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--signal); border-color: var(--signal); color: var(--night); font-weight: 700; }
.btn.primary:hover { background: #E3CE00; }
.btn.light { background: transparent; border-color: #4A4A46; color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cardhead a { font-size: 14px; }
.empty { margin: 6px 0; color: var(--muted); }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.cols .grow { flex: 999 1 460px; }
.cols .side-col { flex: 1 1 300px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { font-family: var(--display); font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat small { font-size: 12px; color: var(--muted); }
.stat.dark { background: var(--night); border-color: var(--night); color: #fff; }
.stat.dark span, .stat.dark small { color: #BDBDB7; }
.stat.dark b { color: var(--signal); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.rows li:last-child { border-bottom: 0; }
.rows a { text-decoration: none; }
.clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.table th { text-align: start; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; text-decoration: none; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-soft); color: #3D3D39; white-space: nowrap; }
.st-quoted, .st-awaiting_quote { background: var(--warn-bg); color: var(--warn); }
.st-sourcing { background: #EFE7FB; color: #5B2E91; }
.st-deposit_paid, .st-balance_paid { background: #DDF1E6; color: var(--ok); border: 1px solid #9FD4B6; }
.st-approved, .st-completed { background: var(--ok-bg); color: var(--ok); }
.st-production { background: var(--night); color: var(--signal); }
.st-shipped { background: #E1ECFA; color: #1F4E8C; }
.st-cancelled { background: var(--bad-bg); color: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-size: 14px; }
.chip small { color: var(--muted); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on small { color: #BDBDB7; }

/* ---------- forms ---------- */
.form { max-width: 880px; }
.form.narrow { max-width: 520px; }
.form h2 { margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .stack label { font-size: 13px; font-weight: 600; color: #3D3D39; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid #CFCFC8; border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { resize: vertical; }
input:disabled { background: var(--line-soft); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn { margin-top: 10px; }

/* ---------- client / project ---------- */
.pagehead.client { align-items: flex-start; }
.who { display: flex; gap: 16px; align-items: center; min-width: 0; }
.avatar { flex: none; width: 60px; height: 60px; border-radius: 10px; background: var(--night); color: var(--signal); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 26px; font-weight: 700; }
.alt { font-family: var(--body); font-size: 20px; font-weight: 600; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: #4A4A46; margin-top: 4px; }
.notes p { margin: 0; }
.projlist { list-style: none; margin: 0; padding: 0; }
.projlist li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) auto auto auto; gap: 6px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.projlist li:last-child { border-bottom: 0; }
.ptitle { font-weight: 700; text-decoration: none; }
.pval { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .projlist li { grid-template-columns: 1fr auto; } }

.hero { background: var(--night); color: #fff; border-radius: 12px; padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; }
.hero h1 { color: #fff; }
.hero .eyebrow, .hero .sub { color: #BDBDB7; }
.herotop { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.heroval { display: flex; flex-direction: column; text-align: end; }
.heroval span { font-size: 12px; color: #BDBDB7; }
.heroval b { font-family: var(--display); font-size: 36px; color: var(--signal); font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.steps li { font-size: 13px; color: #8A8A84; padding-top: 10px; border-top: 4px solid #2C2C29; }
.steps li.done { color: #fff; border-color: #fff; }
.steps li.now { color: var(--signal); border-color: var(--signal); font-weight: 700; }

/* ---------- files ---------- */
.upload { display: flex; flex-direction: column; gap: 12px; background: var(--ground); border-radius: 8px; padding: 14px; }
.drop { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; border: 2px dashed #C9C9C2; border-radius: 8px; padding: 18px; background: var(--paper); cursor: pointer; }
.drop:hover, .drop:focus-within { border-color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.drop .picked { font-size: 13px; font-weight: 600; word-break: break-word; }
.uprow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.uprow .field { flex: 1 1 170px; }
.uprow .grow { flex: 3 1 220px; }

.filegrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.filecard { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.thumb { display: flex; align-items: center; justify-content: center; height: 130px; background: var(--line-soft); text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ext { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--ink); }
.fmeta { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; min-width: 0; }
.fname { font-weight: 700; font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fnote { font-size: 13px; color: #3D3D39; }
.factions { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.factions a { font-size: 13px; }
.factions .linkbtn { padding: 4px 8px; font-size: 13px; }
.danger { color: var(--bad) !important; }
.dangerzone { display: flex; justify-content: flex-end; }
.inlinesearch { flex: 0 1 300px; }

/* ---------- sign-in ---------- */
.authbody { background: var(--night); min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; }
.authwrap { width: 100%; max-width: 420px; padding: 8vh 16px 40px; display: flex; flex-direction: column; gap: 22px; }
.authtop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.authtop img { width: 160px; height: auto; }
.authcard { background: var(--paper); border-radius: 12px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.authcard p { margin: 0; }

/* ---------- phone ---------- */
@media (max-width: 800px) {
  .side { flex-basis: 100%; padding: 14px 16px; gap: 12px; }
  .brand img { width: 110px; }
  .navlist { flex-direction: row; overflow-x: auto; gap: 4px; }
  .navlist a, .navlist .off { white-space: nowrap; padding: 8px 12px; }
  .navlist .off { display: none; }
  .navfoot { flex-direction: row; flex-wrap: wrap; justify-content: space-between; border-top: 0; padding-top: 0; }
  .navfoot a { padding: 8px 10px; font-size: 14px; }
  .main { min-width: 0; max-width: 100%; }
  .heroval { text-align: start; }
}

/* ---------- phase 2: quotations ---------- */
.small { font-size: 12px; }
.span2 { grid-column: 1 / -1; }
.stackcards { display: flex; flex-direction: column; gap: 18px; }
.card.wide, .form.wide { max-width: none; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 16px; }
.field small { line-height: 1.3; }
.joined { display: flex; }
.joined input { border-start-end-radius: 0; border-end-end-radius: 0; }
.joined select { width: auto; border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.checks input, .qitem input[type=checkbox] { width: auto; min-height: 0; }
details.terms summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 8px 0; color: #3D3D39; }
details.terms .grid2 { margin-top: 8px; }
a.light { color: #fff; }
.hero .btns form { display: inline; }
.hero .btn.light:hover { border-color: #fff; color: #fff; }

.pill.qs-draft { background: var(--line-soft); color: #3D3D39; }
.pill.qs-sent { background: var(--warn-bg); color: var(--warn); }
.pill.qs-approved, .pill.qs-paid { background: var(--ok-bg); color: var(--ok); }
.pill.qs-rejected, .pill.qs-cancelled { background: var(--bad-bg); color: var(--bad); }
.pill.qs-partly_paid { background: #E1ECFA; color: #1F4E8C; }
.hero h1 .pill { vertical-align: middle; font-family: var(--body); }

.qtable td { vertical-align: middle; }
.qtable .secrow td { background: var(--signal); font-weight: 700; color: var(--night); }
.qtable .secrow .muted { color: #4A4400; }
.thumbcell { width: 64px; }
.thumbcell img { width: 56px; height: 44px; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: #fff; display: block; }
.tag { display: inline-block; margin-top: 3px; font-size: 11px; background: var(--line-soft); border-radius: 4px; padding: 1px 6px; color: #4A4A46; }

/* item editor */
#items { display: flex; flex-direction: column; gap: 12px; }
.qitem { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--paper); }
.qitem.manual .c-unit { color: #1F4E8C; }
.qi-img { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.imgbox { position: relative; width: 96px; height: 80px; border: 2px dashed #C9C9C2; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; background: var(--ground); font-size: 12px; color: var(--muted); }
.imgbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; display: none; }
.qitem.hasimg .imgbox img { display: block; }
.qitem.hasimg .imgbox span { display: none; }
.imgbox input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.qi-img .clr { padding: 2px 4px; font-size: 12px; display: none; }
.qitem.hasimg .qi-img .clr { display: block; }
.qi-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qi-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.qi-row .field { flex: 1 1 120px; gap: 3px; }
.qi-row .field label { font-size: 11px; font-weight: 600; color: var(--muted); }
.qi-row input { min-height: 38px; padding: 7px 9px; font-size: 14px; }
.qi-row .grow2 { flex: 2 1 180px; }
.qi-row .grow3 { flex: 3 1 220px; }
.qi-row .sm { flex: 0 1 74px; }
.qi-row .sm2 { flex: 0 1 104px; }
.qi-row .int input { background: #FFF9DB; border-color: #E8DB8A; }
.calc { display: grid; grid-template-columns: auto auto; gap: 0 10px; align-items: baseline; font-size: 12px; color: var(--muted); padding-bottom: 4px; min-width: 170px; }
.calc b { color: var(--ink); font-size: 14px; text-align: end; font-variant-numeric: tabular-nums; }
.qi-tools { display: flex; flex-direction: column; gap: 4px; }
.iconbtn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); cursor: pointer; font-size: 15px; color: #3D3D39; }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn.del:hover { color: var(--bad); border-color: var(--bad); }

.savebar { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--night); color: #D9D9D4; border-radius: 12px; padding: 12px 16px; margin-bottom: env(safe-area-inset-bottom, 0px); }
.sbtot { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; font-size: 13px; }
.sbtot b { color: #fff; font-variant-numeric: tabular-nums; }
.sbtot .big b { color: var(--signal); font-size: 20px; font-family: var(--display); }
.sbtot .int { color: #BDBDB7; }
.qform { display: flex; flex-direction: column; gap: 18px; }

@media (max-width: 700px) {
  .qitem { grid-template-columns: minmax(0, 1fr); }
  .qi-img { flex-direction: row; }
  .qi-tools { flex-direction: row; }
  .calc { min-width: 0; flex: 1 1 100%; }
}

/* ---------- payments ---------- */
.paidbadge { display: inline-block; background: var(--ok-bg); color: var(--ok); font-weight: 700; border-radius: 99px; padding: 3px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.paidbadge.big { font-size: 15px; padding: 6px 14px; }
.paidrow td:first-child { border-inline-start: 4px solid var(--ok); }
.okt { color: var(--ok); font-weight: 600; }
.pill.pt-deposit, .pill.pt-balance { background: var(--ok-bg); color: var(--ok); }
.pill.pt-consultation, .pill.pt-design_fee { background: #EFE7FB; color: #5B2E91; }
details.payform > summary { list-style: none; display: inline-flex; width: auto; }
details.payform > summary::-webkit-details-marker { display: none; }
details.payform[open] > summary { margin-bottom: 12px; }
details.payform form { background: var(--ground); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px; max-width: none; }
.checkline { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.checkline input { width: auto; min-height: 0; }
.inlineform { display: inline-flex; gap: 6px; align-items: center; }
.inlineform .mini { width: 110px; min-height: 34px; padding: 5px 8px; font-size: 13px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.inlineform.linkinv { margin-top: 4px; }
.inlineform.linkinv .mini { width: 190px; }

/* ---------- upload progress (per file) ---------- */
.upprog{ margin-top:14px; padding:12px 14px; border:1px solid var(--line); border-radius:var(--r); background:var(--paper); }
.upprog-row{ padding:9px 0; border-bottom:1px solid var(--line-soft); }
.upprog-row:last-child{ border-bottom:0; }
.upprog-top{ display:flex; justify-content:space-between; gap:12px; font-size:13px; margin-bottom:6px; }
.upprog-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.upprog-pct{ font-variant-numeric:tabular-nums; color:var(--muted); }
.upprog-bar{ height:7px; border-radius:99px; background:var(--line-soft); overflow:hidden; }
.upprog-bar i{ display:block; height:100%; width:0; background:var(--signal); transition:width .15s linear; }
.upprog-state{ min-height:14px; margin-top:4px; font-size:11.5px; color:var(--muted); }
.upprog-row.ok .upprog-bar i{ background:var(--ok); }
.upprog-row.ok .upprog-state{ color:var(--ok); }
.upprog-row.bad .upprog-bar i{ background:var(--bad); }
.upprog-row.bad .upprog-state{ color:var(--bad); font-weight:600; }
.upprog-note{ margin-top:10px; font-size:12px; color:var(--bad); }

/* ---------- client workflow ---------- */
.grid3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
@media (max-width:900px){ .grid3{ grid-template-columns:1fr; } }
.filters{ margin:0; padding:10px 14px; border-bottom:1px solid var(--line); flex-wrap:wrap; align-items:center; }
.chip-sep{ width:1px; height:18px; background:var(--line); margin:0 4px; }
.stagechip{ display:inline-block; padding:2px 8px; border-radius:99px; font-size:11px; font-weight:700; background:var(--line-soft); color:var(--muted); white-space:nowrap; }
.stagechip.st-new{ background:#FFF6BF; color:#5C5000; }
.stagechip.st-contacted{ background:#E6F0FF; color:#1B4B91; }
.stagechip.st-quote{ background:#EFE6FF; color:#4B2A85; }
.stagechip.st-deal{ background:var(--ok-bg); color:var(--ok); }
.stagechip.st-done{ background:var(--line-soft); color:var(--muted); }
tr.needrow td:first-child{ box-shadow: inset 3px 0 0 var(--signal); }
.ownerchip{ font-weight:600; font-size:13px; }
.unassigned{ color:var(--bad); font-size:12.5px; font-weight:600; }
.follownote{ max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.overdue{ color:var(--bad); font-weight:700; font-size:11.5px; }
.newcount{ background:#FFF6BF; color:#5C5000; margin-inline-start:6px; }

/* file -> project link */
.filelink{ display:flex; gap:6px; align-items:center; margin-top:6px; }
.filelink select.mini{ max-width:150px; }

/* dashboard workflow counters */
.stats.second{ margin-top:14px; }
a.stat{ text-decoration:none; color:inherit; transition:transform .12s, box-shadow .12s; }
a.stat:hover{ transform:translateY(-1px); box-shadow:0 6px 18px -12px rgba(0,0,0,.35); }
a.stat.alert{ border-color:var(--signal); box-shadow:inset 0 0 0 2px var(--signal); }
a.stat.late b{ color:var(--bad); }
.stat.dark2{ background:var(--night); border-color:var(--night); color:#fff; }
.stat.dark2 span, .stat.dark2 small{ color:#BDBDB7; }
.stat.dark2 b{ color:var(--signal); font-size:28px; }
.stats.second .stat b{ font-size:30px; }

.checkline{ display:flex; align-items:center; gap:8px; font-weight:600; cursor:pointer; }

/* deploy-check 20261124-074935 */

/* ---------- tasks ---------- */
.nbadge{ background:var(--signal); color:var(--night); font-weight:700; font-size:12px; border-radius:99px; padding:1px 8px; min-width:22px; text-align:center; }
.navlist a.on .nbadge{ background:var(--night); color:var(--signal); }
.tbanner{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between;
  background:linear-gradient(135deg, var(--ink) 0%, #2A2A26 100%); color:#fff; border-radius:12px; padding:16px 20px; }
.tbanner.warn{ background:var(--warn-bg); color:var(--warn); }
.tbanner-txt{ font-weight:700; font-size:17px; }
.tbanner .btn.primary{ flex:0 0 auto; }

.tasklist{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.taskrow{ display:flex; align-items:center; gap:14px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--paper); }
.taskrow .pdot{ width:10px; height:10px; border-radius:99px; background:var(--line); flex:0 0 auto; }
.taskrow.prio-high .pdot{ background:#E8A100; }
.taskrow.prio-urgent .pdot{ background:var(--bad); box-shadow:0 0 0 3px rgba(180,35,24,.15); }
.taskrow.isdone{ opacity:.65; }
.taskrow.isdone .ttitle{ text-decoration:line-through; }
.tmain{ flex:1 1 auto; min-width:0; }
.ttitle{ font-weight:700; font-size:16px; text-decoration:none; display:block; overflow:hidden; text-overflow:ellipsis; }
.tmeta{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:4px; font-size:13px; }
.tclient{ color:var(--muted); text-decoration:none; border-bottom:1px dotted var(--line); }
.tdue{ font-weight:700; font-size:12px; color:var(--muted); }
.tdue.late{ color:var(--bad); }
.tdue.today{ color:var(--night); background:var(--signal); border-radius:99px; padding:1px 8px; }
.tdue.soon{ color:#8A6D00; }
.tpeople{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.pchip{ font-size:12px; background:var(--line-soft); border-radius:99px; padding:2px 9px; }
.tprogress{ flex:0 0 120px; display:flex; align-items:center; gap:8px; }
.tprogress span{ font-size:12px; font-weight:700; color:var(--muted); min-width:34px; text-align:end; }
.tbar{ flex:1 1 auto; height:7px; background:var(--line-soft); border-radius:99px; overflow:hidden; }
.tbar i{ display:block; height:100%; background:var(--ink); border-radius:99px; }
.taskrow.isdone .tbar i{ background:var(--ok); }

.tpill{ font-size:12px; font-weight:700; border-radius:99px; padding:2px 9px; background:var(--line-soft); color:var(--muted); white-space:nowrap; }
.updchip{ font-size:11px; font-weight:700; border-radius:99px; padding:2px 8px; background:var(--signal); color:#141414; white-space:nowrap; }
.tp-urgent{ background:var(--bad-bg); color:var(--bad); }
.tp-high{ background:var(--warn-bg); color:var(--warn); }
.ts-doing{ background:#E8F0FB; color:#1B3A5C; }
.ts-done{ background:var(--ok-bg); color:var(--ok); }
.ts-waiting{ background:var(--warn-bg); color:var(--warn); }
.ts-cancelled{ background:var(--line-soft); color:var(--muted); }

.tbody{ white-space:pre-wrap; font-size:15px; margin-bottom:12px; }
.trefs{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.people{ list-style:none; margin:0 0 12px; padding:0; display:flex; flex-direction:column; gap:8px; }
.person{ display:flex; align-items:center; gap:10px; }
.person .avatar.sm{ width:34px; height:34px; font-size:14px; }
.avatar.sm{ width:34px; height:34px; font-size:14px; }
.pinfo{ flex:1 1 auto; min-width:0; }
.pinfo b{ display:block; font-size:14px; }
.ppct{ font-weight:700; font-size:13px; color:var(--muted); min-width:36px; text-align:end; }
.tmyblock{ border-top:1px solid var(--line-soft); padding-top:12px; margin-top:4px; }
.tmyblock h3{ margin:0 0 8px; font-size:14px; color:var(--muted); }
.tbtns{ display:flex; flex-wrap:wrap; gap:6px; }
.tadminform{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; border-top:1px solid var(--line-soft); padding-top:12px; }
.tadminform select{ flex:1 1 180px; height:38px; border:1px solid var(--line); border-radius:8px; background:var(--paper); padding:0 10px; font:inherit; }

.tfiles{ list-style:none; margin:0 0 12px; padding:0; display:flex; flex-direction:column; gap:8px; }
.tfiles li{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; border:1px solid var(--line-soft); border-radius:8px; padding:8px 10px; }
.tfiles a{ font-weight:600; }
.tupload{ margin-top:8px; }
.tupload .drop{ padding:16px; }

.tchat{ display:flex; flex-direction:column; gap:10px; margin-bottom:14px; max-height:520px; overflow:auto; }
.tmsg{ display:flex; flex-direction:column; align-items:flex-start; gap:3px; max-width:80%; }
.tmsg.mine{ align-self:flex-end; align-items:flex-end; }
.tbubble{ background:#EFEFEA; color:#141414; border-radius:12px 12px 12px 3px; padding:9px 13px; white-space:pre-wrap; }
.tmsg.mine .tbubble{ background:#141414; color:#fff; border-radius:12px 12px 3px 12px; }
html[data-theme="dark"] .tbubble{ background:#2A2C31; color:#E6E6E1; }
html[data-theme="dark"] .tmsg.mine .tbubble{ background:var(--signal); color:#141414; }
.tstamp{ font-size:11px; color:var(--muted); }
.tcompose{ display:flex; flex-wrap:wrap; gap:8px; align-items:flex-start; }
.tcompose textarea{ flex:1 1 320px; border:1px solid var(--line); border-radius:8px; padding:10px 12px; font:inherit; background:var(--paper); }
.tcompose select{ flex:0 1 220px; height:42px; border:1px solid var(--line); border-radius:8px; background:var(--paper); padding:0 10px; font:inherit; }

.thist{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.thist li{ display:flex; gap:12px; font-size:14px; border-inline-start:2px solid var(--line-soft); padding-inline-start:12px; }
.thist .twhen{ flex:0 0 118px; color:var(--muted); font-size:12px; }
.thist .twhat b{ font-weight:700; }

.dupes{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.dupes li{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.dupepair{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.dp-side{ display:flex; flex-direction:column; gap:2px; min-width:170px; }
.dp-act{ display:flex; flex-wrap:wrap; gap:6px; }

.userlist{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.userrow{ border:1px solid var(--line); border-radius:10px; padding:12px 14px; display:flex; flex-direction:column; gap:10px; background:var(--paper); }
.userrow.off{ opacity:.75; }
.uhead{ display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.uwho{ display:flex; flex-direction:column; gap:2px; flex:1 1 220px; min-width:0; }
.uform{ display:flex; flex-wrap:wrap; gap:8px; align-items:flex-end; margin:0; }
.uform .field{ margin:0; min-width:150px; }
.uform .grow{ flex:1 1 180px; }
.uform .field label{ font-size:12px; }
.uacts{ display:flex; flex-wrap:wrap; gap:12px; justify-content:space-between; align-items:flex-end; border-top:1px solid var(--line-soft); padding-top:10px; }
.utools{ display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
.navlist{ scrollbar-width:thin; }

@media (max-width: 720px){
  .taskrow{ flex-wrap:wrap; }
  .tprogress{ flex:1 1 100%; }
  .tmsg{ max-width:92%; }
  .thist .twhen{ flex:0 0 88px; }
}

