/* Goku CRM V4.6 · Hợp đồng (chiết khấu, refund, lịch thanh toán), hồ sơ thanh toán, mục tiêu & KPI */
.g46-drawer{width:min(980px,100vw)!important}
.g32-drawer > *{flex-shrink:0}
.g32-drawer > .tblwrap{min-height:auto}
.g46-drawer .g32-grid3{gap:10px 14px}
.g46-drawer .g32-label.span2{grid-column:span 2}
.g46-drawer .g32-label{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.g46-drawer .g32-label .field{white-space:normal}
.g46-ro{background:#f6f8fb!important;color:#0f1b2d!important;font-weight:700}
.g46-money .g32-label:nth-child(3) .field,.g46-money .g32-label:nth-child(5) .field{border-color:#cfe0ff}
.g46-schedhead{margin-top:18px}.g46-schedhead .field{width:auto}
.g46-sched .field{min-width:0;width:100%}
.g46-sched td{vertical-align:middle}
.g46-hide{display:none!important}
.g46-sub{font-weight:500;color:#6b7686;font-size:12.5px}
.g46-comset{margin-bottom:8px}
.g46-comcard{border:1px solid #e3e9f1;border-radius:12px;padding:10px 12px;margin:8px 0;background:#fbfcfe}
.g46-comhead{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:8px}
.g46-pill{font-size:11.5px;font-weight:700;border-radius:999px;padding:2px 9px;background:#eef1f5;color:#3a4657;white-space:nowrap}
.g46-pill.t-new{background:#ffe9e3;color:#c2410c}.g46-pill.t-renewal{background:#fff4d6;color:#8a5a00}.g46-pill.t-cross{background:#f1ebff;color:#6b3fd1}
.g46-pill.tier0{background:#fdecec;color:#b42318}.g46-pill.tier1{background:#e5f0ff;color:#1f5fc9}.g46-pill.tier2{background:#e3f6e9;color:#15803d}
.g46-cgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.g46-cl{background:#fff;border:1px solid #edf1f6;border-radius:10px;padding:7px 10px;min-width:0}
.g46-cl span{display:block;font-size:11.5px;color:#6b7686;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g46-cl b{font-size:15px;white-space:nowrap}
.g46-note{margin-top:14px;display:block}
/* phiếu thu */
.g46-step{font-size:11.5px;font-weight:700;border-radius:6px;padding:2px 8px;white-space:nowrap;background:#eef1f5;color:#4a5566}
.g46-step.s0{background:#fff4d6;color:#8a5a00}.g46-step.s1{background:#e5f0ff;color:#1f5fc9}.g46-step.s2{background:#f1ebff;color:#6b3fd1}.g46-step.s3{background:#e6f6f4;color:#0f766e}.g46-step.ok{background:#e3f6e9;color:#15803d}.g46-step.x{background:#fdecec;color:#b42318}.g46-step.late{background:#fdecec;color:#b42318}
.g46-stepper{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:6px;list-style:none;padding:0;margin:12px 0}
.g46-stepper li{position:relative;display:flex;flex-direction:column;gap:2px;padding:8px 10px 8px 40px;border:1px solid #e3e9f1;border-radius:12px;background:#fff;min-height:48px}
.g46-stepper li span{position:absolute;left:10px;top:10px;width:22px;height:22px;border-radius:50%;background:#eef1f5;color:#6b7686;font-weight:800;font-size:12px;display:flex;align-items:center;justify-content:center}
.g46-stepper li b{font-size:13px}.g46-stepper li small{font-size:11.5px;color:#6b7686}
.g46-stepper li.done{border-color:#bfe5cc;background:#f6fcf8}.g46-stepper li.done span{background:#15803d;color:#fff}
.g46-stepper li.cur{border-color:#1f6fe5;box-shadow:0 0 0 2px #cfe0ff}.g46-stepper li.cur span{background:#1f6fe5;color:#fff}
.g46-sec{border:1px solid #e9eef5;border-radius:12px;padding:10px 12px;margin:10px 0}
.g46-sec h4{margin:0 0 8px;font-size:14px}
.g46-sec.cur{border-color:#9cc0f5;background:#f9fbff}.g46-sec.done{background:#fbfdfb}.g46-sec.todo{opacity:.75}
.g46-quick{display:inline-flex;gap:4px;flex-wrap:wrap;align-items:center;font-size:12px;color:#6b7686;margin-top:4px}.g46-quick .ghost{padding:3px 8px;font-size:12px}
.g46-files{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0}
.g46-file{display:inline-flex;gap:4px;align-items:center;background:#eef4ff;border-radius:8px;padding:3px 8px;font-size:12.5px}.g46-file a{color:#1f5fc9;text-decoration:none;font-weight:600}
.g46-upl{cursor:pointer;display:inline-flex;align-items:center;padding:6px 10px;border-radius:10px;font-size:12.5px}
.g46-more{margin:10px 0}.g46-more summary{cursor:pointer;font-weight:700;color:#1f5fc9;font-size:13px}
.g46-log{list-style:none;padding:0;margin:8px 0;display:grid;gap:4px;font-size:13px}.g46-log small{color:#6b7686}
.g46-invbox{border:1px dashed #cfd8e3;border-radius:12px;padding:8px 12px}.g46-invbox legend{font-weight:700;font-size:13px;padding:0 6px}
.g46-chk{display:flex!important;gap:8px;align-items:center;flex-direction:row!important}
/* mục tiêu & KPI (V4.6.1: giao diện CRM, biểu đồ / bảng) */
.g46-plan{margin-top:18px}
.g46-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.g46-head h3{margin:3px 0 0}
.g46-year{width:auto}
.g46-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:14px 0}
.g46-tile{border:1px solid #e6ebf2;border-radius:14px;padding:12px 14px;background:#fff;display:flex;flex-direction:column;gap:3px;min-width:0}
.g46-tile.hl{border-color:#cfe0ff;background:#f7faff}
.g46-tile>span{font-size:12px;color:#6b7686;font-weight:600}.g46-tile>b{font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#0f1b2d}.g46-tile>small{font-size:12px;color:#4a5566}
.g46-rates{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.g46-rates span{font-size:12px;background:#f3f5f8;border-radius:6px;padding:1px 7px;color:#3a4657}
.g46-bar{height:6px;border-radius:99px;background:#eef1f5;overflow:hidden;margin-top:6px}.g46-bar span{display:block;height:100%;border-radius:99px;background:#d64545}.g46-bar span.mid{background:#2a78d6}.g46-bar span.ok{background:#15803d}
.g46-pct{font-size:11.5px;font-weight:800;border-radius:5px;padding:0 5px;white-space:nowrap}.g46-pct.p1{background:#fdecec;color:#b42318}.g46-pct.p2{background:#e5f0ff;color:#1f5fc9}.g46-pct.p3{background:#e3f6e9;color:#15803d}
.g46-tabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:4px 0 12px}
.g46-sp{flex:1}
.g46-seg{display:inline-flex;gap:2px;background:#f1f4f8;border-radius:12px;padding:3px;flex-wrap:wrap}
.g46-seg button{border:0;background:transparent;border-radius:9px;padding:7px 12px;font-weight:700;font-size:13px;color:#4a5566;cursor:pointer;white-space:nowrap}
.g46-seg button.on{background:#fff;color:#0f1b2d;box-shadow:0 1px 2px rgba(15,27,45,.12)}
.g46-seg button:hover:not(.on){color:#0f1b2d}
.g46-toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:0 0 10px}
.g46-in{width:auto!important;padding:6px 8px!important;font-size:13px!important;height:auto!important}
.g46-quarters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0 0 12px}
.g46-q{border:1px solid #eef1f5;border-radius:12px;padding:8px 12px;background:#fbfcfe;display:flex;flex-direction:column;gap:1px}.g46-q.cur{border-color:#cfe0ff;background:#f7faff}
.g46-q span{font-size:11.5px;font-weight:700;color:#6b7686;text-transform:uppercase}.g46-q b{font-size:16px}.g46-q small{font-size:12px;color:#4a5566}
/* biểu đồ */
.g46-chart{width:100%;overflow:hidden}.g46-chart svg{width:100%;height:auto;display:block}
.g46-grid{stroke:#eef1f5;stroke-width:1}
.g46-ax{font-size:9.5px;fill:#7a8696}.g46-ax.cur{fill:#0f1b2d;font-weight:700}
.g46-lbl{font-size:10px;font-weight:700;fill:#0f1b2d}
.g46-col{fill:#2a78d6}.g46-col.met{fill:#1a63bd}
.g46-tgl{stroke:#0f1b2d;stroke-width:2;stroke-linecap:round}
.g46-chl{stroke:#b9c2ce;stroke-width:2;stroke-linecap:round}
.g46-curband{fill:#fffbea}
.g46-hit{fill:transparent;cursor:default}.g46-hit:hover{fill:rgba(42,120,214,.06)}
.g46-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:#4a5566;margin:4px 0 6px}.g46-legend span{display:inline-flex;align-items:center;gap:6px}
.sw{display:inline-block;width:12px;height:12px;border-radius:3px}.sw.col{background:#2a78d6}.sw.tg{height:2px;width:14px;border-radius:2px;background:#0f1b2d}.sw.ch{height:2px;width:14px;border-radius:2px;background:#b9c2ce}.sw.trk{background:#e3e9f1}.sw.mk{width:2px;height:12px;background:#7a8696;border-radius:1px}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;vertical-align:0}
.g46-tip{position:fixed;z-index:9999;pointer-events:none;background:#0f1b2d;color:#fff;font-size:12.5px;line-height:1.5;padding:8px 10px;border-radius:10px;box-shadow:0 6px 20px rgba(15,27,45,.25);display:none;max-width:260px}.g46-tip b{color:#fff}
.g46-hbars{display:grid;gap:8px;margin:4px 0 6px}
.g46-hrow{display:grid;grid-template-columns:170px minmax(0,1fr) 150px 120px;gap:12px;align-items:center;padding:6px 8px;border-radius:10px}.g46-hrow:hover{background:#f7faff}
.g46-hname{display:flex;flex-direction:column;min-width:0}.g46-hname b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.g46-hname small{font-size:11.5px;color:#7a8696}
.g46-htrack{position:relative;height:20px}
.g46-htrack span{position:absolute;left:0;top:2px;height:16px;border-radius:0 4px 4px 0}.g46-htrack span.tg{background:#e3e9f1}.g46-htrack span.ac{background:#2a78d6}.g46-htrack span.ac.met{background:#1a63bd}
.g46-htrack i{position:absolute;top:0;width:2px;height:20px;background:#9aa5b4;border-radius:1px}.g46-htrack i.full{background:#0f1b2d}
.g46-hval{text-align:right;white-space:nowrap}.g46-hval small{color:#7a8696;margin-left:4px}
.g46-hpct{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.g46-hpct small{font-size:11px;color:#6b7686;white-space:nowrap}
/* bảng dọc */
.g46-mt td,.g46-mt th{white-space:nowrap}.g46-mt tr.cur td{background:#fffbea}.g46-mt tr.tot td{background:#f6f8fb;border-top:1px solid #e3e9f1}
.g46-h4{margin:16px 0 8px}
.g46-brands{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.g46-brand{border:1px solid #eef1f5;border-radius:12px;padding:10px 12px}.g46-brand ul{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:4px;font-size:13px}.g46-brand li{display:flex;justify-content:space-between;gap:8px}.g46-brand small{color:#7a8696}
/* thiết lập */
.g46-setup{display:grid;gap:12px}
.g46-card{border:1px solid #e6ebf2;border-radius:14px;padding:14px 16px;background:#fff}
.g46-ch{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}.g46-ch small{color:#6b7686;font-size:12.5px}
.g46-row{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin-bottom:8px}.g46-row .g32-label{flex:1 1 160px;margin:0}.g46-row.svc{padding-left:18px;border-left:2px solid #eef1f5}
.g46-rowbtn{display:flex;gap:6px;align-items:center;padding-bottom:2px}
.g46-pctin{position:relative;display:block}.g46-pctin input{padding-right:26px}.g46-pctin i{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-style:normal;color:#7a8696;font-size:13px}
.g46-months{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.g46-mq{border:1px solid #eef1f5;border-radius:12px;padding:10px;display:grid;gap:6px;background:#fbfcfe}.g46-mq>span{font-size:12px;color:#6b7686;font-weight:700}
.g46-mq label{display:grid;gap:3px;font-size:12px;color:#4a5566;font-weight:600}
.g46-sumline{margin:10px 0 0;font-size:13px}
.g46-bed{border:1px dashed #dde3ea;border-radius:12px;padding:10px 12px;margin-bottom:10px}
.g46-ptgt{font-size:12px;color:#1f5fc9;font-weight:700;white-space:nowrap}
.g46-savebar{position:sticky;bottom:0;display:flex;justify-content:space-between;align-items:center;gap:10px;background:rgba(255,255,255,.96);border:1px solid #e6ebf2;border-radius:14px;padding:10px 14px}
.g46-empty{border:1px dashed #cfd8e3;border-radius:12px;padding:18px;text-align:center;margin:12px 0;color:#3a4657}.g46-empty p{margin:6px 0 10px;color:#6b7686}
.g46-pol{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:14px}
.g46-poltbl th.t-new{color:#c2410c}.g46-poltbl th.t-renewal{color:#b77900}.g46-poltbl th.t-cross{color:#6b3fd1}
.g46-poltbl td,.g46-poltbl th{padding:8px 10px}
.g46-polnote{font-size:13px;background:#fbfcfe;border:1px solid #eef1f5;border-radius:12px;padding:10px 14px}.g46-polnote ul{padding-left:18px;margin:6px 0;line-height:1.55}
@media (max-width:900px){.g46-months,.g46-quarters{grid-template-columns:1fr 1fr}.g46-hrow{grid-template-columns:1fr;gap:4px}.g46-hval{text-align:left}.g46-pol{grid-template-columns:1fr}}
.g46-own .g46-tiles{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}
.g46-mktpanel h3{margin:0 0 4px}
@media (max-width:900px){.g46-cgrid{grid-template-columns:1fr 1fr}.g46-pol{grid-template-columns:1fr}.g46-drawer .g32-label.span2{grid-column:auto}}
.g46-sched td:first-child{min-width:180px}.g46-sched td:nth-child(5){min-width:170px}
.g46-note textarea{white-space:normal}
