:root{--ink:#19383f;--muted:#708187;--green:#1f6e5b;--line:#e1e8e7;--bg:#f4f7f7;--orange:#b86426}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:Arial,Helvetica,sans-serif;color:var(--ink);font-size:14px}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #5cab97;outline-offset:3px}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#102d34;color:#b9cbce;padding:32px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;color:white;font-size:25px;font-weight:700;letter-spacing:1px}.brand-icon{display:grid;place-items:center;background:#b7efcf;color:#143d37;font-size:26px;width:42px;height:47px;border-radius:12px 12px 18px 18px}.brand-sub{display:block;font-size:9px;letter-spacing:1.3px;margin-top:6px;font-weight:500}.nav-label{font-size:9px;letter-spacing:1.8px;color:#82a1a6;margin:53px 9px 19px}.nav{width:100%;display:flex;align-items:center;gap:13px;text-align:left;background:none;border:0;color:inherit;padding:14px 12px;border-radius:7px;margin-bottom:7px;font-size:18px}.nav span{font-size:13px}.nav.active{color:#d8f6e6;background:#24464c}.nav b{font-size:11px;margin-left:auto;background:#466167;padding:2px 6px;border-radius:6px}.side-note{margin-top:auto;border-top:1px solid #365158;padding:24px 8px 0;font-size:10px;letter-spacing:1.2px}.side-note p{font-size:12px;letter-spacing:0;line-height:1.8;color:#8da9ae}.tiny-dot{display:inline-block;width:6px;height:6px;background:#aad4b8;border-radius:50%;margin-right:5px}.shell{margin-left:248px}.topbar{height:78px;border-bottom:1px solid var(--line);padding:0 44px;display:flex;align-items:center;background:#fff;gap:20px}.breadcrumb{color:#74868a;font-size:12px;flex:1}.breadcrumb span{margin:0 10px;color:#a8b7b8}.top-link{background:none;border:0;color:#637b7f;font-size:12px}.top-link b{background:#edf2ee;padding:4px 7px;border-radius:5px;margin-left:6px}.avatar{background:#e7eeec;border:1px solid #d6e2dd;border-radius:50%;width:32px;height:32px;display:grid;place-items:center;font-size:10px;font-weight:bold}main{padding:37px 44px 20px;max-width:1600px;margin:auto}footer{color:#829196;font-size:11px;padding:24px 44px 30px;line-height:1.7}.eyebrow{font-size:10px;font-weight:bold;letter-spacing:1.5px;color:#6b8a80;margin-bottom:10px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:27px}h1{font-size:30px;letter-spacing:-.8px;margin:0 0 10px}h2{font-size:19px;margin:0}h3{font-size:16px;margin:0}p{line-height:1.7}.sub{color:var(--muted);margin:0;line-height:1.7;font-size:13px}.date-label{font-size:11px;color:#7d8d90;background:white;border:1px solid var(--line);padding:9px 13px;border-radius:5px;white-space:nowrap}.welcome{background:#eaf1ed;border:1px solid #dce7df;border-radius:10px;padding:25px 28px;display:flex;align-items:center;justify-content:space-between;gap:30px;margin-bottom:24px}.welcome h2{font-size:20px;line-height:1.4}.welcome p{color:#667e73;font-size:12px;margin:9px 0 0;max-width:600px}.welcome-badge{width:74px;height:74px;flex-shrink:0;border-radius:50%;border:1px solid #cbded0;display:grid;place-items:center;font-size:36px;color:#4f7966}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:29px}.stat{background:#fff;border:1px solid var(--line);border-radius:9px;padding:20px}.stat-top{display:flex;justify-content:space-between;font-size:12px;color:#7c8d8f}.stat-icon{width:27px;height:27px;border-radius:6px;background:#eef4f0;color:#5d8870;display:grid;place-items:center;margin-top:-5px}.stat strong{display:block;font-size:31px;font-weight:500;margin:14px 0 7px}.stat small{font-size:10px;color:#8a999b}.stat.warn .stat-icon{background:#fcf0e4;color:#c28c4e}.stat.warn strong{color:#b0642d}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px;gap:16px}.section-title span{font-size:11px;color:#809191}.create-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:31px}.create-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:24px;display:flex;align-items:flex-start;gap:18px}.create-card .card-icon{background:#ecf4ef;color:#4e806b;font-size:24px;width:48px;height:51px;display:grid;place-items:center;border-radius:8px;flex-shrink:0}.create-card:nth-child(2) .card-icon{background:#f8efe6;color:#aa774a}.create-card p{color:var(--muted);font-size:12px;margin:9px 0 18px;max-width:360px}.btn{border:1px solid #d5dfdc;border-radius:6px;background:#fff;color:var(--ink);padding:10px 15px;font-weight:500;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px}.btn.primary{background:#246750;border-color:#246750;color:white}.btn.soft{background:#eff5f1;color:#326b54;border-color:#dce8df}.btn.danger{color:#ae4e3e}.btn:disabled{opacity:.55;cursor:wait}.row-actions{display:flex;gap:8px;flex-wrap:wrap}.panel{background:white;border:1px solid var(--line);border-radius:9px;overflow:hidden}.panel-head{padding:19px 22px;border-bottom:1px solid var(--line);display:flex;gap:15px;justify-content:space-between;align-items:center}.link-btn{border:0;background:none;color:#47755f;font-size:12px;padding:3px}.empty{text-align:center;padding:36px 20px;color:#82908e}.empty .empty-icon{margin:0 auto 13px;font-size:25px;color:#9fb8ab}.empty strong{display:block;color:#62776d;font-weight:500;margin:10px}.empty p{font-size:12px;margin:0 0 13px}.note{font-size:12px;line-height:1.7;background:#fff8ec;border:1px solid #f0dfbe;border-radius:7px;padding:14px 17px;color:#8a704a}.toolbar{display:flex;gap:10px;flex-wrap:wrap;padding:17px 20px;border-bottom:1px solid var(--line)}.toolbar input{flex:1;min-width:140px}.toolbar input,.toolbar select{border:1px solid var(--line);padding:10px;border-radius:5px;background:#fff;color:var(--ink)}.records{list-style:none;margin:0;padding:0}.record{padding:18px 22px;border-bottom:1px solid #edf0ef;display:flex;align-items:center;justify-content:space-between;gap:17px}.record:last-child{border:0}.record h3{font-size:14px;line-height:1.7}.record-meta{font-size:11px;color:#81918f;line-height:1.7;margin-top:5px}.badge{display:inline-block;font-size:10px;background:#eef3ef;color:#547864;border-radius:5px;padding:4px 7px;margin-right:8px;white-space:nowrap}.badge.orange{background:#fff0df;color:#a56b34}.badge.red{background:#ffede9;color:#ac5849}.badge.gray{background:#eff1f2;color:#78878b}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.settings-card{padding:23px}.settings-card p,.settings-card li{font-size:12px;color:#748780;line-height:1.8}.settings-card h3{margin-bottom:15px}.settings-card ol{padding-left:18px}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:17px}.field label{font-size:12px;font-weight:bold;color:#536d67}.field input,.field textarea,.field select{width:100%;padding:11px 12px;border:1px solid #d7e1dd;border-radius:6px;color:#28463f;background:white;line-height:1.5}.field textarea{resize:vertical;min-height:84px}.field small{font-size:11px;line-height:1.6;color:#85948e}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.full{grid-column:1/-1}dialog{border:0;padding:0;color:var(--ink);border-radius:12px;width:min(840px,94vw);max-height:94dvh;box-shadow:0 20px 80px #102d343b}dialog::backdrop{background:#102d3480;backdrop-filter:blur(2px)}.dialog-head{padding:24px 28px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.dialog-head .eyebrow{font-size:9px}.icon-btn{border:0;background:#eff3f1;color:#789085;border-radius:50%;width:30px;height:30px;font-size:23px}.steps{display:flex;gap:12px;padding:19px 28px;border-bottom:1px solid var(--line)}.steps button{background:none;border:0;color:#8b9894;display:flex;gap:8px;align-items:center;font-size:12px;padding:7px}.steps button.active{background:#eaf3ed;color:#327357;border-radius:5px}.steps button span{font-size:11px}#form-body{padding:24px 28px;max-height:56dvh;overflow:auto}.dialog-actions{position:sticky;bottom:0;display:flex;gap:10px;padding:18px 28px;border-top:1px solid var(--line);background:#fff;align-items:center}.dialog-actions #step-label{flex:1;font-size:10px;color:#8a9a92;text-align:center}.issue{border:1px solid #dde6e0;border-radius:8px;padding:17px;margin-bottom:17px;background:#fafcfb}.issue-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.issue-head h3{font-size:13px}.photos{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}.photo{width:110px}.photo img{width:110px;height:78px;object-fit:cover;border-radius:5px}.photo input{width:100%;font-size:10px;padding:6px;margin-top:3px}.photo button{border:0;background:none;color:#a75b4a;font-size:10px;padding:4px}.photo-label{display:inline-block;border:1px dashed #a8bfb1;border-radius:6px;color:#59816a;padding:10px 13px;cursor:pointer;font-size:12px;background:#fff}.photo-label input{position:absolute;width:1px;height:1px;opacity:0}.participant{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;margin-bottom:8px}.participant input{min-width:0;border:1px solid #d8e1dc;border-radius:5px;padding:9px;font-size:12px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90vw;background:#163d31;color:white;border-radius:8px;padding:13px 23px;box-shadow:0 5px 25px #0002;font-size:13px;z-index:10;display:none}#toast.show{display:block}#preview{width:min(1000px,96vw);background:#eef1ef}.preview-tools{display:flex;align-items:center;gap:10px;padding:15px 24px;position:sticky;top:0;background:white;border-bottom:1px solid var(--line);z-index:1}.preview-tools span{flex:1;font-size:11px;color:#8a978c}.page{background:white;width:794px;min-height:1123px;margin:24px auto;padding:68px 65px;box-shadow:0 2px 12px #183e3312;font-family:'Times New Roman',serif;color:#111;font-size:17px;line-height:1.5}.doc-title{text-align:center;font-weight:bold;font-size:21px;line-height:1.4;margin:24px 0 12px}.doc-subtitle{text-align:center;font-size:16px;margin-bottom:25px}.doc-p{white-space:pre-wrap;text-align:justify;margin-bottom:10px;overflow-wrap:anywhere}.doc-heading{font-weight:bold;margin:18px 0 9px}.doc-sign{display:flex;justify-content:space-around;gap:10px;text-align:center;font-size:14px;font-weight:bold;line-height:1.5;margin:32px 0 85px;white-space:pre-line}.doc-photo img{max-width:100%;max-height:510px;object-fit:contain;display:block;margin:15px auto 5px}.doc-photo p{text-align:center;font-size:15px}.doc-header{display:flex;gap:20px;justify-content:space-between;text-align:center;font-size:14px;white-space:pre-line;line-height:1.5}.doc-header div{flex:1}.doc-divider{border-bottom:1px solid #777;margin:20px 0}.doc-note{text-align:center;font-size:12px;color:#666;margin-top:24px}.doc-footer{font-size:12px;text-align:right;color:#666;margin-top:20px}
@media(min-width:1600px){main{padding-top:50px}.welcome{padding:32px}.create-card{padding:30px}.stats{gap:22px}.stat{padding:24px}}
@media(max-width:1100px){.sidebar{width:210px;padding:28px 16px}.shell{margin-left:210px}main{padding:28px 24px}.topbar{padding:0 24px}footer{padding-left:24px}.create-card{padding:20px;gap:12px}.create-card .card-icon{width:39px;height:43px}.stats{gap:10px}.stat{padding:15px}.nav-label{font-size:8px}.brand{font-size:21px}}
@media(max-width:760px){.sidebar{position:fixed;top:auto;bottom:0;width:100%;height:68px;padding:5px 8px;background:#102d34;z-index:3;display:block;padding-bottom:env(safe-area-inset-bottom,5px);height:calc(65px + env(safe-area-inset-bottom,0px))}.brand,.nav-label,.side-note{display:none}.sidebar nav{display:flex;justify-content:space-around}.nav{flex-direction:column;gap:4px;margin:0;padding:7px 6px;width:25%;font-size:20px;position:relative}.nav span{font-size:9px}.nav b{position:absolute;right:8px;top:2px;font-size:8px}.shell{margin-left:0;padding-bottom:75px}.topbar{height:58px;padding:0 18px;gap:12px}.breadcrumb{font-size:10px}.top-link span{display:none}main{padding:24px 17px 10px}.page-head{gap:10px;align-items:flex-start;margin-bottom:21px}h1{font-size:24px}.eyebrow{font-size:9px}.date-label{display:none}.welcome{padding:20px;gap:15px}.welcome h2{font-size:18px}.welcome p{font-size:11px}.welcome-badge{width:45px;height:45px;font-size:24px}.stats{grid-template-columns:repeat(2,1fr);gap:11px;margin-bottom:25px}.stat{padding:17px}.stat strong{font-size:28px}.create-grid,.settings-grid{grid-template-columns:1fr;gap:13px}.create-grid{margin-bottom:25px}.create-card{padding:20px}.create-card p{margin:7px 0 12px}.record{padding:15px;align-items:flex-start;flex-direction:column}.record .row-actions{width:100%}.record .row-actions .btn{flex:1;font-size:11px;padding:8px 10px}.section-title h2,.panel-head h3{font-size:16px}.section-title span{font-size:10px}.panel-head{padding:16px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;margin:0}.dialog-head{padding:18px}.steps{padding:12px 13px;gap:3px;justify-content:space-between}.steps button{padding:7px 4px}#form-body{padding:20px 17px;max-height:calc(100dvh - 230px)}.dialog-actions{padding:13px 15px;padding-bottom:max(13px,env(safe-area-inset-bottom));gap:8px}.dialog-actions .btn{padding:10px}#step-label{display:none}.dialog-actions #draft{margin-left:auto}.participant{grid-template-columns:1fr 1fr}.participant input:first-child{grid-column:1/-1}.participant button{justify-self:end}.preview-tools{padding:13px;flex-wrap:wrap}.preview-tools span{flex-basis:100%}#paper-wrap{overflow:auto}.page{margin:16px;transform-origin:top left}footer{padding:17px;font-size:10px}.toolbar{padding:13px}.toolbar select{flex:1;min-width:110px}#toast{bottom:90px;min-width:240px;text-align:center}}
@page{size:A4;margin:18mm 17mm}@media print{body{background:white}.sidebar,.shell,dialog:not(#preview),#toast,#preview>.dialog-head,.preview-tools{display:none!important}#preview{display:block!important;position:static;margin:0;width:100%;height:auto;max-height:none;overflow:visible;box-shadow:none;background:white}#paper-wrap{overflow:visible}.page{width:auto;min-height:0;margin:0;padding:0;box-shadow:none;break-after:page}.page:last-child{break-after:auto}.doc-p{orphans:3;widows:3}.doc-sign,.doc-photo{break-inside:avoid}.doc-heading{break-after:avoid}html:has(#preview:not([open])) body:before{content:'Mở hồ sơ và chọn Xem trước trước khi in.'}}
.pdf-page{width:794px;height:1123px;margin:24px auto;background:white;box-shadow:0 2px 12px #183e3312}.pdf-page canvas{display:block;width:100%;height:100%}@media(max-width:760px){.pdf-page{width:calc(100vw - 24px);height:auto;aspect-ratio:794/1123;margin:12px}.pdf-page canvas{height:auto}}@media print{@page{size:A4;margin:0}.pdf-page{margin:0;width:210mm!important;height:297mm!important;box-shadow:none;break-after:page;break-inside:avoid}.pdf-page:last-child{break-after:auto}.pdf-page canvas{width:210mm!important;height:297mm!important}#preview{border:0!important;padding:0!important}}

.brand{font-size:15px;letter-spacing:.1px;gap:9px}.brand-icon{width:35px;height:42px;flex-shrink:0}.brand-sub{font-size:9px;letter-spacing:1.1px;margin-top:8px}@media(max-width:1100px){.brand{font-size:12px;gap:7px}.brand-icon{width:30px;height:36px}.brand-sub{font-size:8px;letter-spacing:.7px}}
.preview-tools{flex-wrap:wrap}.preview-tools span{min-width:160px}@media(max-width:760px){.preview-tools .btn{flex:1 1 calc(33.333% - 10px);font-size:11px;padding:9px 7px;white-space:nowrap}}
#open-pdf[aria-disabled=true]{opacity:.5;cursor:wait}
.participant select{min-width:0;border:1px solid #d8e1dc;border-radius:5px;padding:9px;font-size:12px;background:white;color:var(--ink)}.photo{width:160px}.photo img{width:160px;height:105px}.photo input{font-size:11px;padding:8px}.photo textarea{width:160px;min-height:64px;font-size:11px;padding:7px;resize:vertical;border:1px solid #d8e1dc;border-radius:5px}

.brand{flex-direction:column;align-items:flex-start;gap:15px}.brand-logo{width:125px;height:72px;object-fit:contain;background:white;border-radius:8px}.mobile-brand-logo{display:none}.manager-info{display:flex;flex-wrap:wrap;gap:8px 24px;margin-bottom:12px;color:#3f645b;font-size:12px}.manager-info strong{font-weight:500}.manager-info a{text-decoration:underline;text-underline-offset:3px}@media(max-width:760px){.mobile-brand-logo{display:block;width:66px;height:43px;object-fit:contain;flex-shrink:0}.topbar{gap:9px}.breadcrumb{font-size:9px}.manager-info{flex-direction:column;gap:5px;font-size:11px}}
.breadcrumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.sidebar-manager{margin:25px 2px 20px;font-size:11px;line-height:1.9;color:#c3d5d7;letter-spacing:0}.sidebar-manager a{color:#c3d5d7;text-decoration:none}.sidebar-manager a:hover{text-decoration:underline}@media(max-width:760px){.sidebar-manager{display:none}}
.project-scope{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:18px 21px;margin:0 0 17px;background:#fff;border:1px solid var(--line);border-radius:8px}.project-scope h3{font-size:14px;margin:0}.project-scope p{font-size:11px;margin:5px 0 0;color:var(--muted)}.project-scope label{font-size:12px;color:#5d776e;display:flex;gap:10px;align-items:center}.project-scope select{min-width:200px;max-width:100%;padding:10px 12px;border:1px solid #c7d9cf;border-radius:6px;background:#f8fbf9;color:#245d49;font-weight:600;font-size:12px}#code-record,#code-settings{text-transform:uppercase}@media(max-width:760px){.project-scope{padding:16px;flex-direction:column;align-items:stretch;gap:12px}.project-scope label{justify-content:space-between}.project-scope select{min-width:0;flex:1}}

.project-scope-controls{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.project-scope-controls .btn{white-space:nowrap}.project-scope-controls select{max-width:290px}#project-editor{width:min(520px,calc(100vw - 28px))}.project-form-body{padding:22px 26px}.project-form-body>p{font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 20px}.project-form-body .field{margin-bottom:18px}#new-project-code{text-transform:uppercase}#project-error{color:#b33d34;margin:0;font-size:13px}#project-editor .dialog-actions{justify-content:flex-end}#save-project:disabled{opacity:.6;cursor:wait}@media(max-width:760px){.project-scope-controls{align-items:stretch;flex-direction:column}.project-scope-controls select{max-width:100%;width:100%}.project-form-body{padding:20px}}

.photo-summary{margin-bottom:20px;line-height:1.7}.photo-number{display:block;padding:6px 0;font-size:12px;color:#245d49}.photo-label{cursor:pointer}

.project-entry{display:flex;gap:10px;align-items:center}.project-entry select{flex:1;min-width:0}.project-entry button{white-space:nowrap}.project-scope-controls select{max-width:360px}@media(max-width:760px){.project-entry{align-items:stretch;flex-direction:column}}

.violation-picker{margin:12px 0 18px;padding:13px 15px;border:1px solid #c7d9cf;border-radius:7px;background:#f7fbf9}.violation-picker summary{font-size:13px;font-weight:600;color:#245d49;cursor:pointer}.violation-picker label{display:block;font-size:12px;margin:14px 0 7px}.violation-picker input{width:100%;padding:10px;border:1px solid #c7d9cf;border-radius:5px}.violation-picker small,.violation-selected small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin:8px 0}.violation-results{max-height:250px;overflow:auto;margin-top:10px}.violation-option{display:flex;width:100%;gap:12px;text-align:left;background:white;border:0;border-bottom:1px solid #e0e9e3;padding:10px;cursor:pointer;font:inherit;font-size:12px;line-height:1.6;color:var(--ink)}.violation-option:hover,.violation-option:focus-visible{background:#e6f2eb}.violation-option strong{min-width:49px;color:#245d49}.violation-selected{background:#edf5f0;border-left:3px solid #4c8c6c;padding:10px 13px;margin-bottom:16px;font-size:12px}.violation-selected span{display:block;margin-top:6px}

.app-version{font-size:11px;color:#c3d5d7;margin-bottom:16px;letter-spacing:.2px}@media(max-width:760px){.app-version{display:none}}

.mobile-version{display:none}@media(max-width:760px){.mobile-version{display:block;font-size:9px;margin-bottom:4px;color:#708187}}

.signature-preview{margin-top:12px;min-height:0}.signature-preview canvas{display:block;max-width:220px;max-height:125px;width:auto;height:auto;background:white;padding:8px;border:1px solid #dbe5df;border-radius:5px}

.sidebar-manager .app-version{margin:9px 0 0;color:#b7ddcf;font-size:11px}.create-card-body{min-width:0;flex:1}.minute-controls{display:flex;align-items:flex-end;flex-wrap:wrap;gap:9px}.minute-controls .btn{white-space:nowrap}.saved-minute-field{flex:1 1 200px;min-width:0}.saved-minute-field label{display:block;font-size:11px;color:var(--muted);margin-bottom:6px}.saved-minute-field select{width:100%;max-width:100%;min-width:0;padding:10px 11px;border:1px solid #c7d9cf;border-radius:6px;color:var(--ink);background:white;font-size:12px}.saved-minute-help{display:block;font-size:11px;color:var(--muted);line-height:1.5;margin-top:10px}.minute-controls .btn:disabled{opacity:.45;cursor:not-allowed}@media(max-width:760px){.minute-controls .saved-minute-field{flex-basis:100%}.minute-controls .btn{flex:1 1 auto;font-size:11px}.minute-create-card .card-icon{display:none}}
/* Desktop, tablet and touch layouts. */
.mobile-nav-title{display:none}.nav-icon{flex-shrink:0}.sidebar{z-index:20;overflow-y:auto}.shell,main,.create-card,.panel,.form-grid,.field,.record>div{min-width:0}.record h3,.record-meta,.violation-option span{overflow-wrap:anywhere}.create-grid,.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-scope-controls label{min-width:0}.project-scope-controls select{width:100%;min-width:0;max-width:390px}.project-scope-controls{max-width:70%}.nav span.desktop-nav-title{line-height:1.5}.nav.active{box-shadow:inset 3px 0 0 #a6dfc4}.btn{transition:background .15s,box-shadow .15s}.btn:not(:disabled):hover{box-shadow:0 2px 8px #19383f12}.btn.primary:not(:disabled):hover{background:#1b5743}.btn.danger:not(:disabled):hover{background:#fff2ef}.btn:disabled{cursor:not-allowed}.link-btn,.icon-btn{min-height:40px}.icon-btn{min-width:40px}.violation-picker select{width:100%;border:1px solid #c7d9cf;border-radius:6px;padding:11px;background:white;color:var(--ink)}
body:has(dialog[open]){overflow:hidden}#editor{overflow:hidden;max-height:min(94dvh,960px)}#record-form{display:flex;flex-direction:column;max-height:min(94dvh,960px)}.dialog-head,.steps,.dialog-actions{flex-shrink:0}#form-body{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}.dialog-actions{gap:10px;background:white;border-top:1px solid var(--line)}#preview[open]{display:flex;flex-direction:column;width:min(1120px,96vw);overflow:hidden}#paper-wrap{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}.preview-tools{flex-shrink:0;background:#f8fbf9}.preview-tools span{flex-basis:100%;font-size:12px}.preview-tools .btn{min-height:42px}#project-editor{height:auto;overflow-y:auto;max-height:90dvh}.steps{overflow-x:auto}.steps button{white-space:nowrap}#toast{max-width:min(560px,calc(100vw - 28px));overflow-wrap:anywhere}
@media(min-width:761px) and (max-width:1180px){.create-grid,.settings-grid{grid-template-columns:minmax(0,1fr)}.project-scope{align-items:flex-start;flex-wrap:wrap}.project-scope-controls{max-width:100%;flex:1}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.record{flex-wrap:wrap}.record .row-actions{margin-left:auto}.minute-controls{gap:10px}.saved-minute-field{flex-basis:260px}}
@media(max-width:760px){
:root{--dock-height:76px}body{overflow-x:hidden}.shell{padding-bottom:calc(var(--dock-height) + 32px + env(safe-area-inset-bottom,0px))}.topbar{padding:0 16px;position:sticky;top:0;z-index:10;box-shadow:0 2px 12px #102d3406}.avatar{display:none}.top-link{min-height:44px;min-width:44px}.breadcrumb{font-size:10px}.mobile-brand-logo{width:60px;height:39px}.mobile-version{font-size:10px;color:#47675e}
.sidebar{inset:auto auto calc(12px + env(safe-area-inset-bottom,0px)) 50%;transform:translateX(-50%);width:calc(100% - 24px);max-width:520px;height:var(--dock-height);padding:6px;background:#102d34;border:1px solid #315159;border-radius:22px;box-shadow:0 12px 32px #102d3438;overflow:visible;z-index:30}.sidebar nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;height:100%}.sidebar .nav{display:flex;flex-direction:column;justify-content:center;align-items:center;width:auto;min-width:0;min-height:60px;margin:0;padding:7px 2px;gap:5px;border-radius:16px;color:#c5d5d7;box-shadow:none}.sidebar .nav.active{background:#d9f0e4;color:#174c3a;box-shadow:0 3px 10px #0002}.sidebar .nav .desktop-nav-title{display:none}.sidebar .nav .mobile-nav-title{display:block;font-size:11px;font-weight:600;line-height:1.2;letter-spacing:0;white-space:nowrap}.nav-icon{width:22px;height:22px}.sidebar .nav b{top:4px;right:7px;background:#f2a664;color:#3d2713;border-radius:9px;font-size:9px;line-height:14px;min-width:17px;padding:0 4px}.sidebar .nav b:empty{display:none}.keyboard-open .sidebar{visibility:hidden}
main{padding:23px 16px 16px}.page-head{gap:12px}.page-head h1{font-size:25px}.page-head .sub{font-size:13px}.welcome{padding:18px}.welcome h2{font-size:18px}.welcome p{font-size:12px}.welcome-badge{display:none}.section-title{align-items:flex-start}.section-title span{max-width:140px;text-align:right;line-height:1.5}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{padding:16px 13px}.stat-top{font-size:12px;gap:5px}.stat small{font-size:11px;line-height:1.5;display:block}.create-grid,.settings-grid{grid-template-columns:minmax(0,1fr)}.create-card{padding:20px;gap:12px}.create-card h3{font-size:16px}.create-card p{font-size:13px;max-width:none}.project-scope{padding:16px;gap:16px}.project-scope-controls{max-width:none;width:100%;gap:10px}.project-scope label{display:flex;flex-direction:column;align-items:stretch;gap:7px;font-size:13px}.project-scope select{max-width:none;min-height:48px;font-size:16px}.project-scope p{font-size:12px}.project-scope-controls .btn{width:100%}.btn{min-height:46px;padding:11px 14px;font-size:13px}.link-btn{min-height:44px;padding:8px;font-size:13px}.row-actions{width:100%;gap:8px}.record{padding:18px 16px}.record h3{font-size:15px}.record-meta{font-size:12px}.record .row-actions .btn{min-height:44px;font-size:12px;flex:1 1 calc(50% - 8px)}.badge{font-size:11px}.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar #search{grid-column:1/-1}.toolbar input,.toolbar select{min-width:0;width:100%;font-size:16px;min-height:46px}.minute-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch}.minute-controls>[data-new],.minute-controls .saved-minute-field{grid-column:1/-1}.minute-controls .btn{font-size:13px;white-space:normal}.saved-minute-field label{font-size:12px}.saved-minute-field select{min-height:48px;font-size:16px}.saved-minute-help{font-size:12px}.settings-card{padding:20px}.settings-card p,.settings-card li{font-size:13px}.field input,.field textarea,.field select,.participant input,.participant select,.photo textarea,.violation-picker input,.violation-picker select{font-size:16px;min-height:46px}.field textarea{min-height:112px}.field label{font-size:13px}.field small{font-size:12px}.form-grid{grid-template-columns:minmax(0,1fr)}.participant{grid-template-columns:minmax(0,1fr)}.participant>*{grid-column:1/-1;min-width:0}.photo{width:calc(50% - 6px);min-width:125px}.photo img{width:100%;height:125px;object-fit:contain;background:#f0f4f1}.photo textarea{width:100%;min-height:100px;font-size:15px}.photo button{min-height:42px}.photo-label{min-height:46px;padding:12px;font-size:14px}.violation-picker{padding:14px 12px}.violation-option{font-size:13px;padding:12px 8px;min-height:48px}.violation-results{max-height:240px}.violation-picker small,.violation-selected small{font-size:12px}.note{font-size:13px}
#editor[open],#preview[open]{width:100%;max-width:none;height:var(--visible-height,100dvh);max-height:var(--visible-height,100dvh);margin:0;border-radius:0}#record-form{height:100%;max-height:100%}.dialog-head{padding:15px 16px;gap:10px}.dialog-head h2{font-size:19px}.dialog-head .eyebrow{font-size:9px;letter-spacing:.8px;line-height:1.5;margin-bottom:5px}.icon-btn{min-width:44px;min-height:44px;font-size:26px}.steps{padding:10px 12px;gap:6px}.steps button{flex:1;min-height:42px;font-size:13px;padding:8px 5px}.steps button span{font-size:11px}#form-body{padding:18px 16px;max-height:none}.dialog-actions{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,1.25fr);padding:12px 12px max(12px,env(safe-area-inset-bottom,0px));gap:8px}.dialog-actions .btn{min-height:46px;padding:10px 8px;font-size:12px;line-height:1.4;white-space:normal}.dialog-actions #draft{margin:0}.dialog-actions #prev{font-size:11px}#project-editor{width:calc(100vw - 24px);max-width:520px;height:auto;max-height:calc(var(--visible-height,100dvh) - 24px);border-radius:16px;margin:auto}#project-editor .dialog-actions{display:flex}#project-editor .dialog-actions .btn{flex:1}.preview-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:12px}.preview-tools span{grid-column:1/-1;font-size:12px;line-height:1.5;min-width:0}.preview-tools .btn{min-width:0;min-height:44px;padding:9px 4px;font-size:12px;white-space:normal}.pdf-page{max-width:calc(100vw - 24px)}#toast{bottom:calc(var(--dock-height) + 36px + env(safe-area-inset-bottom,0px));font-size:13px;line-height:1.6;min-width:0;width:max-content;max-width:calc(100vw - 28px)}body:has(dialog[open]) #toast{bottom:90px}footer{font-size:12px;padding:15px 16px 20px}
}
@media(max-width:360px){.sidebar{width:calc(100% - 16px);padding:5px}.sidebar .nav .mobile-nav-title{font-size:10px}.minute-controls .btn{font-size:12px}.stat{padding:14px 10px}.stat-icon{display:none}.steps button span{font-size:10px}.preview-tools .btn{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media print{.sidebar{display:none!important}#preview[open]{display:block;width:100%;max-width:none;height:auto;max-height:none;overflow:visible}#paper-wrap{overflow:visible}.preview-tools{display:none!important}.pdf-page{max-width:none}}

@media(min-width:761px){.project-scope-controls label{white-space:nowrap;flex:1 1 300px}.project-scope-controls .btn{flex-shrink:0}}
@media(max-width:760px) and (max-height:500px){#editor .dialog-head{padding:8px 12px}#editor .dialog-head .eyebrow{display:none}#editor .dialog-head h2{font-size:16px}#editor .icon-btn{min-height:36px;min-width:36px}#editor .steps{padding:6px 10px}#editor .steps button{min-height:32px;padding:5px}#editor .dialog-actions{padding-top:7px;padding-bottom:7px}#editor .dialog-actions .btn{min-height:40px}#form-body{padding-top:12px;padding-bottom:12px}}

/* Keyboard-aware form viewport: never leave the editor behind the on-screen keyboard. */
@media(max-width:760px){
#editor[open],#preview[open]{position:fixed;inset:auto;left:0;top:var(--visible-top,0px);margin:0;height:var(--visible-height,100dvh);max-height:var(--visible-height,100dvh)}
#form-body{scroll-padding:16px;overflow-anchor:none;padding-bottom:32px}#form-body input,#form-body textarea,#form-body select{scroll-margin:16px}
.keyboard-open #editor .dialog-head{padding:6px 12px}.keyboard-open #editor .dialog-head .eyebrow{display:none}.keyboard-open #editor .dialog-head h2{font-size:16px}
.keyboard-open #editor .steps{padding:4px 10px}.keyboard-open #editor .steps button{min-height:30px;padding:4px}.keyboard-open #editor .dialog-actions{position:relative;padding:6px 10px;min-height:52px}.keyboard-open #editor .dialog-actions .btn{min-height:38px}
.keyboard-open #editor textarea{max-height:130px}.keyboard-open body:has(dialog[open]) #toast{bottom:calc(100dvh - var(--visible-height) - var(--visible-top,0px) + 64px)}
#project-editor[open]{position:fixed;top:calc(var(--visible-top,0px) + 12px);bottom:auto;margin:0 auto;max-height:calc(var(--visible-height,100dvh) - 24px)}
}
