:root{--navy:#102943;--navy2:#173954;--navy3:#274966;--gold:#d69b48;--gold-light:#f9efd9;--bg:#f3f6fa;--surface:#fff;--text:#18324a;--muted:#7b8b9e;--line:#e1e8ef;--green:#079678;--greenbg:#e7f7f1;--amber:#a16b15;--amberbg:#fff3df;--red:#ae4545;--radius:12px;--shadow:0 5px 19px rgba(15,42,65,.035);font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--text)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg)}body{font-size:13px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #d99d4c;outline-offset:2px}button svg{vertical-align:middle}svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin-top:0}h1{font-size:26px;letter-spacing:-.85px;margin-bottom:7px;font-weight:730}h2{font-size:15px;margin-bottom:3px;letter-spacing:-.2px}small{font-size:11px}.hidden{display:none!important}.layout{display:flex;min-height:100vh}.sidebar{width:236px;flex:none;background:var(--navy);color:#bdcfdf;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;z-index:20}.brand{padding:28px 18px 22px;display:flex;align-items:center;gap:10px;color:#fff}.brand-logo{width:42px;height:42px;background:#244764;border-radius:10px;display:grid;place-items:center;font-size:17px;font-weight:800;position:relative}.brand-gold{position:absolute;width:9px;height:9px;background:var(--gold);border-radius:50%;top:6px;right:5px}.brand-name{font-size:16px;font-weight:750;letter-spacing:.1px}.brand-sub{font-size:8px;letter-spacing:1.3px;color:#8fa8be;margin-top:5px}.sidebar-section{font-size:9px;color:#7896ae;letter-spacing:1.5px;font-weight:750;margin:20px 23px 9px}.nav{display:grid;gap:4px;padding:0 13px}.nav-link{width:100%;border:0;text-align:left;color:#c2d0de;display:flex;align-items:center;gap:13px;background:none;padding:12px 11px;border-radius:7px;font-size:13px;font-weight:460}.nav-link:hover{background:#1b3b57;color:#fff}.nav-link.active{background:#274866;color:#fff}.nav-icon{width:18px;display:flex}.nav-icon svg{width:16px;height:16px}.side-bottom{border-top:1px solid #2c4862;margin:auto 15px 21px;padding:19px 6px 0;display:flex;gap:11px}.side-bottom strong{color:#fff;font-size:11px;display:block;margin-bottom:7px}.side-bottom small{display:block;color:#839db4;line-height:1.7;font-size:10px}.side-spark{color:var(--gold);width:12px}.side-spark:before{content:'✦';font-size:16px}.main{min-width:0;flex:1}.topbar{height:66px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 33px;gap:15px}.topbar-left{font-size:12px;color:#60758a;font-weight:600;display:flex;align-items:center;gap:10px}.topbar-actions{display:flex;gap:11px;align-items:center}.sync-status{border:1px solid var(--line);background:#f8fafc;border-radius:30px;padding:7px 11px;font-size:10px;color:#667b8d;display:flex;align-items:center;gap:7px;white-space:nowrap}.dot{width:6px;height:6px;background:#08a48b;border-radius:50%}.dot.off{background:#dc9f42}.outline-btn,.primary-btn,.subtle-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:7px;padding:10px 14px;border:1px solid #d7e1ea;background:#fff;color:#314d66;font-size:12px;font-weight:550;min-height:37px;white-space:nowrap}.outline-btn:hover{background:#f4f7fa}.primary-btn{background:#153b59;border-color:#153b59;color:white}.primary-btn:hover{background:#245476}.subtle-btn{border:none;background:#eff4f8}.primary-btn svg,.outline-btn svg{width:14px;height:14px}.menu-toggle{display:none!important}.icon-btn{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:7px;background:transparent;color:#587087}.icon-btn:hover{background:#f4f7fa}.content{max-width:1390px;padding:29px 34px 24px;margin:auto}.page-title-row{display:flex;justify-content:space-between;align-items:flex-end;gap:15px;margin-bottom:23px}.eyebrow{color:#ba843b;font-size:10px;font-weight:750;letter-spacing:2px;margin-bottom:11px}.page-title-row p{color:var(--muted);font-size:12px;margin:0}.title-actions{display:flex;gap:8px}.notice{border:1px solid #f1e3c3;background:#fffaf0;border-radius:9px;padding:13px 16px;display:flex;align-items:center;gap:11px;color:#87642c;font-size:11.5px;line-height:1.6;margin-bottom:20px}.notice svg{width:17px;height:17px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:17px}.kpi{border:1px solid var(--line);border-radius:12px;padding:20px 19px;background:#fff;min-height:122px;box-shadow:var(--shadow);position:relative}.kpi .k-label{font-size:11px;color:#697f95}.kpi .k-num{font-size:29px;letter-spacing:-1px;line-height:1.3;margin:15px 0 3px;font-weight:720}.kpi .k-note{color:#9aabba;font-size:10px}.k-icon{position:absolute;top:19px;right:18px;background:#f1f6fa;color:#7890a6;border-radius:9px;padding:8px;display:grid}.k-icon svg{width:14px;height:14px}.k-icon.open{background:#e8f6f1;color:#138e73}.k-icon.check{background:#fff2de;color:#bb852f}.chart-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;margin-bottom:17px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:20px}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:20px}.panel-head h2{font-size:14px}.panel-head p{color:#9babba;font-size:11px;margin:5px 0 0}.tiny-tag{background:#f0f4f8;color:#8295a7;font-size:9px;letter-spacing:.4px;padding:7px 9px;border-radius:5px;font-weight:650}.bar-chart{min-height:170px}.bar-row{display:flex;align-items:center;gap:13px;margin-bottom:16px}.bar-row strong{width:43px;color:#566f86;font-size:11px}.bar-track{background:#edf2f5;border-radius:99px;height:8px;overflow:hidden;flex:1}.bar-fill{background:#316981;height:100%;border-radius:99px}.bar-count{font-size:11px;width:20px;text-align:right}.status-layout{min-height:160px;display:flex;align-items:center;justify-content:center;gap:27px}.donut{width:126px;height:126px;border-radius:100%;display:grid;place-items:center;position:relative;flex:none}.donut-center{width:85px;height:85px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut-center strong{font-size:27px;line-height:1}.donut-center small{color:#9aacb9;margin-top:5px}.status-legend{display:grid;gap:13px;min-width:135px}.status-legend div{display:flex;align-items:center;gap:8px;font-size:10px;color:#77899d}.legend-dot{width:8px;height:8px;border-radius:2px}.status-legend strong{margin-left:auto;color:var(--text)}.section-recent{margin-bottom:17px}.text-link{border:none;background:none;padding:5px;color:#107b91;font-size:11px;font-weight:700;display:inline-flex;gap:5px;align-items:center}.text-link:hover{text-decoration:underline}.text-link svg{width:13px;height:13px}.recent-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.recent-card{border:1px solid #e5ebf0;border-radius:9px;padding:14px 14px 11px;min-width:0}.recent-card:hover{border-color:#b4c9d9;background:#fbfdff}.recent-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.recent-name{font-weight:700;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recent-dept{font-size:10px;color:#92a3b2;margin-top:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recent-details{display:flex;gap:10px;color:#8599ab;font-size:10px;flex-wrap:wrap;align-items:center;margin-top:14px}.recent-bottom{border-top:1px solid #edf0f3;display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:10px;margin-top:11px}.recent-bottom span{font-size:10px;color:#8495a5}.grade-badge{background:#eaf4f8;color:#326980;border-radius:4px;padding:5px 7px;font-size:10px;font-weight:750}.status-badge{white-space:nowrap;font-size:9px;font-weight:750;padding:6px 8px;border-radius:30px}.status-badge.terbuka{color:#078b72;background:#e5f8f1}.status-badge.semak{background:#fff2dd;color:#a26d1a}.status-badge.tutup{background:#f0f1f4;color:#69788a}.footer{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9aabba;border-top:1px solid var(--line);padding-top:15px;gap:10px}.filters-panel{margin-bottom:15px}.search-row{display:flex;gap:10px}.search-wrap{border:1px solid #dfe7ef;background:#f7f9fb;display:flex;align-items:center;gap:9px;border-radius:7px;padding:0 12px;flex:1}.search-wrap svg{width:16px;height:16px;color:#8ca0b2}.search-wrap input{border:0;width:100%;background:transparent;padding:11px 0;outline:none;font-size:12px;color:var(--text)}.filter-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin-top:17px}.filter-grid label{color:#62798f;font-weight:650;font-size:10px}.filter-grid select{display:block;width:100%;font-size:11px;margin-top:6px;border:1px solid #e0e7ed;border-radius:6px;padding:11px 8px;background:#fff;color:#3b546b}.filter-foot{border-top:1px solid #edf1f4;margin-top:17px;padding-top:14px;display:flex;align-items:center;justify-content:space-between;color:#9aacbb;font-size:11px}.table-panel{padding:0;overflow:hidden}.table-scroll{overflow-x:auto}.data-table{width:100%;border-collapse:collapse;font-size:11px;text-align:left;white-space:nowrap}.data-table th{color:#7890a3;background:#f8fafc;padding:16px 14px;font-size:10px;letter-spacing:.1px}.data-table td{padding:14px;border-top:1px solid #edf0f3;color:#40566a}.data-table tbody tr:nth-child(even){background:#fbfcfd}.data-table tbody tr:hover{background:#f5f9fc}.data-table td strong{font-size:12px;color:var(--text);display:block}.data-table td small{display:block;color:#8c9fad;margin-top:5px}.table-action{border:1px solid #dce6ed;border-radius:6px;padding:7px 9px;background:#fff;color:#426984;font-size:11px}.table-action:hover{background:#edf5f9}.mobile-cards{display:none}.empty{text-align:center;color:#91a0ad;padding:35px}.modal-layer{position:fixed;inset:0;z-index:40;display:flex;justify-content:center;align-items:center;padding:22px;background:rgba(11,32,50,.53)}.modal{background:#fff;border-radius:13px;width:min(760px,100%);max-height:92vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(3,17,32,.25)}.modal-head{padding:20px 25px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.modal-head h2{font-size:20px;letter-spacing:-.5px;margin:5px 0 0}.modal-kicker{font-size:10px;letter-spacing:1.2px;color:#c09250;font-weight:750}.modal-body{padding:22px 25px;overflow:auto}.form-section{font-weight:720;font-size:12px;color:var(--navy);border-bottom:1px solid var(--line);padding-bottom:12px;margin:7px 0 15px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px;margin-bottom:21px}.form-field{display:flex;flex-direction:column;gap:7px;min-width:0}.form-field.wide{grid-column:1/-1}.form-field label{font-weight:660;color:#597186;font-size:11px}.field-input,select.field-input{border:1px solid #dae4ec;padding:11px 12px;border-radius:7px;color:#213b50;background:#fbfcfd;width:100%;min-width:0}.field-input[readonly]{background:#eaf6f1;color:#0d806b;font-weight:750}.helper{font-size:10px;color:#9aaaba}.form-tip{background:#f4f8fb;border-left:3px solid #8ea5b8;color:#60768b;padding:10px 12px;font-size:11px;line-height:1.6;margin-bottom:17px}.form-footer{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:18px;margin-top:12px}.form-error{color:#a84638;background:#fff3f1;border:1px solid #f0d6cf;padding:10px 12px;border-radius:7px;font-size:11px;margin-bottom:13px}.count-wrap{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.count-wrap .form-field{min-width:0}.count-wrap input{font-size:17px;font-weight:700;text-align:center}.auth-tabs{display:flex;gap:6px;margin-bottom:17px;border-bottom:1px solid var(--line)}.auth-tab{border:0;background:transparent;color:#8094a5;padding:9px 12px}.auth-tab.active{color:var(--navy);border-bottom:2px solid var(--gold);font-weight:750}.login-note{padding:10px 12px;background:#f8fafb;border-radius:7px;color:#728697;font-size:11px;margin:14px 0}.history-item{padding:13px 4px;border-bottom:1px solid #e8eef3;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.history-item strong{font-size:12px}.history-item small{color:#879bad;margin-top:6px;display:block}.history-changes{font-size:11px;color:#617b92;line-height:1.7;max-width:430px}.toast{position:fixed;bottom:24px;right:24px;z-index:100;background:#203d55;color:#fff;padding:13px 17px;border-radius:9px;box-shadow:0 9px 24px rgba(0,0,0,.15);max-width:360px;font-size:12px;opacity:0;pointer-events:none;transition:opacity .25s}.toast.show{opacity:1}.toast.error{background:#9a4545}.overlay{display:none}.mode-warn{border-color:#f3e2be!important;background:#fff9ed!important;color:#a36b16!important}.mode-warn .dot{background:#e4a445}.switcher{display:flex;gap:8px;margin-top:10px}.metric-strong{font-weight:750;color:#1e435e}.modal button{font-size:12px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px 20px;margin-bottom:16px}.detail-item small{color:#899bad;display:block;margin-bottom:4px}.detail-item strong{font-size:12px;font-weight:650;overflow-wrap:anywhere}.detail-actions{display:flex;gap:8px;justify-content:flex-end;border-top:1px solid var(--line);padding-top:18px}.inline-warn{background:#fffaee;border:1px solid #f0e0bc;border-radius:6px;padding:10px 13px;color:#956b2b;line-height:1.7;font-size:11px}.loader{color:#9aabba;text-align:center;padding:35px}.user-display{font-size:11px;color:#657a8d}.help-list{margin:0;padding-left:20px;color:#526d83;line-height:2}.help-list li{margin-bottom:6px}.field-hint{color:#8396a6;font-size:10px}.btn-row{display:flex;gap:10px;flex-wrap:wrap}
@media(max-width:1170px){.sidebar{width:215px}.topbar{padding:0 20px}.content{padding:25px 22px}.chart-grid{grid-template-columns:1fr 1fr}.kpi{padding:17px 15px}.data-table th,.data-table td{padding:12px 9px}}
@media(max-width:930px){.sidebar{position:fixed;transform:translateX(-100%);transition:transform .2s}.sidebar.open{transform:translateX(0)}.overlay.show{display:block;position:fixed;inset:0;background:rgba(0,0,0,.34);z-index:18}.menu-toggle{display:grid!important}.topbar{padding:0 16px}.title-actions{display:none}.content{max-width:100%;padding:23px 16px}.kpi-grid{grid-template-columns:repeat(2,1fr)}.chart-grid{grid-template-columns:1fr}.topbar-left span{font-size:11px}}
@media(max-width:620px){body{font-size:12px}.content{padding:18px 13px 22px}.topbar{height:58px;padding:0 12px}.topbar-left>span{display:none}.topbar-actions{gap:7px}.top-add{padding:9px 10px}.sync-status{max-width:130px;overflow:hidden;text-overflow:ellipsis}.login-btn{padding:9px 9px}.page-title-row{margin-bottom:15px}.page-title-row h1{font-size:22px}.page-title-row p{font-size:11px;line-height:1.5}.notice{align-items:flex-start;padding:11px;font-size:10px}.kpi-grid{gap:8px;margin-bottom:12px}.kpi{padding:15px 13px;min-height:100px}.kpi .k-num{font-size:26px;margin-top:15px}.kpi .k-label{font-size:10px}.kpi .k-note{font-size:9px}.k-icon{top:12px;right:10px;padding:5px}.panel{padding:15px}.chart-grid{gap:12px}.recent-grid{grid-template-columns:1fr;gap:9px}.status-layout{gap:20px}.donut{width:120px;height:120px}.donut-center{width:82px;height:82px}.filter-grid{grid-template-columns:1fr 1fr;gap:10px}.search-row{flex-direction:column}.search-row .outline-btn{align-self:flex-end}.table-scroll{display:none}.table-panel{padding:10px}.mobile-cards{display:grid;gap:10px}.mobile-card{border:1px solid #e5edf1;border-radius:8px;padding:14px;background:#fff}.mobile-title{font-weight:750;margin-bottom:5px}.mobile-sub{color:#8a9ba9;font-size:11px}.mobile-facts{display:flex;gap:13px;flex-wrap:wrap;margin:12px 0;font-size:10px;color:#546e83}.mobile-foot{display:flex;align-items:center;justify-content:space-between;gap:6px}.modal-layer{padding:0;align-items:flex-end}.modal{width:100%;max-height:96vh;border-radius:15px 15px 0 0}.modal-head{padding:16px 18px}.modal-body{padding:17px 16px}.form-grid{gap:10px}.form-field.wide{grid-column:1/-1}.count-wrap{gap:6px}.count-wrap input{font-size:15px}.footer{display:block;line-height:1.8}.footer span{display:block}.detail-grid{gap:12px}.panel-head h2{font-size:13px}}
@media print{.sidebar,.topbar,.title-actions,.modal-layer,.filter-panel,.text-link,.top-add,.outline-btn,.notice{display:none!important}.main{margin:0}.content{padding:10px}.panel{break-inside:avoid;box-shadow:none}.table-scroll{overflow:visible}.table-panel .data-table{font-size:9px}}
@media(max-width:620px){.sync-status{display:none}.topbar-actions{min-width:0}.topbar .top-add{max-width:140px}.main{width:100%;overflow-x:clip}}

/* v2.1 — Pilihan input boleh ditaip sendiri */
.choice-intro{font-size:11px;color:#466479;background:#f2f6f9;border:1px solid #e0e8ef;border-radius:7px;padding:11px 13px;line-height:1.65;margin-bottom:20px;}
.editable-choice .choice-input-wrap{position:relative;display:flex;align-items:center;}
.editable-choice .field-input{padding-right:42px;}
.editable-choice .choice-toggle{position:absolute;right:4px;top:4px;bottom:4px;width:34px;background:transparent;border:0;color:#5e788e;border-radius:5px;display:grid;place-items:center;font-size:22px;font-weight:400;cursor:pointer;}
.editable-choice .choice-toggle:hover{background:#eaf0f5;}
.editable-choice .choice-menu{margin-top:0;border:1px solid #d5e0e8;background:#fff;box-shadow:0 6px 14px rgba(14,36,57,.08);border-radius:7px;padding:5px;display:grid;gap:2px;}
.editable-choice .choice-menu.hidden{display:none;}
.editable-choice .choice-option{font:inherit;font-size:12px;color:#233c53;line-height:1.4;width:100%;text-align:left;padding:9px 11px;background:#fff;border:0;border-radius:5px;overflow-wrap:anywhere;cursor:pointer;}
.editable-choice .choice-option:hover,.editable-choice .choice-option:focus-visible{background:#edf3f8;outline:none;}
.editable-choice .choice-new{color:#a27631;background:#fff9f0;border-top:1px solid #f2e6d3;font-weight:650;}
.editable-choice .choice-new:hover{background:#fff1d9;}
.editable-choice .choice-empty{font-size:11px;color:#8496a5;padding:10px;}
@media(max-width:620px){.choice-intro{font-size:11px;margin-bottom:14px}.editable-choice .choice-option{padding:12px 10px;font-size:12px}}

/* v2.2: Senarai agensi boleh diskrol supaya semua pilihan kelihatan */
.editable-choice[data-choice="agensi"] .choice-menu{max-height:260px;overflow-y:auto;overscroll-behavior:contain;}


/* SPFA-MY v2.4 — tipografi sans lebih jelas, tanpa ubah palet asal */
:root{font-family:"Segoe UI",Arial,Helvetica,sans-serif;}
body{font-size:15px;line-height:1.5;}
h1{font-size:29px;letter-spacing:-.65px;}
h2{font-size:17px;}
small{font-size:13px;}
.brand-name{font-size:18px;}
.brand-sub{font-size:10px;}
.sidebar-section{font-size:11px;}
.nav-link{font-size:15px;}
.side-bottom strong{font-size:13px;}
.side-bottom small{font-size:12px;}
.topbar-left{font-size:14px;}
.sync-status{font-size:12px;}
.outline-btn,.primary-btn,.subtle-btn,.modal button{font-size:14px;}
.eyebrow{font-size:12px;}
.page-title-row p{font-size:14px;}
.notice{font-size:13px;}
.kpi .k-label{font-size:13px;}
.kpi .k-note{font-size:12px;}
.kpi .k-num{font-size:31px;}
.panel-head h2{font-size:16px;}
.panel-head p{font-size:13px;}
.tiny-tag{font-size:11px;}
.bar-row strong,.bar-count{font-size:13px;}
.status-legend div{font-size:12px;}
.text-link{font-size:13px;}
.recent-name{font-size:14px;}
.recent-dept,.recent-details,.recent-bottom span{font-size:12px;}
.grade-badge,.status-badge{font-size:11px;}
.footer{font-size:12px;}
.search-wrap input{font-size:14px;}
.filter-grid label{font-size:12px;}
.filter-grid select{font-size:14px;}
.filter-foot{font-size:13px;}
.data-table{font-size:13px;}
.data-table th{font-size:12px;}
.data-table td strong{font-size:14px;}
.table-action{font-size:13px;}
.modal-head h2{font-size:23px;}
.modal-kicker{font-size:12px;}
.form-section{font-size:14px;}
.form-field label{font-size:13px;}
.helper,.field-hint{font-size:12px;}
.form-tip,.form-error,.inline-warn,.login-note,.history-changes,.user-display{font-size:13px;}
.history-item strong,.detail-item strong,.toast{font-size:14px;}
.choice-intro{font-size:13px;}
.editable-choice .choice-option{font-size:14px;}
.editable-choice .choice-empty{font-size:13px;}
@media(max-width:930px){.topbar-left span{font-size:13px;}}
@media(max-width:620px){
 body{font-size:14px;}
 .page-title-row h1{font-size:25px;}
 .page-title-row p{font-size:13px;}
 .notice{font-size:12px;}
 .kpi .k-num{font-size:28px;}
 .kpi .k-label{font-size:12px;}
 .kpi .k-note{font-size:11px;}
 .mobile-title{font-size:15px;}
 .mobile-sub,.mobile-facts{font-size:12px;}
 .panel-head h2{font-size:15px;}
 .count-wrap input{font-size:17px;}
 .choice-intro{font-size:13px;}
 .editable-choice .choice-option{font-size:14px;}
 /* Paparkan amaran sambungan yang ringkas jika site online tetapi D1 belum tersedia */
 body.hosted-preview .sync-status{display:inline-flex;max-width:108px;font-size:11px;padding:6px 8px;}
 body.hosted-preview .sync-status #syncText{overflow:hidden;text-overflow:ellipsis;}
 body.hosted-preview .topbar-actions{gap:5px;}
 body.hosted-preview .top-add{padding:9px 7px;max-width:120px;}
 body.hosted-preview .login-btn{padding:9px 7px;}
}

/* SPFA-MY v2.5 — menu & permohonan pertukaran */
.brand{padding-left:22px}.brand-name{font-size:19px}.sidebar .nav-link{min-height:42px}
.sidebar .nav:last-of-type{padding-bottom:22px}.side-bottom,.brand-logo{display:none!important}
.transfer-panel{min-height:280px}.transfer-head{display:flex;align-items:start;justify-content:space-between;gap:15px;margin-bottom:15px}
.transfer-head h2{font-size:19px;margin-bottom:6px}.transfer-head p{font-size:13px;color:#70859a;line-height:1.6;margin:0}
.transfer-search{margin-bottom:15px}.transfer-filter{display:flex;align-items:end;justify-content:space-between;margin-bottom:16px;gap:12px}
.transfer-filter label{display:flex;flex-direction:column;gap:6px;color:#61788f;font-size:13px}.transfer-filter select{background:#f7f9fb;border:1px solid #dae3ec;border-radius:7px;padding:9px 12px;color:#213b54;min-width:195px}
.transfer-count{color:#617b93;font-size:13px}.transfer-table td{max-width:265px;overflow-wrap:anywhere;vertical-align:middle}.transfer-table td small{color:#8a9bad}
.transfer-mob{display:grid;gap:3px;margin:12px 0}.transfer-mob small{font-size:11px;color:#8797a7;margin-top:7px}.transfer-mob div{overflow-wrap:anywhere}
.transfer-check{background:#f5f8fa;padding:12px;border-radius:7px}.transfer-check label{display:flex;gap:10px;align-items:flex-start;line-height:1.55;font-weight:500}.transfer-check input{width:17px;height:17px;margin-top:2px;flex:none}
@media(max-width:620px){.transfer-head{align-items:stretch;flex-direction:column}.transfer-head .primary-btn{align-self:flex-start}.transfer-filter{align-items:center}.transfer-filter select{min-width:140px}.transfer-panel{padding:15px}}

/* SPFA-MY v2.6 — short action for confirmed transfers */
.transfer-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.transfer-actions .done-action,.detail-actions .done-action{border:1px solid #b5ddd1;background:#f0faf7;color:#09664f;font-weight:600}
.transfer-actions .done-action:hover,.detail-actions .done-action:hover{background:#e0f6ed}
@media(max-width:690px){.transfer-actions{justify-content:flex-start;gap:10px}.transfer-actions button{min-height:36px}}


/* SPFA-MY v2.7 — kemasan Aptos & jadual pertukaran tanpa tindihan.
   Tiada fail font pihak ketiga dibundel. Aptos digunakan jika dipasang pada peranti. */
:root{
  --navy:#142c45;--navy2:#1d3c58;--navy3:#34536f;
  --gold:#c79650;--bg:#f3f5f8;--text:#1b344c;--muted:#718397;
  --line:#e2e8ee;--radius:13px;--shadow:0 5px 20px rgba(19,42,63,.045);
  font-family:"Aptos","Segoe UI Variable","Segoe UI",Arial,sans-serif;
  font-synthesis:none;
}
html,body{max-width:100%;}
body{font-family:"Aptos","Segoe UI Variable","Segoe UI",Arial,sans-serif;font-size:15.5px;line-height:1.55;letter-spacing:0;}
button,input,select,textarea,option,table{font-family:inherit;}
h1,h2,h3,.brand-name,.modal-head h2{font-family:"Aptos Display","Aptos","Segoe UI Variable","Segoe UI",Arial,sans-serif;letter-spacing:-.025em;}
h1{font-size:31px;font-weight:700;line-height:1.2;}
h2{font-weight:700;}
.sidebar{width:252px;background:#152c46;}
.sidebar .nav-link{font-size:15px;font-weight:500;line-height:1.35;min-height:46px;border-radius:9px;}
.sidebar .nav-link.active{background:#2c4b69;box-shadow:inset 3px 0 0 #ca9a52;}
.sidebar .nav-link:hover{background:#24435f;}
.brand{padding:28px 23px 20px;}
.brand-name{font-size:21px;line-height:1.1;}
.brand-sub{font-size:10px;letter-spacing:1.5px;}
.sidebar-section{font-size:11px;letter-spacing:1.2px;margin-top:23px;}
.topbar{height:70px;padding:0 30px;}
.topbar-left{font-size:14px;}
.content{max-width:1550px;padding:32px 33px 26px;}
.page-title-row{margin-bottom:24px;}
.page-title-row h1{font-size:32px;}
.page-title-row p{font-size:14px;margin-top:8px;}
.panel{border:1px solid #e1e7ee;border-radius:14px;box-shadow:0 6px 20px rgba(23,45,67,.04);}
.primary-btn{background:#183b59;border-color:#183b59;}
.primary-btn:hover{background:#264f70;}
.outline-btn,.primary-btn,.subtle-btn{font-size:14px;font-weight:500;border-radius:8px;}
.search-wrap{min-height:49px;background:#f8fafc;border-color:#dce5ed;border-radius:9px;}
.search-wrap input{font-size:14.5px;}
.transfer-head h2{font-size:20px;font-weight:700;}
.transfer-head p{font-size:14px;line-height:1.55;}
.transfer-filter label{font-size:13px;font-weight:600;}
.transfer-filter select{font-size:14px;min-height:43px;}
.transfer-count{font-size:13px;}
/* Kunci pembetulan: jadual lama memaksa semua teks satu baris (nowrap).
   table-layout:fixed + whitespace normal memastikan lokasi panjang kekal dalam lajurnya. */
#transferTableWrap{width:100%;overflow-x:hidden;}
.transfer-table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;white-space:normal;}
.transfer-table th,.transfer-table td{box-sizing:border-box;min-width:0;max-width:none;white-space:normal;text-align:left;vertical-align:top;overflow-wrap:anywhere;word-break:normal;}
.transfer-table th{padding:14px 13px;background:#f5f8fb;color:#5c7186;font-size:12px;font-weight:650;letter-spacing:.015em;}
.transfer-table td{padding:19px 13px;line-height:1.55;font-size:14px;color:#38526b;border-top:1px solid #e9eef3;}
.transfer-table tbody tr:nth-child(even){background:#fafbfd;}
.transfer-table tbody tr:hover{background:#f2f7fb;}
.transfer-table th:nth-child(1),.transfer-table td:nth-child(1){width:21%;}
.transfer-table th:nth-child(2),.transfer-table td:nth-child(2){width:9%;}
.transfer-table th:nth-child(3),.transfer-table td:nth-child(3){width:24%;}
.transfer-table th:nth-child(4),.transfer-table td:nth-child(4){width:23%;}
.transfer-table th:nth-child(5),.transfer-table td:nth-child(5){width:12%;}
.transfer-table th:nth-child(6),.transfer-table td:nth-child(6){width:11%;}
.transfer-person strong{font-size:15.5px;font-weight:680;line-height:1.4;color:#17324b;display:block;overflow-wrap:anywhere;}
.transfer-ref{margin-top:8px;color:#8697a8;font-size:12.5px;}
.transfer-place{white-space:normal;overflow-wrap:anywhere;line-height:1.65;color:#415a70;}
.transfer-place-empty{color:#a0adba;}
.transfer-grade{display:inline-flex;align-items:center;border:1px solid #dbe7ef;border-radius:6px;background:#f0f6fa;color:#345b74;padding:5px 8px;font-size:12px;font-weight:650;line-height:1.2;}
.transfer-grade.missing{font-weight:500;color:#687d8f;background:#f6f8fa;}
.transfer-table .status-badge{display:inline-flex;max-width:100%;font-size:11.5px;font-weight:650;line-height:1.25;white-space:normal;}
.transfer-table .transfer-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;flex-wrap:nowrap;}
.transfer-table .transfer-actions button{display:flex;align-items:center;justify-content:center;width:100%;min-height:36px;font-size:12px;font-weight:550;padding:8px 5px;text-align:center;line-height:1.3;white-space:normal;}
/* Tablet, komputer kecil: kad dua lajur lebih selesa daripada jadual sempit. */
@media(max-width:1320px){
 .sidebar{width:235px;}
 #transferTableWrap{display:none!important;}
 #transferCards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:9px;}
 #transferCards .mobile-card{min-width:0;margin:0;padding:20px;border:1px solid #e0e8ee;border-radius:12px;box-shadow:0 3px 15px rgba(20,42,66,.03);}
 #transferCards .mobile-title{font-size:16px;line-height:1.35;font-weight:700;overflow-wrap:anywhere;}
 #transferCards .mobile-sub{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:7px;font-size:12px;}
 #transferCards .transfer-mob{margin-top:16px;margin-bottom:16px;gap:6px;}
 #transferCards .transfer-mob small{font-size:11.5px;text-transform:none;font-weight:600;color:#6f8295;margin-top:7px;}
 #transferCards .transfer-mob div{font-size:14px;line-height:1.55;color:#3d566e;}
 #transferCards .transfer-actions{border-top:1px solid #edf1f4;padding-top:13px;gap:10px;}
 #transferCards .transfer-actions .table-action{min-height:37px;}
}
@media(max-width:900px){.sidebar{width:252px;}.content{padding:25px 20px;}}
@media(max-width:740px){#transferCards{grid-template-columns:1fr!important;}.transfer-filter{flex-wrap:wrap;}.transfer-count{max-width:100%;}.transfer-head h2{font-size:19px;}}
@media(max-width:620px){
 body{font-size:14.5px;}
 .content{padding:19px 13px 23px;}
 .page-title-row h1{font-size:26px;}
 .transfer-panel{padding:15px;}
 #transferCards .mobile-card{padding:17px;}
 #transferCards .mobile-title{font-size:16px;}
 .panel-head h2{font-size:16px;}
 .modal-head h2{font-size:23px;}
 .transfer-head .primary-btn{width:100%;}
 .transfer-filter select{min-width:140px;}
}
@media print{
 #transferTableWrap{display:block!important;overflow:visible!important;}
 #transferCards{display:none!important;}
 .transfer-table{font-size:10px;}
 .transfer-table th,.transfer-table td{font-size:10px;padding:7px 5px;}
 .transfer-actions{display:none!important;}
}


/* SPFA-MY v2.8 — sidebar tema dark teal + green accent, tanpa line tepi active */
:root{
  --sidebar-bg:#14344e;
  --sidebar-bg-deep:#102a40;
  --sidebar-panel:#1e4660;
  --sidebar-panel-soft:#244e69;
  --sidebar-text:#dce8f0;
  --sidebar-muted:#98b0bf;
  --sidebar-accent:#b9d69b;
  --sidebar-accent-2:#85b88f;
  --sidebar-line:rgba(155,201,167,.18);
}
.sidebar{
  position:sticky;
  top:0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 20%),
    linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
  color:var(--sidebar-text);
  overflow:hidden;
}
.sidebar::before,
.sidebar::after{
  content:"";
  position:absolute;
  inset:auto;
  pointer-events:none;
  opacity:.42;
}
.sidebar::before{
  width:340px;
  height:340px;
  right:-150px;
  top:85px;
  background:
    linear-gradient(132deg, transparent 48.8%, rgba(137,179,143,.22) 49%, rgba(137,179,143,.22) 49.6%, transparent 49.8%),
    linear-gradient(40deg, transparent 49.2%, rgba(137,179,143,.16) 49.4%, rgba(137,179,143,.16) 49.9%, transparent 50.1%),
    linear-gradient(172deg, transparent 63.2%, rgba(196,220,167,.16) 63.4%, rgba(196,220,167,.16) 63.9%, transparent 64.1%);
}
.sidebar::after{
  width:250px;
  height:250px;
  left:-110px;
  bottom:42px;
  background:
    linear-gradient(148deg, transparent 53.4%, rgba(157,204,168,.14) 53.6%, rgba(157,204,168,.14) 54.1%, transparent 54.3%),
    linear-gradient(28deg, transparent 62.8%, rgba(188,215,159,.12) 63%, rgba(188,215,159,.12) 63.5%, transparent 63.7%);
}
.brand,
.sidebar-section,
.nav,
.side-bottom{position:relative;z-index:1;}
.brand{padding:26px 24px 18px;}
.brand-name{font-size:21px;font-weight:760;color:#fff;}
.brand-sub{color:#a8becc;letter-spacing:1.7px;}
.sidebar-section{
  color:var(--sidebar-accent);
  font-size:11px;
  letter-spacing:1.45px;
  font-weight:760;
  margin:23px 23px 10px;
}
.sidebar .nav{gap:6px;padding:0 14px;}
.sidebar .nav-link{
  color:var(--sidebar-text);
  background:transparent;
  border:1px solid transparent;
  border-radius:14px;
  min-height:48px;
  padding:13px 14px;
  font-size:14.5px;
  font-weight:560;
  transition:background-color .18s ease,border-color .18s ease,transform .18s ease,box-shadow .18s ease;
}
.sidebar .nav-link:hover{
  background:rgba(255,255,255,.045);
  border-color:rgba(184,214,155,.16);
  color:#fff;
}
.sidebar .nav-link.active{
  background:linear-gradient(180deg, rgba(94,125,153,.28) 0%, rgba(64,91,120,.26) 100%);
  border-color:rgba(191,218,163,.22);
  color:#fff;
  box-shadow:0 10px 24px rgba(8,23,38,.18);
}
.sidebar .nav-link.active .nav-icon,
.sidebar .nav-link.active .nav-icon svg{color:var(--sidebar-accent);}
.sidebar .nav-link.active::before{
  content:"";
  position:absolute;
  left:14px;
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--sidebar-accent);
  box-shadow:0 0 0 4px rgba(185,214,155,.14);
}
.sidebar .nav-link.active span:last-child{padding-left:14px;}
.sidebar .nav-link.active{position:relative;}
.sidebar .nav-link.active .nav-icon{margin-left:2px;}
.sidebar .nav-icon svg{opacity:.92;}
/* buang line tepi lama */
.sidebar .nav-link.active{box-shadow:0 10px 24px rgba(8,23,38,.18)!important;}
.side-bottom{border-top:1px solid rgba(175,204,176,.14);}

/* kemasan kecil pada topbar supaya serasi */
.topbar{
  background:linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}
.sync-status{
  border-color:#dce7e1;
  background:#f7fbf8;
}
.dot{background:#8ab889;}
.dot.off{background:#c8a25c;}
.primary-btn{
  background:#183c58;
  border-color:#183c58;
}
.primary-btn:hover{background:#27516c;}
.notice{
  border-color:#e3e5d0;
  background:#fcfdf8;
  color:#67744b;
}
.notice svg{color:#8eb07f;}
@media(max-width:900px){
  .sidebar::before{right:-170px;top:100px;opacity:.34;}
  .sidebar::after{bottom:16px;left:-140px;opacity:.26;}
}

/* v2.9 — medan tempat bertukar sebenar */
.transfer-destination-confirm{margin:18px 0 14px;}
.transfer-destination-confirm .field-input{min-height:45px;font-size:15px;}
.transfer-destination-confirm .field-hint{font-size:12.5px;line-height:1.5;}
.required-star{color:#9a4646;}
.section-recent .panel-head{align-items:center;}


/* SPFA-MY v2.11 — Sejarah: lokasi diminta + destinasi sebenar, baris berwarna */
/* Senarai aktif masih 6 lajur; sejarah menggunakan 7 lajur. */
#transferTableWrap:not(.is-history) .transfer-table th:nth-child(1),
#transferTableWrap:not(.is-history) .transfer-table td:nth-child(1){width:20%;}
#transferTableWrap:not(.is-history) .transfer-table th:nth-child(2),
#transferTableWrap:not(.is-history) .transfer-table td:nth-child(2){width:9%;}
#transferTableWrap:not(.is-history) .transfer-table th:nth-child(3),
#transferTableWrap:not(.is-history) .transfer-table td:nth-child(3){width:23%;}
#transferTableWrap:not(.is-history) .transfer-table th:nth-child(4),
#transferTableWrap:not(.is-history) .transfer-table td:nth-child(4){width:25%;}
#transferTableWrap:not(.is-history) .transfer-table th:nth-child(5),
#transferTableWrap:not(.is-history) .transfer-table td:nth-child(5){width:12%;}
#transferTableWrap:not(.is-history) .transfer-table th:nth-child(6),
#transferTableWrap:not(.is-history) .transfer-table td:nth-child(6){width:11%;}
#transferTableWrap.is-history .transfer-table th:nth-child(1),
#transferTableWrap.is-history .transfer-table td:nth-child(1){width:18%;}
#transferTableWrap.is-history .transfer-table th:nth-child(2),
#transferTableWrap.is-history .transfer-table td:nth-child(2){width:8%;}
#transferTableWrap.is-history .transfer-table th:nth-child(3),
#transferTableWrap.is-history .transfer-table td:nth-child(3){width:16%;}
#transferTableWrap.is-history .transfer-table th:nth-child(4),
#transferTableWrap.is-history .transfer-table td:nth-child(4){width:19%;}
#transferTableWrap.is-history .transfer-table th:nth-child(5),
#transferTableWrap.is-history .transfer-table td:nth-child(5){width:18%;}
#transferTableWrap.is-history .transfer-table th:nth-child(6),
#transferTableWrap.is-history .transfer-table td:nth-child(6){width:11%;}
#transferTableWrap.is-history .transfer-table th:nth-child(7),
#transferTableWrap.is-history .transfer-table td:nth-child(7){width:10%;}
/* Palet hijau lembut pada seluruh baris hanya apabila tempat baharu dicatat. */
#transferTableWrap.is-history .transfer-table tbody tr.history-known-destination,
#transferTableWrap.is-history .transfer-table tbody tr.history-known-destination:nth-child(even){background:#eaf7f1;}
#transferTableWrap.is-history .transfer-table tbody tr.history-known-destination:hover{background:#def1e8;}
#transferTableWrap.is-history .transfer-table tbody tr.history-known-destination .transfer-place{color:#275749;}
#transferTableWrap.is-history .transfer-table tbody tr.history-known-destination .transfer-place-empty{color:#79938a;}
#transferTableWrap.is-history .transfer-table tbody tr.history-known-destination .status-badge.tutup{background:#d2ebdd;color:#27674f;}
#transferCards .mobile-card.history-known-destination{background:#eaf7f1;border-color:#cde6d9;}
#transferCards .mobile-card.history-known-destination .status-badge.tutup{background:#d2ebdd;color:#27674f;}
#transferCards .mobile-card.history-known-destination .transfer-mob div{color:#285a49;}
#transferCards .mobile-card.history-known-destination .transfer-mob div.transfer-place-empty{color:#79938a;}
@media print{
 #transferTableWrap.is-history .transfer-table tbody tr.history-known-destination,
 #transferTableWrap.is-history .transfer-table tbody tr.history-known-destination:nth-child(even){background:#eaf7f1!important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
}

/* v2.13: buang lencana sambungan pada header; semakan D1 dan login sebenar masih aktif. */
#syncStatus{display:none!important;}
