:root{--ink:#173748;--muted:#68808d;--navy:#0f2e40;--accent:#ed923c;--line:#dde6eb;--paper:#f2f6f8}*{box-sizing:border-box}body{margin:0;font:15px/1.5 Arial,Helvetica,sans-serif;background:var(--paper);color:var(--ink)}[hidden]{display:none!important}a{color:#186b86;text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible{outline:3px solid #ed923c88;outline-offset:3px}input,select,textarea{width:100%;border:1px solid #c7d5de;border-radius:8px;padding:10px 12px;color:var(--ink);background:#fff;min-height:43px}input:focus,textarea:focus,select:focus{outline:2px solid #ed923c66;border-color:var(--accent)}textarea{min-height:100px;resize:vertical;line-height:1.6}label{display:block;font-size:13px;font-weight:600}label input,label select,label textarea{margin-top:6px;font-weight:400}.primary,.secondary,.quiet,.danger{border-radius:8px;padding:10px 15px;border:1px solid transparent;display:inline-block}.primary{background:var(--accent);color:#143144;font-weight:700}.secondary{background:#fff;border-color:#c7d5de;color:var(--ink)}.quiet{background:transparent;color:#23718c;padding:6px 10px}.danger{background:#fff1ef;color:#a94338;border-color:#efc7c2}.primary:hover{background:#f5a65d}.secondary:hover{background:#f3f7f9}.actions{display:flex;gap:8px;flex-wrap:wrap}.brand{display:block;color:#fff;font-size:25px;font-weight:800;letter-spacing:1px}.brand span{display:block;font-size:10px;letter-spacing:3px;color:#93b9cc;margin-top:5px}.brand:hover{text-decoration:none}#shell{display:flex;min-height:100vh}aside{width:235px;background:var(--navy);color:#fff;padding:32px 20px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column}.nav-caption{font-size:10px;color:#88a9bc;letter-spacing:2px;margin:45px 12px 12px}nav{display:grid;gap:5px}nav a{color:#bdd1db;padding:12px;border-radius:9px;display:flex;gap:11px;align-items:center;font-weight:600}nav a:hover{background:#244454;text-decoration:none}nav a.active{background:#edf5f9;color:#183f54}.sidebar-footer{margin-top:auto;padding-top:30px;font-size:11px;color:#9ab7c7;line-height:1.9}.workspace{margin-left:235px;width:calc(100% - 235px)}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;font-size:13px}.topbar>div{display:flex;align-items:center;gap:16px}main{max-width:1500px;padding:30px 32px 45px;margin:auto}h1{font-size:29px;letter-spacing:-.6px;line-height:1.25;margin:0 0 9px}h2{font-size:19px;margin:0 0 16px}h3{font-size:16px;margin:0 0 8px}p{margin:7px 0 14px}.muted,.page-head p{color:var(--muted)}.eyebrow{font-size:10px;font-weight:bold;letter-spacing:2px;color:#39809a}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:23px}.page-head p{margin:0;max-width:650px}.panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:23px;margin-bottom:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:16px}.panel-head h2{margin:0}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:23px}.stat{display:block;background:white;border:1px solid var(--line);border-radius:12px;padding:18px 20px;color:var(--ink)}.stat:hover{border-color:#81adc1;text-decoration:none}.stat span{font-size:13px;color:var(--muted)}.stat strong{display:block;font-size:31px;font-weight:700;margin:5px 0}.stat small{font-size:11px;color:var(--muted)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:19px;align-items:center}.toolbar input{flex:1;min-width:190px}.toolbar select{width:auto;max-width:230px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th{background:#f3f7f9;color:#657d89;font-size:11px;text-transform:uppercase;letter-spacing:.5px}th,td{padding:13px 11px;border-bottom:1px solid #e6edf1;vertical-align:top}td small{display:block;color:var(--muted);margin-top:4px}td .quiet{padding:2px 5px}.badge{display:inline-block;background:#e9f2f7;color:#326079;font-size:11px;padding:5px 9px;border-radius:20px;white-space:nowrap}.badge.good{background:#e6f5eb;color:#29794b}.badge.warn{background:#fff1da;color:#926323}.badge.bad{background:#ffe9e5;color:#a54436}.tabs{display:flex;gap:7px;flex-wrap:wrap;padding:0;margin-bottom:20px}.tabs button{padding:10px 14px;background:white;border:1px solid var(--line);border-radius:8px;color:#4d6e80}.tabs button.active{background:#173d52;color:#fff;border-color:#173d52}.profile-head{display:flex;gap:18px;align-items:center;margin-bottom:20px}.avatar{height:62px;width:62px;border-radius:15px;background:#d9eaf2;display:grid;place-items:center;font-weight:700;font-size:24px;color:#326781}.details{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.details dt{font-size:11px;color:var(--muted);margin-bottom:5px}.details dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.wide{grid-column:1/-1}.check-list{display:flex;gap:10px;flex-wrap:wrap}.check-list>span{background:#f2f6f8;border-radius:8px;padding:8px 12px;font-size:12px}.steps{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.steps>span{padding:8px 12px;border-radius:7px;background:#edf2f5;font-size:12px}.steps .current{background:#e8a354;color:#153749;font-weight:bold}.empty{text-align:center;padding:28px 18px;color:var(--muted)}.empty strong{display:block;color:#355d72;font-size:16px;margin-bottom:7px}.notice{padding:14px 18px;border:1px solid #efd5a8;background:#fff7e8;border-radius:9px;margin-bottom:20px;color:#755729}.notice.good{border-color:#c2dfce;background:#edf8f1;color:#397354}.list-item{padding:13px 0;border-bottom:1px solid var(--line)}.list-item:last-child{border:0}.list-item strong{display:block}.list-item small{color:var(--muted)}footer{padding:5px 32px 25px;color:#9bafba;font-size:11px}dialog{width:760px;max-width:calc(100% - 28px);max-height:90vh;border:1px solid #cbdbe4;padding:0;border-radius:16px;box-shadow:0 20px 80px #0b263e33}dialog::backdrop{background:#102f4766}#editor{padding:25px}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between}.dialog-head h2{font-size:22px}.dialog-head button{font-size:25px;margin-top:-10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px;border-top:1px solid var(--line);padding-top:20px}#form-error,#login-error{color:#b44339;white-space:pre-wrap}#toast{position:fixed;right:24px;bottom:24px;background:#163e53;color:white;padding:14px 20px;border-radius:10px;box-shadow:0 5px 25px #18364e22;z-index:100}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding-top:15px;font-size:12px}#login{min-height:100vh;background:#102f42;display:grid;grid-template-columns:1fr 430px;gap:80px;align-items:center;padding:8vw}.login-brand a{color:#fff;font-size:28px;font-weight:800;letter-spacing:1px}.login-brand a span{display:block;font-size:10px;letter-spacing:3px;color:#83adbe}.login-brand h1{font-size:52px;color:#fff;line-height:1.15;margin:55px 0 23px}.login-brand p{color:#a9c4d2}.login-card{background:#fffdf9;border-radius:20px;padding:36px}.login-card h2{font-size:25px;margin:9px 0 25px}.login-card label{margin-bottom:18px}.login-card button{width:100%;margin:10px 0 20px}.login-card a{font-size:12px}.register-wrap{max-width:800px;margin:40px auto;padding:0 20px}.register-brand{background:#15374b;padding:20px;color:white;font-size:23px;font-weight:bold}.register-wrap .panel{padding:30px}.loading{padding:60px;text-align:center;color:var(--muted)}.file-label{font-size:12px;color:#397089;margin-top:5px}.small{font-size:12px}.checkbox-label{display:flex;align-items:center;gap:10px}.checkbox-label input{width:18px;min-height:18px;margin:0}.sr-only{position:absolute;left:-9999px}.export-link{display:inline-block;margin-left:8px}.avatar{position:relative;overflow:hidden;flex-shrink:0}.avatar .crew-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.avatar-small{width:42px;height:42px;border-radius:10px;font-size:16px}.crew-name-cell{display:flex;align-items:center;gap:10px}.photo-preview-wrap{display:flex;justify-content:center}.photo-preview-wrap img{width:180px;height:180px;object-fit:cover;border-radius:16px;border:1px solid var(--line)}@media(max-width:1000px){aside{width:195px;padding:25px 14px}.workspace{margin-left:195px;width:calc(100% - 195px)}main{padding:25px 20px}.stats{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.details{grid-template-columns:1fr 1fr}#login{gap:40px;padding:6vw;grid-template-columns:1fr 380px}.login-brand h1{font-size:38px}}@media(max-width:700px){#shell{display:block}aside{position:static;width:100%;padding:20px}.brand{font-size:20px}.nav-caption,.sidebar-footer{display:none}nav{display:flex;overflow:auto;margin-top:18px;gap:5px}nav a{font-size:12px;padding:8px;white-space:nowrap}nav a span{display:none}.workspace{margin:0;width:100%}.topbar{height:60px;padding:0 20px}main{padding:24px 15px}.page-head{flex-direction:column;gap:12px}h1{font-size:25px}.panel{padding:17px}.stat{padding:15px}.form-grid,.details{grid-template-columns:1fr}.wide{grid-column:auto}.profile-head{align-items:flex-start}.toolbar select{max-width:none;flex:1}#login{display:block;padding:30px 20px}.login-brand h1{font-size:31px;margin:25px 0 10px}.login-card{margin:30px auto 0;max-width:420px;padding:28px}.login-brand p{margin:0}.dialog-head h2{font-size:20px}#editor{padding:20px}#toast{right:15px;left:15px;bottom:15px}.register-wrap{margin:25px auto}.register-wrap .panel{padding:20px}}

.ml-preview{background:white;color:#111;padding:24px;font:12px Arial,sans-serif}.ml-preview h2,.ml-preview h3{color:#111}.ml-preview h3{font-size:13px;background:#eee;padding:8px;margin-top:20px}.ml-preview table{width:100%;border-collapse:collapse;table-layout:fixed}.ml-preview th,.ml-preview td{border:1px solid #555;padding:6px;font-size:11px;overflow-wrap:anywhere;white-space:pre-wrap}.ml-preview input,.ml-preview textarea,.ml-preview select{font:inherit;width:100%;min-height:30px;border:1px dashed #aaa;padding:4px;background:white;color:#111}.ml-preview header{display:block;border:1px solid #555;padding:10px}.ml-print-root{display:none}.ml-signatures{display:flex;justify-content:space-between;gap:24px;margin-top:24px}.ml-signatures p{flex:1;line-height:2}.ml-preview tr{break-inside:avoid}
@media print{@page{size:A4;margin:12mm}body>*{display:none!important}body>.ml-print-root{display:block!important}.ml-print-root .ml-preview{padding:0}.ml-print-root h3{break-after:avoid}.ml-print-root .ml-print-value{white-space:pre-wrap;min-height:18px}.ml-print-root header{position:static}.ml-print-root .ml-signatures{break-inside:avoid}.ml-print-root .ml-preview table{overflow:visible}}

.ml-preview .ml-header td{padding:6px 4px;font-size:8px;line-height:1.25;white-space:nowrap}.ml-preview .ml-header{margin-bottom:14px}@media print{.ml-print-root .ml-header td{font-size:9pt;padding:6px 5px}}

@media print{@page{size:A4;margin:10mm}.ml-print-root .ml-preview{font-size:9pt;line-height:1.15}.ml-print-root .ml-preview h3{font-size:9pt;padding:4px 6px;margin:10px 0 5px}.ml-print-root .ml-preview td,.ml-print-root .ml-preview th{font-size:9pt;line-height:1.15;padding:3px 5px}.ml-print-root .ml-print-value{min-height:12px}.ml-print-root .ml-header{margin-bottom:8px}.ml-print-root .ml-header td{font-size:9pt;padding:5px}.ml-print-root .ml-signatures{margin-top:14px}.ml-print-root .ml-signatures p{font-size:9pt;line-height:1.5;margin:0}.ml-print-root .ml-preview p{margin:5px 0}.ml-print-root thead{display:table-header-group}}

.ml-preview .ml-header{table-layout:auto}.ml-preview .ml-header-company,.ml-preview .ml-header-number{width:1%;white-space:nowrap}.ml-preview .ml-header-title{width:auto;text-align:center;white-space:normal}

.ml-preview h3,.ml-preview th{white-space:nowrap;letter-spacing:0}

@page mlwide{size:A4 landscape;margin:10mm;}
@media print{.ml-print-root.ml-wide{page:mlwide;}}

/* Compact crew process navigation. */
.crew-tabs{gap:5px;flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:3px}
.crew-tabs button{font-size:13px;line-height:1.3;padding:7px 10px;white-space:nowrap;flex:0 0 auto}

.portal-logo{display:block;object-fit:contain;background:#fff;border-radius:8px;flex:0 0 auto}.portal-brand{display:flex;align-items:center;gap:12px;letter-spacing:.5px}.sidebar-logo{width:58px;height:58px;padding:4px}.portal-brand>div{min-width:0;font-size:20px}.portal-brand span{letter-spacing:2px}.login-logo-brand{display:flex;align-items:center;gap:20px}.login-logo{width:104px;height:104px;padding:6px}@media(max-width:700px){.sidebar-logo{width:46px;height:46px}.login-logo{width:78px;height:78px}.login-logo-brand{gap:14px}}

/* Keep every desktop sidebar link reachable on short or zoomed screens. */
@media(min-width:701px){#shell>aside{overflow-y:auto;overscroll-behavior-y:contain;}#shell>aside>.brand,#shell>aside>.nav-caption,#shell>aside>nav,#shell>aside>.sidebar-footer{flex-shrink:0;}}

/* Crew profile actions share one responsive row. */
.profile-head{align-items:flex-start}.profile-head>div:last-child{min-width:0;flex:1}.profile-head h1{overflow-wrap:anywhere}.crew-profile-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:14px 0 0}.crew-profile-actions>button,.crew-profile-actions>a.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin:0;padding:10px 16px;font-size:14px;line-height:1.4;white-space:normal;text-align:center}@media(max-width:700px){.crew-profile-actions{gap:8px}.crew-profile-actions>button,.crew-profile-actions>a.button{flex:1 1 180px}}
