.qd {
  --bg: #F6F8FA;
  --surface: #ffffff;
  --surface-2: #F8FAFC;
  --border: #E3E8EE;
  --border-strong: #D5DBE3;
  --text: #1A2C44;
  --text-2: #1A2C44;
  --text-3: #3C4F69;
  --text-4: #687385;
  --accent: #635bff;
  --accent-hover: #5851ea;
  --accent-soft: rgba(83, 91, 255, .08);
  --grid: #E3E8EE;
  --c-draft: #8792A2;
  --c-sent: #2F74E8;
  --c-open: #635bff;
  --c-signed: #1A9E5C;
  --c-warn: #E8590C;
  --hot: #E8590C;
  --hot-bg: #FFF1E8;
  --ok: #1A9E5C;
  --ok-bg: #E8F7EF;
  --warn: #B7791F;
  --warn-bg: #FEF6E4;
  --badge-gray-bg: #ebeef1;
  --badge-gray-fg: #545969;
  --badge-blue-bg: #e2f0ff;
  --badge-blue-fg: #0055bc;
  --badge-green-bg: #d7f7c2;
  --badge-green-fg: #05690d;
  --promo-bg: linear-gradient(160deg, #f6f8fa 0%, #f6f8fa 62%, #eef0f6 62%);
  --shadow: 0 1px 2px rgba(64, 68, 82, .06);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
}
html.dark .qd {
  --bg: #0B0E14;
  --surface: #11161F;
  --surface-2: #151B26;
  --border: #212938;
  --border-strong: #2A3344;
  --text: #E8ECF3;
  --text-2: #C9D1DD;
  --text-3: #9AA6B8;
  --text-4: #6F7B8F;
  --accent: #9B8CFF;
  --accent-hover: #A99DFF;
  --accent-soft: rgba(155, 140, 255, .12);
  --grid: #212938;
  --c-draft: #6B7689;
  --c-sent: #4C8DF6;
  --c-open: #9B8CFF;
  --c-signed: #2FBF71;
  --c-warn: #FF8A4C;
  --hot: #FF8A4C;
  --hot-bg: rgba(255, 138, 76, .12);
  --ok: #2FBF71;
  --ok-bg: rgba(47, 191, 113, .12);
  --warn: #F5B547;
  --warn-bg: rgba(245, 181, 71, .12);
  --badge-gray-bg: #252c38;
  --badge-gray-fg: #b5bdca;
  --badge-blue-bg: #13294a;
  --badge-blue-fg: #7fb8ff;
  --badge-green-bg: #113524;
  --badge-green-fg: #6fe0a6;
  --promo-bg: linear-gradient(160deg, #1a202b 0%, #1a202b 62%, #1e2531 62%);
  --shadow: none;
}
.qd a { color: var(--accent); text-decoration: none; }
.qd a:hover { color: var(--accent-hover); }
.qd .ic {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qd .num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.qd .content { padding: 8px 32px 48px; max-width: 1240px; width: 100%; }
.qd .today { display: grid; grid-template-columns: 1fr 330px; gap: 32px; padding-bottom: 28px; }
.qd .today-head { display: flex; gap: 36px; align-items: flex-start; margin-bottom: 8px; }
.qd .kicker { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.qd .kicker .ic { color: var(--text-4); width: 14px; height: 14px; }
.qd .today-head .big { font-size: 20px; font-weight: 600; color: var(--text); margin-top: 2px; }
.qd .today-head .sub { font-size: 13px; color: var(--text-3); }
.qd .today-head .sub.muted { color: var(--text-4); }
.qd .today-chart { height: 150px; }
.qd .axis-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-4); direction: ltr; margin-top: 6px; }
.qd .mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 26px; }
.qd .mini-stat .row { display: flex; justify-content: space-between; align-items: baseline; }
.qd .mini-stat .label { font-size: 15px; font-weight: 600; color: var(--text); }
.qd .mini-stat .val { font-size: 22px; font-weight: 600; color: var(--text); margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.qd .mini-stat .val .ic { width: 14px; height: 14px; color: var(--text-4); }
.qd .mini-stat .foot { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.qd .promo {
  border-radius: 10px;
  background: var(--promo-bg);
  padding: 20px;
  align-self: start;
  border: 1px solid var(--border);
}
.qd .promo .eyebrow { font-size: 12px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.qd .promo h3 { font-size: 16px; color: var(--text); font-weight: 600; margin-bottom: 6px; }
.qd .promo p { font-size: 14px; color: var(--text-3); margin-bottom: 14px; }
.qd .promo a { font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.qd .promo a .ic { width: 14px; height: 14px; }
.qd .ov-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0 14px; flex-wrap: wrap; }
.qd h1 { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.qd .filters { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; align-items: center; }
.qd .pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-3); background: var(--surface);
}
.qd .pill b { color: var(--accent); font-weight: 600; }
.qd .pill .sep { width: 1px; height: 14px; background: var(--border-strong); }
.qd .pill .ic { width: 13px; height: 13px; }
.qd .btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text-2); box-shadow: var(--shadow);
}
.qd a.btn:hover { background: var(--surface-2); color: var(--text-2); }
.qd .btn .ic { width: 14px; height: 14px; }
.qd .btn-group { display: flex; gap: 8px; }
.qd a.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.qd a.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.qd .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.qd .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0;
}
.qd .card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qd .card-title { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.qd .card-title .ic { width: 14px; height: 14px; color: var(--text-4); }
.qd .card-value { font-size: 22px; font-weight: 600; color: var(--text); margin-top: 4px; }
.qd .card-prev { font-size: 13px; color: var(--text-3); }
.qd .chart { height: 170px; margin-top: 14px; position: relative; }
.qd .chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.qd .card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-4); margin-top: auto; padding-top: 14px; }
.qd .card-foot a { font-weight: 500; }
.qd .stackbar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; margin: 16px 0 6px; gap: 2px; }
.qd .stackbar span { display: block; height: 100%; }
.qd .legend { list-style: none; margin: 4px 0 0; padding: 0; }
.qd .legend li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.qd .legend li:last-child { border-bottom: 0; }
.qd .legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.qd .legend .lv { margin-inline-start: auto; font-weight: 600; color: var(--text); }
.qd .legend .lp { color: var(--text-4); font-size: 12px; min-width: 38px; text-align: left; }
.qd .section { margin-top: 36px; }
.qd .section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.qd .section-head h2 { font-size: 20px; font-weight: 700; color: var(--text); }
.qd .tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.qd .tab {
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 14px; min-width: 120px; text-align: start; background: var(--surface); color: inherit;
}
.qd a.tab:hover { color: inherit; }
.qd .tab .t { font-size: 12px; color: var(--text-3); font-weight: 500; }
.qd .tab .n { font-size: 16px; font-weight: 600; color: var(--text); }
.qd .tab.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.qd .tab.on .t { color: var(--accent); }
.qd .table-wrap { border-top: 1px solid var(--border); overflow-x: auto; }
.qd table { width: 100%; border-collapse: collapse; min-width: 720px; }
.qd th { font-size: 12px; font-weight: 600; color: var(--text-3); text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.qd td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.qd tbody tr { cursor: pointer; }
.qd tbody tr:hover td { background: var(--surface-2); }
.qd td.amt, .qd th.amt { font-weight: 600; color: var(--text); text-align: left; }
.qd th.amt { font-weight: 600; }
.qd td.name { color: var(--text); font-weight: 500; white-space: normal; }
.qd td.name a { color: var(--text); font-weight: 500; }
.qd td.name a:hover { color: var(--accent); }
.qd td.name .hint { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--c-warn); font-weight: 500; margin-top: 2px; }
.qd td.name .hint .ic, .qd td.name .hint i { width: 12px; height: 12px; }
.qd td.muted { color: var(--text-3); }
.qd .badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 4px; }
.qd .badge .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.qd .b-gray { background: var(--badge-gray-bg); color: var(--badge-gray-fg); }
.qd .b-blue { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.qd .b-green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.qd a.row-action {
  font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--border-strong);
  padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; background: var(--surface);
}
.qd a.row-action:hover { background: var(--accent-soft); color: var(--accent); }
.qd a.row-action .ic { width: 12px; height: 12px; }
.qd .table-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 13px; color: var(--text-3); }
.qd .empty-note { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; color: var(--text-3); background: var(--surface); }
.qd .empty-note strong { display: block; color: var(--text); font-weight: 600; }
.qd .heat { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.qd .heat i { display: inline-block; width: 64px; height: 4px; border-radius: 99px; background: var(--border); }
.qd .heat i b { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
@media (max-width: 1100px) {
  .qd .cards { grid-template-columns: 1fr 1fr; }
  .qd .today { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .qd .content { padding-inline: 16px; }
  .qd .cards { grid-template-columns: 1fr; }
  .qd .mini-stats { grid-template-columns: 1fr; gap: 20px; }
  .qd .today-head { gap: 20px; flex-wrap: wrap; }
}

.qp {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f8fa; --border: #ebeef1; --border-strong: #d5dbe1;
  --text: #1a1b25; --text-2: #414552; --text-3: #687385; --text-4: #8792a2;
  --accent: #635bff; --accent-hover: #5851ea; --accent-soft: #f2f1ff;
  --c-draft: #a3acba; --c-sent: #0055bc; --c-open: #635bff; --c-signed: #09825d; --c-warn: #c84801;
  --badge-gray-bg: #ebeef1; --badge-gray-fg: #545969;
  --badge-blue-bg: #e2f0ff; --badge-blue-fg: #0055bc;
  --badge-purple-bg: #f2f1ff; --badge-purple-fg: #4b44d6;
  --badge-green-bg: #d7f7c2; --badge-green-fg: #05690d;
  --badge-orange-bg: #fcedb9; --badge-orange-fg: #a82c00;
  --info-bg: #f2f1ff; --info-border: #dcd9ff;
  --shadow: 0 1px 2px rgba(64, 68, 82, .06);
  color: var(--text-2); font-size: 14px; line-height: 1.45;
  min-width: 0;
  max-width: 100%;
}
html.dark .qp {
  --bg: #0e1117; --surface: #141922; --surface-2: #1a202b; --border: #252c38; --border-strong: #333c4b;
  --text: #f1f3f7; --text-2: #c9cfd9; --text-3: #97a1b1; --text-4: #6f7a8c;
  --accent: #8a84ff; --accent-hover: #9b96ff; --accent-soft: #232245;
  --c-draft: #5d6676; --c-sent: #4c9bff; --c-open: #8a84ff; --c-signed: #33c48d; --c-warn: #ff8a4c;
  --badge-gray-bg: #252c38; --badge-gray-fg: #b5bdca;
  --badge-blue-bg: #13294a; --badge-blue-fg: #7fb8ff;
  --badge-purple-bg: #232245; --badge-purple-fg: #b3afff;
  --badge-green-bg: #113524; --badge-green-fg: #6fe0a6;
  --badge-orange-bg: #3a2210; --badge-orange-fg: #ffad7a;
  --info-bg: #1b1d36; --info-border: #2e2f5c;
  --shadow: none;
}
.qp .ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qp .num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.qp .sq { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.qp .content { padding: 8px 32px 48px; max-width: 1240px; width: 100%; min-width: 0; }
#workspace-main { min-width: 0; }
.qp .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 16px 0 30px; flex-wrap: wrap; }
.qp h1 { font-size: 32px; font-weight: 700; color: var(--text); letter-spacing: -.025em; line-height: 1.05; }
.qp .ph-sub { display: flex; align-items: center; gap: 10px; color: var(--text-3); margin-top: 10px; font-size: 14px; flex-wrap: wrap; }
.qp .ph-sub .num { color: var(--text); font-weight: 600; }
.qp .ph-sub .sep { width: 3px; height: 3px; border-radius: 99px; background: var(--border-strong); flex: none; }
.qp .hotx { display: inline-flex; align-items: center; gap: 5px; color: var(--c-warn); font-weight: 500; }
.qp .hotx .ic { width: 14px; height: 14px; }
.qp .hotx .num { color: inherit; font-weight: 500; }
.qp .ph-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qp .page-head .btn { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; gap: 8px; box-shadow: none; transition: background .15s, border-color .15s, color .15s; }
.qp .page-head .btn .ic { width: 16px; height: 16px; stroke-width: 2; }
.qp .page-head .btn.pr { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.qp .page-head .btn.pr:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.qp .page-head .btn.ghost-b { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.qp .page-head .btn.ghost-b .ic { color: var(--text-4); }
.qp .page-head .btn.ghost-b:hover { background: var(--surface-2); color: var(--text); }
.qp .btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.qp .btn, .qp a.btn, .qp button.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 13px; color: var(--text-2); box-shadow: var(--shadow);
}
.qp a.btn:hover, .qp button.btn:hover { background: var(--surface-2); color: var(--text-2); }
.qp .btn .ic { width: 14px; height: 14px; }
.qp a.btn.primary, .qp button.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.qp a.btn.primary:hover, .qp button.btn.primary:hover { background: var(--accent-hover); color: #fff; }
.qp .notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--info-bg); border: 1px solid var(--info-border); color: var(--text-2); margin-bottom: 22px; }
.qp .notice + .notice { margin-top: -14px; }
.qp .notice.warn { background: var(--badge-orange-bg); border-color: transparent; }
.qp .notice.ok { background: var(--badge-green-bg); border-color: transparent; }
.qp .notice .ic { color: var(--accent); }
.qp .notice.warn .ic { color: var(--c-warn); }
.qp .notice.ok .ic { color: var(--c-signed); }
.qp .notice b { color: var(--text); font-weight: 600; }
.qp .notice .push { margin-inline-start: auto; font-weight: 600; color: var(--accent); }
.qp .notice .close { margin-inline-start: auto; color: var(--text-4); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; border: 0; background: none; cursor: pointer; }
.qp .notice .push + .close { margin-inline-start: 0; }
.qp .notice .close:hover { background: var(--surface-2); }
.qp .row-action { font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--border-strong); padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; background: var(--surface); }
.qp .row-action:hover { background: var(--accent-soft); color: var(--accent); }
.qp .row-action .ic { width: 12px; height: 12px; }
.qp .toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.qp .pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px dashed var(--border-strong); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-3); background: var(--surface); }
.qp .pill:hover { border-color: var(--text-4); }
.qp .pill .ic { width: 13px; height: 13px; }
.qp .toolbar .right { margin-inline-start: auto; display: flex; gap: 8px; }
.qp .bulk { display: none; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; background: var(--accent-soft); margin-bottom: 10px; font-weight: 500; color: var(--text); }
.qp .bulk.show { display: flex; }
.qp .bulk .acts { margin-inline-start: auto; display: flex; gap: 6px; }
.qp .bulk .btn { height: 28px; }
.qp .btn.danger { color: var(--c-warn); }
.qp .pager { display: flex; gap: 6px; }
.qp .no-results { padding: 40px 12px; text-align: center; color: var(--text-4); }
.qp .detail-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.qp .depth .lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-4); margin-top: 8px; }
.qp .heat .ic { width: 13px; height: 13px; }
.qp .heat b.h-hot { color: var(--c-signed); }
.qp .heat b.h-mid { color: var(--c-open); }
.qp .heat b.h-low { color: var(--c-warn); }
.qp .summary { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 16px; margin: 10px 0 28px; }
.qp .card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.qp .card-title { font-size: 13px; font-weight: 600; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.qp .card-title .ic { width: 13px; height: 13px; color: var(--text-4); }
.qp .card-value { font-size: 22px; font-weight: 600; color: var(--text); margin-top: 6px; }
.qp .card-sub { font-size: 12px; color: var(--text-4); margin-top: 2px; }
.qp .stackbar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; margin: 14px 0 12px; gap: 2px; background: var(--surface-2); }
.qp .stackbar span { display: block; height: 100%; }
.qp .chips { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.qp .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.qp .chip b { color: var(--text); font-weight: 600; }
.qp .tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.qp a.tab { border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 14px; min-width: 118px; text-align: start; background: var(--surface); color: inherit; }
.qp a.tab:hover { border-color: var(--text-4); color: inherit; }
.qp .tab .t { font-size: 12px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.qp .tab .n { font-size: 17px; font-weight: 600; color: var(--text); margin-top: 1px; }
.qp a.tab.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.qp a.tab.on .t { color: var(--accent); }
.qp .pipe { margin-bottom: 22px; }
.qp .ptabs { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.qp .ptabs.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qp a.ptab { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px 16px; border-radius: 12px; text-align: start; text-decoration: none; color: var(--text-3); transition: background .18s, color .18s; }
.qp a.ptab:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); color: var(--text); }
.qp .pt-l { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.qp .pt-l i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.qp .pt-n { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.qp .pt-n b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.qp .pt-n em { font-style: normal; font-size: 12.5px; color: var(--text-4); }
.qp a.ptab.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); }
.qp a.ptab.on .pt-l { font-weight: 600; }
.qp .rb-h { display: flex; justify-content: space-between; margin-top: 16px; font-size: 11.5px; color: var(--text-4); }
.qp .ribbon { display: flex; gap: 3px; height: 6px; margin-top: 7px; border-radius: 99px; overflow: hidden; }
.qp .ribbon i { display: block; height: 100%; opacity: .9; transition: opacity .2s, filter .2s; }
.qp .pipe.f .ribbon i { opacity: .22; }
.qp .pipe.f .ribbon i.on { opacity: 1; }
.qp .tbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.qp .fsearch { display: flex; align-items: center; gap: 8px; height: 38px; width: 320px; max-width: 100%; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-4); transition: border-color .15s, box-shadow .15s; }
.qp .fsearch:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.qp .fsearch .ic { width: 15px; height: 15px; flex: none; }
.qp .fsearch input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 13.5px; box-shadow: none; }
.qp .fsearch input::placeholder { color: var(--text-4); }
.qp .fsearch kbd { font: 500 11px Heebo, sans-serif; color: var(--text-4); border: 1px solid var(--border-strong); border-radius: 5px; padding: 0 6px; line-height: 18px; }
.qp .tbar .fchips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.qp .fchip { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px dashed var(--border-strong); color: var(--text-3); background: transparent; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; cursor: pointer; }
.qp .fchip .ic { width: 13px; height: 13px; }
.qp .fchip:hover { color: var(--text); border-style: solid; }
.qp .tb-end { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.qp .sortx { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-4); padding: 0 8px; }
.qp .sortx b { color: var(--text-2); font-weight: 600; }
.qp .sortx .ic { width: 14px; height: 14px; }
.qp .tbar .btn.sm { white-space: nowrap; height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; gap: 6px; box-shadow: none; }
.qp .tbar .btn.sm .ic { width: 14px; height: 14px; }
.qp .tbar .btn.ghost { border-color: transparent; background: transparent; color: var(--text-3); }
.qp .tbar .btn.ghost:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 900px) {
  .qp .ptabs, .qp .ptabs.n3 { grid-template-columns: 1fr 1fr; overflow: visible; }
  .qp .cc-stats, .qp .cc-grid { grid-template-columns: 1fr; }
  .qp .fsearch { width: 100%; }
  .qp .tb-end { margin-inline-start: 0; }
  .qp .page-head { flex-direction: column; align-items: flex-start; }
}
.qp .table-wrap { border-top: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; max-width: 100%; scrollbar-width: none; }
.qp .table-wrap::-webkit-scrollbar { width: 0; height: 0; }
.qp .table-x { position: sticky; bottom: 0; z-index: 4; height: 14px; overflow-x: auto; overflow-y: hidden; background: var(--bg); scrollbar-width: thin; scrollbar-color: #8b97a8 transparent; }
.qp .table-x[hidden] { display: none; }
.qp .table-x-spacer { height: 1px; }
.qp .table-x::-webkit-scrollbar { height: 10px; }
.qp .table-x::-webkit-scrollbar-thumb { background: #8b97a8; border-radius: 99px; }
html.dark .qp .table-x { scrollbar-color: #3d4a5c transparent; }
html.dark .qp .table-x::-webkit-scrollbar-thumb { background: #3d4a5c; }
.qp .table-wrap table { width: 100%; border-collapse: collapse; min-width: 960px; }
.qp .table-wrap th { position: sticky; top: 0; z-index: 1; background: var(--bg); font-size: 12px; font-weight: 600; color: var(--text-3); text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.qp .table-wrap td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; white-space: nowrap; }
.qp .table-wrap tbody tr.row { cursor: pointer; }
.qp .table-wrap tbody tr.row:hover td { background: var(--surface-2); }
.qp .table-wrap tbody tr.row.sel td { background: var(--accent-soft); }
.qp .table-wrap th.amt, .qp .table-wrap td.amt { text-align: left; }
.qp .table-wrap td.amt { font-weight: 600; color: var(--text); }
.qp .table-wrap td.muted { color: var(--text-3); }
.qp .cb { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; margin-top: 2px; }
html.dark .qp .cb {
  appearance: none;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  display: inline-grid;
  place-content: center;
}
html.dark .qp .cb:checked { background: var(--accent); border-color: var(--accent); }
html.dark .qp .cb:checked::before {
  content: "";
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translate(-0.5px, -1px);
}
html.dark .qp .cb:indeterminate::before {
  content: "";
  width: 8px;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}
html.dark .qp .cb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html.dark .qp .cb:disabled { opacity: .45; }
.qp td[data-col="title"] { max-width: 280px; }
.qp td[data-col="client"] { max-width: 200px; }
@media (max-width: 1600px) {
  .qp th[data-col="title"],
  .qp td[data-col="title"] { width: 180px; max-width: 180px; }
}
.qp td[data-col="title"] .title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qp .title { color: var(--text); font-weight: 600; white-space: nowrap; min-width: 0; }
.qp .title .name, .qp .title a.name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--text); font-weight: 600; font-size: 14px; }
.qp .title .sq { width: 8px; height: 8px; border-radius: 2px; }
.qp .status-text { font-size: 13px; font-weight: 600; }
.qp .status-text.b-draft { color: var(--c-draft); background: none; padding: 0; }
.qp .status-text.b-sent { color: var(--c-sent); background: none; padding: 0; }
.qp .status-text.b-viewed { color: var(--c-open); background: none; padding: 0; }
.qp .status-text.b-signed { color: var(--c-signed); background: none; padding: 0; }
.qp .title a.name:hover { color: var(--text); }
.qp .title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 400; color: var(--text-4); margin-top: 2px; }
.qp .title a.link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; margin-top: 2px; color: var(--accent); direction: ltr; }
.qp .title a.link .ic { width: 12px; height: 12px; }
.qp .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 5px; }
.qp .badge .sq { width: 8px; height: 8px; border-radius: 2px; }
.qp .b-draft { background: var(--badge-gray-bg); color: var(--badge-gray-fg); }
.qp .b-sent { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.qp .b-viewed { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }
.qp .b-signed { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.qp .b-fwd { background: var(--badge-orange-bg); color: var(--badge-orange-fg); }
.qp .b-fwd .ic { width: 12px; height: 12px; stroke-width: 2.2; }
.qp .eng { display: flex; flex-direction: column; gap: 6px; min-width: 230px; }
.qp .heat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.qp .heat .track { flex: none; width: 64px; height: 4px; border-radius: 99px; background: var(--border); overflow: hidden; }
.qp .heat .fill { height: 100%; border-radius: 99px; background: var(--accent); }
.qp .heat b { color: var(--text); font-weight: 600; }
.qp .stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.qp .stats span.stat { display: inline-flex; align-items: center; gap: 4px; }
.qp .stats .ic { width: 13px; height: 13px; color: var(--text-4); }
.qp .empty { color: var(--text-4); }
.qp .more, .qp button.more { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); border: 1px solid transparent; background: none; cursor: pointer; padding: 0; }
.qp .more:hover, .qp .more.on { border-color: var(--border-strong); background: var(--surface); color: var(--accent); }
.qp .table-wrap tr.detail td { background: var(--surface-2); padding: 18px 20px 20px; white-space: normal; cursor: default; }
.qp .detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.qp .dtile { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.qp .dtile .k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.qp .dtile .v { font-size: 18px; font-weight: 600; color: var(--text); margin-top: 4px; }
.qp .depth .bar { position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.qp .depth .bar i { position: absolute; top: 0; bottom: 0; inset-inline-start: 0; border-radius: 4px; display: block; }
.qp .table-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 13px; color: var(--text-3); gap: 12px; flex-wrap: wrap; }
.qp .title small.contact-person { color: var(--accent); font-weight: 600; }
.qp .ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.qp .cc-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.qp .cc-back:hover { color: var(--text); }
.qp .cc-back .ic { width: 16px; height: 16px; }
html[dir="ltr"] .qp .cc-back .ic { transform: scaleX(-1); }
.qp .cc-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.qp .cc-av { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.qp .cc-av.img { object-fit: cover; background: var(--surface); }
.qp .cc-id h1 { min-width: 0; }
.qp .ph-sub a { color: var(--text-2); }
.qp .ph-sub a:hover { color: var(--accent); }
.qp .cc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.qp .cc-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 16px; }
.qp .cc-stat span { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-3); }
.qp .cc-stat b { display: block; margin-top: 8px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.qp .cc-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.qp .cc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; min-width: 0; overflow: hidden; }
.qp .cc-card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; }
.qp .cc-card > header h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.qp .cc-card > header span { font-size: 12.5px; color: var(--text-4); }
.qp a.cc-deal { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); text-decoration: none; color: inherit; }
.qp a.cc-deal:hover { background: var(--surface-2); color: inherit; }
.qp .cc-deal .mark { width: 8px; height: 8px; border-radius: 2px; margin-top: 6px; flex: none; }
.qp .cc-deal .grow { flex: 1; min-width: 0; }
.qp .cc-deal b { display: block; font-size: 14.5px; font-weight: 650; color: var(--text); }
.qp .cc-deal .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.qp .cc-deal .amt { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; }
.qp .cc-empty { padding: 28px 18px 32px; color: var(--text-4); font-size: 13.5px; }
.qp .tl { padding: 4px 18px 18px; }
.qp .tl-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 16px; }
.qp .tl-item:last-child { padding-bottom: 0; }
.qp .tl-item::before { content: ""; position: absolute; inset-inline-start: 8px; top: 16px; bottom: 0; width: 1px; background: var(--border); }
.qp .tl-item:last-child::before { display: none; }
.qp .tl-dot { width: 9px; height: 9px; border-radius: 99px; margin-top: 4px; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.qp .tl-k { font-size: 12.5px; font-weight: 650; color: var(--text); }
.qp .tl-t { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
a.qp .tl-t, .qp a.tl-t { color: var(--text-2); }
.qp a.tl-t:hover { color: var(--accent); }
.qp .tl-when { margin-top: 3px; font-size: 12px; color: var(--text-4); }
.qp .row-end { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.qp .row-acts { display: flex; align-items: center; gap: 2px; opacity: 0; }
.qp tr.row:hover .row-acts, .qp tr.row:focus-within .row-acts { opacity: 1; }
.qp .row-acts form { display: flex; }
.qp .more.danger:hover { color: var(--danger, #c0123c); }
.qp .col-pop { position: relative; }
.qp .col-menu { position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline-end: 0; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 40px rgba(26, 27, 37, .12); }
.qp .col-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: grab; font-size: 13px; font-weight: 600; color: var(--text); }
.qp .col-item:hover { background: var(--surface-2); }
.qp .col-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.qp .col-item .grip { width: 14px; height: 14px; color: var(--text-4); }
.q-float-tip { position: fixed; z-index: 80; transform: translate(-50%, calc(-100% - 6px)); background: #0F172A; color: #fff; font-size: 12px; font-weight: 600; line-height: 1; padding: 0.35rem 0.55rem; border-radius: 0.5rem; white-space: nowrap; opacity: 0; pointer-events: none; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18); }
.q-float-tip.on { opacity: 1; }
.q-float-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #0F172A; }
html.dark .q-float-tip { background: #334155; }
html.dark .q-float-tip::after { border-top-color: #334155; }
[x-cloak] { display: none !important; }
.qp .sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1100px) {
  .qp .summary { grid-template-columns: 1fr 1fr; }
  .qp .detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .qp .content { padding-inline: 16px; }
  .qp .summary { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .qp .table-x,
  .qp .col-pop { display: none !important; }
  .qp .table-wrap { overflow: visible; border-top: 0; }
  .qp .table-wrap table { display: block; min-width: 0; width: 100%; }
  .qp .table-wrap thead { display: none; }
  .qp .table-wrap tbody { display: flex; flex-direction: column; gap: 10px; }
  .qp .table-wrap tr.row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
  }
  .qp .table-wrap tr.row td,
  .qp .table-wrap tr.row td[hidden] {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding: 0;
    border: 0;
    white-space: normal;
    background: transparent !important;
  }
  .qp .table-wrap tr.row td[data-span] { grid-column: 1 / -1; }
  .qp .table-wrap tr.row td[data-card="check"] {
    position: absolute;
    top: 16px;
    inset-inline-start: 14px;
    z-index: 1;
    width: 16px !important;
  }
  .qp table[data-proposal-table] tr.row td[data-col="title"] {
    grid-column: 1;
    grid-row: 1;
    padding-inline-start: 26px;
  }
  .qp table[data-proposal-table] tr.row td[data-col="amount"] {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    text-align: end;
    font-size: 15px;
  }
  .qp .table-wrap td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-4);
  }
  .qp .table-wrap tr.row .title,
  .qp .table-wrap tr.row .title .name,
  .qp .table-wrap tr.row .title a.name,
  .qp .table-wrap tr.row .title small { white-space: normal; }
  .qp .row-acts { opacity: 1; }
  .qp .row-end { justify-content: flex-start; }
  .qp .table-wrap tr.row td[data-col-end] {
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }
  .qp .eng { min-width: 0; }
  .qp .table-wrap tr.detail {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
  }
  .qp .table-wrap tr.detail td {
    display: block;
    width: auto;
    max-width: none;
    white-space: normal;
    border: 0;
  }
  .qp .table-wrap tr.detail td:empty { display: none; }
  .qp .table-wrap tr:not(.row):not(.detail) { display: block; }
  .qp .table-wrap tr:not(.row):not(.detail) td {
    display: block;
    border: 0;
    white-space: normal;
    text-align: center;
  }
  table.q-stack { display: block; min-width: 0; width: 100%; }
  table.q-stack thead { display: none; }
  table.q-stack tbody { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
  table.q-stack tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 14px;
    border: 1px solid #ebeef1;
    border-radius: 14px;
    background: #fff;
  }
  table.q-stack td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    min-width: 0;
  }
  table.q-stack td[data-span] { grid-column: 1 / -1; }
  table.q-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #8792a2;
  }
  html.dark table.q-stack tr { background: #0f172a; border-color: #1e293b; }
}

/* Settings — quto-settings.html, mapped onto html.dark */
.qs {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f6f8fa; --surface-3: #eef1f5;
  --border: #ebeef1; --border-strong: #d5dbe1;
  --text: #1a1b25; --text-2: #414552; --text-3: #687385; --text-4: #8792a2;
  --accent: #635bff; --accent-hover: #5851ea; --accent-soft: #f2f1ff; --accent-2: #9a5bff;
  --c-draft: #a3acba; --c-sent: #0055bc; --c-open: #635bff; --c-signed: #09825d; --c-warn: #c84801;
  --c-pink: #c4317a; --c-teal: #0e7c86;
  --badge-gray-bg: #ebeef1; --badge-gray-fg: #545969;
  --badge-purple-bg: #f2f1ff; --badge-purple-fg: #4b44d6;
  --danger: #c0123c; --danger-soft: #fde8ec;
  --glow: rgba(99, 91, 255, .12);
  --shadow: 0 1px 2px rgba(64, 68, 82, .06);
  --shadow-lg: 0 12px 40px rgba(26, 27, 37, .12), 0 1px 3px rgba(26, 27, 37, .06);
  color: var(--text-2); font-size: 14px; line-height: 1.5;
}
html.dark .qs {
  --bg: #0e1117; --surface: #141922; --surface-2: #1a202b; --surface-3: #212836;
  --border: #252c38; --border-strong: #333c4b;
  --text: #f1f3f7; --text-2: #c9cfd9; --text-3: #97a1b1; --text-4: #6f7a8c;
  --accent: #8a84ff; --accent-hover: #9b96ff; --accent-soft: #232245; --accent-2: #b48aff;
  --c-draft: #5d6676; --c-sent: #4c9bff; --c-open: #8a84ff; --c-signed: #33c48d; --c-warn: #ff8a4c;
  --c-pink: #f06aaa; --c-teal: #3cc2cc;
  --badge-gray-bg: #252c38; --badge-gray-fg: #b5bdca;
  --badge-purple-bg: #232245; --badge-purple-fg: #b3afff;
  --danger: #ff6b8a; --danger-soft: #3a1620;
  --glow: rgba(138, 132, 255, .14);
  --shadow: none;
  --shadow-lg: 0 14px 50px rgba(0, 0, 0, .55);
}
.qs a { color: var(--accent); text-decoration: none; }
.qs button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.qs .ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qs .num, .qs .ltr { direction: ltr; unicode-bidi: isolate; }
.qs .sq { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.qs .content { padding: 8px 32px 120px; max-width: 1180px; width: 100%; }
.qs .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 22px; flex-wrap: wrap; }
.qs h1 { font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.qs .page-sub { color: var(--text-3); margin-top: 4px; }
.qs .org-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-weight: 600; color: var(--text); }
html[dir="rtl"] .qs .org-pill { padding: 0 12px 0 6px; }
.qs .org-pill .lg { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.qs .org-pill small { font-weight: 500; color: var(--text-4); }
.qs .layout { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: start; }
.qs .subnav { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; }
.qs .subnav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--text-3); font-weight: 500; }
.qs .subnav a:hover { color: var(--text); background: var(--surface-2); }
.qs .subnav a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.qs .subnav a .sq { width: 8px; height: 8px; border-radius: 2px; }
.qs .subnav hr { border: 0; border-top: 1px solid var(--border); margin: 10px 6px; }
.qs .sec { scroll-margin-top: 16px; margin-bottom: 28px; }
.qs .sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qs .sec-head .tile { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.qs .sec-head .tile .ic { width: 15px; height: 15px; stroke-width: 2; }
.qs .sec-head h2 { font-size: 18px; font-weight: 700; color: var(--text); }
.qs .card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.qs .row { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 28px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.qs .row:last-child { border-bottom: 0; }
.qs .row .lbl b { display: block; color: var(--text); font-weight: 600; font-size: 14px; }
.qs .row .lbl p { color: var(--text-3); font-size: 13px; margin-top: 3px; line-height: 1.55; }
.qs .ctrl { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.qs .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qs .field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.qs .inp, .qs .sel, .qs .ta, .qs select, .qs textarea.ta {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text); outline: none; box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.qs .ta, .qs textarea.ta { height: auto; min-height: 130px; padding: 10px 12px; line-height: 1.7; resize: vertical; }
.qs .inp:focus, .qs .sel:focus, .qs .ta:focus, .qs select:focus, .qs textarea.ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.qs .inp::placeholder, .qs .ta::placeholder { color: var(--text-4); }
.qs .sel, .qs select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238792a2' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-inline-end: 34px; padding-inline-start: 12px;
}
html[dir="rtl"] .qs .sel, html[dir="rtl"] .qs select { background-position: left 12px center; padding-inline-end: 12px; padding-inline-start: 34px; }
.qs .affix { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; direction: ltr; background: var(--surface); }
.qs .affix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.qs .affix span { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); color: var(--text-3); font-size: 13px; white-space: nowrap; }
.qs .affix input { border: 0; outline: none; background: none; height: 38px; padding: 0 10px; flex: 1; min-width: 0; color: var(--text); box-shadow: none; }
.qs .hint { font-size: 12.5px; color: var(--text-4); }
.qs .hint.err { color: var(--danger); }
.qs .inp.locked, .qs input.locked { background: var(--surface-2); color: var(--text-3); }
.qs .counter { font-size: 12px; color: var(--text-4); text-align: left; }
.qs .btn, .qs a.btn, .qs button.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; font-size: 13px;
  color: var(--text-2); box-shadow: var(--shadow); white-space: nowrap;
}
.qs a.btn:hover, .qs button.btn:hover { background: var(--surface-2); color: var(--text-2); }
.qs .btn .ic { width: 14px; height: 14px; }
.qs .btn.primary, .qs button.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.qs .btn.primary:hover, .qs button.btn.primary:hover { background: var(--accent-hover); color: #fff; }
.qs .btn.ghost, .qs button.btn.ghost { border-color: transparent; box-shadow: none; color: var(--text-3); background: transparent; }
.qs .btn.ghost:hover, .qs button.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.qs .btn.danger, .qs button.btn.danger { color: var(--danger); }
.qs .btn.danger:hover, .qs button.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.qs .btn:disabled { opacity: .5; cursor: default; }
.qs .upload { display: flex; align-items: center; gap: 16px; }
.qs .pic { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #7a73ff, #3b35c9); color: #fff; display: grid; place-items: center; font-size: 24px; font-weight: 700; flex: none; overflow: hidden; position: relative; }
.qs .pic img, .qs .logo-box img { width: 100%; height: 100%; object-fit: contain; }
.qs .pic img { object-fit: cover; position: absolute; inset: 0; }
.qs .logo-box { width: 150px; height: 64px; border-radius: 10px; border: 1px dashed var(--border-strong); background: var(--surface-2); display: grid; place-items: center; color: var(--text); font-weight: 700; font-size: 15px; flex: none; overflow: hidden; padding: 8px; position: relative; }
.qs .upload .acts { display: flex; flex-direction: column; gap: 6px; }
.qs .upload .acts > div { display: flex; gap: 6px; flex-wrap: wrap; }
.qs .drop { position: relative; }
.qs .drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.qs .switch { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.qs .switch input { position: absolute; opacity: 0; pointer-events: none; }
.qs .switch .tr { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; transition: background .2s; margin-top: 1px; }
.qs .switch .tr::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s; }
.qs .switch input:checked + .tr { background: var(--accent); }
.qs .switch input:checked + .tr::after { transform: translateX(16px); }
html[dir="rtl"] .qs .switch input:checked + .tr::after { transform: translateX(-16px); }
.qs .switch input:focus-visible + .tr { box-shadow: 0 0 0 3px var(--glow); }
.qs .switch b { display: block; color: var(--text); font-weight: 600; }
.qs .switch span.d { display: block; font-size: 12.5px; color: var(--text-3); font-weight: 400; }
.qs .linkprev { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; }
.qs .linkprev .ic { color: var(--text-4); }
.qs .linkprev code, .qs .linkprev .url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); direction: ltr; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; padding: 0; height: auto; }
.qs .biz-cur { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.qs .biz-cur .t { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.qs .biz-cur .t .ic { width: 19px; height: 19px; stroke-width: 2; }
.qs .biz-cur b { display: block; color: var(--text); font-size: 15px; }
.qs .biz-cur span { font-size: 13px; color: var(--text-3); }
.qs .biz-cur .btn { margin-inline-start: auto; }
.qs .seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; flex-wrap: wrap; }
.qs .seg button { height: 32px; padding: 0 14px; border-radius: 7px; font-weight: 500; color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; }
.qs .seg button:hover { color: var(--text); }
.qs .seg button.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.qs .seg button .fl { font-size: 11px; font-weight: 700; color: var(--text-4); letter-spacing: .03em; }
.qs .seg button.on .fl { color: var(--accent); }
.qs .radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qs .rc { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; background: var(--surface); }
.qs .rc:hover { border-color: var(--text-4); }
.qs .rc input { position: absolute; opacity: 0; }
.qs .rc .dot { width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid var(--border-strong); flex: none; margin-top: 2px; display: grid; place-items: center; }
.qs .rc input:checked ~ .dot { border-color: var(--accent); }
.qs .rc input:checked ~ .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.qs .rc:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.qs .rc b { display: block; color: var(--text); font-weight: 600; font-size: 13.5px; }
.qs .rc span { font-size: 12.5px; color: var(--text-3); }
.qs .vat-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.qs .vat-row .field { width: 140px; }
.qs .check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-2); }
.qs .check input { width: 16px; height: 16px; accent-color: var(--accent); }
.qs .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 5px; background: var(--badge-gray-bg); color: var(--badge-gray-fg); }
.qs .badge.p { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }
.qs .items { display: flex; flex-direction: column; gap: 8px; }
.qs .item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.qs .item .th { width: 44px; height: 30px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; font-size: 11px; font-weight: 700; color: var(--text-3); flex: none; }
.qs .item .meta { flex: 1; min-width: 0; }
.qs .item .meta b { display: block; color: var(--text); font-weight: 600; font-size: 13.5px; }
.qs .item .meta span { display: block; font-size: 12.5px; color: var(--text-4); }
.qs .item .q { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.qs .item .rm { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--text-4); flex: none; }
.qs .item .rm:hover { background: var(--danger-soft); color: var(--danger); }
.qs .item .stack { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.qs .empty { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--text-3); font-size: 13px; }
.qs .empty .ic { width: 20px; height: 20px; color: var(--text-4); }
.qs .adder { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.qs .adder .acts { display: flex; justify-content: flex-start; gap: 8px; }
.qs .member { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.qs .member .avatar { margin: 0; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #7a73ff, #3b35c9); color: #fff; font-weight: 600; font-size: 13px; display: grid; place-items: center; flex: none; overflow: hidden; }
.qs .member .avatar img { width: 100%; height: 100%; object-fit: cover; }
.qs .member .meta { flex: 1; min-width: 0; }
.qs .member .meta b { display: block; color: var(--text); }
.qs .member .meta span { font-size: 12.5px; color: var(--text-4); }
.qs .invite { display: grid; grid-template-columns: 1fr 150px auto; gap: 10px; align-items: end; }
.qs .savebar {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px;
  border-radius: 14px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg);
  z-index: 50; transition: transform .3s cubic-bezier(.2, .8, .2, 1); min-width: 420px; pointer-events: none;
}
.qs .savebar.show { transform: translate(-50%, 0); pointer-events: auto; }
.qs .savebar .msg { flex: 1; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.qs .savebar .msg i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-warn); flex: none; }
.qs .savebar .btn { height: 32px; box-shadow: none; }
.qs .savebar .btn.ghost { color: var(--bg); opacity: .75; }
.qs .savebar .btn.ghost:hover { background: transparent; opacity: 1; color: var(--bg); }
.qs .savebar .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.qs .modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 12, 20, .55); backdrop-filter: blur(3px); }
.qs .modal.show { display: flex; }
.qs .dialog { width: min(860px, 100%); max-height: min(720px, 92vh); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.qs .dlg-head { padding: 18px 20px 12px; display: flex; align-items: center; gap: 12px; }
.qs .dlg-head h3 { font-size: 17px; color: var(--text); font-weight: 700; }
.qs .dlg-head p { font-size: 13px; color: var(--text-3); }
.qs .dlg-head .x { margin-inline-start: auto; }
.qs .dlg-tools { padding: 0 20px 12px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--border); }
.qs .dlg-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.qs .dlg-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.qs .dlg-search input { border: 0; outline: none; background: none; flex: 1; color: var(--text); height: 38px; box-shadow: none; }
.qs .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.qs .chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 12.5px; font-weight: 500; color: var(--text-3); background: var(--surface); }
.qs .chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.qs .chip .sq { width: 8px; height: 8px; border-radius: 2px; }
.qs .dlg-body { overflow-y: auto; padding: 14px 20px 20px; }
.qs .grp { font-size: 12px; font-weight: 600; color: var(--text-4); margin: 10px 2px 8px; display: flex; align-items: center; gap: 8px; }
.qs .biz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qs .biz { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; text-align: start; background: var(--surface); width: 100%; }
.qs .biz:hover { border-color: var(--border-strong); background: var(--surface-2); }
.qs .biz.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.qs .biz .sq { margin-top: 5px; }
.qs .biz b { display: block; color: var(--text); font-weight: 600; font-size: 13.5px; }
.qs .biz span { display: block; font-size: 12px; color: var(--text-3); line-height: 1.45; }
.qs .dlg-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; background: var(--surface-2); }
.qs .dlg-foot .sel-name { flex: 1; color: var(--text-3); font-size: 13px; }
.qs .dlg-foot .sel-name b { color: var(--text); }
.qs .no-res { padding: 30px; text-align: center; color: var(--text-4); }
.qs .icon-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.qs .icon-btn:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 1100px) {
  .qs .layout { grid-template-columns: 1fr; }
  .qs .subnav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .qs .subnav hr { display: none; }
  .qs .subnav a { white-space: nowrap; }
}
@media (max-width: 820px) {
  .qs .content { padding-inline: 16px; }
  .qs .row { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .qs .grid2, .qs .radio-cards { grid-template-columns: 1fr; }
  .qs .biz-grid { grid-template-columns: 1fr 1fr; }
  .qs .invite { grid-template-columns: 1fr; }
  .qs .savebar { min-width: 0; width: calc(100% - 24px); }
}
