:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#1d2926;background:#f6f7f4;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #8dc9b5;outline-offset:2px}[hidden]{display:none!important}
.app-shell{display:flex;min-height:100vh}.sidebar{width:248px;flex:none;background:#17352f;color:#e9f3ed;display:flex;flex-direction:column;justify-content:space-between;padding:29px 18px 20px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;padding:0 13px}.brand strong{display:block;font-size:17px;letter-spacing:-.02em}.brand small{display:block;color:#a8c0b5;font-size:11px;margin-top:3px}.brand-mark{width:35px;height:35px;border-radius:11px;background:#d9eddf;display:flex;align-items:flex-end;justify-content:center;gap:3px;padding-bottom:8px;flex:none}.brand-mark span{width:4px;border-radius:3px;background:#27745c}.brand-mark span:nth-child(1){height:9px}.brand-mark span:nth-child(2){height:17px}.brand-mark span:nth-child(3){height:12px}.nav-label{font-size:10px;font-weight:750;letter-spacing:.16em;color:#8eaca0;margin:58px 13px 15px}.nav{display:grid;gap:5px}.nav-item{border:0;background:transparent;color:#c5d8cf;min-height:45px;padding:0 14px;border-radius:10px;text-align:left;display:flex;align-items:center;gap:13px;font-size:13px;font-weight:580;width:100%;transition:background .15s,color .15s}.nav-item:hover{background:#25483e;color:white}.nav-item.active{background:#d9ede0;color:#173f32;font-weight:750}.nav-icon{font-size:18px;width:21px;text-align:center;font-weight:400}.nav-count{margin-left:auto;background:#e6a573;color:#183a30;border-radius:20px;min-width:20px;height:20px;text-align:center;line-height:20px;font-size:11px;font-weight:700}.sidebar-bottom{padding:0 10px}.sidebar-status{display:flex;align-items:center;gap:9px;border-top:1px solid #315148;padding-top:22px;color:#b9d0c4;font-size:11px}.online-dot{width:7px;height:7px;border-radius:50%;background:#8ed5a0;box-shadow:0 0 0 4px #315b47}.logout-button{width:100%;border:0;color:#d7e6dd;background:transparent;text-align:left;padding:22px 0 2px;font-size:12px;font-weight:650;display:flex;justify-content:space-between}.logout-button:hover{color:white}
.workspace{min-width:0;flex:1}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 48px;border-bottom:1px solid #e7ebe5;background:#fbfcfa}.topbar-left,.topbar-right{display:flex;align-items:center;gap:13px;font-size:12px;color:#687b72}.topbar-label{font-size:10px;font-weight:800;letter-spacing:.12em;color:#879990}.topbar-separator{color:#b3c0b8}#topbar-current{font-weight:700;color:#2c4439}.topbar-right{font-size:11px}.icon-button{border:1px solid #dee6df;background:#fff;border-radius:9px;width:32px;height:32px;display:grid;place-items:center;color:#315a48;font-size:19px;line-height:1}.icon-button:hover{background:#eaf2ec}main{max-width:1510px;margin:auto;padding:39px 48px 72px}.view{display:none}.view.active{display:block}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:30px}.eyebrow{font-size:10px;letter-spacing:.15em;color:#71947e;font-weight:800;margin-bottom:12px}.page-heading h1{font-size:32px;letter-spacing:-.045em;line-height:1.14;margin:0;color:#18362d;font-weight:770}.page-heading p{color:#76867c;font-size:13px;margin:10px 0 0}.primary-button{border:0;background:#1d6349;color:white;border-radius:9px;padding:12px 18px;font-size:12px;font-weight:750;min-height:40px;white-space:nowrap;box-shadow:0 4px 10px #1d634917}.primary-button:hover{background:#17533d}.primary-button span{margin-left:8px}.metrics-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:20px}.metric-card{background:white;border:1px solid #e7ebe6;border-radius:14px;padding:22px 22px 20px;min-height:140px;box-shadow:0 2px 9px #17352f05}.metric-card.accent{background:#e6f3e9;border-color:#d5ebda}.metric-label{font-size:11px;color:#6d7f73;font-weight:650}.metric-value{font-size:27px;line-height:1.2;letter-spacing:-.045em;margin:20px 0 6px;font-weight:780;color:#1d3a2c;white-space:nowrap}.metric-hint{font-size:10px;color:#8b9a91}.overview-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.9fr);gap:18px}.panel{background:#fff;border:1px solid #e6ebe5;border-radius:14px;box-shadow:0 2px 9px #17352f05}.panel-heading{padding:23px 24px 18px;display:flex;justify-content:space-between;align-items:center;gap:12px}.panel-heading h2,.qr-form-panel h2{font-size:16px;letter-spacing:-.02em;margin:0;color:#1e3b30}.panel-heading p,.qr-form-panel>p{font-size:11px;color:#8c9c91;margin:6px 0 0}.link-button{border:0;background:transparent;color:#247153;font-size:11px;font-weight:750;white-space:nowrap}.link-button:hover{text-decoration:underline}.link-button span{margin-left:4px}.recent-list{padding:0 24px 12px}.recent-row{display:flex;align-items:center;gap:13px;width:100%;padding:16px 0;border:0;border-top:1px solid #edf0eb;background:transparent;text-align:left}.recent-row:hover .recent-title{color:#237251}.recent-avatar{width:35px;height:35px;border-radius:10px;background:#e9f2e9;display:grid;place-items:center;color:#427b56;font-size:13px;font-weight:800;flex:none}.recent-main{min-width:0;flex:1}.recent-title{font-size:12px;font-weight:720;color:#2a3e34;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recent-sub{font-size:10px;color:#94a196;margin-top:5px}.recent-money{text-align:right;flex:none}.recent-money strong{display:block;color:#254333;font-size:12px}.recent-money small{display:block;color:#829386;font-size:10px;margin-top:5px}.attention-list{padding:0 24px;min-height:189px}.attention-item{display:flex;gap:11px;align-items:flex-start;padding:13px 0;border-top:1px solid #edf0eb;width:100%;background:none;border-left:0;border-right:0;border-bottom:0;text-align:left}.attention-item:hover strong{color:#a75f28}.attention-dot{width:8px;height:8px;background:#d48a4b;border-radius:50%;margin-top:5px;flex:none}.attention-item strong{display:block;font-size:11px;color:#304339;font-weight:730}.attention-item span{display:block;font-size:10px;color:#8b9a8e;margin-top:4px}.attention-link{border:0;border-top:1px solid #edf0eb;background:#fff;color:#227150;width:100%;text-align:left;padding:18px 24px;font-size:11px;font-weight:760;border-radius:0 0 14px 14px}.attention-link:hover{background:#f8fbf8}.attention-link span{float:right}.empty-state{padding:25px 12px 33px;text-align:center;color:#91a095;font-size:12px;line-height:1.6}
.table-panel{overflow:hidden}.table-toolbar{padding:19px 22px;display:flex;align-items:center;justify-content:space-between;gap:14px}.search-wrap{position:relative;max-width:440px;flex:1}.search-wrap span{position:absolute;left:13px;top:8px;color:#8da096;font-size:22px;line-height:1}.search-wrap input{width:100%;height:39px;border:1px solid #e0e8df;background:#fafcf9;border-radius:9px;padding:0 14px 0 37px;font-size:11px;color:#2d4338;outline:none}.search-wrap input:focus{border-color:#7bb599;background:#fff}.table-toolbar select{border:1px solid #e0e8df;border-radius:9px;background:#fff;color:#536a5c;font-size:11px;height:39px;padding:0 32px 0 12px}.toolbar-count{font-size:11px;color:#88998d}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:790px;text-align:left}th{background:#fafbf9;border-top:1px solid #edf0eb;border-bottom:1px solid #e9eee8;padding:15px 22px;font-size:10px;font-weight:780;letter-spacing:.04em;color:#8a9a90;white-space:nowrap}td{border-bottom:1px solid #eef1ed;padding:16px 22px;font-size:11px;color:#65766a;white-space:nowrap}tbody tr{cursor:pointer}tbody tr:hover{background:#f9fcf9}tbody tr:last-child td{border-bottom:0}.cell-primary{font-weight:750;color:#294336;font-size:11px}.cell-secondary{font-size:10px;color:#9aaa9d;margin-top:5px}.numeric{text-align:right}.money-primary{font-weight:750;color:#234535}.status-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:6px;background:#eef4ef;color:#47735c;font-size:10px;font-weight:750}.status-chip:before{content:"";width:5px;height:5px;background:currentColor;border-radius:50%}.status-chip.warning{background:#fff0e4;color:#a9662e}.status-chip.danger{background:#fce9e5;color:#b45d50}.status-chip.neutral{background:#f0f2f0;color:#6d7c71}.table-footer{border-top:1px solid #edf0eb;padding:14px 22px;display:flex;align-items:center;justify-content:space-between;color:#8b9b90;font-size:10px}.pagination{display:flex;gap:8px}.pagination button{border:1px solid #e1e8e0;background:#fff;padding:8px 12px;border-radius:7px;font-size:10px;color:#476c55;font-weight:700}.pagination button:hover:not(:disabled){background:#eaf3eb}.notice{display:flex;align-items:flex-start;gap:13px;background:#fff8ed;border:1px solid #f2e3c8;padding:17px 20px;border-radius:11px;margin-bottom:20px;color:#6d5635}.notice-symbol{width:22px;height:22px;display:grid;place-items:center;flex:none;border-radius:50%;background:#f4dfbc;font-weight:850;font-size:12px}.notice strong{font-size:12px}.notice p{margin:5px 0 0;font-size:11px;line-height:1.5;color:#8c754f}
.qr-layout{display:grid;grid-template-columns:minmax(320px,1fr) minmax(320px,1fr);gap:18px;max-width:1000px}.qr-form-panel{padding:30px}.qr-form-panel>p{font-size:12px;margin-top:8px}.qr-form-panel form{margin-top:31px}.qr-form-panel label,.login-card label{display:block;color:#3f5948;font-size:11px;font-weight:760;margin-bottom:10px}.qr-form-panel input,.password-wrap input{width:100%;border:1px solid #dbe6dc;border-radius:9px;background:#fff;outline:none;color:#21392b;height:45px;padding:0 13px;font-size:12px}.qr-form-panel input:focus,.password-wrap input:focus{border-color:#62a37d;box-shadow:0 0 0 3px #bde4ca55}.field-hint{margin:12px 0 24px;font-size:11px;color:#8b9d8e}.field-hint strong{color:#527c5d}.bank-info{border-top:1px solid #edf0eb;margin-top:34px;padding-top:20px;display:grid;gap:14px}.bank-info div{display:flex;justify-content:space-between;gap:10px;font-size:11px}.bank-info span{color:#8d9d90}.bank-info strong{color:#314e3b;font-weight:730}.qr-preview-panel{min-height:470px;display:flex;flex-direction:column;align-items:center;padding:24px 26px}.qr-preview-head{display:flex;align-items:center;justify-content:space-between;width:100%;font-size:11px;font-weight:770;color:#324b3d}.preview-tag{font-size:9px;color:#6c9479;background:#ecf5ed;padding:6px 8px;border-radius:5px;font-weight:680}.qr-placeholder{margin:auto;text-align:center;display:grid;justify-items:center;gap:10px}.qr-placeholder-icon{display:grid;place-items:center;width:80px;height:80px;background:#f1f6f1;color:#7eaa89;font-size:46px;border-radius:20px;margin-bottom:10px}.qr-placeholder strong{font-size:13px;color:#496552}.qr-placeholder span{font-size:11px;color:#95a599}.qr-preview-panel img{display:block;max-width:300px;width:82%;height:auto;margin:30px auto 14px;border:1px solid #edf0eb;border-radius:8px}.qr-actions{display:flex;gap:8px;margin-top:auto;width:100%;justify-content:center}.secondary-button{border:1px solid #dce7dc;background:#fff;color:#376849;border-radius:8px;padding:10px 15px;font-size:11px;font-weight:750;text-decoration:none}.secondary-button:hover{background:#f0f7ef}.form-error{font-size:11px;color:#b25142;margin:10px 0}
.detail-overlay{position:fixed;inset:0;z-index:20}.detail-backdrop{position:absolute;inset:0;background:#00000040}.detail-drawer{position:absolute;right:0;top:0;bottom:0;width:min(500px,100%);background:#fbfcfa;box-shadow:-12px 0 35px #00000018;display:flex;flex-direction:column}.detail-header{display:flex;align-items:flex-start;justify-content:space-between;padding:30px 30px 24px;border-bottom:1px solid #e9eee8}.detail-header h2{margin:0;color:#244332;letter-spacing:-.02em;font-size:20px}.detail-content{padding:26px 30px 50px;overflow-y:auto}.detail-amount{font-size:30px;font-weight:800;letter-spacing:-.04em;color:#1d4932;margin:7px 0 8px}.detail-section{margin-top:30px}.detail-section h3{font-size:10px;color:#92a094;letter-spacing:.12em;margin:0 0 14px}.detail-data{display:grid;gap:12px}.detail-data div{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border-bottom:1px solid #edf1ed;padding-bottom:12px;font-size:11px}.detail-data span{color:#8c9d8f}.detail-data strong{color:#2b4735;text-align:right;font-weight:690;overflow-wrap:anywhere}.detail-note{border-radius:9px;background:#fff5e8;border:1px solid #f4e2c8;color:#755737;font-size:11px;line-height:1.55;padding:13px;margin-top:20px}.detail-payment{padding:13px 0;border-bottom:1px solid #edf1ed;font-size:11px}.detail-payment strong{color:#2c4a39}.detail-payment span{float:right;color:#59806a}.toast{position:fixed;bottom:23px;right:26px;background:#1c4936;color:#fff;font-size:11px;font-weight:700;padding:12px 16px;border-radius:8px;box-shadow:0 10px 22px #183f2c33;z-index:30}
.login-screen{min-height:100vh;background:#edf2ed;display:grid;place-items:center;padding:24px}.login-card{width:min(420px,100%);background:#fff;border:1px solid #e0e8df;border-radius:17px;padding:37px 39px 30px;box-shadow:0 18px 50px #173a2514}.login-card .brand-mark{margin-bottom:27px}.login-kicker{font-size:10px;font-weight:800;letter-spacing:.16em;color:#638b6d}.login-card h1{font-size:27px;letter-spacing:-.04em;color:#1f3c2d;margin:11px 0 7px}.login-card p{font-size:12px;line-height:1.55;color:#879789;margin:0 0 31px}.password-wrap{position:relative}.password-wrap input{padding-right:62px}.text-button{position:absolute;right:7px;top:7px;border:0;background:transparent;color:#4b8160;font-size:11px;font-weight:750;height:30px;padding:0 8px}.login-submit{width:100%;margin-top:18px;display:flex;justify-content:space-between;align-items:center}.login-foot{margin-top:29px;border-top:1px solid #edf0eb;padding-top:19px;color:#9ca99e;font-size:10px;text-align:center}
@media(max-width:1130px){.sidebar{width:220px}.topbar{padding:0 30px}main{padding:34px 30px 60px}.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.overview-grid{grid-template-columns:1fr}.attention-list{min-height:0;padding-bottom:10px}}@media(max-width:720px){.app-shell{display:block}.sidebar{position:static;height:auto;width:100%;padding:13px 16px 9px}.sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}.brand{padding:0}.brand-mark{width:30px;height:30px}.brand strong{font-size:13px}.brand small{font-size:9px}.nav-label,.sidebar-bottom{display:none}.nav{display:flex;gap:3px;overflow:auto;width:100%;padding-top:12px}.nav-item{min-height:37px;white-space:nowrap;padding:0 10px;font-size:10px;gap:6px}.nav-icon{font-size:14px;width:15px}.nav-count{display:none!important}.topbar{height:48px;padding:0 18px}.topbar-label,.topbar-separator{display:none}.topbar-right{font-size:9px}main{padding:25px 17px 48px}.page-heading{margin-bottom:22px;align-items:flex-start}.page-heading h1{font-size:25px}.page-heading p{font-size:11px;line-height:1.4}.page-heading .primary-button{font-size:10px;padding:9px 12px;min-height:34px}.metrics-grid{gap:9px}.metric-card{padding:16px;min-height:115px}.metric-value{font-size:21px;margin:17px 0 5px}.metric-label{font-size:10px}.metric-hint{font-size:9px}.overview-grid{gap:13px}.panel-heading{padding:20px 18px 15px}.recent-list,.attention-list{padding-left:18px;padding-right:18px}.qr-layout{grid-template-columns:1fr}.qr-form-panel{padding:24px}.qr-preview-panel{min-height:350px}.table-toolbar{padding:14px;flex-wrap:wrap}.search-wrap{max-width:none;min-width:100%}.table-toolbar select{width:100%}.table-footer{padding:13px 14px}.login-card{padding:31px 26px}}
.recent-title,.recent-sub{display:block}
@media(max-width:1130px){.qr-layout{grid-template-columns:1fr;max-width:650px}}
@media(max-width:1000px){table{min-width:0}thead{display:none}tbody{display:grid;gap:10px;padding:12px}tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:12px;border:1px solid #e7ece6;border-radius:10px;padding:14px;background:#fff}td{border:0;padding:0;white-space:normal}td:before{content:attr(data-label);display:block;font-size:9px;color:#91a094;margin-bottom:4px}td:first-child,td:nth-child(2),td:nth-child(5){grid-column:1/3}td.numeric{text-align:left}td:last-child{grid-column:1/3}tbody tr:last-child td{border:0}}

/* Giao diện sáng, ít màu nhấn; trạng thái cần xử lý vẫn nổi bật để dễ đối soát. */
:root{color:#202124;background:#fff}
body{background:#fff}
.sidebar{background:#fff;color:#202124;border-right:1px solid #e9e9e9}
.brand strong,.page-heading h1,.panel-heading h2,.qr-form-panel h2,.detail-header h2,.login-card h1{color:#151515}
.brand small,.sidebar-status,.logout-button{color:#656565}
.brand-mark{background:#181818}
.brand-mark span{background:#fff}
.nav-label,.eyebrow,.topbar-label,.detail-section h3{color:#858585}
.nav-item{color:#3d3d3d;text-decoration:none;cursor:pointer}
.nav-item:hover{background:#f5f5f5;color:#151515}
.nav-item.active{background:#f0f0f0;color:#151515}
.nav-count{background:#202020;color:#fff}
.sidebar-status{border-top-color:#e9e9e9}
.online-dot{background:#444;box-shadow:0 0 0 4px #ededed}
.logout-button:hover{color:#111}
.workspace,.topbar{background:#fff}
.topbar{border-bottom-color:#ececec}
#topbar-current,.topbar-left,.topbar-right{color:#3a3a3a}
.topbar-separator{color:#c6c6c6}
.icon-button,.secondary-button,.pagination button{border-color:#dedede;color:#292929;background:#fff}
.icon-button:hover,.secondary-button:hover,.pagination button:hover:not(:disabled){background:#f4f4f4}
.page-heading p,.panel-heading p,.qr-form-panel>p,.metric-label,.metric-hint,.recent-sub,.recent-money small,.attention-item span,.bank-info span{color:#777}
.primary-button{background:#202020;color:#fff;box-shadow:none}
.primary-button:hover{background:#000}
.overview-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px}.overview-section-heading h2{font-size:14px;margin:0;color:#202020}.overview-section-heading span{font-size:11px;color:#777;text-align:right}.metric-card,.panel{border-color:#e9e9e9;box-shadow:none}
.metric-card.accent{background:#f6f6f6;border-color:#e8e8e8}
.metric-value,.recent-title,.recent-money strong,.money-primary,.cell-primary,.qr-placeholder strong,.bank-info strong,.detail-amount,.detail-data strong{color:#202020}
.recent-avatar{background:#f1f1f1;color:#444}
.recent-row,.attention-item,.attention-link,.bank-info,.detail-data div,.detail-payment{border-color:#ececec}
.recent-row:hover .recent-title,.attention-item:hover strong{color:#111}
.link-button,.attention-link{color:#202020}
.attention-link:hover{background:#f7f7f7}
.attention-dot{background:#d93025}
.table-toolbar select,.search-wrap input,.qr-form-panel input,.password-wrap input{border-color:#dedede;background:#fff;color:#202020}
.search-wrap input:focus,.qr-form-panel input:focus,.password-wrap input:focus{border-color:#858585;box-shadow:0 0 0 3px #e6e6e6}
.search-wrap span{color:#777}
th{background:#fafafa;border-color:#ececec;color:#7b7b7b}
td,.table-footer,.table-panel .table-toolbar{border-color:#ececec;color:#666}
tbody tr:hover{background:#fafafa}
.status-chip{background:#eaf6ee;color:#176b46;padding:6px 10px}
.status-chip::before{display:none}
.status-chip.neutral{background:#f2f2f2;color:#616161}
.status-chip.warning{background:#fff2ee;color:#b24832}
.status-chip.danger{background:#fce7e5;color:#b62d2a}
.notice{background:#fff8f6;border-color:#f0d8d3;color:#873d34}
.notice-symbol{background:#f7dfda}
.notice p{color:#8f665f}
.field-hint,.qr-placeholder span{color:#777}
.field-hint strong{color:#202020}
.preview-tag{background:#f2f2f2;color:#555}
.qr-placeholder-icon{background:#f4f4f4;color:#656565}
.detail-drawer{background:#fff}
.detail-header,.detail-data div{border-color:#ececec}
.detail-note{background:#fff7f5;border-color:#f0d9d4;color:#8e4c42}
.detail-payment span{color:#555}
.toast{background:#202020;color:#fff}
.login-screen{background:#f7f7f7}
.login-card{border-color:#e6e6e6;box-shadow:0 14px 40px #0000000d}
.login-kicker,.text-button{color:#555}
.login-card p,.login-foot{color:#777}
.login-foot{border-color:#ededed}
.form-error{color:#b62d2a}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline-color:#666}
@media(max-width:1000px){tbody tr{border-color:#e8e8e8}td:before{color:#858585}}
@media(max-width:720px){.sidebar{border-right:0;border-bottom:1px solid #ececec}.nav-item.active{background:#ededed}}

/* Biểu mẫu kết nối dùng cùng kiểu trắng đen với phần quản lý giao dịch. */
.connection-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.automation-panel{padding:24px 26px;margin-bottom:18px}.automation-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;margin-top:18px}.automation-step{font-size:12px;line-height:20px;color:#555}.automation-step strong{color:#202020}.automation-step.ready:before,.automation-step.missing:before{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:5px;margin-right:9px;vertical-align:-4px;font-size:13px;font-weight:800;line-height:1}.automation-step.ready:before{content:"✓";background:#e7f4ec;color:#167347}.automation-step.missing:before{content:"!";background:#fff0dc;color:#a45b0a}.automation-panel .connection-state{background:#fff0dc;color:#8a4a07}.automation-panel .connection-state.is-ready{background:#e7f4ec;color:#166b44}@media(max-width:720px){.automation-steps{grid-template-columns:1fr}.automation-panel{padding:20px}}

/* Biểu tượng điều hướng dùng cùng kích thước và nét vẽ ở mọi trạng thái. */
.nav-icon{width:20px;height:20px;flex:none;display:inline-flex;align-items:center;justify-content:center}
.nav-icon svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-item:focus-visible{outline:2px solid currentColor;outline-offset:2px}
@media(max-width:720px){.nav-item{min-height:44px}.nav-icon,.nav-icon svg{width:18px;height:18px}}

.test-hook-section{margin:0}.test-hook-section summary{font-size:14px;font-weight:700;cursor:pointer;list-style-position:outside}.test-hook-section>p{color:#777;font-size:11px;line-height:1.55;margin:12px 0 18px}.test-transactions{margin-top:18px}.test-transaction{border-top:1px solid #ededed;padding:11px 0;font-size:11px;display:flex;justify-content:space-between;gap:12px}.test-transaction strong{display:block;color:#222}.test-transaction small{display:block;color:#777;margin-top:4px}
.connection-panel{padding:26px}
.connection-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:22px}
.connection-heading>div{min-width:0}
.connection-step-number{display:inline-grid;place-items:center;width:27px;height:27px;margin-right:10px;border-radius:7px;background:#e7f4ec;color:#166b44;font-size:13px;font-weight:800;vertical-align:2px}
.connection-heading .connection-step-number+h2{display:inline-block}
.connection-heading h2{margin:0;color:#161616;font-size:18px;letter-spacing:-.02em}
.connection-heading p{margin:6px 0 0;color:#777;font-size:11px;line-height:1.5}
.connection-state{background:#f2f2f2;border-radius:6px;color:#505050;font-size:10px;font-weight:700;padding:7px 9px;white-space:nowrap}
.settings-form{display:grid;gap:9px}
.settings-form label{font-size:11px;font-weight:750;color:#303030;margin-top:9px}
.settings-form input,.settings-form select{height:42px;width:100%;border:1px solid #dedede;background:#fff;border-radius:8px;padding:0 12px;font-size:12px;color:#202020;min-width:0}
.settings-form input:disabled,.settings-form select:disabled{background:#f2f2f2;color:#818181;cursor:not-allowed}
.settings-form input:focus,.settings-form select:focus{border-color:#888;outline:3px solid #ebebeb}
.sync-error{margin:0 22px 18px;padding:12px 14px;border:1px solid #ead1d1;border-radius:8px;background:#fff7f7;color:#8a3434;font-size:11px;line-height:1.5}
.settings-form small,.settings-note{color:#777;font-size:10px;line-height:1.5}
.settings-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.settings-two>div{display:grid;gap:9px}
.settings-actions,.copy-line{display:flex;gap:9px;align-items:center}
.settings-actions{margin-top:16px;flex-wrap:wrap}
.copy-line input{flex:1}
.copy-line button{white-space:nowrap;height:42px}
.settings-note{margin:8px 0}
.settings-note strong{color:#202020}
.settings-result{border:1px solid #e5e5e5;background:#fafafa;border-radius:8px;padding:13px;font-size:11px;line-height:1.6;color:#333;overflow-wrap:anywhere}
.settings-form .settings-switch{display:flex;align-items:flex-start;gap:12px;margin:12px 0 0;padding:14px;border:1px solid #e6e6e6;border-radius:9px;cursor:pointer}
.settings-switch input{width:16px;height:16px;flex:none;margin:2px 0 0;accent-color:#202020}
.settings-switch strong,.settings-switch small{display:block}
.settings-switch small{margin-top:4px;font-weight:400}
.connection-fields{display:grid;gap:16px;min-width:0}
.connection-fields-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.connection-fields-four{grid-template-columns:repeat(4,minmax(0,1fr))}
.connection-fields-two{grid-template-columns:repeat(2,minmax(0,1fr))}
.connection-field{display:flex;flex-direction:column;min-width:0}
.settings-form .connection-field>label{margin:0 0 7px}
.connection-field>small{margin-top:6px}
.connection-field>.secondary-button{align-self:flex-start;margin-top:10px}
.connection-group,.connection-provider-fields,.connection-webhook-box{border-top:1px solid #ececec;padding-top:18px;margin-top:6px}
.connection-group h3,.connection-provider-fields h3,.connection-webhook-box h3{font-size:13px;margin:0 0 5px;color:#222}
.connection-group>p,.connection-provider-fields>p,.connection-webhook-box>p{font-size:11px;line-height:1.5;color:#777;margin:0 0 14px}
.connection-provider-fields>.connection-fields+.connection-fields{margin-top:16px}
.connection-provider-fields>.secondary-button{justify-self:start;margin:12px 0}
.connection-provider-fields>.settings-result{margin:0 0 14px}
.connection-provider-fields>small{display:block;margin-top:10px}
.connection-webhook-box .settings-note{margin:14px 0 0}
.connection-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #ececec;padding-top:16px;margin-top:6px}
.settings-form .connection-footer .settings-switch,.settings-form.connection-activation-form .settings-switch{margin:0;flex:1}
.connection-activation-form{display:flex;align-items:center;gap:16px}
.connection-footer>.primary-button,.connection-activation-form>.primary-button{flex:none}
.connection-test-panel{background:#fafafa}
.connection-test-panel .settings-form{margin-top:18px}
.connection-feedback,.connection-webhook-box>.connection-feedback{margin:0 0 10px;padding:9px 12px;border:1px solid #e3e8e5;border-radius:8px;background:#f6f8f6;color:#42534b;font-size:11px;line-height:1.5}
.connection-feedback[data-status="saved"],.connection-webhook-box>.connection-feedback[data-status="saved"]{border-color:#cfe9d9;background:#f0f8f3;color:#17603e}
.connection-feedback[data-status="pending"],.connection-webhook-box>.connection-feedback[data-status="pending"]{border-color:#efd8b0;background:#fff7e9;color:#8a5409}
.connection-feedback[data-status="error"]{border-color:#efcaca;background:#fff3f3;color:#9c3030}
#pay2s-form .connection-field>label{font-size:13px}
#pay2s-form input,#pay2s-form select{font-size:13px}
#pay2s-form .connection-field>small,#pay2s-form .connection-group>p,#pay2s-form .connection-provider-fields>p{font-size:12px}
#pay2s-form .connection-feedback{font-size:13px;line-height:1.55;padding:11px 13px}
#pay2s-form .connection-group h3,#pay2s-form .connection-provider-fields h3,#pay2s-form .connection-webhook-box h3{font-size:15px}
.settings-form small[data-configured="true"]{color:#17603e;font-weight:600}
.settings-form small[data-configured="false"]{color:#915a16}
.settings-form input[type="password"][data-secret-saved="true"]::placeholder{color:#777;opacity:1;letter-spacing:.04em}
.connection-activation>.connection-feedback{margin:12px 0 0}
@media(max-width:1100px){.connection-fields-four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.connection-fields-three{grid-template-columns:repeat(2,minmax(0,1fr))}.connection-footer,.connection-activation-form{align-items:stretch;flex-direction:column}.connection-footer>.primary-button,.connection-activation-form>.primary-button{align-self:flex-start}}
@media(max-width:720px){.connection-panel{padding:20px}.connection-heading{display:block}.connection-state{display:inline-block;margin-top:12px}.settings-two{grid-template-columns:1fr}.connection-fields-three,.connection-fields-four,.connection-fields-two{grid-template-columns:minmax(0,1fr)}.connection-footer>.primary-button,.connection-activation-form>.primary-button{align-self:stretch}.connection-fields{gap:14px}}

/* Danh sách công nợ giữ các con số dễ quét trên cả màn hình nhỏ. */
.customer-toolbar{padding:19px 22px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.customer-head,.customer-row{display:grid;grid-template-columns:minmax(170px,2fr) minmax(130px,1fr) minmax(130px,1fr) 90px;align-items:center;gap:15px;padding:15px 22px}
.customer-head{background:#fafafa;border-block:1px solid #ececec;color:#858585;font-size:10px;font-weight:750}
.customer-row{border-bottom:1px solid #eee;font-size:11px;color:#303030}
.customer-row:last-child{border-bottom:0}
.customer-row strong,.customer-row small{display:block}
.customer-row strong{font-weight:740}
.customer-row small{color:#888;margin-top:5px;font-size:10px}
.customer-row .secondary-button{font-size:10px;padding:8px 10px;text-align:center;white-space:nowrap}
@media(max-width:900px){.customer-head{display:none}.customer-toolbar{flex-wrap:wrap}.customer-toolbar .search-wrap{max-width:none;min-width:100%}.customer-row{grid-template-columns:1fr 1fr;padding:17px}.customer-row>div:first-child{grid-column:1;grid-row:1}.customer-row>strong:nth-child(2){grid-column:1;grid-row:2}.customer-row>div:nth-child(3){grid-column:2;grid-row:2}.customer-row .secondary-button{grid-column:2;grid-row:1;justify-self:end}}
.detail-form{display:grid;gap:11px;margin-top:26px;padding-top:20px;border-top:1px solid #ececec}
.detail-form h3{font-size:10px;letter-spacing:.12em;color:#858585;margin:0 0 2px}
.detail-form input,.detail-form textarea{width:100%;border:1px solid #dedede;border-radius:8px;padding:10px 12px;color:#202020;background:#fff;font-size:12px}
.detail-form textarea{min-height:80px;resize:vertical;font-family:inherit}
.detail-form p{font-size:10px;color:#777;line-height:1.5;margin:0}
.detail-form button{justify-self:start}
.detail-note-entry{border-bottom:1px solid #eee;padding:10px 0;font-size:11px;color:#333}
.detail-note-entry small{color:#888}
.detail-note-entry p{margin:5px 0;white-space:pre-wrap;line-height:1.5}

/* Nội dung dùng hết phần bên phải sidebar, chỉ chừa lề trong để dễ đọc. */
.topbar{padding:0}
.topbar-inner{width:100%;max-width:none;margin:0;padding:0 32px;display:flex;align-items:center;justify-content:space-between;gap:20px}
main{width:100%;max-width:none;padding:28px 32px 64px;margin:0}
.qr-layout{max-width:none}
.page-heading{margin-bottom:22px}
.page-heading h1{font-size:29px}

/* Các chỉ số luôn tối đa bốn cột, số liệu nổi bật hơn nhãn. */
.metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.metric-card{min-height:124px;padding:18px}
.metric-label{font-size:13px;font-weight:650}
.metric-value{font-size:clamp(24px,2vw,30px);font-weight:800;margin:13px 0 5px;white-space:normal;overflow-wrap:anywhere}
.metric-hint{font-size:11px;line-height:1.35}

/* Bảng giao dịch và đối soát có cùng tỷ lệ cột và căn lề. */
.table-panel table{table-layout:fixed;min-width:900px}
.table-panel th:nth-child(1),.table-panel td:nth-child(1){width:18%}
.table-panel th:nth-child(2),.table-panel td:nth-child(2){width:30%}
.table-panel th:nth-child(3),.table-panel td:nth-child(3){width:16%}
.table-panel th:nth-child(4),.table-panel td:nth-child(4){width:14%}
.table-panel th:nth-child(5),.table-panel td:nth-child(5){width:12%}
.table-panel th:nth-child(6),.table-panel td:nth-child(6){width:10%}
.table-panel th,.table-panel td{padding:13px 14px;overflow-wrap:anywhere;white-space:normal}
.table-panel th{font-size:11px}
.table-panel td{font-size:13px;line-height:1.4}
.table-panel .cell-primary{font-size:15px;font-weight:650}
.table-panel .cell-secondary{font-size:12px;line-height:1.35;color:#777;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.table-panel .money-primary,.table-panel .numeric{font-weight:650;color:#303030}
.table-panel .status-chip{font-size:11px;white-space:normal}
.table-panel th.numeric,.table-panel td.numeric{text-align:right}
.table-panel .numeric,.customer-debt,.customer-invoices{font-variant-numeric:tabular-nums}

/* Bốn cột khách hàng: tên 42%, công nợ 20%, hóa đơn 20%, thao tác 18%. */
#view-customers .page-heading{margin-bottom:16px}
#view-customers .page-heading h1{font-size:27px;letter-spacing:-.035em}
.customer-toolbar{padding:12px 20px}
.customer-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px;margin-left:auto}
.customer-toolbar .primary-button{min-height:36px;padding:9px 14px}
.customer-head,.customer-row{grid-template-columns:42% 20% 20% 18%;gap:0;padding-left:20px;padding-right:20px}
.customer-head{padding-top:11px;padding-bottom:11px;font-size:12px}
.customer-row{min-height:66px;padding-top:10px;padding-bottom:10px;font-size:14px}
.customer-name{min-width:0;padding-right:18px}
.customer-row .customer-name strong{font-size:15px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
.customer-row .customer-summary-meta{display:block;font-size:12px;margin-top:3px;line-height:1.35;color:#777}
.customer-head>:nth-child(2),.customer-head>:nth-child(3),.customer-row>.customer-debt,.customer-row>.customer-invoices{text-align:right;padding-right:16px}
.customer-head>:last-child{text-align:right}
.customer-row>.customer-debt,.customer-row>.customer-invoices strong{font-size:14px;font-weight:650;color:#303030}
.customer-row .customer-invoices small{font-size:12px;margin-top:3px}
.customer-row .customer-qr{width:120px;max-width:100%;min-height:34px;padding:7px 10px;justify-self:end}
.customer-panel .sync-error{margin:0 20px 12px;padding:9px 12px}
@media(max-width:1130px){.topbar-inner{padding:0 30px}.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:901px) and (max-width:1130px){.qr-layout{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.qr-layout{grid-template-columns:1fr}}
@media(max-width:900px){
  .customer-toolbar-actions{width:100%;justify-content:space-between;margin-left:0}
  .customer-row{grid-template-columns:1fr auto;gap:8px 16px}
  .customer-row>.customer-debt{grid-column:1;grid-row:2;text-align:left;padding-right:0}
  .customer-row>.customer-invoices{grid-column:2;grid-row:2;text-align:right;padding-right:0}
  .customer-row>.customer-qr{grid-column:2;grid-row:1}
  .customer-debt:before,.customer-invoices:before{display:block;font-size:11px;font-weight:400;color:#777;margin-bottom:3px}
  .customer-debt:before{content:"Công nợ"}
  .customer-invoices:before{content:"Hóa đơn còn nợ"}
}
@media(max-width:1000px){
  .table-panel table{min-width:0;table-layout:auto}
  .table-panel th,.table-panel td{width:auto!important}
  .table-panel td{padding:0}
  .table-panel td.numeric{text-align:left}
}
@media(max-width:720px){
  .topbar-inner{padding:0 18px}
  main{padding:22px 17px 48px}
  .metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .metric-card{min-height:112px;padding:14px}
  .metric-value{font-size:22px}
  .customer-toolbar{padding:12px 15px}
  .customer-head,.customer-row{padding-left:15px;padding-right:15px}
  .customer-row{min-height:0;padding-top:12px;padding-bottom:12px}
  .customer-panel .sync-error{margin:0 15px 10px}
  .customer-toolbar-actions{gap:8px}
  .customer-toolbar-actions .toolbar-count{font-size:10px}
}
@media(max-width:420px){.metrics-grid{grid-template-columns:1fr}}

/* Xem và gửi mã QR ngay trên danh sách khách hàng. */
.quick-qr-overlay{position:fixed;inset:0;z-index:25;display:grid;place-items:center;padding:16px}
.quick-qr-backdrop{position:absolute;inset:0;background:#1119}
.quick-qr-dialog{position:relative;width:min(580px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;background:#fff;border:1px solid #e6e6e6;border-radius:16px;box-shadow:0 20px 65px #0003}
.quick-qr-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 22px 10px}
.quick-qr-kicker{font-size:10px;font-weight:750;letter-spacing:.12em;color:#777;margin-bottom:6px}
.quick-qr-header h2{font-size:20px;line-height:1.3;margin:0;color:#202020;overflow-wrap:anywhere}
.quick-qr-body{padding:0 22px 16px}
.quick-qr-code{font-size:12px;color:#666;margin:0 0 10px}
.quick-qr-image-wrap{min-height:0;display:grid;place-items:center;background:#fafafa;border:1px solid #eee;border-radius:12px;padding:8px}
.quick-qr-image-wrap img{display:block;width:min(100%,260px,33dvh);height:auto;background:#fff}
.quick-qr-message{font-size:13px;color:#777}
.quick-qr-details{display:grid;gap:6px;margin-top:12px}
.quick-qr-details>div{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:12px}
.quick-qr-details span{color:#777}
.quick-qr-details strong{text-align:right;color:#202020;font-weight:650;overflow-wrap:anywhere}
.quick-qr-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.8fr);gap:8px;margin-top:14px}
.quick-qr-actions .primary-button,.quick-qr-actions .secondary-button{width:100%;min-width:0;min-height:40px;padding:9px 8px;font-size:11px;line-height:1.25;display:inline-flex;align-items:center;justify-content:center;text-align:center;white-space:normal}
@media(max-width:470px){.quick-qr-overlay{padding:10px}.quick-qr-dialog{max-height:calc(100dvh - 20px)}.quick-qr-header{padding:14px 16px 8px}.quick-qr-body{padding:0 16px 14px}.quick-qr-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-qr-actions #quick-qr-copy-details{grid-column:1/-1}}

/* Phân trang dùng chung cho khách hàng, giao dịch và đối soát. */
.pagination-bar{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:12px 22px;min-height:58px;padding:10px 20px;color:#4a4a4a;font-size:12px}
.page-size{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.page-size select{height:34px;min-width:64px;padding:0 9px;border:1px solid #dcdcdc;border-radius:7px;background:#fff;color:#202020;font-size:12px}
.pagination-bar .pagination{display:inline-flex;align-items:center;gap:3px}
.pagination-bar .pagination button{width:34px;height:34px;min-width:34px;padding:0;border:0;background:transparent;border-radius:7px;color:#2c2c2c;font-size:21px;font-weight:500;line-height:1}
.pagination-bar .pagination button:hover:not(:disabled){background:#f0f0f0}
.pagination-bar .pagination button:disabled{background:transparent;opacity:.35}
.page-number{width:49px;height:34px;margin:0 3px;border:1px solid #dcdcdc;border-radius:7px;background:#fff;text-align:center;color:#202020;font-size:12px;font-weight:650}
.page-number::-webkit-inner-spin-button,.page-number::-webkit-outer-spin-button{appearance:none;margin:0}
.page-number{appearance:textfield}
.page-total{min-width:30px;color:#777;font-size:12px;white-space:nowrap}
.page-range{color:#3f3f3f;font-size:12px;font-weight:650;white-space:nowrap}
@media(max-width:720px){.pagination-bar{gap:9px 14px;padding:12px 15px}.page-range{width:100%;order:3}.pagination-bar .pagination button{width:30px;min-width:30px}}

/* Danh sách khách hàng bám theo các cột và thứ tự của KiotViet. */
.customer-table-scroll{overflow-x:auto}
.customer-head,.customer-totals,.customer-row{grid-template-columns:12% 22% 13% 14% 15% 16% 8%;gap:0;min-width:1050px;padding-left:20px;padding-right:20px}
.customer-head{min-height:42px;padding-top:0;padding-bottom:0;background:#f6f7f8;color:#4b5563}
.customer-head button{border:0;background:none;text-align:left;padding:8px 10px 8px 0;color:inherit;font:inherit;font-weight:700;cursor:pointer}
.customer-head button:hover{color:#181818}
.customer-head button:focus-visible,.customer-toolbar-actions button:focus-visible{outline:2px solid #333;outline-offset:2px}
.customer-head button[data-direction="desc"]::after{content:" ↓";color:#202020}
.customer-head button[data-direction="asc"]::after{content:" ↑";color:#202020}
.customer-head>button:nth-child(-n+3){text-align:left}
.customer-head button:nth-child(n+4),.customer-head>span{text-align:right}
.customer-totals{display:grid;align-items:center;min-height:45px;border-bottom:1px solid #dedede;background:#fcfcfc;font-size:12px;font-variant-numeric:tabular-nums}
.customer-totals[hidden]{display:none}
.customer-totals>strong:nth-child(n+4){text-align:right;padding-right:14px;font-size:13px}
.customer-row{min-height:52px;padding-top:8px;padding-bottom:8px;font-size:13px}
.customer-row>.customer-code,.customer-row>.customer-name,.customer-row>.customer-phone{min-width:0;padding-right:12px}
.customer-row>.customer-code{font-size:13px;font-weight:600;overflow-wrap:anywhere}
.customer-row .customer-name strong{font-size:13px;font-weight:550}
.customer-row .customer-summary-meta{font-size:10px;color:#858585}
.customer-row>.customer-debt,.customer-row>.customer-invoiced,.customer-row>.customer-revenue{text-align:right;padding-right:14px;font-size:13px;font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
.customer-row>.customer-phone{overflow-wrap:anywhere}
.customer-row .customer-qr{width:100%;min-width:68px;min-height:32px}
.customer-toolbar-actions .secondary-button{min-height:36px;padding:8px 11px;font-size:11px;white-space:nowrap}
.customer-toolbar-actions .secondary-button[aria-pressed="true"]{background:#ededed;border-color:#b9b9b9}
.customer-toolbar-actions #customer-sort{display:block;flex:0 1 200px;min-width:170px;min-height:36px;max-width:100%;padding:0 10px;border:1px solid #dcdcdc;border-radius:7px;background:#fff;color:#202020;font-size:12px}
.customer-sync-notice{margin:0 20px 12px;padding:10px 12px;border:1px solid #d9dfe4;border-radius:7px;background:#f8fafb;color:#48515a;font-size:12px;line-height:1.5}
.customer-sync-notice[hidden]{display:none}
@media(max-width:900px){
  .customer-toolbar-actions #customer-sort{flex:1 1 150px}
  .customer-head,.customer-totals{display:none}
  .customer-row{min-width:0;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:13px 16px}
  .customer-row>.customer-code{grid-column:1;grid-row:1}
  .customer-row>.customer-name{grid-column:1;grid-row:2}
  .customer-row>.customer-phone{grid-column:1;grid-row:3;color:#555}
  .customer-row>.customer-debt{grid-column:1;grid-row:4;text-align:left;padding-right:0}
  .customer-row>.customer-invoiced{grid-column:2;grid-row:4;text-align:right;padding-right:0}
  .customer-row>.customer-revenue{grid-column:2;grid-row:5;text-align:right;padding-right:0}
  .customer-row>.customer-qr{grid-column:2;grid-row:1 / span 3;align-self:start;width:90px}
  .customer-debt::before,.customer-invoiced::before,.customer-revenue::before{display:block;margin-bottom:3px;color:#777;font-size:10px;font-weight:400}
  .customer-debt::before{content:"Nợ hiện tại"}
  .customer-invoiced::before{content:"Tổng bán"}
  .customer-revenue::before{content:"Tổng bán trừ trả hàng"}
}
@media(max-width:720px){.customer-sync-notice{margin:0 15px 10px}}

#qr-bank-connection,#quick-qr-bank{width:100%;min-height:42px;border:1px solid #dedede;border-radius:8px;background:#fff;color:#202020;padding:0 12px;font:inherit;margin:8px 0 16px}#qr-bank-connection:focus,#quick-qr-bank:focus{outline:3px solid #ebebeb;border-color:#888}
#quick-qr-bank{margin:6px 0 12px}


#pay2s-fields:not([hidden]),#apipay-fields:not([hidden]),#test-pay2s-fields:not([hidden]),#test-apipay-fields:not([hidden]){display:grid;gap:9px}
.connection-log-panel .connection-heading{align-items:center}
.webhook-log-list{display:grid;gap:8px;margin-top:12px}
.webhook-log-row{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid #e5e5e5;border-radius:8px;background:#fff;font-size:12px}
.webhook-log-details,.webhook-log-result{display:grid;gap:5px;min-width:0}
.webhook-log-details small{overflow-wrap:anywhere;color:#666;line-height:1.5}
.webhook-log-result{text-align:right;flex:none}
.webhook-log-result small{color:#666}
@media(max-width:650px){.webhook-log-row{display:grid}.webhook-log-result{text-align:left}}

/* Các trường lồng trong form giữ nhãn và gợi ý ở từng dòng riêng. */
#test-pay2s-fields label,#test-apipay-fields label{display:block;margin-top:9px}
#test-pay2s-fields small,#test-apipay-fields small{display:block;line-height:1.5}

/* Ô tìm kiếm dùng cùng chiều cao và căn biểu tượng giữa theo chiều dọc. */
.search-wrap{min-width:0}
.search-wrap span{left:14px;top:50%;bottom:auto;transform:translateY(-50%);width:17px;height:17px;display:block;pointer-events:none;font-size:0;color:transparent}
.search-wrap span::before{content:"";position:absolute;left:1px;top:1px;width:11px;height:11px;border:1.7px solid #666;border-radius:50%}
.search-wrap span::after{content:"";position:absolute;left:11px;top:12px;width:6px;height:1.7px;background:#666;border-radius:1px;transform:rotate(45deg);transform-origin:left center}
.search-wrap input{display:block;height:42px;font-size:13px;line-height:normal;padding-left:43px}
.search-wrap input::placeholder{color:#777;opacity:1}

/* Hộp chi tiết giao dịch: nằm giữa màn hình, các giá trị dài có dòng riêng. */
.detail-overlay{display:grid;place-items:center;padding:24px}
.detail-backdrop{background:#00000030}
.detail-drawer{position:relative;inset:auto;width:min(760px,100%);max-height:calc(100dvh - 48px);border:1px solid #e6e6e6;border-radius:16px;box-shadow:0 20px 70px #00000025;overflow:hidden}
.detail-header{flex:none;padding:22px 28px 19px;background:#fff}
.detail-header h2{font-size:22px;line-height:1.2}
.detail-transaction-id{margin:7px 0 0;color:#666;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.detail-content{padding:24px 28px 30px;scrollbar-gutter:stable}
.detail-summary{display:grid;justify-items:start;gap:5px;padding:17px 20px;border:1px solid #e7e7e7;border-radius:12px;background:#fafafa}
.detail-summary .detail-amount{margin:5px 0 0;font-size:30px;line-height:1.1}
.detail-summary-caption{font-size:12px;color:#686868}
.detail-section{margin-top:25px}
.detail-section h3,.detail-form h3{font-size:11px;line-height:1.3;letter-spacing:.08em;color:#666;margin-bottom:12px}
.detail-data{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.detail-data .detail-row{display:flex;flex-direction:column;gap:7px;min-width:0;padding:13px 15px;border:1px solid #e9e9e9;border-radius:9px;background:#fff}
.detail-data .detail-row-full{grid-column:1/-1}
.detail-data span{font-size:12px;color:#686868}
.detail-data strong{font-size:13px;line-height:1.5;text-align:left;font-weight:650;overflow-wrap:anywhere;word-break:normal}
.detail-payment{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;font-size:13px}
.detail-payment-reference{display:grid;gap:4px;min-width:0}
.detail-payment-reference strong{color:#202020;overflow-wrap:anywhere}
.detail-payment-reference small{color:#666;font-size:12px}
.detail-payment span{float:none;white-space:nowrap;font-weight:700;color:#202020}
.detail-form{margin-top:25px;padding-top:22px}
.detail-form input,.detail-form textarea{font-size:13px;line-height:1.5}
.detail-form select{width:100%;border:1px solid #dedede;border-radius:8px;padding:10px 12px;color:#202020;background:#fff;font-size:13px;line-height:1.5}
.detail-form .detail-confirmation{display:flex;align-items:flex-start;gap:9px;font-size:12px;line-height:1.5;color:#555}
.detail-form .detail-confirmation input{width:auto;flex:none;margin-top:2px}
.detail-form p,.detail-note-entry{font-size:12px}
.detail-note-entry small{font-size:11px}
.detail-form-feedback[data-status="success"]{color:#17603e}
.detail-form-feedback[data-status="error"]{color:#a12e2e}
@media(max-width:650px){
  .detail-overlay{padding:0}
  .detail-drawer{width:100%;max-height:100dvh;height:100dvh;border:0;border-radius:0}
  .detail-header{padding:19px 20px 16px}
  .detail-content{padding:20px 20px 32px}
  .detail-data{grid-template-columns:1fr}
  .detail-data .detail-row-full{grid-column:auto}
}

/* Trang Messenger chỉ giữ cài đặt chung và nhật ký. */
.messenger-layout{display:grid;gap:18px;max-width:1100px}
.messenger-panel{padding:24px 26px}
.messenger-panel .connection-heading{margin-bottom:19px}
.messenger-panel .settings-switch{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid #e5e5e5;border-radius:9px;margin:0 0 15px}
.messenger-panel .settings-switch input{width:16px;height:16px;flex:none;accent-color:#202020}
.messenger-panel .settings-switch strong,.messenger-panel .settings-switch small{display:block}
.messenger-panel .settings-switch strong{font-size:14px}
.messenger-panel .settings-switch small{color:#666;font-size:12px;margin-top:4px;line-height:1.5}
.messenger-panel .connection-group{margin-top:22px}
.messenger-list{display:grid;gap:9px;margin-top:12px}
.messenger-item{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:13px 15px;border:1px solid #e7e7e7;border-radius:9px;background:#fff}
.messenger-item-info{display:grid;gap:5px;min-width:220px;flex:1}
.messenger-item-info strong{font-size:14px;color:#202020;overflow-wrap:anywhere}
.messenger-item-info small{font-size:12px;color:#666;overflow-wrap:anywhere}
.messenger-item-info p{font-size:13px;line-height:1.5;color:#4f4f4f;margin:2px 0 0;overflow-wrap:anywhere}
.customer-actions{display:grid;gap:5px;align-self:center}
.customer-actions .secondary-button{display:grid;place-items:center;width:100%;min-width:68px;min-height:34px;padding:6px 8px;font-size:12px;text-align:center;text-decoration:none}
@media(max-width:900px){.customer-row>.customer-actions{grid-column:2;grid-row:1 / span 3;align-self:start;width:96px}}
@media(max-width:650px){.messenger-panel{padding:19px}.messenger-item{align-items:stretch}}

/* Tình trạng liên hệ được nhìn ngay trong danh sách khách hàng. */
.customer-head,.customer-totals,.customer-row{grid-template-columns:10% 18% 11% 11% 11% 14% 17% 8%;min-width:1240px}
.customer-head>span:nth-last-child(2){text-align:left}
.customer-row>.customer-messenger-status{min-width:0;padding-right:12px;display:grid;align-content:center;gap:4px}
.customer-messenger-status small{display:block;font-size:12px;line-height:1.4;color:#56616b;overflow-wrap:anywhere}
.customer-messenger-state{display:block;font-size:13px;font-weight:650;line-height:1.4}
.customer-messenger-state.ready{color:#14634a}
.customer-messenger-state.waiting{color:#8a5b00}
.customer-messenger-state.warning{color:#9b5412}
.customer-messenger-state.neutral{color:#606b76}
.customer-messenger-status .customer-confirm-link{justify-self:start;min-height:30px;padding:5px 9px;font-size:11px;white-space:normal;text-align:left}
.customer-messenger-status [hidden]{display:none}
.customer-confirm-prompt{display:grid;gap:6px;padding:8px;border:1px solid #cbd8e6;border-radius:7px;background:#f6faff;font-size:11px;line-height:1.4;color:#263b53;overflow-wrap:anywhere}
.customer-confirm-actions{display:flex;flex-wrap:wrap;gap:5px}
.customer-confirm-actions .secondary-button{min-height:28px;padding:4px 7px;font-size:11px}
.customer-confirm-feedback.error{color:#a52d2d}
.customer-confirm-feedback.success{color:#14634a}
.customer-row>.customer-messenger-editor{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:8px 0 4px;padding:20px;border:1px solid #d9e1e6;border-radius:10px;background:#f9fbfc;font-size:14px;line-height:1.5}
.customer-messenger-editor-heading{grid-column:1/-1;display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:1px solid #e1e7ea;padding-bottom:13px}
.customer-messenger-editor-heading h3{margin:0;font-size:17px;line-height:1.35}
.customer-messenger-editor-heading p{margin:4px 0 0;color:#59636d;font-size:13px}
.customer-messenger-editor-section{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.customer-messenger-editor-section h4{margin:0;font-size:14px}
.customer-messenger-editor-section p{margin:0;color:#46515b;font-size:13px;line-height:1.5}
.customer-messenger-editor-section .secondary-button,.customer-messenger-editor-heading .secondary-button{font-size:13px;min-height:38px}
.customer-messenger-field{display:grid;gap:6px;width:100%;font-size:13px;font-weight:600;color:#303943}
.customer-messenger-field input,.customer-messenger-field select{width:100%;min-width:0;height:42px;padding:0 12px;border:1px solid #ccd5da;border-radius:7px;background:#fff;color:#202020;font:inherit;font-weight:400}
.customer-messenger-link-picker{display:grid;gap:9px;width:100%;margin-top:7px;padding-top:13px;border-top:1px solid #e1e7ea}
.customer-messenger-link-actions{display:flex;flex-wrap:wrap;gap:8px}
.customer-messenger-link-actions .secondary-button[disabled]{opacity:.55;cursor:not-allowed}
.customer-messenger-settings-link{font-size:13px;font-weight:650;color:#245f86;text-decoration:underline;text-underline-offset:2px}
.customer-messenger-help{font-size:12px!important;color:#69737d!important}
.customer-messenger-auto-guide{width:100%;display:grid;justify-items:start;gap:10px;padding:14px;border:1px solid #b9d3f4;border-radius:9px;background:#eef6ff;color:#24384e}
.customer-messenger-auto-guide h5,.customer-messenger-manual-heading{margin:0;font-size:13px;color:#173d69}
.customer-messenger-auto-guide ol{margin:0;padding-left:21px;font-size:13px;line-height:1.6}
.customer-messenger-command{display:flex;flex-wrap:wrap;align-items:center;gap:9px;width:100%}
.customer-messenger-command code{display:inline-block;padding:9px 12px;border:1px solid #93bce9;border-radius:7px;background:#fff;font-size:15px;font-weight:700;user-select:all}
.customer-messenger-auto-guide .customer-messenger-auto-result{min-height:1.4em;color:#173d69;font-weight:600}
.customer-messenger-error{grid-column:1/-1;color:#a52d2d}
.messenger-panel .connection-heading p,.messenger-panel .settings-note,.messenger-panel .connection-field small{font-size:13px;line-height:1.55}
.messenger-panel .connection-field label{font-size:13px}
@media(max-width:900px){
  .customer-row{min-width:0;grid-template-columns:minmax(0,1fr) auto}
  .customer-row>.customer-messenger-status{grid-column:1 / -1;grid-row:6;border-top:1px solid #eee;padding:9px 0 0;margin-top:3px}
  .customer-row>.customer-messenger-editor{grid-row:7;grid-template-columns:1fr;margin-top:8px;padding:16px}
  .customer-messenger-editor-heading{grid-column:1}
  .customer-messenger-link-actions{display:grid;grid-template-columns:1fr 1fr}
}

