:root{--navy:#164a70;--navy-dark:#0c344f;--blue:#245d83;--green:#0b8164;--green-soft:#e8f6ef;--sky:#eff6fd;--ink:#213247;--muted:#68798a;--border:#e0e8ef;--bg:#f5f8fb;--white:#fff;--shadow:0 5px 24px rgba(22,54,78,.055);font-family:Segoe UI,Arial,sans-serif;color:var(--ink);font-synthesis:none}*,*::before,*::after{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);font-size:16px;line-height:1.5}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #65afe8;outline-offset:2px}[hidden]{display:none!important}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(28px,2.5vw,35px);line-height:1.25;letter-spacing:-.8px;margin-bottom:9px}h2{font-size:21px;line-height:1.35;margin-bottom:0;letter-spacing:-.3px}h3{font-size:18px;margin-bottom:8px}.muted{color:var(--muted)}.subtitle{font-size:16px;color:var(--muted);margin:0}.eyebrow{color:var(--green);font-weight:800;letter-spacing:1.5px;font-size:11px;margin-bottom:10px;text-transform:uppercase}.button{border:1px solid transparent;border-radius:11px;padding:13px 20px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:720;font-size:15px;min-height:47px;white-space:nowrap;transition:background-color .16s,transform .16s}.button:hover{transform:translateY(-1px)}.button.primary{background:var(--navy);color:white;box-shadow:0 4px 10px rgba(25,86,120,.13)}.button.primary:hover{background:#0f3b5f}.button.secondary{background:white;border-color:#cad6df;color:var(--navy)}.button.outline{background:transparent;border-color:#bacdda;color:var(--navy)}.button.outline:hover,.button.secondary:hover{background:#eaf3f8}.button.ghost{background:#f0f5f9;color:#39536a}.button.small{min-height:39px;padding:8px 14px;font-size:14px}.button.danger{background:#fcebed;color:#b62e36}.link-button{padding:8px 0;border:0;background:none;color:var(--navy);font-size:14px;font-weight:740;text-decoration:underline;text-underline-offset:4px}.topbar{background:white;border-bottom:1px solid #dce5ec;position:sticky;top:0;z-index:20;box-shadow:0 1px 10px rgba(20,60,90,.025)}.topbar-inner{max-width:1540px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:26px;min-height:82px;padding:0 38px}.brand{display:flex;align-items:center;gap:11px;white-space:nowrap}.brand-mark{height:46px;width:46px;display:grid;place-items:center;border-radius:13px;background:var(--navy);color:white;font-weight:800;font-size:32px;line-height:1}.brand strong{display:block;font-size:20px;color:#193c58;line-height:1.2;letter-spacing:-.4px}.brand small{font-size:9px;font-weight:800;color:#7e91a3;letter-spacing:1.1px}.main-nav{height:82px;display:flex;align-items:stretch;gap:14px}.nav-tab{border:0;background:none;color:#65768a;font-weight:700;font-size:16px;padding:0 17px;position:relative;display:flex;align-items:center;gap:9px}.nav-tab.selected{color:var(--navy)}.nav-tab.selected:after{content:"";position:absolute;bottom:0;left:12px;right:12px;height:4px;border-radius:6px 6px 0 0;background:var(--green)}.nav-tab:hover{color:var(--navy)}.header-right{display:flex;gap:19px;align-items:center}.header-role{font-size:14px;color:#53677b;white-space:nowrap;font-weight:650}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:5px}.page-container{max-width:1488px;margin:0 auto;padding:36px 36px 65px}.page-title-row{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:29px}.title-actions{display:flex;gap:10px;flex-wrap:wrap}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:25px}.stat-card{padding:19px 23px 18px;background:white;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);display:flex;justify-content:space-between;align-items:center;min-height:112px}.stat-card .stat-label{color:#697d8e;font-size:14px;font-weight:690;letter-spacing:.05px}.stat-card .stat-count{font-size:32px;line-height:1.15;font-weight:830;color:#244662;letter-spacing:-1.1px;margin-top:6px}.stat-icon{height:49px;width:49px;display:grid;place-items:center;font-size:23px;color:var(--navy);background:#eaf2f9;border-radius:14px;flex-shrink:0}.stat-card:nth-child(2) .stat-icon{background:#e7f5ee;color:var(--green)}.stat-card:nth-child(3) .stat-icon{background:#f0ecfc;color:#6b51b6}.stat-card:nth-child(4) .stat-icon{background:#fff2e4;color:#b3742e}.panel{background:white;border:1px solid var(--border);border-radius:17px;box-shadow:var(--shadow)}.filter-panel{padding:23px 26px 26px;margin-bottom:26px}.section-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:19px}.section-line .muted{font-size:14px;margin:4px 0 0}.filters{display:grid;grid-template-columns:minmax(165px,1fr) minmax(180px,1.35fr) minmax(180px,1.35fr);gap:17px}.form-field label,.field-label{display:block;font-size:14px;font-weight:740;color:#435366;margin-bottom:8px}.control,.password-wrap input{width:100%;height:48px;border:1px solid #d6e0e8;border-radius:10px;padding:0 14px;background:#fff;color:var(--ink);min-width:0;font-size:16px}.control:focus{border-color:#4c91ba;outline:3px solid #e3f1fa}.search-field{position:relative}.search-field span{position:absolute;top:8px;left:13px;color:#8698a6;font-size:26px;line-height:1;pointer-events:none}.search-field input{padding-left:43px}.results-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}.results-heading p{font-size:14px;margin:4px 0 0}.view-bar{background:white;border:1px solid var(--border);border-radius:13px;padding:8px;display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}.view-modes{display:flex;gap:6px;flex-wrap:wrap}.view-mode{border:0;background:transparent;border-radius:9px;color:#597084;padding:11px 14px;font-size:14px;font-weight:730;min-height:42px}.view-mode.active{background:var(--navy);color:white}.view-mode:not(.active):hover{background:#f1f6f9}.sheet-hint{font-size:13px;color:var(--green);font-weight:680;margin-right:12px;white-space:nowrap}.address-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:17px;align-items:start}.address-sidebar{background:#fff;border:1px solid var(--border);border-radius:14px;padding:16px 11px;position:sticky;top:98px;max-height:calc(100vh - 115px);overflow:auto}.sidebar-title{font-size:14px;font-weight:800;color:#41576a;padding:5px 10px 12px}.sidebar-list{display:flex;flex-direction:column;gap:2px}.address-link{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:43px;text-align:left;padding:9px 11px;border:none;border-radius:9px;background:transparent;color:#465c70;font-size:14px;font-weight:670;width:100%}.address-link span:first-child{overflow-wrap:anywhere}.address-link:hover,.address-link.active{background:#eaf3f8;color:var(--navy)}.address-link.active{border-left:4px solid var(--green)}.small-counter{background:#eef3f6;border-radius:8px;padding:1px 7px;color:#63788a;white-space:nowrap;font-size:12px}.address-link.active .small-counter{background:white}.address-list{min-width:0}.address-card{margin-bottom:13px;background:#fff;border:1px solid var(--border);border-radius:14px;overflow:hidden;box-shadow:0 2px 14px rgba(40,75,110,.04)}.address-card.expanded{border-color:#a9c9d8}.address-toggle{width:100%;border:0;background:white;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:20px}.address-toggle:hover{background:#f9fbfc}.address-left{display:flex;align-items:center;gap:12px;min-width:0}.address-icon{height:44px;width:44px;display:grid;place-items:center;background:#eaf3f8;color:var(--navy);border-radius:11px;font-size:24px;flex-shrink:0}.address-primary{font-weight:800;font-size:16px;color:#25455e;overflow-wrap:anywhere}.address-secondary{color:#798a97;font-size:13px;margin-top:2px}.address-right{display:flex;align-items:center;gap:14px;flex-shrink:0}.address-arrow{color:#6d8497;font-size:22px;display:inline-block;transition:transform .15s}.address-card.expanded .address-arrow{transform:rotate(90deg)}.count-pill{background:#eaf5f0;color:#187457;border-radius:30px;padding:6px 10px;font-size:13px;font-weight:750;white-space:nowrap}.table-toolbar{padding:12px 15px;background:#f5f9fc;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:10px}.table-toolbar p{margin:0;color:#617485;font-size:13px}.table-toolbar .button{min-height:38px;font-size:13px;padding:7px 10px}.excel-scroll{width:100%;overflow:auto;overscroll-behavior-inline:contain;background:white;scrollbar-color:#a3bbc9 #f1f5f7}.excel-scroll:focus-visible{outline:3px solid #72a9cb;outline-offset:-3px}.excel-scroll .excel-table{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;min-width:100%;color:#243244;font-family:Calibri,"Segoe UI",Arial,sans-serif;font-size:14px}.excel-table th,.excel-table td{padding:8px 6px;border:1px solid #9dabb7;word-break:break-word;overflow-wrap:anywhere;line-height:1.35;white-space:pre-wrap}.excel-table th{position:sticky;z-index:2;color:#fff;font-weight:700;line-height:1.25}.excel-table thead tr:first-child th{top:0;min-height:52px;height:52px}.excel-table thead tr:nth-child(2) th{top:var(--xl-h1,52px);min-height:42px;height:42px}.excel-table tr[data-hid]{cursor:pointer}.excel-table tbody tr[data-hid]:hover td{box-shadow:inset 0 0 0 2px rgba(29,127,167,.2)}.excel-full{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:white}.excel-title{padding:14px 20px;display:flex;justify-content:space-between;align-items:center;gap:10px;border-bottom:1px solid var(--border)}.excel-title strong{font-size:17px}.excel-scroll.full-view{max-height:66vh}.excel-footer{padding:11px 16px;font-size:13px;color:#6c7d8c;background:#f8fbfd}.empty-result{padding:48px 20px;text-align:center;background:white;border:1px dashed #cddbe5;border-radius:15px;color:#6d7d8b}.empty-result .big{font-size:45px;display:block;margin-bottom:13px}.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(325px,1fr));gap:14px}.house-card{padding:21px;background:#fff;border:1px solid var(--border);border-radius:15px}.house-head{display:flex;justify-content:space-between;gap:10px;align-items:start;border-bottom:1px solid var(--border);padding-bottom:14px;margin-bottom:15px}.house-head strong{font-size:18px}.house-head p{font-size:14px;color:var(--muted);margin:4px 0 0}.person-line{padding:11px 0;border-bottom:1px dashed #e3ebf0}.person-line:last-of-type{border-bottom:0}.person-title{font-size:16px;font-weight:780;color:#2d4f6a;margin-bottom:5px}.person-details{font-size:14px;color:#64768a;line-height:1.7}.person-details b{color:#526576}.card-actions{margin-top:13px;display:flex;justify-content:flex-end}.qr-guide{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:21px 25px;background:#ebf5f4;border:1px solid #d0e7e1;border-radius:15px;margin-bottom:25px}.guide-step{display:flex;align-items:center;gap:13px;flex:1}.guide-icon{display:grid;place-items:center;border-radius:50%;background:#168665;color:white;font-size:16px;font-weight:820;flex-shrink:0;width:42px;height:42px}.guide-step strong{font-size:15px;color:#234f4a}.guide-step p{font-size:13px;color:#607f78;margin:3px 0 0}.guide-arrow{font-size:30px;color:#90bab1;padding:0 4px}.alert-box{margin:0 0 20px;border:1px solid #f2d1aa;background:#fff8ee;border-radius:12px;padding:14px 18px;font-size:14px;color:#895728;line-height:1.6}.qr-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.qr-panel,.history-panel{padding:23px 23px 11px;margin-bottom:23px}.qr-filters{display:flex;gap:10px}.qr-filters select{min-width:160px}.qr-filters input{min-width:230px}.management-table{width:100%;border-collapse:collapse;text-align:left}.management-table th{color:#718293;font-size:13px;letter-spacing:.2px;background:#f6f9fb;font-weight:790;border-bottom:1px solid #e3ebf0;padding:15px 13px}.management-table td{padding:17px 13px;border-bottom:1px solid #edf1f4;font-size:14px;vertical-align:middle}.management-table tr:last-child td{border-bottom:0}.management-table tr:hover td{background:#fbfdfe}.management-table td strong{font-size:15px;color:#38576e}.management-table td small{display:block;color:#8493a2;font-size:12px;margin-top:4px}.status-label{display:inline-flex;align-items:center;gap:5px;background:#e7f6ed;color:#1a815c;padding:5px 9px;border-radius:7px;font-size:12px;font-weight:780}.status-label.warn{background:#fff3df;color:#a56b20}.status-label.neutral{background:#eef3f7;color:#55728c}.table-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap}.mini-button{border:1px solid #c8d9e3;background:white;color:var(--navy);padding:8px 12px;border-radius:8px;font-size:13px;font-weight:760;white-space:nowrap;min-height:37px}.mini-button:hover{background:#edf5f9}.mini-button.danger{color:#b23f3f;border-color:#efc5c5}.table-responsive{overflow-x:auto;width:100%}.history-panel .section-line{margin-bottom:19px}.modal-overlay{position:fixed;inset:0;z-index:100;background:rgba(14,35,54,.62);display:flex;align-items:center;justify-content:center;padding:18px}.modal{width:min(900px,100%);max-height:calc(100vh - 36px);overflow:hidden;background:white;border-radius:18px;box-shadow:0 18px 70px rgba(8,28,48,.2);display:flex;flex-direction:column}.modal-header{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:24px 27px 17px;border-bottom:1px solid var(--border)}.modal-header h2{font-size:24px}.icon-button{background:#f1f5f8;border:0;border-radius:50%;width:41px;height:41px;color:#587186;font-size:25px;line-height:1}.modal-body{padding:24px 27px;overflow:auto}.modal-footer{padding:14px 25px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.editor-help{padding:12px 15px;background:#ecf5fb;border-radius:10px;color:#44677f;margin-bottom:19px;font-size:14px}.editor-group{background:#fafcfd;border:1px solid #e2eaf0;border-radius:13px;margin-bottom:15px;padding:16px 17px}.editor-group-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:15px}.editor-group-head h3{margin:0}.editor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.editor-grid .form-field label{font-size:13px}.editor-grid .control{height:45px;font-size:16px}.editor-address{margin:0 0 18px}.edit-add{width:100%;border:1px dashed #9cc0d1;background:#f8fbfd;color:var(--navy);padding:13px;border-radius:9px;font-weight:760}.qr-preview{text-align:center;padding:10px}.qr-preview img{height:min(310px,65vw);width:min(310px,65vw);border:1px solid var(--border);border-radius:12px;image-rendering:pixelated}.qr-preview h3{margin-top:15px}.qr-preview .qr-url{font-size:12px;background:#eff4f8;padding:11px;border-radius:7px;color:#4c6173;overflow-wrap:anywhere}.toast{position:fixed;bottom:25px;right:24px;z-index:160;background:#1f4f6c;color:white;padding:15px 23px;border-radius:11px;box-shadow:0 10px 35px rgba(16,42,60,.25);max-width:min(470px,90vw);font-size:15px}.toast.error{background:#a6383c}.footer{color:#95a4af;text-align:center;font-size:13px;border-top:1px solid #e5edf2;padding:20px}.footer span{padding:0 9px}.login-screen{min-height:100vh;display:grid;grid-template-columns:minmax(360px,46%) 1fr;background:white}.login-art{color:white;padding:70px 11%;background:linear-gradient(155deg,#113c5c 5%,#185d74 63%,#288977 130%);display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden}.login-art:after{content:"";position:absolute;right:-140px;top:12%;width:400px;height:400px;border:2px solid rgba(255,255,255,.11);border-radius:50%;box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 150px rgba(255,255,255,.018)}.art-top{position:absolute;top:42px;left:11%;font-weight:800;letter-spacing:1.7px;font-size:16px}.art-house{font-size:155px;line-height:1;margin-bottom:30px;opacity:.88}.login-art h2{font-size:clamp(28px,3.1vw,45px);line-height:1.2;letter-spacing:-1.1px;position:relative;z-index:1}.login-art p{font-size:17px;max-width:400px;color:#c8dce6;position:relative;z-index:1}.art-bottom{position:absolute;bottom:45px;font-size:13px;color:#c3d7e1}.login-panel{width:min(470px,80%);margin:auto}.login-logo{width:58px;height:58px;border-radius:16px;background:#e9f2f7;color:var(--navy);font-size:42px;display:grid;place-items:center;margin-bottom:25px}.login-panel h1{font-size:32px}.login-panel .muted{margin-bottom:32px}.password-wrap{display:flex;border:1px solid #d6e0e8;border-radius:10px;overflow:hidden}.password-wrap:focus-within{outline:3px solid #e3f1fa;border-color:#4c91ba}.password-wrap input{border:0;flex:1;outline:0!important;height:51px}.password-wrap button{border:0;background:white;color:var(--navy);font-size:14px;font-weight:740;padding:0 16px}.login-button{width:100%;margin-top:20px;justify-content:space-between;font-size:17px;padding:14px 20px}.login-button span{font-size:22px}.help-note{color:#8a99a8;font-size:13px;line-height:1.65;margin-top:25px}.error-message{color:#b3323b;background:#fff0f1;padding:12px;border-radius:9px;font-size:14px;margin-top:12px}
@media(max-width:1100px){.topbar-inner{padding:0 22px;gap:8px}.header-role{display:none}.page-container{padding:28px 22px 54px}.address-layout{grid-template-columns:230px minmax(0,1fr)}.sheet-hint{display:none}.management-table td,.management-table th{padding:12px 9px}.qr-guide{padding:18px}.guide-step{align-items:flex-start}.guide-icon{width:35px;height:35px;font-size:14px}}
@media(max-width:760px){body{font-size:16px}.topbar-inner{padding:0 15px;min-height:64px;flex-wrap:wrap}.brand-mark{width:37px;height:37px;font-size:27px;border-radius:10px}.brand strong{font-size:18px}.brand small{font-size:8px}.header-right{margin-left:auto}.header-right .button{padding:7px 9px;min-height:38px;font-size:12px}.main-nav{order:3;width:100%;height:53px;justify-content:space-between}.nav-tab{flex:1;justify-content:center;padding:0 9px;font-size:15px}.nav-tab.selected:after{left:18px;right:18px}.page-container{padding:23px 13px 38px}.page-title-row{align-items:flex-start;flex-direction:column;gap:17px;margin-bottom:23px}.title-actions{width:100%}.title-actions .button{flex:1;padding:11px 9px}.subtitle{font-size:14px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.stat-card{min-height:92px;padding:14px}.stat-card .stat-label{font-size:13px}.stat-card .stat-count{font-size:27px}.stat-icon{height:39px;width:39px;font-size:19px}.filter-panel{padding:17px;margin-bottom:22px}.filters{grid-template-columns:1fr;gap:13px}.section-line{margin-bottom:15px}.results-heading{align-items:flex-start;gap:8px}.results-heading .button{min-height:40px;font-size:13px;padding:7px 10px}.view-bar{padding:5px}.view-modes{display:flex;width:100%;gap:2px;flex-wrap:nowrap}.view-mode{padding:10px 3px;font-size:12px;flex:1;white-space:nowrap}.address-layout{display:block}.address-sidebar{position:relative;top:0;max-height:175px;overflow:auto;margin-bottom:11px;padding:10px}.sidebar-list{display:flex;flex-direction:row;overflow:auto;flex-wrap:nowrap}.address-link{min-width:max-content;width:auto;border:1px solid var(--border);border-radius:10px;padding:7px 12px}.address-link.active{border:1px solid var(--green)}.sidebar-title{padding:2px 7px 7px}.address-toggle{padding:14px 12px}.address-icon{height:36px;width:36px;font-size:20px}.address-primary{font-size:15px}.address-secondary{font-size:12px}.address-right{gap:6px}.count-pill{font-size:11px;padding:5px 7px}.excel-scroll .excel-table{font-size:14px}.excel-table th,.excel-table td{padding:8px 7px}.card-grid{grid-template-columns:1fr}.qr-guide{display:block;padding:13px 18px}.guide-step{padding:10px 0;align-items:center}.guide-arrow{display:none}.qr-stats{grid-template-columns:repeat(3,1fr)}.qr-stats .stat-card{padding:11px 8px;min-height:92px}.qr-stats .stat-icon{display:none}.qr-stats .stat-label{font-size:12px}.qr-stats .stat-count{font-size:24px}.qr-panel,.history-panel{padding:15px 11px 7px}.qr-panel .section-line{flex-direction:column;align-items:stretch}.qr-filters{width:100%}.qr-filters select{min-width:0;width:40%}.qr-filters input{min-width:0;width:60%}.management-table{min-width:710px}.history-panel .section-line{gap:9px}.modal-overlay{padding:0;align-items:flex-end}.modal{max-height:96vh;border-radius:16px 16px 0 0;width:100%}.modal-header{padding:17px}.modal-body{padding:17px}.modal-footer{padding:12px}.editor-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.editor-group{padding:13px}.footer{font-size:11px}.login-screen{grid-template-columns:1fr}.login-art{display:none}.login-panel{width:min(440px,87%);margin:100px auto}}
@media(max-width:420px){.view-mode{font-size:11px}.results-heading h2{font-size:19px}.results-heading .button{font-size:12px}.editor-grid{grid-template-columns:1fr}.modal-footer .button{flex:1}.qr-stats .stat-label{font-size:11px}.stat-card .stat-label{font-size:12px}}
/* Keep the address and its sheet label on separate lines. */
.address-primary{display:block}
/* Zoom controls for the full Excel view */
.xl-zoom-controls{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:999px;padding:2px 4px;background:#fff}
.xl-zoom-controls .mini-button{min-width:30px;padding:4px 9px}
#xl-zoom-label{font-size:12.5px;font-weight:700;color:var(--muted);min-width:40px;text-align:center}
.xl-zoom-bar{display:flex;justify-content:flex-end;padding:0 4px 10px}
/* Excel file library (Danh sách file) */
.mode-files #stats,.mode-files .filter-panel,.mode-files .results-heading,.mode-files .view-bar{display:none!important}
.files-head{margin:2px 0 16px}
.files-head h2{margin:0 0 2px}
.files-head p{margin:0}
.files-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.file-card{border:1px solid var(--border);border-radius:14px;background:#fff;padding:16px;display:flex;flex-direction:column;gap:10px;box-shadow:var(--shadow,0 1px 8px rgba(22,54,78,.05))}
.file-card.active{border-color:#2f9e77;box-shadow:0 0 0 2px rgba(47,158,119,.18)}
.file-card-top{display:flex;align-items:flex-start;gap:10px}
.file-card-title{flex:1;min-width:0}
.file-card-title strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-card-title p{margin:2px 0 0;font-size:12.5px}
.file-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e8f2ee;color:#1e7a5e;flex:none}
.file-icon .ui-icon{width:22px;height:22px}
.file-badge{flex:none;font-size:11.5px;font-weight:700;color:#1e7a5e;background:#e2f5ee;border:1px solid #b9e4d4;border-radius:999px;padding:3px 10px;white-space:nowrap}
.file-meta{margin:0;font-size:13px;color:var(--muted)}
.file-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}
.files-backbar{display:flex;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
/* Import/Export title buttons: import only on the library page, export via per-file cards */
#page-list #export-button{display:none!important}
#page-list:not(.mode-files) #import-button{display:none!important}
/* Small confirm dialog stays centered on every screen size */
#delete-wb-overlay{align-items:center;padding:18px}
#delete-wb-overlay .modal{border-radius:18px;width:min(460px,100%)}
/* File-card actions: one row, delete button compact and muted */
.file-actions{display:flex;gap:6px;flex-wrap:nowrap}
.file-actions .button{flex:1;justify-content:center;white-space:nowrap}
.file-actions .button .ui-icon{width:14px;height:14px}
.file-actions .button.danger{flex:0 0 auto;font-size:12px;padding:5px 10px;opacity:.68}
/* Back-to-library button in the detail page title row */
#back-library{white-space:nowrap;flex:none}
.mode-files #back-library{display:none!important}

/* QR collection V1: clear, large controls for an older adult managing a residential group. */
.qr-create-panel{padding:23px 25px;margin-bottom:22px}.qr-create-panel .section-line{margin-bottom:17px}
.qr-create-panel .section-line .muted{font-size:14px;margin:5px 0 0}
.qr-builder{display:grid;grid-template-columns:minmax(140px,1fr) minmax(170px,1.35fr) minmax(140px,.75fr) auto;gap:13px;align-items:end}
.qr-builder .form-field{min-width:0}.qr-builder .button{margin-bottom:0;min-height:48px}
.batch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-bottom:19px}
.batch-option{border:2px solid #e0eaf0;border-radius:13px;background:#f9fbfd;text-align:left;padding:16px;display:flex;flex-direction:column;gap:7px;min-height:123px;color:#39556b}
.batch-option:hover{border-color:#a8ccdd}.batch-option.active{border-color:var(--green);background:#f3fcf8}
.batch-option strong{font-size:15px;line-height:1.35}.batch-option>span:last-child{color:#687c8c;font-size:13px}
.batch-option .status-label{align-self:start}
.qr-batch-actions{display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap;background:#eff7fa;border:1px solid #d2e5ee;border-radius:12px;padding:14px 16px;margin-bottom:17px}
.qr-batch-actions strong{font-size:17px;color:#1f4a65}.qr-batch-actions p{font-size:14px;color:#657c8c;margin:3px 0 0}.qr-button-row{display:flex;gap:8px;flex-wrap:wrap}.qr-button-row .button{font-size:14px;min-height:42px;padding:9px 13px}
.qr-code-toolbar{display:flex;justify-content:space-between;align-items:center;gap:13px;padding:14px 0 15px;border-top:1px solid var(--border)}
.qr-code-toolbar strong{font-size:17px}.qr-code-toolbar p{margin:3px 0 0;font-size:13px;color:var(--muted)}
.qr-code-filters{display:flex;gap:9px}.qr-code-filters select{width:150px}.qr-code-filters input{width:270px}
.qr-code-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.qr-code-card{border:1px solid #dae5ed;background:#fff;border-radius:12px;padding:15px;min-width:0;display:flex;flex-direction:column;gap:7px;box-shadow:0 2px 8px rgba(20,60,80,.035)}
.qr-code-card strong{font-size:15px;color:#2b5068;overflow-wrap:anywhere}.qr-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.qr-mini-icon{background:#eaf3f9;border-radius:9px;height:35px;width:35px;display:grid;place-items:center;color:#1a6083;font-size:20px}
.qr-code-card p{font-size:14px;margin:0;color:#5c7483;min-height:44px;overflow-wrap:anywhere}.qr-code-card small{color:#8192a0;font-size:12px}
.qr-card-buttons{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto;padding-top:8px}.qr-card-buttons .mini-button{flex:1;text-align:center;min-height:39px}
.qr-empty{border:none;padding:24px}
.qr-v1-top{padding:12px 3px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.qr-v1-top strong{color:#294f6a;font-size:16px}.qr-v1-top span{color:#658196;font-size:13px}
.qr-v1-scroll{max-height:480px;border:1px solid #dbe5eb;border-radius:9px;margin-bottom:16px}
.public-household .form-field{max-width:none}.public-household label b{color:#cb3d44}
.public-success .public-submit{margin-top:23px}
@media(max-width:1180px){.qr-builder{grid-template-columns:repeat(2,minmax(0,1fr))}.qr-code-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.batch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.qr-create-panel{padding:18px 15px}.qr-builder{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.qr-builder .form-field:nth-child(2){grid-column:span 2}.qr-builder .button{align-self:end}.batch-grid{grid-template-columns:1fr;gap:8px}.batch-option{min-height:96px}.qr-code-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.qr-code-card{padding:12px}.qr-code-card p{font-size:13px}.qr-code-toolbar{flex-direction:column;align-items:stretch}.qr-code-filters input{flex:1;width:100%}.qr-code-filters select{width:136px}.qr-v1-top{flex-direction:column;align-items:start;gap:3px}.qr-batch-actions{align-items:stretch}.qr-button-row{width:100%}.qr-button-row .button{flex:1}.qr-stats .stat-card{min-height:102px}.qr-stats .stat-label{font-size:13px}}
@media(max-width:470px){.qr-builder{grid-template-columns:1fr}.qr-builder .form-field:nth-child(2){grid-column:auto}.qr-code-grid{grid-template-columns:1fr}.qr-code-card p{min-height:0}.qr-card-buttons .mini-button{font-size:14px}.qr-button-row .button{flex-basis:100%}.qr-code-filters{flex-direction:column}.qr-code-filters select{width:100%}}

/* Full-screen Excel-like editor overlay */
.excel-title-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sheet-editor-overlay{position:fixed;inset:0;z-index:90;background:#f2f6f9;display:flex;flex-direction:column}
.xl-toolbar{display:flex;align-items:center;gap:13px;padding:10px 16px;background:#fff;border-bottom:1px solid #c6d4e0;flex-wrap:wrap;box-shadow:0 2px 10px rgba(22,54,78,.07)}
.xl-title{font-size:16px;letter-spacing:-.2px}
.xl-stats{font-size:13px;font-weight:700;color:#b45309;background:#fff7e6;border:1px solid #f2dcae;border-radius:999px;padding:4px 12px;white-space:nowrap}
.xl-hint{font-size:12.5px;color:var(--muted)}
.xl-spacer{flex:1}
.xl-scroll{flex:1;overflow:auto;background:#fff;scrollbar-color:#a3bbc9 #f1f5f7}
.xl-table td{padding:4px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default}
.xl-table td.xl-editable{cursor:text}
.xl-table td.xl-editable:hover{box-shadow:inset 0 0 0 2px #65afe8}
.xl-table td.xl-dirty,.xl-table td.xl-dirty:hover{box-shadow:inset 0 0 0 2px #d97706}
.xl-table td.xl-editing{padding:0;overflow:visible;cursor:text}
.xl-input{width:100%;border:none;outline:2px solid #2b7cd3;outline-offset:-2px;background:#fffdf3;padding:4px 6px;font:inherit;color:#111;text-align:inherit;white-space:nowrap}
.xl-rownum{position:sticky;left:0;z-index:2;background:#eef3f7;color:#5a6b7a;text-align:right;font-size:12px;font-weight:700;border:1px solid #b9c7d2;white-space:nowrap}
.xl-letters th{position:sticky;top:0;z-index:4;background:#eef3f7;border:1px solid #b9c7d2;color:#3d5164;font-size:12px;font-weight:700;padding:4px 8px;height:26px}
.xl-letters .xl-corner{left:0;z-index:6}
.xl-headrow1 .xl-headcorner,.xl-headrow2 .xl-headcorner{position:sticky;left:0;z-index:5;background:#eef3f7;border:1px solid #b9c7d2}
.xl-headrow1 th{position:sticky;top:var(--xl-letters-h,26px);z-index:3}
.xl-headrow2 th{position:sticky;top:calc(var(--xl-letters-h,26px) + var(--xl-headrow1-h,36px));z-index:3}
.xl-table thead th{font-size:12.5px!important;white-space:normal}
.xl-headrow1 th{height:36px}
.xl-headrow2 th{height:36px}
