:root{--bg:#05070b;--panel:#0b0f17;--line:#202938;--text:#eef3fb;--muted:#8c98aa;--mag:#ff2bd6;--cyan:#2de7ff;--danger:#ff5577}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 80% 10%,#101b2b 0,transparent 38%),var(--bg);color:var(--text);font:14px/1.5 Inter,system-ui,sans-serif}.topbar{height:70px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 32px;background:#060910e8;backdrop-filter:blur(10px);position:sticky;top:0;z-index:5}.brand{display:flex;gap:7px;align-items:center;font-weight:900;letter-spacing:.08em}.brand .mag{color:var(--mag)}.brand .cyan{color:var(--cyan)}.brand small{color:#fff;font-size:9px;letter-spacing:.25em;margin-left:4px}.topbar nav{display:flex;gap:20px}.topbar a{color:#b7c1cf;text-decoration:none}.topbar a:hover{color:#fff}.oc-shell{max-width:1180px;margin:auto;padding:42px 24px 80px}.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:28px;align-items:stretch;margin:30px 0 24px}.eyebrow{font-size:11px;letter-spacing:.22em;color:var(--cyan);font-weight:800}.hero h1,.page-head h1{font-size:clamp(38px,6vw,72px);line-height:.98;margin:14px 0 18px}.hero h1 em{font-style:normal;color:var(--mag)}.hero p,.page-head p{color:var(--muted);max-width:650px;font-size:16px}.panel,.flight-card,.note,.stats>div{border:1px solid var(--line);background:linear-gradient(145deg,#0b111b,#080c13);border-radius:18px}.upload{padding:28px}.upload h2{margin-top:0}.drop{min-height:190px;border:1px dashed #344154;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;cursor:pointer}.drop input{display:none}.drop strong{font-size:20px;margin-bottom:6px}.drop span{color:var(--muted)}button{border:0;background:linear-gradient(90deg,var(--mag),#a63cff);color:white;padding:13px 18px;border-radius:11px;font-weight:800;cursor:pointer;margin-top:16px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.stats>div{padding:22px}.stats b{font-size:34px;display:block}.stats span{color:var(--muted)}.note{margin-top:14px;padding:18px;display:flex;gap:14px}.note b{color:var(--cyan);white-space:nowrap}.page-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:25px}.badge,.status,.pill{border:1px solid #344154;border-radius:99px;padding:6px 10px;color:var(--cyan);font-size:11px;text-transform:uppercase}.review-list{display:grid;gap:14px}.flight-card{padding:18px}.flight-head{display:flex;align-items:center;gap:14px;color:var(--muted)}.flight-head strong{color:#fff;font-size:20px}.flight-head .status{margin-left:auto}.route{display:flex;align-items:center;justify-content:center;gap:60px;padding:20px 0}.route div{display:flex;flex-direction:column;text-align:center}.route b{font-size:30px}.route small{color:var(--muted);font-size:16px}.route i{color:var(--mag);font-size:28px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.grid label{color:var(--muted);font-size:11px;text-transform:uppercase}.grid input,.grid select{width:100%;margin-top:5px;background:#070b12;border:1px solid var(--line);border-radius:9px;color:#fff;padding:10px}.provenance{margin-top:14px;font-size:10px;color:#657286;letter-spacing:.05em}.primary{float:right;margin:22px 0 0}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:16px}.table-wrap table{width:100%;border-collapse:collapse;min-width:1000px}.table-wrap th,.table-wrap td{padding:12px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.table-wrap th{font-size:10px;color:var(--muted);letter-spacing:.12em}.footer{text-align:center;color:#4f5b6d;font-size:11px;padding:25px}.alert{padding:14px;border-radius:12px;margin-bottom:20px}.danger{background:#2a0c16;border:1px solid #6d2337;color:#ff9bb0}@media(max-width:760px){.topbar{padding:0 16px}.topbar nav{gap:10px}.oc-shell{padding:24px 14px 60px}.hero{grid-template-columns:1fr}.stats{grid-template-columns:1fr}.page-head{display:block}.route{gap:28px}.grid{grid-template-columns:1fr 1fr}.note{display:block}.note b{display:block;margin-bottom:6px}}
.reconcile{margin:0 0 16px;padding:15px 17px;border-radius:13px;display:flex;gap:12px;align-items:flex-start}.warning{background:#261d08;border:1px solid #765d1b;color:#e8d59a}.warning b{color:#ffd85c;white-space:nowrap}.warning span{color:#c8b879}

.editable-row{cursor:pointer;transition:background .15s,box-shadow .15s}.editable-row:hover,.editable-row:focus{background:#0d1420;outline:none;box-shadow:inset 3px 0 0 var(--cyan)}.editable-row td{transition:color .15s}.editable-row:hover td{color:#fff}.empty-cell{color:#536075;font-style:italic}.back-link{color:var(--cyan);text-decoration:none;border:1px solid #263746;padding:8px 12px;border-radius:10px}.edit-panel{border:1px solid var(--line);background:linear-gradient(145deg,#0b111b,#080c13);border-radius:18px;padding:22px}.edit-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.edit-grid label{color:var(--muted);font-size:11px;text-transform:uppercase}.edit-grid label.wide{grid-column:span 2}.edit-grid input,.edit-grid select{width:100%;margin-top:6px;background:#070b12;border:1px solid var(--line);border-radius:9px;color:#fff;padding:11px}.checks{display:flex;flex-wrap:wrap;gap:18px;margin-top:18px;padding-top:18px;border-top:1px solid var(--line);color:var(--muted)}.checks input{accent-color:var(--cyan)}.edit-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.edit-actions button,.edit-actions .secondary{margin:0}.secondary{display:inline-flex;align-items:center;text-decoration:none;color:#d7deea;border:1px solid var(--line);border-radius:11px;padding:13px 18px;font-weight:800}.edit-actions .primary{float:none}@media(max-width:760px){.edit-grid{grid-template-columns:1fr 1fr}.edit-grid label.wide{grid-column:span 2}.edit-actions{justify-content:stretch}.edit-actions>*{flex:1;text-align:center;justify-content:center}}@media(max-width:520px){.edit-grid{grid-template-columns:1fr}.edit-grid label.wide{grid-column:span 1}}

/* ================================================================
   EDIT FLIGHT — structured premium layout
   ================================================================ */
.edit-page-head{display:grid;grid-template-columns:1fr 1fr;gap:34px;align-items:center;margin:18px 0 20px}.edit-heading{padding:4px 6px 10px}.edit-back{display:inline-flex;margin-bottom:34px;color:#aebbd0}.edit-heading .eyebrow{display:block}.edit-heading h1{font-size:clamp(42px,5vw,66px);line-height:1;margin:12px 0 14px;letter-spacing:-.035em}.edit-heading p{margin:0;color:#8c9ab0;font-size:17px;max-width:760px}.flight-hero-card{min-height:138px;border:1px solid rgba(255,43,214,.72);border-radius:18px;background:linear-gradient(135deg,rgba(11,14,24,.96),rgba(7,12,21,.9));position:relative;overflow:hidden;box-shadow:0 0 30px rgba(255,43,214,.08)}.flight-hero-card:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,43,214,.09),transparent 42%,rgba(45,231,255,.07));pointer-events:none}.flight-hero-copy{position:absolute;left:30px;top:20px;z-index:2;display:flex;flex-direction:column}.flight-hero-copy span{font-size:12px;letter-spacing:.12em;color:#d8e0ed}.flight-hero-copy strong{font-size:48px;line-height:1.02;letter-spacing:-.03em}.flight-hero-copy b{display:inline-block;margin-top:9px;width:max-content;background:linear-gradient(90deg,var(--mag),#a63cff);border-radius:99px;padding:5px 13px;font-size:10px;letter-spacing:.08em}.flight-outline{position:absolute;right:-6px;bottom:-2px;width:70%;height:100%;color:#596cff;opacity:.62;filter:drop-shadow(0 0 5px rgba(45,231,255,.25));z-index:1}.edit-form{display:flex;flex-direction:column;gap:18px}.edit-section{border:1px solid #233247;background:linear-gradient(145deg,#0a111a,#070c13);border-radius:16px;padding:22px;min-width:0}.edit-section-main{border-color:#314258;box-shadow:inset 2px 0 0 rgba(255,43,214,.75)}.section-title{display:flex;align-items:center;gap:15px;margin-bottom:19px}.section-title h2{margin:0;font-size:19px;line-height:1.2}.section-title p{margin:5px 0 0;color:#8796aa;font-size:14px}.section-icon{width:48px;height:48px;display:grid;place-items:center;border:1px solid rgba(255,43,214,.65);border-radius:12px;color:#be63ff;font-size:25px;flex:0 0 auto}.section-icon.cyan{color:var(--cyan);border-color:rgba(45,231,255,.55)}.field-grid{display:grid;gap:18px}.field-grid-six{grid-template-columns:repeat(6,minmax(0,1fr))}.field-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}.field-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}.edit-section-row{display:grid;grid-template-columns:1fr 1.02fr 1.15fr;gap:18px}.edit-section-row .edit-section{height:100%}.edit-form label{display:block;color:#b9c5d5;font-size:12px;font-weight:600}.edit-form input:not([type=checkbox]),.edit-form select{width:100%;height:52px;margin-top:7px;background:#070c13;border:1px solid #34465c;border-radius:9px;color:#f3f6fb;padding:0 14px;font:inherit;font-size:16px;outline:none;transition:border-color .15s,box-shadow .15s}.edit-form input:not([type=checkbox]):focus,.edit-form select:focus{border-color:var(--cyan);box-shadow:0 0 0 2px rgba(45,231,255,.08)}.edit-form input::placeholder{color:#65748a}.phase-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.phase-check{height:62px;border:1px solid #3b5068!important;border-radius:10px;padding:0 18px;display:flex!important;align-items:center;gap:13px;color:#e4eaf3!important;font-size:16px!important;font-weight:600!important;background:#07101a}.phase-check span{font-size:22px;color:var(--cyan)}.phase-check input{margin-left:auto;width:20px;height:20px;accent-color:var(--cyan)}.edit-actions{display:flex;justify-content:space-between;align-items:center;border-top:1px solid #1d2a39;padding:16px 4px 0;margin-top:0}.edit-actions .secondary{height:56px;min-width:200px;justify-content:center;border-color:#3b5068;color:var(--cyan);background:#070c13}.edit-actions .primary{height:56px;min-width:320px;display:inline-flex;align-items:center;justify-content:center;font-size:16px;margin:0;border-radius:12px}.footer{margin-top:0}
@media(max-width:1050px){.edit-page-head{grid-template-columns:1fr}.flight-hero-card{min-height:150px}.edit-section-row{grid-template-columns:1fr 1fr}.edit-section-row .edit-section:last-child{grid-column:1/-1}.field-grid-six{grid-template-columns:repeat(3,minmax(0,1fr))}.phase-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.oc-shell{padding:24px 14px 60px}.edit-page-head{gap:18px;margin-top:8px}.edit-back{margin-bottom:24px}.edit-heading h1{font-size:44px}.edit-heading p{font-size:15px}.flight-hero-card{min-height:130px}.flight-hero-copy{left:20px}.flight-hero-copy strong{font-size:40px}.flight-outline{width:68%;opacity:.45}.edit-section-row{grid-template-columns:1fr}.edit-section-row .edit-section:last-child{grid-column:auto}.field-grid-six,.field-grid-two,.field-grid-three{grid-template-columns:1fr 1fr}.phase-grid{grid-template-columns:1fr 1fr}.edit-actions{flex-direction:column-reverse;align-items:stretch}.edit-actions .primary,.edit-actions .secondary{width:100%;min-width:0}}
@media(max-width:520px){.field-grid-six,.field-grid-two,.field-grid-three{grid-template-columns:1fr}.phase-grid{grid-template-columns:1fr}.edit-section{padding:17px}.section-icon{width:42px;height:42px}.section-title h2{font-size:17px}.edit-heading h1{font-size:38px}.flight-hero-copy strong{font-size:34px}.flight-outline{width:72%}}

/* ================================================================
   EDIT FLIGHT — COMPACT SINGLE-VIEW GRID
   v0.3.2
   ================================================================ */
body:has(.edit-form){overflow:hidden}
body:has(.edit-form) .oc-shell{height:calc(100vh - 70px);min-height:0;max-width:none;padding:22px 28px 16px;overflow:hidden}
body:has(.edit-form) .edit-page-head{grid-template-columns:minmax(0,1fr) 390px;gap:22px;margin:0 0 14px;align-items:center;height:104px}
body:has(.edit-form) .edit-heading{padding:0;min-width:0}
body:has(.edit-form) .edit-back{margin:0 0 7px;padding:0;border:0;font-size:13px;color:var(--cyan)}
body:has(.edit-form) .edit-heading .eyebrow{display:inline-block;margin-left:12px}
body:has(.edit-form) .edit-heading h1{font-size:36px;line-height:1;margin:4px 0 5px;letter-spacing:-.025em}
body:has(.edit-form) .edit-heading p{font-size:13px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:has(.edit-form) .flight-hero-card{height:96px;min-height:0;border-radius:13px}
body:has(.edit-form) .flight-hero-copy{left:18px;top:13px}
body:has(.edit-form) .flight-hero-copy span{font-size:9px}
body:has(.edit-form) .flight-hero-copy strong{font-size:34px}
body:has(.edit-form) .flight-hero-copy b{margin-top:4px;padding:3px 9px;font-size:8px}
body:has(.edit-form) .flight-outline{width:64%;height:100%;right:-8px;opacity:.45}
body:has(.edit-form) .edit-form{display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:auto auto auto;gap:12px;height:calc(100% - 118px);min-height:0;overflow:hidden}
body:has(.edit-form) .edit-section{padding:14px 16px;border-radius:12px}
body:has(.edit-form) .edit-section-main{grid-column:1/-1}
body:has(.edit-form) .edit-section-row{display:contents}
body:has(.edit-form) .edit-section-row .edit-section{height:auto}
body:has(.edit-form) .edit-section-row .edit-section:nth-child(1){grid-column:1}
body:has(.edit-form) .edit-section-row .edit-section:nth-child(2){grid-column:2}
body:has(.edit-form) .edit-section-row .edit-section:nth-child(3){grid-column:3}
body:has(.edit-form) .section-title{gap:9px;margin-bottom:10px}
body:has(.edit-form) .section-icon{width:34px;height:34px;border-radius:9px;font-size:18px}
body:has(.edit-form) .section-title h2{font-size:15px}
body:has(.edit-form) .section-title p{font-size:10px;margin-top:2px}
body:has(.edit-form) .field-grid{gap:9px}
body:has(.edit-form) .field-grid-six{grid-template-columns:repeat(6,minmax(0,1fr))}
body:has(.edit-form) .field-grid-two{grid-template-columns:1fr 1fr}
body:has(.edit-form) .field-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}
body:has(.edit-form) .edit-form label{font-size:10px;line-height:1.15}
body:has(.edit-form) .edit-form input:not([type=checkbox]),body:has(.edit-form) .edit-form select{height:38px;margin-top:4px;border-radius:7px;padding:0 9px;font-size:13px}
body:has(.edit-form) .phase-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
body:has(.edit-form) .phase-check{height:44px;padding:0 10px;border-radius:8px;gap:7px;font-size:12px!important}
body:has(.edit-form) .phase-check span{font-size:16px}
body:has(.edit-form) .phase-check input{width:16px;height:16px}
body:has(.edit-form) .edit-section:last-of-type{grid-column:1/-1}
body:has(.edit-form) .edit-actions{grid-column:1/-1;padding:9px 0 0;height:56px}
body:has(.edit-form) .edit-actions .secondary,body:has(.edit-form) .edit-actions .primary{height:42px;min-width:150px;padding:0 18px;border-radius:9px;font-size:13px}
body:has(.edit-form) .footer{display:none}

@media(max-width:1050px){
  body:has(.edit-form){overflow:auto}
  body:has(.edit-form) .oc-shell{height:auto;overflow:visible;padding:20px 18px 40px}
  body:has(.edit-form) .edit-page-head{height:auto;grid-template-columns:1fr;margin-bottom:14px}
  body:has(.edit-form) .flight-hero-card{height:100px}
  body:has(.edit-form) .edit-form{height:auto;display:grid;grid-template-columns:1fr 1fr;overflow:visible}
  body:has(.edit-form) .edit-section-main,body:has(.edit-form) .edit-section:last-of-type,body:has(.edit-form) .edit-actions{grid-column:1/-1}
  body:has(.edit-form) .edit-section-row .edit-section:nth-child(1),body:has(.edit-form) .edit-section-row .edit-section:nth-child(2),body:has(.edit-form) .edit-section-row .edit-section:nth-child(3){grid-column:auto}
}
@media(max-width:700px){
  body:has(.edit-form) .edit-form{grid-template-columns:1fr}
  body:has(.edit-form) .edit-section-main,body:has(.edit-form) .edit-section:last-of-type,body:has(.edit-form) .edit-actions{grid-column:1}
  body:has(.edit-form) .field-grid-six,body:has(.edit-form) .field-grid-two,body:has(.edit-form) .field-grid-three{grid-template-columns:1fr 1fr}
  body:has(.edit-form) .phase-grid{grid-template-columns:1fr 1fr}
}


/* ================================================================
   EDIT FLIGHT — CLEAN GRID / NO AIRCRAFT ILLUSTRATION
   v0.3.3
   ================================================================ */
html,body{max-width:100%;overflow-x:hidden}
body:has(.edit-form) .oc-shell{width:100%;max-width:100%;margin:0;padding:18px 28px 12px;overflow:hidden}
body:has(.edit-form) .edit-page-head{grid-template-columns:minmax(0,1fr) 300px;height:86px;gap:18px;margin:0 0 10px}
body:has(.edit-form) .edit-back{margin:0 0 5px;font-size:12px}
body:has(.edit-form) .edit-heading .eyebrow{font-size:10px}
body:has(.edit-form) .edit-heading h1{font-size:30px;margin:3px 0 3px}
body:has(.edit-form) .edit-heading p{font-size:12px}
body:has(.edit-form) .flight-hero-card.compact-flight-card{height:72px;min-height:72px;border-radius:11px;box-shadow:none}
body:has(.edit-form) .compact-flight-card .flight-hero-copy{position:static;padding:10px 16px}
body:has(.edit-form) .compact-flight-card .flight-hero-copy span{font-size:8px;color:#8c9ab0}
body:has(.edit-form) .compact-flight-card .flight-hero-copy strong{font-size:28px;line-height:1}
body:has(.edit-form) .compact-flight-card .flight-hero-copy b{margin-top:3px;padding:2px 7px;font-size:7px}
body:has(.edit-form) .flight-outline{display:none!important}
body:has(.edit-form) .edit-form{grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:auto auto auto;gap:10px;height:calc(100% - 96px)}
body:has(.edit-form) .edit-section{padding:12px 14px;border-radius:11px}
body:has(.edit-form) .edit-section-main{grid-column:1/-1}
body:has(.edit-form) .edit-section-row .edit-section:nth-child(1){grid-column:span 4}
body:has(.edit-form) .edit-section-row .edit-section:nth-child(2){grid-column:span 4}
body:has(.edit-form) .edit-section-row .edit-section:nth-child(3){grid-column:span 4}
body:has(.edit-form) .section-title{gap:8px;margin-bottom:8px}
body:has(.edit-form) .section-icon{width:30px;height:30px;font-size:16px;border-radius:8px}
body:has(.edit-form) .section-title h2{font-size:14px}
body:has(.edit-form) .section-title p{font-size:9px}
body:has(.edit-form) .field-grid{gap:8px}
body:has(.edit-form) .field-grid-six{grid-template-columns:repeat(6,minmax(0,1fr))}
body:has(.edit-form) .field-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
body:has(.edit-form) .field-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}
body:has(.edit-form) .edit-form input:not([type=checkbox]),body:has(.edit-form) .edit-form select{height:36px;margin-top:3px;font-size:12px;padding:0 8px}
body:has(.edit-form) .edit-form label{font-size:9px}
body:has(.edit-form) .phase-grid{gap:8px}
body:has(.edit-form) .phase-check{height:40px;font-size:11px!important;padding:0 9px}
body:has(.edit-form) .edit-actions{height:46px;padding:7px 0 0}
body:has(.edit-form) .edit-actions .secondary,body:has(.edit-form) .edit-actions .primary{height:36px;min-width:140px;font-size:12px}
.editable-row{cursor:pointer!important;user-select:none}
.editable-row td{cursor:pointer!important}

@media(max-width:1050px){
  body:has(.edit-form){overflow:auto}
  body:has(.edit-form) .oc-shell{height:auto;overflow:visible;padding:18px}
  body:has(.edit-form) .edit-page-head{height:auto;grid-template-columns:1fr 260px}
  body:has(.edit-form) .edit-form{height:auto;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
  body:has(.edit-form) .edit-section-main,body:has(.edit-form) .edit-section:last-of-type,body:has(.edit-form) .edit-actions{grid-column:1/-1}
  body:has(.edit-form) .edit-section-row .edit-section:nth-child(1),body:has(.edit-form) .edit-section-row .edit-section:nth-child(2),body:has(.edit-form) .edit-section-row .edit-section:nth-child(3){grid-column:auto}
}
@media(max-width:700px){
  body:has(.edit-form) .edit-page-head{grid-template-columns:1fr}
  body:has(.edit-form) .edit-form{grid-template-columns:1fr}
  body:has(.edit-form) .edit-section-main,body:has(.edit-form) .edit-section:last-of-type,body:has(.edit-form) .edit-actions{grid-column:1}
  body:has(.edit-form) .field-grid-six,body:has(.edit-form) .field-grid-two,body:has(.edit-form) .field-grid-three{grid-template-columns:1fr 1fr}
}

/* ================================================================
   EDIT FLIGHT — PREMIUM SINGLE WINDOW / GRID
   v0.3.4
   ================================================================ */
body:has(.edit-form){overflow:hidden}
body:has(.edit-form) .oc-shell{max-width:none;width:100%;height:calc(100dvh - 70px);margin:0;padding:18px 26px 12px;overflow:hidden}
body:has(.edit-form) .edit-page-head{height:92px;display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:22px;align-items:center;margin:0 0 12px}
body:has(.edit-form) .edit-heading{padding:0;min-width:0}
body:has(.edit-form) .edit-back{display:inline-block;margin:0 0 4px;padding:0;border:0;border-radius:0;color:#aebbd0;font-size:13px;text-decoration:none}
body:has(.edit-form) .edit-back:hover{color:var(--cyan)}
body:has(.edit-form) .edit-heading .eyebrow{display:inline-block;margin-left:10px;font-size:10px}
body:has(.edit-form) .edit-heading h1{font-size:34px;line-height:1;margin:2px 0 5px;letter-spacing:-.035em}
body:has(.edit-form) .edit-heading p{margin:0;max-width:760px;color:#8c9ab0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:has(.edit-form) .edit-flight-badge{height:76px;border:1px solid rgba(255,43,214,.65);border-radius:13px;background:linear-gradient(135deg,#0b111b,#080c13);display:flex;flex-direction:column;justify-content:center;padding:10px 18px;box-shadow:inset 2px 0 0 rgba(45,231,255,.35)}
body:has(.edit-form) .edit-flight-badge span{font-size:9px;letter-spacing:.16em;color:#8c9ab0}
body:has(.edit-form) .edit-flight-badge strong{font-size:30px;line-height:1;letter-spacing:-.025em}
body:has(.edit-form) .edit-flight-badge small{margin-top:4px;color:var(--mag);font-weight:800;font-size:8px;letter-spacing:.1em}
body:has(.edit-form) .edit-form{height:calc(100% - 104px);display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-template-rows:132px 170px 112px 46px;gap:10px;overflow:hidden}
body:has(.edit-form) .edit-section{min-width:0;height:100%;padding:13px 15px;border-radius:12px;border:1px solid #24364b;background:linear-gradient(145deg,#0a111a,#070c13)}
body:has(.edit-form) .edit-section-main{grid-column:1/-1;border-color:#314258;box-shadow:inset 2px 0 0 rgba(255,43,214,.72)}
body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2){grid-column:span 4}
body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3){grid-column:span 4}
body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4){grid-column:span 4}
body:has(.edit-form) .edit-section-phases{grid-column:1/-1}
body:has(.edit-form) .section-title{gap:9px;margin-bottom:9px}
body:has(.edit-form) .section-icon{width:31px;height:31px;border-radius:8px;font-size:16px}
body:has(.edit-form) .section-title h2{font-size:14px;line-height:1.1}
body:has(.edit-form) .section-title p{margin:2px 0 0;font-size:9px}
body:has(.edit-form) .field-grid{gap:9px}
body:has(.edit-form) .field-grid-six{grid-template-columns:repeat(6,minmax(0,1fr))}
body:has(.edit-form) .field-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))}
body:has(.edit-form) .field-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}
body:has(.edit-form) .edit-form label{font-size:9px;line-height:1.15;color:#aebbd0}
body:has(.edit-form) .edit-form input:not([type=checkbox]),body:has(.edit-form) .edit-form select{height:38px;width:100%;margin-top:4px;padding:0 9px;border:1px solid #34465c;border-radius:7px;background:#070c13;color:#f3f6fb;font:inherit;font-size:12px;outline:none}
body:has(.edit-form) .edit-form input:not([type=checkbox]):focus,body:has(.edit-form) .edit-form select:focus{border-color:var(--cyan);box-shadow:0 0 0 2px rgba(45,231,255,.08)}
body:has(.edit-form) .edit-form input::placeholder{color:#65748a}
body:has(.edit-form) .phase-grid{height:43px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
body:has(.edit-form) .phase-check{height:43px;padding:0 11px;display:flex!important;align-items:center;gap:8px;border:1px solid #334960!important;border-radius:8px;background:#07101a;color:#e4eaf3!important;font-size:12px!important;font-weight:600!important}
body:has(.edit-form) .phase-check span{font-size:17px;color:var(--cyan)}
body:has(.edit-form) .phase-check b{font-size:11px}
body:has(.edit-form) .phase-check input{margin-left:auto;width:16px;height:16px;accent-color:var(--cyan)}
body:has(.edit-form) .edit-actions{grid-column:1/-1;height:46px;margin:0;border-top:1px solid #1d2a39;padding:8px 0 0;display:flex;justify-content:space-between;align-items:center}
body:has(.edit-form) .edit-actions .secondary,body:has(.edit-form) .edit-actions .primary{height:38px;min-width:150px;margin:0;border-radius:9px;padding:0 17px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:12px}
body:has(.edit-form) .edit-actions .secondary{color:var(--cyan);background:#070c13;border:1px solid #3b5068;text-decoration:none}
body:has(.edit-form) .edit-actions .primary{min-width:230px;border:0;color:#fff;background:linear-gradient(90deg,var(--mag),#a63cff);font-weight:800}
body:has(.edit-form) .footer{display:none}
.editable-row,.editable-row td{cursor:pointer!important}

@media(max-width:1050px){
  body:has(.edit-form){overflow:auto}
  body:has(.edit-form) .oc-shell{height:auto;overflow:visible;padding:18px}
  body:has(.edit-form) .edit-page-head{height:auto;grid-template-columns:1fr;margin-bottom:14px}
  body:has(.edit-form) .edit-flight-badge{max-width:360px}
  body:has(.edit-form) .edit-form{height:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto;overflow:visible}
  body:has(.edit-form) .edit-section-main,body:has(.edit-form) .edit-section-phases,body:has(.edit-form) .edit-actions{grid-column:1/-1}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4){grid-column:auto}
}
@media(max-width:700px){
  body:has(.edit-form) .edit-form{grid-template-columns:1fr}
  body:has(.edit-form) .edit-section-main,body:has(.edit-form) .edit-section-phases,body:has(.edit-form) .edit-actions{grid-column:1}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4){grid-column:1}
  body:has(.edit-form) .field-grid-six,body:has(.edit-form) .field-grid-two,body:has(.edit-form) .field-grid-three{grid-template-columns:1fr 1fr}
  body:has(.edit-form) .phase-grid{grid-template-columns:1fr 1fr;height:auto}
  body:has(.edit-form) .phase-check{height:42px}
  body:has(.edit-form) .edit-actions{flex-direction:column-reverse;height:auto;gap:8px}
  body:has(.edit-form) .edit-actions .secondary,body:has(.edit-form) .edit-actions .primary{width:100%;min-width:0}
}
@media(max-width:480px){
  body:has(.edit-form) .field-grid-six,body:has(.edit-form) .field-grid-two,body:has(.edit-form) .field-grid-three{grid-template-columns:1fr}
  body:has(.edit-form) .phase-grid{grid-template-columns:1fr}
}

/* ================================================================
   v0.3.5 — DASHBOARD GRID + LOGBOOK POINTER FIX
   ================================================================ */
.stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  overflow:hidden;
  border:1px solid #233247;
  border-radius:18px;
  background:#08131f;
}
.stats>div{
  min-width:0;
  min-height:86px;
  padding:16px 18px;
  border:0;
  border-radius:0;
  background:transparent;
  border-right:1px solid #233247;
  border-bottom:1px solid #233247;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.stats>div:nth-child(2n){border-right:0}
.stats>div:nth-last-child(-n+2){border-bottom:0}
.stats b{
  font-size:30px;
  line-height:1.05;
  letter-spacing:-.03em;
}
.stats span{
  margin-top:6px;
  color:var(--cyan);
  font-size:11px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
}

/* Logbook rows are actions: force the hand cursor on the row AND every child. */
.table-wrap tbody tr.editable-row,
.table-wrap tbody tr.editable-row *,
.editable-row,
.editable-row *{
  cursor:pointer !important;
}
.editable-row{
  user-select:none !important;
}
.editable-row:hover{
  background:#0d1420 !important;
}

@media(max-width:760px){
  .stats>div{
    min-height:78px;
    padding:14px;
  }
  .stats b{font-size:25px}
}


/* ================================================================
   v0.3.6 — EDIT FLIGHT: DIRECT GRID LAYOUT
   Avoids :has() dependency and keeps the editor inside one viewport.
   ================================================================ */
html:has(.edit-shell),
body:has(.edit-shell){overflow:hidden!important;height:100%!important}
.edit-shell{max-width:none!important;width:100%!important;height:calc(100dvh - 70px)!important;margin:0!important;padding:16px 28px 10px!important;overflow:hidden!important}
.edit-shell .edit-page-head{height:78px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 300px!important;gap:18px!important;align-items:center!important;margin:0 0 10px!important}
.edit-shell .edit-heading{padding:0!important;min-width:0!important}
.edit-shell .edit-back{display:inline-block!important;margin:0 0 3px!important;font-size:12px!important;line-height:1!important}
.edit-shell .edit-heading .eyebrow{display:inline-block!important;margin-left:9px!important;font-size:9px!important}
.edit-shell .edit-heading h1{font-size:30px!important;line-height:1!important;margin:3px 0 4px!important;letter-spacing:-.035em!important}
.edit-shell .edit-heading p{font-size:12px!important;line-height:1.2!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.edit-shell .edit-flight-badge{height:66px!important;min-width:0!important;padding:9px 15px!important;border-radius:11px!important}
.edit-shell .edit-flight-badge span{font-size:8px!important}
.edit-shell .edit-flight-badge strong{font-size:27px!important}
.edit-shell .edit-flight-badge small{font-size:7px!important;margin-top:3px!important}
.edit-shell .edit-form{height:calc(100% - 88px)!important;display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;grid-template-rows:126px 158px 104px 44px!important;gap:9px!important;overflow:hidden!important}
.edit-shell .edit-section{height:100%!important;min-width:0!important;padding:11px 13px!important;border-radius:11px!important;overflow:hidden!important}
.edit-shell .edit-form>.edit-section-main{grid-column:1/-1!important}
.edit-shell .edit-form>.edit-section:nth-of-type(2),
.edit-shell .edit-form>.edit-section:nth-of-type(3),
.edit-shell .edit-form>.edit-section:nth-of-type(4){grid-column:span 4!important}
.edit-shell .edit-section-phases{grid-column:1/-1!important}
.edit-shell .section-title{gap:8px!important;margin-bottom:8px!important}
.edit-shell .section-icon{width:29px!important;height:29px!important;border-radius:7px!important;font-size:15px!important}
.edit-shell .section-title h2{font-size:14px!important;line-height:1.05!important}
.edit-shell .section-title p{font-size:8px!important;margin:2px 0 0!important}
.edit-shell .field-grid{gap:8px!important}
.edit-shell .field-grid-six{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.edit-shell .field-grid-two{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.edit-shell .field-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.edit-shell .edit-form label{font-size:8px!important;line-height:1.1!important}
.edit-shell .edit-form input:not([type=checkbox]),
.edit-shell .edit-form select{height:36px!important;margin-top:4px!important;padding:0 8px!important;border-radius:7px!important;font-size:12px!important}
.edit-shell .phase-grid{height:40px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.edit-shell .phase-check{height:40px!important;padding:0 10px!important;border-radius:8px!important;gap:7px!important;font-size:11px!important}
.edit-shell .phase-check span{font-size:15px!important}
.edit-shell .phase-check b{font-size:10px!important}
.edit-shell .phase-check input{width:15px!important;height:15px!important}
.edit-shell .edit-actions{grid-column:1/-1!important;height:44px!important;margin:0!important;padding:7px 0 0!important}
.edit-shell .edit-actions .secondary,
.edit-shell .edit-actions .primary{height:36px!important;min-width:145px!important;margin:0!important;padding:0 15px!important;border-radius:8px!important;font-size:11px!important}
.edit-shell .edit-actions .primary{min-width:210px!important}
.edit-shell .footer{display:none!important}

/* Rows in the Logbook are clickable actions, never text-edit targets. */
.table-wrap tbody tr.editable-row,
.table-wrap tbody tr.editable-row *,
.editable-row,
.editable-row *{cursor:pointer!important}

@media(max-width:1050px){
  html:has(.edit-shell),body:has(.edit-shell){overflow:auto!important;height:auto!important}
  .edit-shell{height:auto!important;min-height:calc(100dvh - 70px)!important;overflow:visible!important;padding:18px!important}
  .edit-shell .edit-page-head{height:auto!important;grid-template-columns:1fr!important}
  .edit-shell .edit-flight-badge{max-width:360px}
  .edit-shell .edit-form{height:auto!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important;overflow:visible!important}
  .edit-shell .edit-form>.edit-section-main,
  .edit-shell .edit-section-phases,
  .edit-shell .edit-actions{grid-column:1/-1!important}
  .edit-shell .edit-form>.edit-section:nth-of-type(2),
  .edit-shell .edit-form>.edit-section:nth-of-type(3),
  .edit-shell .edit-form>.edit-section:nth-of-type(4){grid-column:auto!important}
}
@media(max-width:700px){
  .edit-shell .edit-form{grid-template-columns:1fr!important}
  .edit-shell .edit-form>.edit-section-main,
  .edit-shell .edit-form>.edit-section-phases,
  .edit-shell .edit-actions,
  .edit-shell .edit-form>.edit-section:nth-of-type(2),
  .edit-shell .edit-form>.edit-section:nth-of-type(3),
  .edit-shell .edit-form>.edit-section:nth-of-type(4){grid-column:1!important}
  .edit-shell .field-grid-six,.edit-shell .field-grid-two,.edit-shell .field-grid-three{grid-template-columns:1fr 1fr!important}
  .edit-shell .phase-grid{grid-template-columns:1fr 1fr!important;height:auto!important}
  .edit-shell .phase-check{height:40px!important}
  .edit-shell .edit-actions{flex-direction:row!important}
}
@media(max-width:480px){
  .edit-shell .field-grid-six,.edit-shell .field-grid-two,.edit-shell .field-grid-three,.edit-shell .phase-grid{grid-template-columns:1fr!important}
}


/* ================================================================
   v0.3.9 — ENRICHMENT: CLEAN EDIT-STYLE GRIDS
   Visual-only refinement. Keeps enrichment logic/data untouched.
   ================================================================ */
.enrich-list{display:grid;gap:12px;margin-top:14px}
.enrich-card{padding:12px 14px;border-radius:12px;border-color:#26364a;background:linear-gradient(145deg,#0a111a,#070c13);box-shadow:inset 2px 0 0 rgba(45,231,255,.10)}
.enrich-card .flight-head{height:34px;gap:12px}
.enrich-card .flight-head>span:first-child{font-size:12px;color:#8c9ab0;font-variant-numeric:tabular-nums}
.enrich-card .flight-head strong{font-size:18px;letter-spacing:-.01em}
.enrich-card .flight-head .status{font-size:9px;padding:4px 8px}
.enrich-card .route{justify-content:flex-start;gap:0;padding:9px 12px;margin:0 0 10px;border:1px solid #202f41;border-radius:9px;background:#070d15}
.enrich-card .route div{min-width:108px;text-align:left}
.enrich-card .route b{font-size:22px;line-height:1}
.enrich-card .route small{font-size:12px;margin-top:2px;color:#8c9ab0}
.enrich-card .route i{font-size:20px;margin:0 20px;color:var(--mag);font-style:normal}
.clean-source-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.enrich-section{min-width:0;border:1px solid #24364b;border-radius:10px;background:linear-gradient(145deg,#0a111a,#070c13);padding:11px 12px}
.enrich-section label{display:block;color:#6f7e93;font-size:8px;letter-spacing:.14em;font-weight:800;margin-bottom:6px}
.pdf-source{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:3px;align-items:center}
.pdf-source label{grid-column:1/-1}
.pdf-source strong{font-size:13px;color:#eef3fb}
.pdf-source>span{font-size:11px;color:#aebbd0;justify-self:end}
.pdf-source small{grid-column:1/-1;font-size:9px;color:#68778b;margin-top:3px}
.candidate-panel{display:flex;flex-direction:column;justify-content:flex-start}
.candidate-panel>label{margin-bottom:5px}
.candidate-panel>strong{font-size:12px;line-height:1.2}
.candidate-panel>span{font-size:10px;color:#9aa8bb;line-height:1.35}
.candidate{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:7px 10px;padding:6px 0;border-top:1px solid #1d2a39}
.candidate:first-of-type{border-top:0;padding-top:0}
.candidate>strong{font-size:14px;letter-spacing:.02em}
.candidate>span{font-size:9px;color:#9aa8bb}
.candidate>small{font-size:8px;color:#68778b;white-space:nowrap}
.candidate>small:nth-of-type(2){grid-column:1/-1;white-space:normal;line-height:1.3}
.candidate form{grid-column:3;grid-row:1}
.candidate .small-btn,.candidate-panel>.small-btn{margin:0;height:28px;padding:0 10px;border-radius:7px;font-size:9px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.candidate-panel>.small-btn{margin-top:7px;align-self:flex-start}
.accepted-mark{color:var(--cyan)!important;font-weight:800}
.candidate-panel.unresolved{border-color:#3a3344}
.provenance{margin-top:8px;padding:0 2px;font-size:8px;line-height:1.2;color:#5f6e82;letter-spacing:.05em}
.enrich-stats{margin-bottom:0}
.enrich-stats>div{padding:14px 16px;border-radius:12px}
.enrich-stats b{font-size:28px}
.note{border-radius:12px;padding:12px 14px}
@media(max-width:760px){
  .clean-source-grid{grid-template-columns:1fr}
  .enrich-card .route{justify-content:center}
  .enrich-card .route div{text-align:center}
  .pdf-source{grid-template-columns:1fr}
  .pdf-source>span{justify-self:start}
  .candidate{grid-template-columns:1fr auto}
  .candidate form{grid-column:2;grid-row:1 / span 2}
  .candidate>small:nth-of-type(2){grid-column:1/-1}
}

/* ================================================================
   v0.4.0 — ENRICHMENT: AIRCRAFT PROFILE
   Aircraft profile is read-only enrichment UI. The PDF aircraft_type
   remains the source-of-record value and is never overwritten.
   ================================================================ */
.aircraft-profile{margin-top:10px;padding:10px 12px!important}
.aircraft-profile-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.aircraft-profile-head label{margin-bottom:4px!important}
.aircraft-profile-head strong{display:block;font-size:12px;line-height:1.2;color:#eef3fb}
.profile-badge{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:25px;padding:0 9px;border:1px solid #294459;border-radius:7px;color:var(--cyan);font-size:9px;font-weight:800;letter-spacing:.08em}
.aircraft-profile-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-top:8px}
.aircraft-profile-grid span{display:flex;flex-direction:column;gap:2px;min-width:0;padding:7px 8px;border:1px solid #1d2b3b;border-radius:7px;background:#080f17;color:#b6c3d4;font-size:9px}
.aircraft-profile-grid b{color:#65758a;font-size:7px;letter-spacing:.1em;text-transform:uppercase}
.profile-note{display:block;margin-top:7px;color:#68778b;font-size:8px;line-height:1.25}
.profile-empty{display:block;color:#9aa8bb;font-size:10px;line-height:1.35}
.aircraft-profile>.small-btn{margin-top:7px;height:27px;padding:0 10px;border-radius:7px;font-size:9px;display:inline-flex;align-items:center;text-decoration:none}
.aircraft-profile.unresolved{border-color:#3a3344}
@media(max-width:900px){.aircraft-profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.aircraft-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.aircraft-profile-head{align-items:flex-start}}

/* v0.4.1 — compact day/night enrichment */
.night-profile{margin-top:10px;padding:10px 12px!important;border:1px solid #1d2b3b;border-radius:8px;background:#080f17}
.night-profile .profile-badge{white-space:nowrap}
.night-profile .manual-badge{border-color:#5a4058;color:#f0a6df}
.night-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.night-grid span{font-size:10px}
@media(max-width:900px){.night-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ================================================================
   v0.4.2 — ENRICHMENT: PIC / CREW MANUAL FALLBACK
   PIC is never inferred automatically. Existing/manual values remain editable.
   ================================================================ */
.crew-profile{margin-top:10px;padding:10px 12px!important}
.crew-grid{grid-template-columns:1fr 1.5fr 1fr}
.crew-profile .small-btn{margin-top:7px;height:27px;padding:0 10px;border-radius:7px;font-size:9px;display:inline-flex;align-items:center;text-decoration:none}
.crew-profile.unresolved{border-color:#3a3344}
@media(max-width:900px){.crew-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.crew-grid{grid-template-columns:1fr}}
/* ================================================================
   v0.4.3 — ENRICHMENT: IFR TIME MANUAL / SOURCE-BASED
   IFR time is not inferred from route, schedule or aircraft type.
   ================================================================ */
.ifr-profile{margin-top:10px;padding:10px 12px!important}
.ifr-profile .manual-badge{border-color:#5a4058;color:#f0a6df}
.ifr-grid{grid-template-columns:1fr 1.2fr 1fr}
.ifr-profile .small-btn{margin-top:7px;height:27px;padding:0 10px;border-radius:7px;font-size:9px;display:inline-flex;align-items:center;text-decoration:none}
.ifr-profile.unresolved{border-color:#3a3344}
@media(max-width:900px){.ifr-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.ifr-grid{grid-template-columns:1fr}}


/* ================================================================
   v0.4.8 — ONCHOCKS AUTHENTICATION
   ================================================================ */
.account-chip{display:inline-flex;align-items:center;gap:7px;margin-left:6px;padding:6px 10px;border:1px solid #27374c;border-radius:999px;color:#dce5f0;font-size:11px;background:#08101a}
.account-chip b{font-size:8px;letter-spacing:.12em;color:var(--mag);border-left:1px solid #334154;padding-left:7px}
.login-body{min-height:100dvh;background:radial-gradient(circle at 18% 18%,rgba(45,231,255,.09),transparent 34%),radial-gradient(circle at 82% 12%,rgba(255,43,214,.10),transparent 35%),var(--bg);display:flex;align-items:center;justify-content:center;padding:30px}
.login-shell{width:min(1080px,100%);display:grid;grid-template-columns:1.1fr .9fr;gap:18px;align-items:stretch}
.login-intro,.login-card{border:1px solid #24354a;border-radius:22px;background:linear-gradient(145deg,#0a111b,#070c13);box-shadow:0 18px 60px rgba(0,0,0,.28)}
.login-intro{padding:46px 48px;display:flex;flex-direction:column;justify-content:center;min-height:590px;position:relative;overflow:hidden}
.login-intro:after{content:"";position:absolute;right:-90px;bottom:-100px;width:360px;height:360px;border:1px solid rgba(45,231,255,.18);border-radius:50%;box-shadow:0 0 0 45px rgba(255,43,214,.035),0 0 0 90px rgba(45,231,255,.025)}
.login-brand{display:flex;align-items:center;gap:7px;font-weight:900;letter-spacing:.08em;margin-bottom:70px}.login-brand .mag{color:var(--mag)}.login-brand .cyan{color:var(--cyan)}.login-brand small{font-size:9px;letter-spacing:.25em;margin-left:4px;color:#fff}
.login-intro .eyebrow{font-size:10px}.login-intro h1{font-size:clamp(42px,5vw,66px);line-height:.98;letter-spacing:-.045em;margin:14px 0 18px}.login-intro h1 em{font-style:normal;color:var(--mag)}.login-intro p{max-width:560px;color:#93a0b2;font-size:15px}
.login-points{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:42px;position:relative;z-index:1}.login-points div{border:1px solid #203147;border-radius:12px;padding:13px;background:#08101a}.login-points b{display:block;color:var(--cyan);font-size:9px;letter-spacing:.16em;margin-bottom:7px}.login-points span{font-size:11px;color:#cbd5e2;line-height:1.3}
.login-card{padding:38px 36px;display:flex;flex-direction:column;justify-content:center}.login-card h2{font-size:27px;margin:10px 0 5px}.login-muted{margin:0 0 26px;color:#8c98aa;font-size:13px}.login-form{display:grid;gap:15px}.login-form label{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#9eacbf;font-weight:700}.login-form input{display:block;width:100%;height:46px;margin-top:6px;padding:0 13px;border:1px solid #2b3d53;border-radius:9px;background:#060b12;color:#f4f7fb;font:14px Inter,system-ui,sans-serif;outline:none}.login-form input:focus{border-color:var(--cyan);box-shadow:0 0 0 2px rgba(45,231,255,.08)}.login-form button{width:100%;height:46px;margin-top:7px;border:0;border-radius:9px;background:linear-gradient(90deg,var(--mag),#a63cff);color:#fff;font-weight:800;cursor:pointer}.login-form button b{margin-left:8px}.login-note{display:flex;gap:10px;margin-top:20px;padding:12px;border:1px solid #1e3347;border-radius:11px;background:#07101a}.login-note>span{color:var(--cyan);font-size:17px}.login-note strong,.login-note small{display:block}.login-note strong{font-size:10px;color:#e8eef6}.login-note small{font-size:10px;line-height:1.45;color:#77879c;margin-top:3px}.login-back{margin-top:20px;color:#718197;font-size:11px;text-decoration:none}.login-back:hover{color:var(--cyan)}
@media(max-width:820px){.login-body{padding:16px}.login-shell{grid-template-columns:1fr}.login-intro{min-height:auto;padding:30px}.login-brand{margin-bottom:38px}.login-intro h1{font-size:43px}.login-points{margin-top:28px}.login-card{padding:30px 24px}}
@media(max-width:520px){.login-points{grid-template-columns:1fr}.login-intro h1{font-size:38px}.login-intro p{font-size:13px}.topbar{padding:0 14px}.topbar nav{gap:8px;flex-wrap:wrap;justify-content:flex-end}.account-chip{display:none}}

.login-form button:disabled{opacity:.65;cursor:wait}.login-status{min-height:16px;margin-top:2px;color:#8fa0b5;font-size:10px}.login-frame{position:absolute;width:1px;height:1px;border:0;opacity:0;pointer-events:none}


/* =========================================================
   v0.4.10 — PROFILE LOGOUT
   Logout is delegated to the existing OnChocks session.
   ========================================================= */
.topbar nav{display:flex;align-items:center;gap:18px}
.pilot-logout-form{margin:0;display:inline-flex;align-items:center}
.pilot-logout-button{appearance:none;-webkit-appearance:none;border:1px solid rgba(255,71,190,.38);background:rgba(255,71,190,.06);color:#ff57c6;border-radius:999px;padding:7px 11px;font:inherit;font-size:9px;font-weight:900;letter-spacing:.09em;cursor:pointer;line-height:1}
.pilot-logout-button:hover,.pilot-logout-button:focus-visible{background:rgba(255,71,190,.14);border-color:rgba(255,71,190,.68);color:#fff;outline:none}
@media(max-width:720px){.topbar nav{gap:8px}.pilot-logout-button{padding:8px 10px;font-size:9px}}


/* v0.4.16 · MANUAL INPUT VISUAL CUE
   Any section/input that still requires pilot-entered data uses the same
   magenta accent as the main edit card, without changing automatic fields.
   */
.edit-section.manual-required{border-color:#314258;box-shadow:inset 2px 0 0 rgba(255,43,214,.9),0 0 0 1px rgba(255,43,214,.04)}
.edit-section.manual-required .section-icon{border-color:rgba(255,43,214,.75);color:#ff5be2}
.edit-form input.manual-input:not([type=checkbox]),
.grid input.manual-input{border-color:rgba(255,43,214,.72)!important;box-shadow:0 0 0 1px rgba(255,43,214,.10),inset 0 0 18px rgba(255,43,214,.025)}
.edit-form input.manual-input:not([type=checkbox]):focus,
.grid input.manual-input:focus{border-color:var(--mag)!important;box-shadow:0 0 0 2px rgba(255,43,214,.12)!important}
.edit-form input.manual-input::placeholder,.grid input.manual-input::placeholder{color:#c06bb1}

/* v0.4.16 · single authoritative version marker */
.app-version{font-size:9px;line-height:1;letter-spacing:.12em;color:#607089;margin-left:5px;align-self:center;white-space:nowrap}


/* v0.4.16 · MAIN FLIGHT DETAILS ARE NOT MANUAL
   Section 1 contains source-of-record flight details and must keep the
   neutral/cyan visual treatment. Magenta is reserved for fields that
   actually require pilot manual completion.
   */
.edit-section.edit-section-main{border-color:#233247!important;box-shadow:none!important}
.edit-section.edit-section-main .section-icon{border-color:rgba(45,231,255,.55)!important;color:var(--cyan)!important}

/* ================================================================
   v0.4.23 — OFFICIAL PAPER LOGBOOK
   A4 landscape reproduction of the photographed paper logbook.
   Two physical pages per logbook page: 1–8 and 9–12.
   ================================================================ */
.print-toolbar{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#07101a;border-bottom:1px solid #24354a}
.print-toolbar button,.print-back{height:38px;border:1px solid #2b3d53;border-radius:8px;background:#09121d;color:#f4f7fb;padding:0 14px;font:700 12px Inter,system-ui,sans-serif;text-decoration:none;display:inline-flex;align-items:center;cursor:pointer}
.print-toolbar button{border:0;background:linear-gradient(90deg,var(--mag),#a63cff)}
.paper-preview{background:#dfe3e7;padding:24px;display:flex;flex-direction:column;gap:24px}
.paper-page{width:297mm;height:210mm;min-height:210mm;background:#fff;color:#111;padding:7mm 7mm 6mm;box-sizing:border-box;box-shadow:0 2px 14px rgba(0,0,0,.18);overflow:hidden;display:block;page-break-after:always;break-after:page}
.paper-page.paper-force-break{page-break-before:always;break-before:page}
.paper-page:first-child{page-break-before:auto;break-before:auto}
.paper-page:last-child{page-break-after:auto;break-after:auto}
.paper-heading{height:7mm;display:flex;justify-content:space-between;align-items:center;font:700 9px Arial,Helvetica,sans-serif;letter-spacing:.03em;color:#111}
.paper-grid{width:100%;border-collapse:collapse;border-spacing:0;table-layout:fixed;font-family:Arial,Helvetica,sans-serif;color:#111;font-size:6.5px;border:0.35mm solid #222!important}
.paper-grid th,.paper-grid td{border:0.35mm solid #222!important;padding:1mm .7mm;vertical-align:middle;overflow:hidden}
.paper-grid thead th{font-weight:700;text-align:center;line-height:1.05}
.paper-grid .group-head th{height:10mm;font-size:7px;padding:.7mm}
.paper-grid .group-head th span{font-size:7px;line-height:1.05}
.paper-grid .subhead th{height:8mm;font-size:6.2px;padding:.6mm}
.paper-grid small{font-size:5.5px;font-weight:600;line-height:1.05}
.paper-grid tbody tr{height:10.6mm;page-break-inside:avoid;break-inside:avoid}
.paper-grid tbody td{text-align:center;height:10.6mm;padding:.5mm .45mm;font-size:6.5px;line-height:1.05;word-break:normal;overflow-wrap:anywhere}
.paper-grid tbody td:nth-child(2),.paper-grid tbody td:nth-child(4),.paper-grid tbody td:nth-child(6),.paper-grid tbody td:nth-child(7),.paper-grid tbody td:last-child{text-align:center}
.paper-grid tfoot td,.paper-grid tfoot th{height:7mm;font-size:6.5px;padding:.6mm;border:0.35mm solid #222!important}
.paper-grid tfoot th{text-align:center}
.page-one-grid{table-layout:fixed!important;width:100%!important}.page-one-grid col.c-date{width:8%}.page-one-grid col.c-place{width:5.5%}.page-one-grid col.c-time{width:5.5%}.page-one-grid col.c-aircraft{width:8%}.page-one-grid col.c-reg{width:7%}.page-one-grid col.c-se{width:4%}.page-one-grid col.c-me{width:4%}.page-one-grid col.c-mp{width:8%}.page-one-grid col.c-total{width:2%}.page-one-grid col.c-pic{width:24.5%}.page-one-grid col.c-small{width:3.5%}
.page-one-grid tfoot th{font-size:4.5px!important;line-height:1!important;white-space:nowrap!important;padding:.3mm!important}
.page-two-grid col.c-night{width:8%}.page-two-grid col.c-ifr{width:8%}.page-two-grid col.c-fn{width:7%}.page-two-grid col.c-fstd-date{width:8%}.page-two-grid col.c-fstd-type{width:9%}.page-two-grid col.c-fstd-time{width:8%}.page-two-grid col.c-remarks{width:17%}.page-two-grid col.c-signature{width:14%}
.page-two-grid tbody tr{height:10mm}.page-two-grid tbody td{height:10mm;padding:.5mm .45mm;font-size:6.5px;line-height:1.05}
.print-signature-block{min-height:18mm;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;text-align:center;padding:2mm 3mm 1mm;font-family:Arial,Helvetica,sans-serif;color:#111;font-size:6px;line-height:1.15;break-inside:avoid;page-break-inside:avoid}.paper-grid .signature-grid-row td{height:18mm!important;padding:0!important;overflow:hidden!important}
.print-signature-block span{display:block;margin-bottom:3mm}.signature-line{border-bottom:1px solid #222;width:72%;margin:0 auto 1mm}.print-signature-block small{font-size:5px}

/* v0.4.23 — HARD PHYSICAL PAGE SEPARATION
   The official paper layout is always two distinct A4 landscape sheets:
   sheet A = columns 1–8, sheet B = columns 9–12.
   Explicit break elements prevent the browser print engine from flowing
   the second grid onto the same physical page as the next 1–8 grid.
*/
.paper-hard-break{display:block;height:0!important;min-height:0!important;overflow:hidden!important;page-break-before:always!important;break-before:page!important}
.paper-hard-break-after{page-break-after:always!important;break-after:page!important}
@media print{
  .paper-hard-break{display:block!important;height:0!important;min-height:0!important;page-break-before:always!important;break-before:page!important}
  .paper-hard-break-after{page-break-after:always!important;break-after:page!important}
}
@media screen and (max-width:1100px){.paper-preview{overflow-x:auto;align-items:flex-start}.paper-page{flex:0 0 297mm}}
@media print{
  @page{size:A4 landscape;margin:0}
  html,body{background:#fff!important;margin:0!important;padding:0!important}
  .no-print{display:none!important}
  .paper-preview{padding:0!important;background:#fff!important;gap:0!important;display:block!important}
  .paper-page{width:297mm!important;height:210mm!important;min-height:210mm!important;padding:7mm 7mm 6mm!important;margin:0!important;box-shadow:none!important;display:block!important;page-break-after:always!important;break-after:page!important;overflow:hidden!important}
  .paper-page.paper-force-break{page-break-before:always!important;break-before:page!important}
  .paper-page:first-child{page-break-before:auto!important;break-before:auto!important}
  .paper-page:last-child{page-break-after:auto!important;break-after:auto!important}
}

/* v0.4.26 — PRINT PAGE PAIRING + ADD FLIGHT
   Each logbook side is a physical A4 landscape sheet. Columns 1–8 and 9–12
   can never occupy the same printed page. */
.paper-preview{gap:0!important}
.paper-page-one,.paper-page-two{page-break-after:always!important;break-after:page!important}
.paper-page-two{page-break-before:always!important;break-before:page!important}
.paper-hard-break,.paper-hard-break-after{display:none!important}
.add-flight-form .edit-section-main{border-color:rgba(255,43,214,.72)!important;box-shadow:inset 2px 0 0 rgba(255,43,214,.9),0 0 0 1px rgba(255,43,214,.04)!important}
.add-flight-form .edit-section-main .section-icon{border-color:rgba(255,43,214,.75)!important;color:#ff5be2!important}
@media print{
  .paper-preview{display:block!important;padding:0!important;margin:0!important;background:#fff!important}
  .paper-page-one,.paper-page-two{display:block!important;width:297mm!important;height:210mm!important;min-height:210mm!important;margin:0!important;padding:7mm 7mm 6mm!important;overflow:hidden!important;box-sizing:border-box!important}
  .paper-page-one{page-break-after:always!important;break-after:page!important}
  .paper-page-two{page-break-before:always!important;page-break-after:always!important;break-before:page!important;break-after:page!important}
  .paper-preview > .paper-hard-break{display:none!important}
  .paper-preview > .paper-hard-break-after{display:none!important}
}

/* v0.4.27 — DATE CALENDAR STACKING FIX */
body:has(.add-flight-form) .edit-form,
body:has(.add-flight-form) .edit-form{grid-template-rows:auto;overflow:auto;height:auto}
body:has(.add-flight-form) .edit-section{height:auto;min-height:0}
body:has(.add-flight-form) .edit-form{grid-template-columns:repeat(12,minmax(0,1fr))}
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2),
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3),
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){grid-column:span 4}
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(5){grid-column:span 5}
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(6){grid-column:span 7}
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(7){grid-column:span 5}
body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(8){grid-column:span 7}
body:has(.add-flight-form) .edit-section-remarks textarea{width:100%;resize:vertical;min-height:52px;margin-top:4px;border:1px solid #34465c;border-radius:7px;background:#070c13;color:#f3f6fb;padding:8px 9px;font:inherit;font-size:12px}
.field-grid-four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.compact-top-gap{margin-top:9px}
.full-width-label{display:block!important}
.date-picker-control{position:relative;display:flex;align-items:center;margin-top:4px}
.edit-shell .add-flight-form .edit-section{overflow:visible!important}
.edit-shell .add-flight-form .edit-section-main{position:relative;z-index:20!important}
.edit-shell .add-flight-form .edit-section.calendar-layer{position:relative;z-index:200!important}
.add-flight-form .edit-section-main .date-picker-control,.add-flight-form .edit-section:nth-of-type(7) .date-picker-control{z-index:100!important}
.date-picker-control{cursor:pointer}
.date-picker-popover{z-index:1000!important}
.date-picker-control .date-display{margin-top:0!important;padding-right:38px!important;cursor:pointer}
.date-picker-button{position:absolute;right:4px;top:4px;width:30px;height:30px;border:0;border-radius:6px;background:#101b28;color:var(--cyan);font-size:16px;cursor:pointer;z-index:2}
.date-picker-popover{position:absolute;left:0;top:calc(100% + 7px);width:268px;padding:10px;border:1px solid #38506a;border-radius:10px;background:#07101a;box-shadow:0 14px 35px rgba(0,0,0,.55);z-index:50;color:#eef3fb}
.date-picker-popover[hidden]{display:none}
.cal-head{display:grid;grid-template-columns:32px 1fr 32px;align-items:center;gap:6px;margin-bottom:8px}
.cal-head strong{text-align:center;font-size:12px}
.cal-head button{height:28px;border:1px solid #31465d;border-radius:6px;background:#0b1521;color:var(--cyan);font-size:18px;cursor:pointer}
.cal-week,.cal-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.cal-week span{text-align:center;font-size:8px;color:#7e8ea4;font-weight:800;padding:3px 0}
.cal-day,.cal-empty{height:29px;display:flex;align-items:center;justify-content:center;border-radius:5px}
.cal-day{border:1px solid #263a50;background:#0b1521;color:#e8eef7;font-size:11px;cursor:pointer}
.cal-day:hover{border-color:var(--cyan);color:#fff;background:#102234}
.cal-day.selected{border-color:var(--mag);background:rgba(255,43,214,.18);color:#fff;font-weight:800}
@media(max-width:1050px){body:has(.add-flight-form) .edit-form{grid-template-columns:repeat(2,minmax(0,1fr))}body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(n){grid-column:auto}body:has(.add-flight-form) .edit-section-main,body:has(.add-flight-form) .edit-section-phases,body:has(.add-flight-form) .edit-section-remarks,body:has(.add-flight-form) .edit-actions{grid-column:1/-1!important}.field-grid-four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){body:has(.add-flight-form) .edit-form{grid-template-columns:1fr}body:has(.add-flight-form) .edit-section-main,body:has(.add-flight-form) .edit-section-phases,body:has(.add-flight-form) .edit-section-remarks,body:has(.add-flight-form) .edit-actions{grid-column:1!important}.field-grid-four{grid-template-columns:1fr}}

/* Keep the physical A4 separation visible to both browser preview and print engines. */
.paper-hard-break{display:block!important;height:1px!important;min-height:1px!important;overflow:hidden!important;page-break-before:always!important;break-before:page!important}
.paper-hard-break-after{display:block!important;height:1px!important;min-height:1px!important;overflow:hidden!important;page-break-after:always!important;break-after:page!important}
@media print{.paper-hard-break,.paper-hard-break-after{display:block!important;height:1px!important;min-height:1px!important;page-break-before:always!important;page-break-after:always!important;break-before:page!important;break-after:page!important}.paper-page-one{page-break-after:always!important;break-after:page!important}.paper-page-two{page-break-before:always!important;page-break-after:always!important;break-before:page!important;break-after:page!important}}


/* v0.4.31 — EDIT/ADD FORM GRID + CALENDAR LAYER FINAL FIX
   Keep sections 5/7 and 6/8 in the same compact proportions on both
   New Flight and Edit Flight. Do not let the fixed viewport grid clip them.
*/
.edit-shell .edit-form{
  grid-template-rows:auto!important;
  height:auto!important;
  min-height:0!important;
  overflow:visible!important;
  align-content:start!important;
}
.edit-shell .edit-form>.edit-section:nth-of-type(2),
.edit-shell .edit-form>.edit-section:nth-of-type(3),
.edit-shell .edit-form>.edit-section:nth-of-type(4){grid-column:span 4!important}
.edit-shell .edit-form>.edit-section:nth-of-type(5){grid-column:span 5!important}
.edit-shell .edit-form>.edit-section:nth-of-type(6){grid-column:1/-1!important}
.edit-shell .edit-form>.edit-section:nth-of-type(7){grid-column:span 5!important}
.edit-shell .edit-form>.edit-section:nth-of-type(8){grid-column:span 7!important}
.edit-shell .edit-form>.edit-section-main{grid-column:1/-1!important}
.edit-shell .edit-form>.edit-actions{grid-column:1/-1!important}
.edit-shell .edit-section{overflow:visible!important}
.edit-shell .edit-form>.edit-section.calendar-layer,
.edit-shell .edit-form>.edit-section:has(.date-picker-popover:not([hidden])){
  position:relative!important;
  z-index:500!important;
}
.edit-shell .date-picker-control{position:relative!important;z-index:600!important}
.edit-shell .date-picker-popover{position:absolute!important;z-index:99999!important}

@media(max-width:1050px){
  .edit-shell .edit-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .edit-shell .edit-form>.edit-section:nth-of-type(2),
  .edit-shell .edit-form>.edit-section:nth-of-type(3),
  .edit-shell .edit-form>.edit-section:nth-of-type(4),
  .edit-shell .edit-form>.edit-section:nth-of-type(5),
  .edit-shell .edit-form>.edit-section:nth-of-type(7),
  .edit-shell .edit-form>.edit-section:nth-of-type(8){grid-column:auto!important}
  .edit-shell .edit-form>.edit-section-main,
  .edit-shell .edit-form>.edit-section-phases,
  .edit-shell .edit-form>.edit-section-remarks,
  .edit-shell .edit-form>.edit-actions{grid-column:1/-1!important}
}
@media(max-width:700px){
  .edit-shell .edit-form{grid-template-columns:1fr!important}
  .edit-shell .edit-form>.edit-section:nth-of-type(2),
  .edit-shell .edit-form>.edit-section:nth-of-type(3),
  .edit-shell .edit-form>.edit-section:nth-of-type(4),
  .edit-shell .edit-form>.edit-section:nth-of-type(5),
  .edit-shell .edit-form>.edit-section:nth-of-type(7),
  .edit-shell .edit-form>.edit-section:nth-of-type(8){grid-column:1!important}
  .edit-shell .edit-form>.edit-section-main,
  .edit-shell .edit-form>.edit-section-phases,
  .edit-shell .edit-form>.edit-section-remarks,
  .edit-shell .edit-form>.edit-actions{grid-column:1!important}
}


/* v0.4.31 — CALENDAR FIT + TOUCH SIGNATURE + ME DEFAULT */
.edit-shell .date-picker-popover{width:100%!important;max-width:100%!important;box-sizing:border-box!important;left:0!important;right:0!important;padding:8px!important;overflow:hidden!important}
.edit-shell .cal-head{grid-template-columns:28px minmax(0,1fr) 28px!important;gap:5px!important;margin-bottom:6px!important}.edit-shell .cal-head button{height:28px!important}.edit-shell .cal-head strong{font-size:11px!important}.edit-shell .cal-week,.edit-shell .cal-days{gap:2px!important}.edit-shell .cal-week span{font-size:7px!important;padding:2px 0!important}.edit-shell .cal-day,.edit-shell .cal-empty{height:27px!important;min-width:0!important}.edit-shell .cal-day{font-size:10px!important}
.edit-shell .edit-section-remarks .full-width-label textarea{display:block!important;width:100%!important;box-sizing:border-box!important;min-height:54px!important;resize:vertical!important}
.signature-field{margin-top:9px;padding-top:8px;border-top:1px solid #1d2a39}.signature-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px;font-size:9px;color:#aebbd0}.signature-clear{border:1px solid #34465c;background:#0b1521;color:#8fa0b6;border-radius:6px;padding:4px 7px;font-size:8px;cursor:pointer}.signature-clear:hover{border-color:var(--cyan);color:#fff}.signature-pad-wrap{width:100%;height:72px;border:1px dashed #34465c;border-radius:7px;background:#050a10;overflow:hidden;touch-action:none}.signature-pad{display:block;width:100%;height:100%;cursor:crosshair;touch-action:none}.signature-field small{display:block;margin-top:4px;color:#68778b;font-size:7px}.print-signature{display:block;max-width:42mm;max-height:10mm;object-fit:contain;margin:0 auto 1mm;filter:grayscale(1) brightness(0) contrast(100);opacity:1}
@media(max-width:1050px){.signature-pad-wrap{height:90px}}

/* v0.4.31 — FSTD calendar opens upward + signature modal + empty-field cue */
.edit-shell .date-picker-popover.calendar-above{top:auto!important;bottom:calc(100% + 7px)!important}
.edit-form input.manual-input:not([type=checkbox]),
.edit-form textarea.manual-input,
.edit-form .date-display.manual-input{border-color:rgba(255,43,214,.78)!important;box-shadow:0 0 0 1px rgba(255,43,214,.10),inset 0 0 18px rgba(255,43,214,.025)!important}
.edit-form input.manual-input:not([type=checkbox]):focus,
.edit-form textarea.manual-input:focus,
.edit-form .date-display.manual-input:focus{border-color:var(--mag)!important;box-shadow:0 0 0 2px rgba(255,43,214,.14)!important}
.edit-form input.manual-input::placeholder,.edit-form textarea.manual-input::placeholder{color:#c06bb1!important}
.signature-open{height:28px!important;margin:0!important;padding:0 10px!important;border:1px solid rgba(255,43,214,.72)!important;border-radius:7px!important;background:#0b1521!important;color:#fff!important;font-size:9px!important;font-weight:800!important;cursor:pointer!important}
.signature-open:hover{border-color:var(--cyan)!important;color:var(--cyan)!important}
.signature-preview{display:flex;align-items:center;gap:9px;height:34px;margin-top:5px;padding:3px 8px;border:1px solid #26394e;border-radius:7px;background:#07101a;color:#8fa0b6;font-size:8px}
.signature-preview img{height:27px;max-width:180px;object-fit:contain;background:#050a10;filter:grayscale(1) brightness(0) contrast(100)}
.signature-preview[hidden]{display:none}
.signature-modal[hidden]{display:none!important}
.signature-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:24px}
.signature-modal-backdrop{position:absolute;inset:0;background:rgba(1,4,8,.82);backdrop-filter:blur(7px)}
.signature-dialog{position:relative;z-index:1;width:min(920px,calc(100vw - 40px));padding:18px;border:1px solid rgba(255,43,214,.72);border-radius:14px;background:linear-gradient(145deg,#0b111b,#070c13);box-shadow:0 24px 80px rgba(0,0,0,.7)}
.signature-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:12px}.signature-dialog-head h3{margin:3px 0 1px;font-size:24px}.signature-dialog-head p{margin:0;color:#7e8da2;font-size:10px}.signature-modal-close{width:32px;height:32px;margin:0;padding:0;border:1px solid #34465c;border-radius:7px;background:#0b1521;color:#d9e1eb;font-size:20px;cursor:pointer}.signature-modal-close:hover{border-color:var(--cyan);color:var(--cyan)}
.signature-canvas-wrap{height:300px;border:1px dashed #3a5068;border-radius:10px;background:#04080e;overflow:hidden;touch-action:none}.signature-canvas-wrap .signature-pad{width:100%;height:100%;display:block;cursor:crosshair;touch-action:none}
.signature-dialog-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}.signature-dialog-actions button{margin:0!important;height:38px!important}.signature-dialog-actions>div{display:flex;gap:8px}.signature-dialog-clear{border:1px solid #34465c!important;background:#0b1521!important;color:#d7deea!important}
body.signature-modal-open{overflow:hidden!important}
@media(max-width:700px){.signature-modal{padding:10px}.signature-dialog{width:100%;padding:12px}.signature-canvas-wrap{height:260px}.signature-dialog-actions{flex-direction:column;align-items:stretch}.signature-dialog-actions>div{width:100%}.signature-dialog-actions button{flex:1}.signature-dialog-clear{width:100%}}

/* ================================================================
   v0.4.31 — iPHONE-STYLE DATE WHEEL
   The picker uses the same dark field background as the date input.
   ================================================================ */
.add-flight-form .date-picker-popover{
  width:100%!important;
  max-width:100%!important;
  padding:10px!important;
  background:#070c13!important;
  border:1px solid #34465c!important;
  border-radius:10px!important;
  overflow:hidden!important;
}
.add-flight-form .date-picker-popover.calendar-above{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}
.date-wheel-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:30px;
  padding:0 3px 7px;
  border-bottom:1px solid #1d2a39;
}
.date-wheel-title strong{font-size:10px;color:#eef3fb}
.date-wheel-title span{font-size:9px;color:var(--cyan);font-weight:800}
.date-wheels{position:relative;display:grid;grid-template-columns:1fr 1.35fr 1fr;height:142px;margin-top:7px;overflow:hidden}
.date-wheel{position:relative;height:142px;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;touch-action:pan-y;overscroll-behavior:contain}
.date-wheel::-webkit-scrollbar{display:none}
.date-wheel-inner{display:flex;flex-direction:column;align-items:stretch}
.date-wheel-spacer{height:46px;flex:0 0 46px}
.date-wheel-item{height:34px;min-height:34px;scroll-snap-align:center;border:0!important;border-radius:6px!important;background:transparent!important;color:#66768c!important;font:700 12px/34px Inter,system-ui,sans-serif!important;padding:0!important;margin:0!important;cursor:pointer!important;text-align:center;box-shadow:none!important}
.date-wheel-item.active{color:#fff!important;background:rgba(255,43,214,.14)!important;box-shadow:inset 0 0 0 1px rgba(255,43,214,.55)!important}
.date-wheel-item:hover{color:#dce5f2!important}
.date-wheel-selection{position:absolute;left:0;right:0;top:54px;height:34px;border-top:1px solid rgba(45,231,255,.34);border-bottom:1px solid rgba(45,231,255,.34);pointer-events:none;border-radius:6px}
.date-wheel-foot{display:flex;justify-content:flex-end;margin-top:7px;padding-top:7px;border-top:1px solid #1d2a39}
.date-wheel-done{height:27px!important;margin:0!important;padding:0 12px!important;border:1px solid rgba(45,231,255,.55)!important;border-radius:7px!important;background:#0b1521!important;color:var(--cyan)!important;font-size:9px!important;font-weight:800!important;cursor:pointer!important}
.date-wheel-done:hover{border-color:var(--mag)!important;color:#fff!important}

/* v0.4.31 — keep browser autofill backgrounds consistent with Date field */
.add-flight-form input:-webkit-autofill,
.add-flight-form input:-webkit-autofill:hover,
.add-flight-form input:-webkit-autofill:focus,
.add-flight-form textarea:-webkit-autofill,
.add-flight-form select:-webkit-autofill{
  -webkit-text-fill-color:#f3f6fb!important;
  -webkit-box-shadow:0 0 0 1000px #070c13 inset!important;
  box-shadow:0 0 0 1000px #070c13 inset!important;
  background-color:#070c13!important;
  transition:background-color 9999s ease-out 0s!important;
}

/* v0.4.33 — picker opens by clicking the field itself; no calendar/clock icons */
.add-flight-form .date-picker-button,
.add-flight-form .time-picker-button{display:none!important}
.add-flight-form .date-picker-control .date-display{padding-right:12px!important;width:100%!important;box-sizing:border-box!important}
.add-flight-form .time-picker-control input{padding-right:12px!important;width:100%!important;box-sizing:border-box!important}
.add-flight-form .date-picker-control,.add-flight-form .time-picker-control{cursor:pointer!important}
.add-flight-form .date-picker-control .date-display,.add-flight-form .time-picker-control input{cursor:pointer!important}

/* v0.4.33 — TIME WHEEL + COMPLETE/MISSING GRID STATE */
.add-flight-form .time-picker-control{position:relative;display:block;margin-top:4px;z-index:80}
.add-flight-form .time-picker-control input{margin-top:0!important;padding-right:36px!important;cursor:pointer!important}
.add-flight-form .time-picker-control .time-picker-button{position:absolute;right:4px;top:4px;width:30px;height:30px;border:0;border-radius:6px;background:#101b28;color:var(--cyan);font-size:16px;cursor:pointer;z-index:2}
.add-flight-form .time-picker-control .time-picker-button:hover{color:#fff;background:#122337}
.add-flight-form .time-picker-popover{position:absolute;left:0;top:calc(100% + 7px);width:100%;min-width:190px;padding:10px;box-sizing:border-box;border:1px solid #34465c;border-radius:10px;background:#070c13;box-shadow:0 14px 35px rgba(0,0,0,.58);z-index:10000;color:#eef3fb;overflow:hidden}
.add-flight-form .time-picker-control.time-layer{z-index:100000!important}
.add-flight-form .time-picker-popover[hidden]{display:none}
.time-wheel-title{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:30px;padding:0 3px 7px;border-bottom:1px solid #1d2a39}
.time-wheel-title strong{font-size:10px;color:#eef3fb}.time-wheel-title span{font-size:10px;color:var(--cyan);font-weight:800}
.time-wheels{position:relative;display:grid;grid-template-columns:1fr 1fr;height:142px;margin-top:7px;overflow:hidden}
.time-wheel{position:relative;height:142px;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;touch-action:pan-y;overscroll-behavior:contain}
.time-wheel::-webkit-scrollbar{display:none}.time-wheel-inner{display:flex;flex-direction:column;align-items:stretch}
.time-wheel-spacer{height:46px;flex:0 0 46px}
.time-wheel-item{height:34px;min-height:34px;scroll-snap-align:center;border:0!important;border-radius:6px!important;background:transparent!important;color:#66768c!important;font:700 12px/34px Inter,system-ui,sans-serif!important;padding:0!important;margin:0!important;cursor:pointer!important;text-align:center;box-shadow:none!important}
.time-wheel-item.active{color:#fff!important;background:rgba(255,43,214,.14)!important;box-shadow:inset 0 0 0 1px rgba(255,43,214,.55)!important}.time-wheel-item:hover{color:#dce5f2!important}
.time-wheel-selection{position:absolute;left:0;right:0;top:54px;height:34px;border-top:1px solid rgba(45,231,255,.34);border-bottom:1px solid rgba(45,231,255,.34);pointer-events:none;border-radius:6px}
.time-wheel-foot{display:flex;justify-content:space-between;gap:7px;margin-top:7px;padding-top:7px;border-top:1px solid #1d2a39}.time-wheel-foot button{height:27px!important;margin:0!important;padding:0 10px!important;border-radius:7px!important;font-size:9px!important;font-weight:800!important;cursor:pointer!important}
.time-wheel-clear{border:1px solid rgba(255,43,214,.55)!important;background:#0b1521!important;color:#ff5be2!important}.time-wheel-done{border:1px solid rgba(45,231,255,.55)!important;background:#0b1521!important;color:var(--cyan)!important}
.time-wheel-clear:hover,.time-wheel-done:hover{border-color:var(--mag)!important;color:#fff!important}

/* Empty fields use the same magenta rule as Edit Flight, including readonly IFR. */
.add-flight-form input.manual-input:not([type=checkbox]),.add-flight-form textarea.manual-input,.add-flight-form .date-display.manual-input{border-color:rgba(255,43,214,.78)!important;box-shadow:0 0 0 1px rgba(255,43,214,.10),inset 0 0 18px rgba(255,43,214,.025)!important}
.add-flight-form input.manual-input:not([type=checkbox]):focus,.add-flight-form textarea.manual-input:focus,.add-flight-form .date-display.manual-input:focus{border-color:var(--mag)!important;box-shadow:0 0 0 2px rgba(255,43,214,.14)!important}
.add-flight-form input.manual-input::placeholder,.add-flight-form textarea.manual-input::placeholder{color:#c06bb1!important}

/* A grid becomes visually complete only when all of its applicable fields are filled. */
.add-flight-form .edit-section.grid-complete .section-icon{border-color:rgba(45,231,255,.55)!important;color:var(--cyan)!important}
.add-flight-form .edit-section:not(.grid-complete) .section-icon{border-color:rgba(255,43,214,.65)!important;color:#ff5be2!important}
.add-flight-form .phase-check.phase-missing{border-color:rgba(255,43,214,.78)!important;box-shadow:inset 0 0 18px rgba(255,43,214,.025)!important}
.add-flight-form .phase-check.phase-missing span{color:#ff5be2!important}
.add-flight-form .phase-check.phase-missing input{accent-color:var(--mag)!important}
.add-flight-form .phase-check:not(.phase-missing) input{accent-color:var(--cyan)!important}

@media(max-width:700px){
  .add-flight-form .time-picker-popover{min-width:0;width:100%}
}


/* v0.4.36 — TIME PICKER ACTIVE GRID LAYER
   When an HH:MM picker is open, raise its entire parent grid item above
   every following section. The popup must never render underneath the
   Aeromobile, Crew, Total, Takeoffs/Landings or other lower grids.
*/
.add-flight-form .edit-section:has(.time-picker-control.time-layer){
  position:relative!important;
  z-index:1000000!important;
  isolation:isolate;
}
.add-flight-form .time-picker-control.time-layer{
  position:relative!important;
  z-index:1000001!important;
}
.add-flight-form .time-picker-control.time-layer .time-picker-popover{
  position:absolute!important;
  z-index:1000002!important;
}
/* v0.4.36 — keep the time picker fully visible: open upward when the lower
   viewport/next grid would hide it; otherwise keep the normal downward position. */
.add-flight-form .time-picker-popover.time-picker-below{
  top:calc(100% + 7px)!important;
  bottom:auto!important;
}
.add-flight-form .time-picker-popover.time-picker-above{
  top:auto!important;
  bottom:calc(100% + 7px)!important;
}


/* v0.4.37 — Remarks textarea matches the dark edit-field background. */
.edit-shell .edit-form textarea,
.edit-shell .edit-form textarea.manual-input,
body:has(.edit-form) .edit-form textarea {
  background:#070c13!important;
  color:#f3f6fb!important;
  -webkit-text-fill-color:#f3f6fb!important;
}
.edit-shell .edit-form textarea::placeholder,
.edit-shell .edit-form textarea.manual-input::placeholder {
  color:#65748a!important;
  opacity:1!important;
}


/* v0.4.38 — flight deletion controls. The trash button is deliberately
   outside the clickable row target and never inherits the row navigation. */
.flight-delete-cell{width:52px;text-align:center!important;padding-left:4px!important;padding-right:8px!important}
.flight-delete-form{display:inline-flex;margin:0;padding:0}
.flight-delete-button{width:32px;height:32px;margin:0!important;padding:0!important;border:1px solid rgba(255,85,119,.48)!important;border-radius:8px!important;background:#0b1018!important;color:#ff6f8b!important;font-size:15px!important;line-height:30px!important;cursor:pointer!important;display:inline-flex;align-items:center;justify-content:center}
.flight-delete-button:hover{border-color:#ff5577!important;color:#fff!important;background:#24101a!important;box-shadow:0 0 12px rgba(255,85,119,.12)}
.flight-delete-button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.edit-actions-left{display:flex;align-items:center;gap:10px}
.danger-outline{border:1px solid rgba(255,85,119,.60)!important;background:#0b1018!important;color:#ff6f8b!important;padding:13px 18px!important;border-radius:11px!important;font-weight:800!important;cursor:pointer!important;margin-top:16px!important}
.danger-outline:hover{border-color:#ff5577!important;background:#24101a!important;color:#fff!important}
@media(max-width:700px){.edit-actions-left{flex-wrap:wrap}.flight-delete-cell{width:46px}}


/* v0.4.41 — paper-logbook TAKEOFF/LANDING counts
   The real paper logbook records quantities, not boolean checkboxes. */
.phase-count-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.phase-count{min-width:0;display:grid!important;grid-template-columns:1fr auto;grid-template-rows:auto 52px;column-gap:10px;align-items:center;padding:11px 12px!important;border:1px solid #3b5068!important;border-radius:10px;background:#07101a!important;color:#e4eaf3!important}
.phase-count span{grid-column:1;grid-row:1;font-size:19px;color:var(--cyan)}
.phase-count b{grid-column:1;grid-row:2;align-self:center;font-size:13px!important;font-weight:700!important}
.phase-count input{grid-column:2;grid-row:1 / span 2;width:74px!important;height:52px!important;margin:0!important;text-align:center;padding:0 8px!important;font-size:18px!important;font-weight:800!important}
.phase-count input:focus{border-color:var(--cyan)!important;box-shadow:0 0 0 2px rgba(45,231,255,.08)!important}
.edit-shell .phase-count input{background:#070c13!important}
@media(max-width:1050px){.phase-count-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.phase-count-grid{grid-template-columns:1fr}.phase-count input{width:70px!important}}
/* v0.4.41 — imported commercial FO records mirror the real paper convention:
   ME + Multi-Pilot + Co-Pilot time normally equal Total Time when not manually overridden. */

/* ================================================================
   v0.4.41 — EDIT FLIGHT COMPLETE FORM IN ONE WINDOW
   Keep the complete edit form inside the browser window. The form
   itself becomes the scroll area instead of clipping sections 6–8.
   ================================================================ */
@media(min-width:1051px){
  body:has(.edit-form){overflow:hidden!important}
  body:has(.edit-form) .oc-shell{
    height:calc(100vh - 70px)!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body:has(.edit-form) .edit-form{
    height:calc(100% - 96px)!important;
    min-height:0!important;
    max-height:calc(100% - 96px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    align-content:start!important;
    scrollbar-gutter:stable;
    padding-right:6px!important;
    box-sizing:border-box!important;
  }
  body:has(.edit-form) .edit-form::-webkit-scrollbar{width:8px}
  body:has(.edit-form) .edit-form::-webkit-scrollbar-track{background:#070c13;border-radius:8px}
  body:has(.edit-form) .edit-form::-webkit-scrollbar-thumb{background:#26394e;border:2px solid #070c13;border-radius:8px}
  body:has(.edit-form) .edit-form::-webkit-scrollbar-thumb:hover{background:#3a5068}
  body:has(.edit-form) .edit-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:700!important;
    background:linear-gradient(180deg,rgba(4,8,14,.82),#04080e 35%)!important;
    padding-top:12px!important;
    padding-bottom:4px!important;
  }
}

/* v0.4.41 — iPhone wheel pickers, field-only activation, top layer */
.date-picker-button,.time-picker-button{display:none!important}
.date-picker-control .date-display{padding-right:12px!important;cursor:pointer!important}
.time-picker-control{position:relative!important;display:block!important;width:100%!important;margin-top:4px!important;z-index:20}
.time-picker-control input{width:100%!important;margin-top:0!important;padding-right:12px!important;cursor:pointer!important}
.date-picker-popover,.time-picker-popover{position:fixed!important;z-index:2147483647!important;box-sizing:border-box!important;background:#070c13!important;color:#eef3fb!important;box-shadow:0 18px 55px rgba(0,0,0,.72)!important;overflow:hidden!important}
.date-picker-popover{width:360px!important;max-width:calc(100vw - 24px)!important;padding:10px!important;border:1px solid #34465c!important;border-radius:12px!important}
.time-picker-popover{width:300px!important;max-width:calc(100vw - 24px)!important;padding:10px!important;border:1px solid #34465c!important;border-radius:12px!important}
.date-picker-popover[hidden],.time-picker-popover[hidden]{display:none!important}
.edit-form .engine-toggle-label{display:flex!important;flex-direction:column!important;gap:5px!important}
.engine-toggle{height:52px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 14px;border:1px solid #34465c;border-radius:9px;background:#070c13;color:#eef3fb;cursor:pointer;box-sizing:border-box}
.engine-toggle input{width:21px!important;height:21px!important;margin:0!important;accent-color:var(--mag);cursor:pointer}
.engine-toggle:has(input:checked){border-color:var(--cyan);box-shadow:0 0 0 1px rgba(45,231,255,.12)}
.engine-toggle:has(input:not(:checked)){border-color:rgba(255,43,214,.78);box-shadow:0 0 0 1px rgba(255,43,214,.08)}
.engine-toggle-label>input[type=hidden]{display:none!important}
.add-flight-form .engine-toggle{height:38px;border-radius:7px;padding:0 10px}
.add-flight-form .engine-toggle input{width:18px!important;height:18px!important}
/* Calendar/time popovers must never be clipped by a grid, section, or shell. */
body:has(.edit-form){overflow:hidden}
body:has(.edit-form) .edit-form{overflow:visible!important}
body:has(.edit-form) .edit-section{overflow:visible!important}

/* ================================================================
   v0.4.42 — PICKER TOP LAYER + COMPACT GRID BALANCE
   Popovers are moved to <body> by JS and positioned fixed, so they
   cannot fall behind another grid or be clipped by a section.
   Desktop edit/add forms remain a single-window layout without a
   form scrollbar; the grids are tightened to stay visually coherent.
   ================================================================ */
.date-picker-popover,.time-picker-popover{
  position:fixed!important;
  z-index:2147483647!important;
  max-height:calc(100vh - 20px)!important;
  overflow:hidden!important;
}
.edit-shell .edit-section.calendar-layer,
.edit-shell .edit-section:has(.date-picker-popover:not([hidden])),
.add-flight-form .edit-section.calendar-layer,
.add-flight-form .edit-section:has(.date-picker-popover:not([hidden])),
.add-flight-form .edit-section:has(.time-picker-control.time-layer){
  isolation:auto!important;
  z-index:auto!important;
}
.add-flight-form .time-picker-control.time-layer,
.edit-shell .time-picker-control.time-layer{z-index:auto!important;}
.add-flight-form .time-picker-control.time-layer .time-picker-popover,
.edit-shell .time-picker-control.time-layer .time-picker-popover{position:fixed!important;z-index:2147483647!important;}

@media(min-width:1051px){
  body:has(.edit-form){overflow:hidden!important}
  body:has(.edit-form) .oc-shell{
    height:calc(100dvh - 70px)!important;
    min-height:0!important;
    overflow:hidden!important;
    padding:12px 22px 8px!important;
  }
  body:has(.edit-form) .edit-page-head{
    height:76px!important;
    margin:0 0 8px!important;
    gap:16px!important;
  }
  body:has(.edit-form) .edit-heading h1{font-size:28px!important;margin:2px 0 2px!important}
  body:has(.edit-form) .edit-heading p{font-size:11px!important}
  body:has(.edit-form) .edit-back{font-size:11px!important;margin-bottom:2px!important}
  body:has(.edit-form) .edit-heading .eyebrow{font-size:8px!important}
  body:has(.edit-form) .flight-hero-card.compact-flight-card{height:64px!important;min-height:64px!important}
  body:has(.edit-form) .compact-flight-card .flight-hero-copy{padding:8px 13px!important}
  body:has(.edit-form) .compact-flight-card .flight-hero-copy strong{font-size:25px!important}
  body:has(.edit-form) .edit-form{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:auto auto auto auto auto!important;
    gap:8px!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    overflow:visible!important;
    align-content:start!important;
  }
  body:has(.edit-form) .edit-form>.edit-section-main{grid-column:1/-1!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4){grid-column:span 4!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(5){grid-column:span 5!important}
  body:has(.edit-form) .edit-form>.edit-section-phases{grid-column:1/-1!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(7){grid-column:span 5!important}
  body:has(.edit-form) .edit-form>.edit-section-remarks{grid-column:span 7!important}
  body:has(.edit-form) .edit-form>.edit-actions{grid-column:1/-1!important}
  body:has(.edit-form) .edit-section{
    padding:9px 11px!important;
    border-radius:10px!important;
  }
  body:has(.edit-form) .section-title{gap:7px!important;margin-bottom:6px!important}
  body:has(.edit-form) .section-icon{width:27px!important;height:27px!important;border-radius:7px!important;font-size:14px!important}
  body:has(.edit-form) .section-title h2{font-size:13px!important}
  body:has(.edit-form) .section-title p{font-size:8px!important;margin-top:1px!important}
  body:has(.edit-form) .field-grid{gap:6px!important}
  body:has(.edit-form) .field-grid-four{gap:6px!important}
  body:has(.edit-form) .edit-form label{font-size:8px!important;line-height:1.1!important}
  body:has(.edit-form) .edit-form input:not([type=checkbox]),
  body:has(.edit-form) .edit-form select{
    height:32px!important;
    margin-top:3px!important;
    border-radius:7px!important;
    padding:0 8px!important;
    font-size:12px!important;
  }
  body:has(.edit-form) .engine-toggle{height:32px!important;padding:0 8px!important;border-radius:7px!important}
  body:has(.edit-form) .engine-toggle input{width:17px!important;height:17px!important}
  body:has(.edit-form) .compact-top-gap{margin-top:6px!important}
  body:has(.edit-form) .field-note{font-size:7px!important;line-height:1!important}
  body:has(.edit-form) .phase-count-grid{gap:6px!important}
  body:has(.edit-form) .phase-count{grid-template-rows:auto 36px!important;padding:7px 8px!important;border-radius:8px!important}
  body:has(.edit-form) .phase-count span{font-size:15px!important}
  body:has(.edit-form) .phase-count b{font-size:10px!important}
  body:has(.edit-form) .phase-count input{width:58px!important;height:36px!important;font-size:14px!important}
  body:has(.edit-form) .edit-section-remarks .full-width-label textarea{min-height:40px!important;height:40px!important;resize:none!important}
  body:has(.edit-form) .signature-field{margin-top:5px!important;padding-top:5px!important}
  body:has(.edit-form) .signature-head{margin-bottom:3px!important;font-size:8px!important}
  body:has(.edit-form) .signature-open{height:24px!important;font-size:8px!important;padding:0 8px!important}
  body:has(.edit-form) .signature-preview{height:26px!important;margin-top:3px!important}
  body:has(.edit-form) .signature-field small{font-size:6px!important;margin-top:2px!important}
  body:has(.edit-form) .edit-actions{height:38px!important;padding:4px 0 0!important}
  body:has(.edit-form) .edit-actions .secondary,
  body:has(.edit-form) .edit-actions .primary{height:32px!important;min-width:130px!important;font-size:11px!important;border-radius:8px!important}
}

/* The same compact proportions apply to Add Flight on wide screens. */
@media(min-width:1051px){
  body:has(.add-flight-form){overflow:hidden!important}
  body:has(.add-flight-form) .oc-shell{height:calc(100dvh - 70px)!important;min-height:0!important;overflow:hidden!important;padding:12px 22px 8px!important}
  body:has(.add-flight-form) .edit-page-head{height:76px!important;margin:0 0 8px!important;gap:16px!important}
  body:has(.add-flight-form) .edit-heading h1{font-size:28px!important;margin:2px 0!important}
  body:has(.add-flight-form) .edit-heading p{font-size:11px!important}
  body:has(.add-flight-form) .edit-back{font-size:11px!important;margin-bottom:2px!important}
  body:has(.add-flight-form) .edit-heading .eyebrow{font-size:8px!important}
  body:has(.add-flight-form) .flight-hero-card.compact-flight-card{height:64px!important;min-height:64px!important}
  body:has(.add-flight-form) .edit-form{display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:8px!important;height:auto!important;overflow:visible!important}
  body:has(.add-flight-form) .edit-form>.edit-section-main{grid-column:1/-1!important}
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){grid-column:span 4!important}
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(5){grid-column:span 5!important}
  body:has(.add-flight-form) .edit-form>.edit-section-phases{grid-column:1/-1!important}
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(7){grid-column:span 5!important}
  body:has(.add-flight-form) .edit-form>.edit-section-remarks{grid-column:span 7!important}
  body:has(.add-flight-form) .edit-form>.edit-actions{grid-column:1/-1!important}
  body:has(.add-flight-form) .edit-section{padding:9px 11px!important;border-radius:10px!important}
  body:has(.add-flight-form) .section-title{gap:7px!important;margin-bottom:6px!important}
  body:has(.add-flight-form) .section-icon{width:27px!important;height:27px!important;border-radius:7px!important;font-size:14px!important}
  body:has(.add-flight-form) .section-title h2{font-size:13px!important}
  body:has(.add-flight-form) .section-title p{font-size:8px!important;margin-top:1px!important}
  body:has(.add-flight-form) .field-grid,.add-flight-form .field-grid-four{gap:6px!important}
  body:has(.add-flight-form) .edit-form label{font-size:8px!important;line-height:1.1!important}
  body:has(.add-flight-form) .edit-form input:not([type=checkbox]),
  body:has(.add-flight-form) .edit-form select{height:32px!important;margin-top:3px!important;border-radius:7px!important;padding:0 8px!important;font-size:12px!important}
  body:has(.add-flight-form) .engine-toggle{height:32px!important;padding:0 8px!important;border-radius:7px!important}
  body:has(.add-flight-form) .phase-count-grid{gap:6px!important}
  body:has(.add-flight-form) .phase-count{grid-template-rows:auto 36px!important;padding:7px 8px!important;border-radius:8px!important}
  body:has(.add-flight-form) .phase-count span{font-size:15px!important}
  body:has(.add-flight-form) .phase-count b{font-size:10px!important}
  body:has(.add-flight-form) .phase-count input{width:58px!important;height:36px!important;font-size:14px!important}
  body:has(.add-flight-form) .edit-section-remarks .full-width-label textarea{min-height:40px!important;height:40px!important;resize:none!important}
  body:has(.add-flight-form) .signature-field{margin-top:5px!important;padding-top:5px!important}
  body:has(.add-flight-form) .signature-open{height:24px!important;font-size:8px!important;padding:0 8px!important}
  body:has(.add-flight-form) .signature-field small{font-size:6px!important;margin-top:2px!important}
  body:has(.add-flight-form) .edit-actions{height:38px!important;padding:4px 0 0!important}
  body:has(.add-flight-form) .edit-actions .secondary,
  body:has(.add-flight-form) .edit-actions .primary{height:32px!important;min-width:130px!important;font-size:11px!important;border-radius:8px!important}
}

/* Picker dimensions remain comfortable even inside the compact form. */
.date-picker-popover{width:360px!important;max-width:calc(100vw - 24px)!important}
.time-picker-popover{width:300px!important;max-width:calc(100vw - 24px)!important}


/* v0.4.43 — RESTORE PAGE SCROLL ON EDIT/ADD FORMS
   The previous compact layout disabled document scrolling, which made
   sections 7–8 and the action bar unreachable on normal desktop viewports.
   Keep pickers fixed/top-layer, but let the complete page scroll naturally. */
@media(min-width:1051px){
  html:has(.edit-form),html:has(.add-flight-form){
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  body:has(.edit-form),body:has(.add-flight-form){
    overflow-y:auto!important;
    overflow-x:hidden!important;
    min-height:100vh!important;
    height:auto!important;
  }
  body:has(.edit-form) .oc-shell,
  body:has(.add-flight-form) .oc-shell{
    height:auto!important;
    min-height:calc(100vh - 70px)!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body:has(.edit-form) .edit-form,
  body:has(.add-flight-form) .edit-form{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body:has(.edit-form) .edit-actions,
  body:has(.add-flight-form) .edit-actions{
    position:relative!important;
    bottom:auto!important;
  }
}

/* v0.4.47 — final form alignment / clean wheel selection
   Remove the cyan selection rails from time wheels: the selected value
   is already clearly identified by the magenta active cell. Keep the
   picker itself on the top layer and normalize the internal field grids
   and action buttons so every section shares the same geometry. */
.time-wheel-selection{display:none!important}

/* Normalize every internal form grid: equal column behavior, identical
   label/input stacking and no accidental width overflow. */
.edit-form .field-grid,
.edit-form .field-grid-four{
  width:100%!important;
  min-width:0!important;
  align-items:start!important;
  box-sizing:border-box!important;
}
.edit-form .field-grid > label,
.edit-form .field-grid-four > label{
  min-width:0!important;
  width:100%!important;
  box-sizing:border-box!important;
}
.edit-form .field-grid > label > input:not([type=checkbox]),
.edit-form .field-grid > label > select,
.edit-form .field-grid-four > label > input:not([type=checkbox]),
.edit-form .field-grid-four > label > select,
.edit-form .field-grid > label > .time-picker-control,
.edit-form .field-grid-four > label > .time-picker-control,
.edit-form .field-grid > label > .date-picker-control,
.edit-form .field-grid-four > label > .date-picker-control{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

/* Keep the four crew-time cells on exactly one common baseline. */
.edit-form .field-grid-four{grid-auto-rows:minmax(0,auto)!important;}
.edit-form .field-grid-four > label{align-self:start!important;}

/* Delete and Cancel use the same footprint and vertical alignment. */
.edit-actions-left .secondary,
.edit-actions-left .danger-outline{
  height:42px!important;
  min-height:42px!important;
  min-width:150px!important;
  margin-top:0!important;
  margin-bottom:0!important;
  padding:0 18px!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:9px!important;
  line-height:1!important;
}
.edit-actions-left{align-items:center!important;}

@media(max-width:700px){
  .edit-actions-left .secondary,
  .edit-actions-left .danger-outline{
    min-width:0!important;
    flex:1 1 150px!important;
  }
}

/* v0.4.47 — TRUE COMPACT FORM GEOMETRY
   Remove artificial row heights and empty vertical space. Let every card
   size itself to its actual content. Rebalance the desktop columns so the
   three upper cards use 3/4/5 columns instead of three equal blocks. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-form,
  body:has(.add-flight-form) .edit-form{
    grid-template-rows:auto!important;
    align-items:start!important;
    align-content:start!important;
    gap:6px!important;
  }

  body:has(.edit-form) .edit-form>.edit-section,
  body:has(.add-flight-form) .edit-form>.edit-section{
    height:auto!important;
    min-height:0!important;
    align-self:start!important;
    box-sizing:border-box!important;
  }

  /* Upper row: give each card only the horizontal space it actually needs. */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2){grid-column:span 3!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3){grid-column:span 4!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){grid-column:span 5!important}

  body:has(.edit-form) .edit-section,
  body:has(.add-flight-form) .edit-section{
    padding:8px 10px!important;
    border-radius:10px!important;
  }

  body:has(.edit-form) .section-title,
  body:has(.add-flight-form) .section-title{
    gap:6px!important;
    margin-bottom:5px!important;
  }

  body:has(.edit-form) .section-icon,
  body:has(.add-flight-form) .section-icon{
    width:26px!important;
    height:26px!important;
    border-radius:7px!important;
    font-size:13px!important;
  }

  body:has(.edit-form) .section-title h2,
  body:has(.add-flight-form) .section-title h2{font-size:13px!important}
  body:has(.edit-form) .section-title p,
  body:has(.add-flight-form) .section-title p{font-size:7px!important;margin-top:0!important}

  body:has(.edit-form) .field-grid,
  body:has(.add-flight-form) .field-grid,
  body:has(.edit-form) .field-grid-four,
  body:has(.add-flight-form) .field-grid-four{
    gap:5px!important;
    align-items:start!important;
  }

  body:has(.edit-form) .edit-form label,
  body:has(.add-flight-form) .edit-form label{
    font-size:8px!important;
    line-height:1.05!important;
  }

  body:has(.edit-form) .edit-form input:not([type=checkbox]),
  body:has(.edit-form) .edit-form select,
  body:has(.add-flight-form) .edit-form input:not([type=checkbox]),
  body:has(.add-flight-form) .edit-form select{
    height:30px!important;
    margin-top:3px!important;
    border-radius:7px!important;
    padding:0 7px!important;
    font-size:12px!important;
  }

  body:has(.edit-form) .engine-toggle,
  body:has(.add-flight-form) .engine-toggle{
    height:30px!important;
    padding:0 7px!important;
    border-radius:7px!important;
  }

  body:has(.edit-form) .engine-toggle input,
  body:has(.add-flight-form) .engine-toggle input{
    width:16px!important;
    height:16px!important;
  }

  body:has(.edit-form) .compact-top-gap,
  body:has(.add-flight-form) .compact-top-gap{margin-top:4px!important}

  body:has(.edit-form) .field-note,
  body:has(.add-flight-form) .field-note{font-size:6px!important;line-height:1!important}

  body:has(.edit-form) .phase-count-grid,
  body:has(.add-flight-form) .phase-count-grid{gap:5px!important}

  body:has(.edit-form) .phase-count,
  body:has(.add-flight-form) .phase-count{
    grid-template-rows:auto 32px!important;
    padding:6px 7px!important;
    border-radius:8px!important;
  }

  body:has(.edit-form) .phase-count input,
  body:has(.add-flight-form) .phase-count input{
    width:52px!important;
    height:32px!important;
    font-size:13px!important;
  }

  body:has(.edit-form) .phase-count span,
  body:has(.add-flight-form) .phase-count span{font-size:14px!important}
  body:has(.edit-form) .phase-count b,
  body:has(.add-flight-form) .phase-count b{font-size:9px!important}

  body:has(.edit-form) .edit-section-remarks .full-width-label textarea,
  body:has(.add-flight-form) .edit-section-remarks .full-width-label textarea{
    min-height:36px!important;
    height:36px!important;
  }

  body:has(.edit-form) .signature-field,
  body:has(.add-flight-form) .signature-field{margin-top:4px!important;padding-top:4px!important}

  body:has(.edit-form) .signature-open,
  body:has(.add-flight-form) .signature-open{height:23px!important;font-size:8px!important}

  body:has(.edit-form) .signature-field small,
  body:has(.add-flight-form) .signature-field small{font-size:6px!important;margin-top:2px!important}

  body:has(.edit-form) .edit-actions,
  body:has(.add-flight-form) .edit-actions{
    height:36px!important;
    min-height:36px!important;
    padding:4px 0 0!important;
  }
}

/* v0.4.47 — SPACE-OPTIMIZED DESKTOP GRID
   Use the empty area under the short Aeromobile/Pilot Time cards instead of
   leaving it unused. Section 4 occupies the right column across the first
   two content rows, while Section 5 fills the free area beneath Sections 2–3.
   Data, controls and picker logic are untouched. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-form,
  body:has(.add-flight-form) .edit-form{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:auto auto auto auto!important;
    grid-auto-flow:row!important;
    gap:7px!important;
    align-items:stretch!important;
    align-content:start!important;
  }

  body:has(.edit-form) .edit-form>.edit-section-main,
  body:has(.add-flight-form) .edit-form>.edit-section-main{
    grid-column:1/-1!important;
    grid-row:auto!important;
  }

  /* Row 1: 3 / 4 / 5 columns. */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2){
    grid-column:1 / span 3!important;
    grid-row:auto!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3){
    grid-column:4 / span 4!important;
    grid-row:auto!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){
    grid-column:8 / span 5!important;
    grid-row:span 2!important;
  }

  /* Row 2: use the space below sections 2–3 for Total & Operational. */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(5){
    grid-column:1 / span 7!important;
    grid-row:auto!important;
    align-self:start!important;
  }

  /* Keep phases full width and compact. */
  body:has(.edit-form) .edit-section-phases,
  body:has(.add-flight-form) .edit-section-phases{
    grid-column:1/-1!important;
    grid-row:auto!important;
  }

  /* Bottom pair uses the full width without forcing a large empty card. */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(7){
    grid-column:1 / span 5!important;
    grid-row:auto!important;
  }
  body:has(.edit-form) .edit-form>.edit-section-remarks,
  body:has(.add-flight-form) .edit-form>.edit-section-remarks{
    grid-column:6 / span 7!important;
    grid-row:auto!important;
  }

  body:has(.edit-form) .edit-form>.edit-section,
  body:has(.add-flight-form) .edit-form>.edit-section{
    margin:0!important;
  }
}

/* v0.4.47 — remove date-wheel selection rails; keep magenta selected value */
.date-wheel-selection{display:none!important}


/* v0.4.49 — BALANCED DESKTOP FORM GRID
   Arrange the form in four compact visual rows:
   1) flight details, 2) aircraft / pilot time / crew,
   3) operational condition + takeoffs/landings,
   4) FSTD + remarks. The Takeoffs/Landings card uses vertical internal
   rows so it fills the previously unused area beside Section 5. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-form,
  body:has(.add-flight-form) .edit-form{
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:auto auto auto auto auto!important;
    grid-auto-flow:initial!important;
    gap:7px!important;
    align-items:stretch!important;
    align-content:start!important;
  }

  /* Row 1 — flight details */
  body:has(.edit-form) .edit-form>.edit-section-main,
  body:has(.add-flight-form) .edit-form>.edit-section-main{
    grid-column:1/-1!important;
    grid-row:1!important;
  }

  /* Row 2 — 3 / 4 / 5 column balance */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2){
    grid-column:1 / span 3!important;
    grid-row:2!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3){
    grid-column:4 / span 4!important;
    grid-row:2!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){
    grid-column:8 / span 5!important;
    grid-row:2!important;
  }

  /* Row 3 — operational condition left, takeoffs/landings right. */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(5){
    grid-column:1 / span 7!important;
    grid-row:3!important;
    align-self:stretch!important;
  }
  body:has(.edit-form) .edit-section-phases,
  body:has(.add-flight-form) .edit-section-phases{
    grid-column:8 / span 5!important;
    grid-row:3!important;
    align-self:stretch!important;
  }

  /* Four phase counters become a clean vertical stack. */
  body:has(.edit-form) .edit-section-phases .phase-count-grid,
  body:has(.add-flight-form) .edit-section-phases .phase-count-grid{
    grid-template-columns:1fr!important;
    grid-auto-rows:minmax(0,1fr)!important;
    gap:5px!important;
    height:auto!important;
    min-height:0!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count,
  body:has(.add-flight-form) .edit-section-phases .phase-count{
    min-height:0!important;
    height:auto!important;
    padding:5px 7px!important;
    grid-template-columns:1fr auto!important;
    grid-template-rows:1fr!important;
    align-items:center!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count span,
  body:has(.add-flight-form) .edit-section-phases .phase-count span{
    grid-column:1!important;
    grid-row:1!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count b,
  body:has(.add-flight-form) .edit-section-phases .phase-count b{
    grid-column:1!important;
    grid-row:1!important;
    align-self:center!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count input,
  body:has(.add-flight-form) .edit-section-phases .phase-count input{
    grid-column:2!important;
    grid-row:1!important;
    width:58px!important;
    height:30px!important;
    margin:0!important;
  }

  /* Row 4 — FSTD / remarks */
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(7){
    grid-column:1 / span 5!important;
    grid-row:4!important;
  }
  body:has(.edit-form) .edit-form>.edit-section-remarks,
  body:has(.add-flight-form) .edit-form>.edit-section-remarks{
    grid-column:6 / span 7!important;
    grid-row:4!important;
  }

  body:has(.edit-form) .edit-form>.edit-section,
  body:has(.add-flight-form) .edit-form>.edit-section{
    margin:0!important;
  }
}

/* v0.4.50 — reference layout lock + phase counter alignment
   Keep icon, label and value in three independent columns so they never overlap. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-section-phases .phase-count,
  body:has(.add-flight-form) .edit-section-phases .phase-count{
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr) 58px!important;
    grid-template-rows:1fr!important;
    column-gap:8px!important;
    align-items:center!important;
    padding:5px 7px!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count span,
  body:has(.add-flight-form) .edit-section-phases .phase-count span{
    grid-column:1!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:start!important;
    margin:0!important;
    line-height:1!important;
    font-size:16px!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count b,
  body:has(.add-flight-form) .edit-section-phases .phase-count b{
    grid-column:2!important;
    grid-row:1!important;
    align-self:center!important;
    justify-self:start!important;
    min-width:0!important;
    margin:0!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    line-height:1.1!important;
    font-size:11px!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count input,
  body:has(.add-flight-form) .edit-section-phases .phase-count input{
    grid-column:3!important;
    grid-row:1!important;
    width:58px!important;
    height:30px!important;
    min-width:58px!important;
    margin:0!important;
    justify-self:end!important;
    text-align:center!important;
    padding:0 6px!important;
    font-size:14px!important;
  }
}


/* v0.4.50 — exact reference composition from approved layout
   Desktop: row 3 uses two equal halves (5 + 6), while phases remain four compact horizontal rows. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(5){
    grid-column:1 / span 6!important;
    grid-row:3!important;
  }
  body:has(.edit-form) .edit-section-phases,
  body:has(.add-flight-form) .edit-section-phases{
    grid-column:7 / span 6!important;
    grid-row:3!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count-grid,
  body:has(.add-flight-form) .edit-section-phases .phase-count-grid{
    grid-template-columns:1fr!important;
    grid-auto-rows:minmax(0,1fr)!important;
    gap:5px!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count,
  body:has(.add-flight-form) .edit-section-phases .phase-count{
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr) 58px!important;
    grid-template-rows:1fr!important;
    column-gap:8px!important;
    align-items:center!important;
    min-height:0!important;
    height:auto!important;
    padding:5px 7px!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count span,
  body:has(.add-flight-form) .edit-section-phases .phase-count span{
    grid-column:1!important; grid-row:1!important; justify-self:start!important; align-self:center!important;
    margin:0!important; line-height:1!important; font-size:16px!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count b,
  body:has(.add-flight-form) .edit-section-phases .phase-count b{
    grid-column:2!important; grid-row:1!important; justify-self:start!important; align-self:center!important;
    margin:0!important; min-width:0!important; white-space:nowrap!important; overflow:hidden!important; text-overflow:ellipsis!important;
    line-height:1.1!important; font-size:11px!important;
  }
  body:has(.edit-form) .edit-section-phases .phase-count input,
  body:has(.add-flight-form) .edit-section-phases .phase-count input{
    grid-column:3!important; grid-row:1!important; justify-self:end!important;
    width:58px!important; min-width:58px!important; height:30px!important; margin:0!important;
    text-align:center!important; padding:0 6px!important; font-size:14px!important;
  }
}

/* v0.4.50 FINAL GRID OVERRIDE — authoritative desktop edit/add composition
   Sections: 1 full width; 2/3/4 = 4+4+4; 5/6 = 7+5; 7/8 = 5+7. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-form,
  body:has(.add-flight-form) .edit-form{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:auto auto auto auto auto!important;
    gap:8px!important;
    height:auto!important;
    max-height:none!important;
    min-height:0!important;
    overflow:visible!important;
    align-content:start!important;
  }

  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(1),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(1){
    grid-column:1 / -1!important;
    grid-row:1!important;
  }

  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){
    grid-row:2!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2){grid-column:1 / span 4!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3){grid-column:5 / span 4!important}
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(4),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(4){grid-column:9 / span 4!important}

  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(5){
    grid-column:1 / span 7!important;
    grid-row:3!important;
    align-self:start!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(6),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(6),
  body:has(.edit-form) .edit-form>.edit-section-phases,
  body:has(.add-flight-form) .edit-form>.edit-section-phases{
    grid-column:8 / span 5!important;
    grid-row:3!important;
    align-self:start!important;
  }

  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(7){
    grid-column:1 / span 5!important;
    grid-row:4!important;
  }
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-form>.edit-section-remarks,
  body:has(.add-flight-form) .edit-form>.edit-section-remarks{
    grid-column:6 / span 7!important;
    grid-row:4!important;
  }

  body:has(.edit-form) .edit-form>.edit-actions,
  body:has(.add-flight-form) .edit-form>.edit-actions{
    grid-column:1 / -1!important;
    grid-row:5!important;
  }
}


/* v0.4.50 — FINAL 5/6 WIDTH AUTHORITY
   Highest-specificity desktop rule: Section 5 = 7 columns, Section 6 = 5 columns.
   This intentionally overrides the older .edit-shell layout rules. */
@media(min-width:1051px){
  body.edit-page .edit-shell .edit-form>.edit-section:nth-of-type(5),
  body:has(.edit-form) .edit-shell .edit-form>.edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-shell .edit-form>.edit-section:nth-of-type(5){
    grid-column:1 / span 7!important;
    grid-row:3!important;
  }
  body.edit-page .edit-shell .edit-form>.edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form>.edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form>.edit-section-phases{
    grid-column:8 / span 5!important;
    grid-row:3!important;
  }
}

/* STEP 1 — v0.4.50: Section 6 starts on the exact same grid line as Section 4.
   Section 4 starts at column 9, so Section 6 starts at column 9.
   No other grid geometry is changed in this step. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-phases{
    grid-column: 9 / span 4 !important;
    grid-row: 3 !important;
  }
}


/* STEP 4 — v0.4.50: Section 5 sits directly below Section 2.
   It starts on the same left grid line as Section 2 and ends on the same right grid line as Section 3.
   Section 6 and all other sections are untouched. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(5){
    grid-column: 1 / span 7 !important;
    grid-row: 3 !important;
    align-self: start !important;
    transform: translateY(-49px) !important;
  }
}

/* STEP 6 — v0.4.50
   Section 5 extends to the exact right edge of Section 3.
   Section 7 mirrors Section 5: same left edge, same width, immediately below it.
   Section 6 remains untouched. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(5){
    grid-column: 1 / span 8 !important;
    grid-row: 3 !important;
    align-self: start !important;
    transform: translateY(-49px) !important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(7){
    grid-column: 1 / span 8 !important;
    grid-row: 4 !important;
    align-self: start !important;
    transform: translateY(-194px) !important;
  }
}

/* STEP 8 — v0.4.50
   Section 8 follows Section 7 visually, starts on the same left grid line as
   Section 3 and ends on the same right grid line as Section 6.
   Its bottom edge is aligned with the bottom edge of Section 6.
   Section 7, Section 6 and all data/logic remain untouched. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    grid-column: 5 / span 8 !important;
    grid-row: 4 !important;
    align-self: start !important;
    transform: translateY(-100px) !important;
    height: 90px !important;
  }
}

/* STEP 9 — v0.4.50: Section 8 geometry correction.
   Left edge = Section 7 left edge.
   Right edge = Section 7 / Section 3 right edge.
   Top edge = immediately below Section 7.
   Bottom edge = Section 6 bottom edge.
   No other section geometry is changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    grid-column: 1 / span 8 !important;
    grid-row: 4 !important;
    align-self: start !important;
    transform: translateY(-201px) !important;
    height: 90px !important;
  }
}

/* STEP 10 — v0.4.50: Section 8 immediately below Section 7.
   Keep the established horizontal geometry and move only Section 8 vertically.
   Left/right edges remain identical to Section 7; bottom remains aligned to Section 6. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    transform: translateY(-98px) !important;
  }
}

/* STEP 10 — v0.4.50: Section 8 immediately below Section 7.
   Keep the established horizontal geometry and move only Section 8 vertically.
   Left/right edges remain identical to Section 7; bottom remains aligned to Section 6. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    transform: translateY(-98px) !important;
  }
}


/* STEP 12 — v0.4.50: Section 1 field alignment.
   Keep the six fields in two-column units so Numero volo, From and To
   sit on the same vertical grid lines as the surrounding sections. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    column-gap:9px !important;
  }
}

/* STEP 14 — v0.4.50: restore vertical margin between Sections 5 and 7.
   Keep all established horizontal geometry unchanged. Move Sections 7 and 8
   down together by 8px so Section 5→7 keeps a visible gap and the 7→8 spacing
   remains unchanged. No data, logic or other grid geometry is modified. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(7){
    transform: translateY(-186px) !important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    transform: translateY(-90px) !important;
  }
}

/* STEP 16 — v0.4.50: Section 6 bottom alignment without moving Sections 7/8.
   Section 6 must visually extend down to the bottom edge of Section 8, but
   its height must NOT enlarge grid row 3 and therefore must NOT push row 4.
   Section 7 and Section 8 keep their established positions. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form,
  body:has(.edit-form) .edit-shell .edit-form,
  body:has(.add-flight-form) .edit-shell .edit-form{
    grid-template-rows: auto auto 110px auto auto !important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-phases{
    height: 375px !important;
    min-height: 375px !important;
    box-sizing: border-box !important;
    align-self: start !important;
  }
}

/* STEP 17 — v0.4.50: Section 6 bottom edge locked to Section 8.
   The height is calculated from the actual rendered bottom edge of Section 8,
   so changing Section 6 height can never move Sections 7/8. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-phases{
    height:var(--grid6-sync-height, 375px) !important;
    min-height:0 !important;
    max-height:none !important;
    align-self:start !important;
    box-sizing:border-box !important;
  }
}


/* STEP 18 — v0.4.50: Section 6 height is controlled by the geometry sync script.
   Do not let the previous fixed 375px height override that measurement. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-phases{
    min-height:0 !important;
    max-height:none !important;
    align-self:start !important;
    box-sizing:border-box !important;
  }
}

/* STEP 19 — v0.4.50: authoritative final edit/add grid geometry.
   5, 7 and 8 form a fixed left stack (8 columns wide), while 6 occupies
   the right column and spans exactly the same vertical extent as 5+7+8.
   No transforms, offsets or JS-driven geometry are used. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form,
  body:has(.edit-form) .edit-shell .edit-form,
  body:has(.add-flight-form) .edit-shell .edit-form{
    display:grid !important;
    grid-template-columns:repeat(12,minmax(0,1fr)) !important;
    grid-template-rows:auto auto auto auto auto !important;
    gap:8px !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    align-content:start !important;
  }

  /* 1 — full width */
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(1),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(1),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(1){
    grid-column:1 / -1 !important;
    grid-row:1 !important;
    transform:none !important;
  }

  /* 2 / 3 / 4 — three equal columns */
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(2),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(2){
    grid-column:1 / span 4 !important;
    grid-row:2 !important;
    transform:none !important;
  }
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(3),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(3){
    grid-column:5 / span 4 !important;
    grid-row:2 !important;
    transform:none !important;
  }
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(4),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(4),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(4){
    grid-column:9 / span 4 !important;
    grid-row:2 !important;
    transform:none !important;
  }

  /* 5 — left stack, directly below 2/3 */
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(5){
    grid-column:1 / span 8 !important;
    grid-row:3 !important;
    transform:none !important;
    align-self:start !important;
  }

  /* 6 — right side, starts with 4 and ends exactly with 8 */
  body.edit-page .edit-shell .edit-form > .edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-phases{
    grid-column:9 / span 4 !important;
    grid-row:3 / span 3 !important;
    transform:none !important;
    align-self:stretch !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    box-sizing:border-box !important;
  }

  /* 7 — immediately below 5, same left edge and same width */
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(7){
    grid-column:1 / span 8 !important;
    grid-row:4 !important;
    transform:none !important;
    align-self:start !important;
  }

  /* 8 — immediately below 7, same left/right edges; its bottom defines 6 bottom */
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    grid-column:1 / span 8 !important;
    grid-row:5 !important;
    transform:none !important;
    align-self:start !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    box-sizing:border-box !important;
  }

  /* Action bar stays below the complete form stack. */
  body.edit-page .edit-shell .edit-form > .edit-actions,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions{
    grid-column:1 / -1 !important;
    grid-row:6 !important;
    transform:none !important;
  }
}

/* v0.4.50 — COMPACT UPPER CARDS
   Sections 2 and 3 contain less content than Section 4. Keep their borders
   tight to the actual content instead of stretching them to the full row height. */
@media(min-width:1051px){
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(2),
  body:has(.edit-form) .edit-form>.edit-section:nth-of-type(3),
  body:has(.add-flight-form) .edit-form>.edit-section:nth-of-type(3){
    align-self:start!important;
    height:max-content!important;
  }
}

/* STEP 24 — v0.4.50: preserve the approved grid while adding a minimal gap
   between Section 2 and Section 5. Sections 5, 7 and 8 move together by
   52px instead of 60px, leaving an 8px visual margin below Section 2.
   Section 6 keeps the same compensation so its bottom remains synchronized
   with Section 8. No content or data logic is changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(5),
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(7),
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(8),
  body.edit-page .edit-shell .edit-form > .edit-section-remarks,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-remarks,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-remarks{
    transform:translateY(-52px)!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-phases,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-phases,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-phases{
    margin-bottom:52px!important;
  }
}

/* STEP 25 — FOOTER TEXT POSITION
   Raise only the footer/action-bar text slightly inside the existing buttons.
   Button geometry, spacing and alignment remain unchanged. */
.edit-shell .edit-actions .secondary span,
.edit-shell .edit-actions .primary span{
  transform:translateY(-4px)!important;
}

/* STEP 26 — ACTION BAR DIRECTLY UNDER THE GRID
   Keep the footer/action buttons in normal document flow, directly below
   sections 6/8. Do not pin them to the viewport or make them sticky. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-actions,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions{
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    float:none!important;
    grid-column:1 / -1!important;
    grid-row:6!important;
    margin-top:0!important;
    margin-bottom:0!important;
    transform:none!important;
    align-self:start!important;
  }
}

/* STEP 27 — v0.4.51: ACTIONS UNDER THEIR RESPECTIVE GRIDS
   The action buttons belong immediately below the completed left/right grid
   stacks. Keep the approved grid geometry untouched; only the action-row
   footprint and its vertical spacing are changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-actions,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions{
    grid-column:1 / -1 !important;
    grid-row:6 !important;
    display:grid !important;
    grid-template-columns:repeat(12,minmax(0,1fr)) !important;
    column-gap:8px !important;
    row-gap:0 !important;
    width:100% !important;
    height:42px !important;
    min-height:42px !important;
    box-sizing:border-box !important;
    margin-top:8px !important;
    margin-bottom:0 !important;
    padding:0 !important;
    border-top:0 !important;
    align-self:start !important;
    position:relative !important;
    transform:none !important;
  }

  body.edit-page .edit-shell .edit-form > .edit-actions .edit-actions-left,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions .edit-actions-left,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions .edit-actions-left{
    grid-column:1 / span 8 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:8px !important;
    min-width:0 !important;
    height:42px !important;
  }

  body.edit-page .edit-shell .edit-form > .edit-actions > .primary,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions > .primary,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions > .primary{
    grid-column:9 / span 4 !important;
    justify-self:end !important;
    align-self:start !important;
    width:auto !important;
    height:42px !important;
    min-height:42px !important;
    min-width:210px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  body.edit-page .edit-shell .edit-form > .edit-actions .edit-actions-left .secondary,
  body.edit-page .edit-shell .edit-form > .edit-actions .edit-actions-left .danger-outline,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions .edit-actions-left .secondary,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions .edit-actions-left .danger-outline,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions .edit-actions-left .secondary,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions .edit-actions-left .danger-outline{
    height:42px !important;
    min-height:42px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }
}


/* STEP 28 — v0.4.52: ACTIONS DIRECTLY UNDER THE VISIBLE GRID EDGES
   Section 6 keeps its bottom alignment with Section 8. The 52px compensation
   used only to synchronize that grid must not create a blank gap before the
   action buttons. Move the action bar into that reserved compensation space,
   without changing the position or dimensions of Sections 5, 6, 7 or 8. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-actions,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions{
    transform:translateY(-52px)!important;
    margin-bottom:-52px!important;
  }
}

/* STEP 29 — v0.4.53: ALIGN FIELD BOXES ON THE SAME BASELINE
   In Sections 1, 5 and 7 every field box must share the same bottom line.
   The date-picker wrapper follows the same top spacing as normal inputs so
   Data / Numero volo / From / To / Dep / Arr and the fields in 5 and 7
   remain perfectly level without changing the established grid geometry. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid label,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid label,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid label,
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(5) .field-grid label,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(5) .field-grid label,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(5) .field-grid label,
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(7) .field-grid label,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(7) .field-grid label,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(7) .field-grid label{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid label > input:not([type=checkbox]),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid label > input:not([type=checkbox]),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid label > input:not([type=checkbox]),
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(5) .field-grid label > input:not([type=checkbox]),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(5) .field-grid label > input:not([type=checkbox]),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(5) .field-grid label > input:not([type=checkbox]),
  body.edit-page .edit-shell .edit-form > .edit-section:nth-of-type(7) .field-grid label > input:not([type=checkbox]),
  body:has(.edit-form) .edit-shell .edit-form > .edit-section:nth-of-type(7) .field-grid label > input:not([type=checkbox]),
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section:nth-of-type(7) .field-grid label > input:not([type=checkbox]){
    margin-top:7px!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid .date-picker-control{
    margin-top:7px!important;
  }
}


/* STEP 30 — v0.4.54: OPPOSITE-SIDE FIELD LABELS + ACTION ICON ALIGNMENT
   Keep the approved v0.4.53 grid geometry untouched. Field names sit above
   their reference boxes on the opposite (right) side, while the boxes keep
   their exact established widths and baselines. Action icons use a common
   footprint so the X in Annulla and the check in Salva modifiche align cleanly. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .field-grid > label,
  body:has(.edit-form) .edit-shell .edit-form .field-grid > label,
  body:has(.add-flight-form) .edit-shell .edit-form .field-grid > label,
  body.edit-page .edit-shell .edit-form .field-grid-four > label,
  body:has(.edit-form) .edit-shell .edit-form .field-grid-four > label,
  body:has(.add-flight-form) .edit-shell .edit-form .field-grid-four > label{
    text-align:right!important;
  }
}

.edit-actions .action-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:16px!important;
  min-width:16px!important;
  height:16px!important;
  line-height:16px!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 16px!important;
  text-align:center!important;
  vertical-align:middle!important;
}
.edit-actions .secondary,
.edit-actions .danger-outline,
.edit-actions .primary{
  gap:7px!important;
}

/* STEP 32 — v0.4.56: FINAL FIELD BASELINE + ACTION CONTENT CENTERING
   Keep the approved grid geometry untouched. The Date control receives the
   exact same top offset as the other Section 1 inputs, so its bottom edge is
   on the same baseline. Action-button contents are vertically and
   horizontally centered as a single group, with no artificial text lift. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .date-picker-control{
    margin-top:4px!important;
    align-self:start!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-actions .secondary,
  body.edit-page .edit-shell .edit-form > .edit-actions .primary,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions .secondary,
  body:has(.edit-form) .edit-shell .edit-form > .edit-actions .primary,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions .secondary,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-actions .primary{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    vertical-align:middle!important;
    line-height:1!important;
  }
}

.edit-shell .edit-actions .secondary span,
.edit-shell .edit-actions .primary span{
  transform:none!important;
}

.edit-shell .edit-actions .action-icon{
  align-self:center!important;
  transform:none!important;
  line-height:1!important;
}


/* STEP 34 — v0.4.59: FINAL DATE BOTTOM-EDGE ALIGNMENT
   Match the Date control offset to the normal Section 1 inputs.
   No grid geometry is changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .date-picker-control{
    margin-top:7px!important;
  }
}

/* STEP 35 — v0.4.59: 1px FINAL DATE BOTTOM ALIGNMENT */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .date-picker-control{
    margin-top:6px!important;
  }
}


/* STEP 37 — v0.4.61: FINAL DATE BASELINE FIX
   The Date field uses the same rendered height and top offset as the other
   Section 1 fields. The calendar wrapper and visible date input are locked
   to the existing compact edit-form input geometry. No grid geometry changes. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    height:46px!important;
    min-height:46px!important;
    max-height:38px!important;
    margin-top:4px!important;
    align-self:start!important;
    box-sizing:border-box!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin-top:0!important;
    box-sizing:border-box!important;
  }
}


/* STEP 38 — v0.4.62: FORCE DATE INPUT TO THE SAME BASELINE AS SECTION 1 FIELDS
   The visible Data box must have exactly the same rendered geometry as the
   five neighbouring inputs. The date-picker wrapper is treated as a fixed
   field-height container so it cannot stretch the grid row or the input. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child{
    align-self:start!important;
    min-height:0!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin-top:4px!important;
    padding:0!important;
    flex:none!important;
    align-self:start!important;
    box-sizing:border-box!important;
    line-height:0!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0 8px!important;
    box-sizing:border-box!important;
    line-height:38px!important;
  }
}


/* STEP 40 — v0.4.64: FINAL DATE GEOMETRY + SIGNATURE CENTER + ENGINE NONE
   - Section 1 Date must use exactly the same visible field geometry as the
     five neighbouring inputs: same height, radius, border and vertical base.
   - The signature dialog is explicitly centered in the viewport.
   - SE/ME remain optional: zero, one, or (UI) one selected state is valid;
     no engine checkbox is required.
   - No established section/grid geometry is changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin-top:0!important;
    padding:0!important;
    display:block!important;
    position:relative!important;
    box-sizing:border-box!important;
    flex:none!important;
    align-self:start!important;
    border:0!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0 38px 0 14px!important;
    box-sizing:border-box!important;
    border:1px solid #34465c!important;
    border-radius:9px!important;
    line-height:38px!important;
    font:inherit!important;
    font-size:16px!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-button,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-button,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-button{
    position:absolute!important;
    right:8px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    margin:0!important;
  }
}

.signature-modal{
  position:fixed!important;
  inset:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100vw!important;
  height:100vh!important;
  padding:24px!important;
  box-sizing:border-box!important;
}
.signature-dialog{
  position:relative!important;
  margin:auto!important;
  transform:none!important;
}

/* Engine choice is optional: both unchecked is a valid state.
   No required attribute is present on either checkbox. */

/* STEP 42 — v0.4.66: DATE FIELD EXACT BASELINE
   The visible Date field is forced to the exact same compact geometry as
   the other Section 1 inputs: 38px height, 4px top offset and the same
   border/radius. No grid geometry is changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin-top:4px!important;
    padding:0!important;
    display:flex!important;
    align-items:stretch!important;
    position:relative!important;
    box-sizing:border-box!important;
    flex:0 0 38px!important;
    align-self:start!important;
    overflow:visible!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0 38px 0 8px!important;
    box-sizing:border-box!important;
    border:1px solid #34465c!important;
    border-radius:7px!important;
    line-height:normal!important;
    font-size:12px!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-button,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-button,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-button{
    right:4px!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:28px!important;
    height:28px!important;
    margin:0!important;
  }
}


/* STEP 43 — v0.4.67: DATE BASELINE FINAL LOCK
   Cache-busted final rule. The visible Data field uses the exact same
   38px field geometry and 4px label-to-field offset as the neighbouring
   Section 1 inputs. The date wrapper cannot stretch the grid row. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    align-self:start!important;
    min-height:0!important;
    height:auto!important;
  }
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:4px 0 0!important;
    padding:0!important;
    box-sizing:border-box!important;
    flex:0 0 38px!important;
    align-self:stretch!important;
    position:relative!important;
    overflow:visible!important;
  }
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    display:block!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0 38px 0 9px!important;
    box-sizing:border-box!important;
    border:1px solid #34465c!important;
    border-radius:7px!important;
    line-height:38px!important;
    font-size:12px!important;
  }
}

/* STEP 44 — v0.4.69: DATE FIELD EXACT MATCH TO NORMAL INPUT
   The previous Date wrapper was still rendering taller than the neighbouring
   Section 1 inputs. Match the actual edit-form input geometry: 36px height,
   4px label-to-field offset, identical box sizing. Grid structure is untouched. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    display:block!important;
    width:100%!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:4px 0 0!important;
    padding:0!important;
    box-sizing:border-box!important;
    flex:0 0 36px!important;
    align-self:stretch!important;
    position:relative!important;
    overflow:visible!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    display:block!important;
    width:100%!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0 12px!important;
    box-sizing:border-box!important;
    border:1px solid #34465c!important;
    border-radius:7px!important;
    line-height:normal!important;
    font:inherit!important;
    font-size:12px!important;
  }
}


/* STEP 45 — v0.4.69: DATE FIELD VERTICAL FOOTPRINT MATCH
   Only the visible Data field is adjusted. Reduce the date control by 6px
   vertically and center that reduction against the neighbouring inputs.
   Horizontal geometry, grid structure and calendar behaviour remain unchanged. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control{
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin-top:7px!important;
    flex-basis:30px!important;
  }

  body.edit-page .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.edit-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display,
  body:has(.add-flight-form) .edit-shell .edit-form > .edit-section-main .field-grid-six > label:first-child .date-picker-control .date-display{
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    line-height:normal!important;
  }
}

/* STEP 46 — v0.4.70: DELETE FLIGHT BUTTON MAGENTA
   Match the approved magenta action styling used by the primary controls. */
.edit-actions-left .danger-outline{
  border-color:var(--mag)!important;
  color:var(--mag)!important;
}
.edit-actions-left .danger-outline:hover{
  border-color:var(--mag)!important;
  color:#fff!important;
  background:#24101a!important;
}

/* v0.4.134 — Match the single-flight delete button to the global delete action.
   Keep the button text neutral white and the trash icon magenta. */
.edit-actions-left .danger-outline{
  border-color:rgba(255,43,214,.28)!important;
  color:#e7edf7!important;
  background:#0b1018!important;
}
.edit-actions-left .danger-outline .action-icon{
  color:var(--mag)!important;
}
.edit-actions-left .danger-outline:hover{
  border-color:#3b526e!important;
  background:linear-gradient(180deg,#152235,#0c1522)!important;
  color:#fff!important;
}

/* STEP 48 — v0.4.73: GRID 3 BOX BASELINE ALIGNMENT
   Align the Multi-Pilot Time input box with the two engine toggle boxes.
   Keep the approved grid geometry and widths unchanged. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > input{
    margin-top:7px!important;
  }
}

/* STEP 49 — v0.4.73: GRID 3 MULTI-PILOT BOX HEIGHT MATCH
   Match the Multi-Pilot Time field exactly to the SE/ME choice boxes.
   Keep label alignment and approved grid geometry unchanged. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > input{
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin-top:3px!important;
    margin-bottom:0!important;
    box-sizing:border-box!important;
  }
}

/* STEP 50 — v0.4.74: GRID 3 FINAL BOX ALIGNMENT
   Put the Multi-Pilot Time field on the exact same top and bottom
   baseline as the Single Engine and Multi Engine choice boxes.
   Do not change grid widths, labels or surrounding structure. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > input{
    margin-top:0!important;
    margin-bottom:0!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    box-sizing:border-box!important;
    align-self:flex-start!important;
  }
}

/* STEP 51 — v0.4.75: GRID 3 MULTI-PILOT WRAPPER HEIGHT ALIGNMENT
   The duration field is wrapped by .time-picker-control at runtime.
   Align the wrapper itself with the SE/ME boxes, not only the inner input. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control{
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin-top:0!important;
    margin-bottom:0!important;
    align-self:flex-start!important;
    box-sizing:border-box!important;
  }
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input{
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin-top:0!important;
    margin-bottom:0!important;
    box-sizing:border-box!important;
  }
}

/* STEP 52 — v0.4.76: GRID 3 MULTI-PILOT BOTTOM BASELINE
   Move the Multi-Pilot Time control down so its lower border is exactly
   aligned with the lower borders of the Single Engine and Multi Engine boxes.
   No grid widths, labels or other sections are changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control{
    margin-top:12px!important;
  }
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input{
    margin-top:0!important;
  }
}

/* v0.4.77 — GRID 3 MULTI-PILOT VERTICAL CENTER FIX
   Remove the excessive downward offset introduced in STEP 52.
   The Multi-Pilot Time control must share the same vertical line
   as the Single Engine and Multi Engine controls. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control{
    margin-top:0!important;
    margin-bottom:0!important;
    align-self:flex-start!important;
  }
}

/* v0.4.78 — GRID 3 MULTI-PILOT FINAL CENTER ALIGNMENT
   The Multi-Pilot Time field is positioned on the same vertical line
   as the Single Engine and Multi Engine choice boxes. No widths or
   surrounding grid geometry are changed. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control{
    margin-top:12px!important;
    margin-bottom:0!important;
    align-self:flex-start!important;
    box-sizing:border-box!important;
  }
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input{
    margin-top:0!important;
    margin-bottom:0!important;
    box-sizing:border-box!important;
  }
}


/* v0.4.79 — GRID 3 EXACT MULTI-PILOT ALIGNMENT
   The third field uses the same label-to-box stack as the SE/ME controls.
   The wrapper and input share the exact same 30px height; no extra offset. */
@media (min-width:1051px){
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3),
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:5px!important;
  }
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control{
    display:block!important;
    width:100%!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;
    align-self:stretch!important;
  }
  body.edit-page .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input,
  body:has(.edit-form) .edit-shell .edit-form .engine-time-grid > label:nth-child(3) > .time-picker-control > input{
    display:block!important;
    width:100%!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
}


/* v0.4.80 — TOP NAV CYAN CLICKABLE BOXES */
.topbar nav > a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:7px 13px;
  border:1px solid rgba(45,231,255,.55);
  border-radius:10px;
  background:rgba(45,231,255,.045);
  color:var(--cyan);
  text-decoration:none;
  font-weight:800;
  line-height:1;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.topbar nav > a:hover,.topbar nav > a:focus-visible{
  background:rgba(45,231,255,.13);
  border-color:var(--cyan);
  color:#fff;
  outline:none;
}
@media(max-width:720px){
  .topbar nav > a{min-height:34px;padding:6px 9px;font-size:12px}
}

/* v0.4.81 — TOP NAV PILL SHAPE
   Navigation buttons use the same rounded pill form as the profile and logout controls. */
.topbar nav > a{
  border-radius:999px;
}


/* v0.4.82 — TOP NAV UNIFORM PILLS
   All navigation pills share one height and one horizontal center line
   with the profile and logout controls. */
.topbar nav{
  display:flex!important;
  align-items:center!important;
  gap:18px;
}
.topbar nav > a,
.topbar nav > .account-chip,
.topbar nav > .pilot-logout-form,
.topbar nav > .pilot-logout-form > .pilot-logout-button{
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  box-sizing:border-box!important;
}
.topbar nav > a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 13px!important;
  line-height:1!important;
}
.topbar nav > .account-chip{
  display:inline-flex!important;
  align-items:center!important;
  margin-left:0!important;
  padding:0 10px!important;
  line-height:1!important;
}
.topbar nav > .pilot-logout-form{
  display:inline-flex!important;
  align-items:center!important;
  margin:0!important;
}
.topbar nav > .pilot-logout-form > .pilot-logout-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0 13px!important;
  line-height:1!important;
}
@media(max-width:720px){
  .topbar nav{gap:8px!important}
  .topbar nav > a,
  .topbar nav > .account-chip,
  .topbar nav > .pilot-logout-form,
  .topbar nav > .pilot-logout-form > .pilot-logout-button{
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
  }
  .topbar nav > a{padding:0 9px!important;font-size:12px}
  .topbar nav > .pilot-logout-form > .pilot-logout-button{padding:0 10px!important;font-size:9px}
}

/* v0.4.83 — PROFILE BORDER COLOR
   All top navigation and logout outlines match the profile badge border. */
.topbar nav > a,
.topbar nav > .pilot-logout-form > .pilot-logout-button{
  border-color:#27374c!important;
}

/* 0.4.84 - compact enrichment flight grids + back-to-top control */
.review-list{gap:9px}
.enrich-card{padding:9px 11px}
.enrich-card .flight-head{height:30px;gap:10px}
.enrich-card .flight-head strong{font-size:17px}
.enrich-card .route{padding:7px 10px;margin-bottom:8px}
.enrich-card .route b{font-size:20px}
.enrich-card .route small{font-size:11px}
.enrich-card .route i{font-size:18px;margin:0 16px}
.enrich-card .clean-source-grid{gap:8px}
.enrich-card .enrich-section{padding:9px 10px}
.enrich-card .aircraft-profile,.enrich-card .night-profile,.enrich-card .crew-profile,.enrich-card .ifr-profile{margin-top:8px;padding:8px 10px!important}
.enrich-card .aircraft-profile-grid{gap:6px;margin-top:6px}
.enrich-card .aircraft-profile-grid span{padding:6px 7px}
.back-to-top{position:fixed;right:18px;bottom:18px;width:42px;height:42px;margin:0;padding:0;border:1px solid #27374c;border-radius:999px;background:#08101a;color:var(--cyan);display:grid;place-items:center;font-size:22px;font-weight:900;line-height:1;cursor:pointer;z-index:20;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .18s,visibility .18s,transform .18s}
.back-to-top.visible{opacity:1;visibility:visible;transform:translateY(0)}
.back-to-top:hover,.back-to-top:focus-visible{border-color:var(--cyan);background:#0d1b29;outline:none}
@media(max-width:760px){.back-to-top{right:12px;bottom:12px;width:38px;height:38px}}


/* 0.4.85 - simplified operational enrichment */
.enrichment-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.enrichment-head-actions form{margin:0}
.enrichment-head-actions .danger-outline{white-space:nowrap}
.enrichment-reg-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.enrichment-reg-row .enrich-section{min-width:0}
.enrichment-reg-row .candidate-panel{margin:0}
@media(max-width:760px){.enrichment-reg-row{grid-template-columns:1fr}.enrichment-head-actions{justify-content:flex-start}}

/* v0.4.86 — show every REG proposal, including low-confidence candidates */
.candidate-panel>label{letter-spacing:.08em}
.candidate.confidence-low>span,.candidate.confidence-very-low>span,.candidate.confidence-medium>span{color:#ffb86b}
.candidate.confidence-low,.candidate.confidence-very-low{border-top-color:#5a3b2c}
.candidate.confidence-low>strong,.candidate.confidence-very-low>strong{color:#ffcf91}

/* v0.4.94 — compact single-line Flight Records */
.flight-records-list{display:grid;gap:10px}
.flight-record-card{border:1px solid var(--line);background:linear-gradient(145deg,#0b111b,#080c13);border-radius:14px;padding:12px 14px;cursor:pointer;transition:background .15s,box-shadow .15s;min-width:0}
.flight-record-card:hover,.flight-record-card:focus{background:#0d1420;outline:none;box-shadow:inset 3px 0 0 var(--cyan)}
.flight-record-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:9px;border-bottom:1px solid var(--line);min-width:0}
.flight-record-identity{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;min-width:0;white-space:nowrap}
.flight-record-identity strong{font-size:20px;color:#fff}
.flight-record-route{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-weight:700}
.flight-record-route b{color:var(--mag);font-size:16px}
.flight-record-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:nowrap;white-space:nowrap}
.flight-record-head-actions .secondary{padding:6px 9px;font-size:11px}
.flight-record-head-actions .pill{white-space:nowrap;font-size:10px;padding:4px 8px}
.flight-record-specs{display:flex;align-items:center;gap:22px;margin-top:10px;overflow-x:auto;overflow-y:hidden;padding:2px 1px 6px;white-space:nowrap;scrollbar-width:thin}
.record-spec-group,.record-spec-group-wide{display:flex;align-items:center;gap:12px;flex:0 0 auto;min-width:max-content;border:0;border-radius:0;padding:0;background:transparent}
.record-spec-group h3{margin:0;color:var(--cyan);font-size:10px;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap}
.record-spec-grid{display:flex;align-items:center;gap:14px;flex:0 0 auto}
.record-spec-grid>div{display:inline-flex;align-items:baseline;gap:5px;flex:0 0 auto}
.record-spec-grid label,.record-signature label{display:inline;color:var(--muted);font-size:9px;letter-spacing:.05em;text-transform:uppercase;margin:0}
.record-spec-grid b{display:inline;color:var(--text);font-size:12px;overflow-wrap:normal}
.record-remarks{white-space:nowrap;overflow-wrap:normal;line-height:1.3;margin:0;max-width:420px;overflow:hidden;text-overflow:ellipsis}
.record-signature{display:inline-flex;align-items:center;gap:6px;border:0;padding:0}
.record-signature img{display:block;max-width:110px;max-height:30px;background:#070b12;border:1px solid var(--line);border-radius:5px;padding:2px}
@media(max-width:900px){.flight-record-card-head{align-items:flex-start}.flight-record-identity{gap:8px}.flight-record-identity strong{font-size:18px}.flight-record-head-actions{gap:5px}.flight-record-specs{gap:18px}}
@media(max-width:520px){.flight-record-card{padding:10px}.flight-record-card-head{gap:8px}.flight-record-identity{overflow-x:auto}.flight-record-head-actions .secondary{padding:5px 7px}.flight-record-specs{gap:16px}.record-spec-grid{gap:10px}.record-spec-grid>div{gap:4px}}



/* v0.4.95 — Flight Records desktop scrollbar styling */
.flight-record-specs{
  scrollbar-color:#30445d #080d15;
  scrollbar-width:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}
.flight-record-specs::-webkit-scrollbar{height:12px}
.flight-record-specs::-webkit-scrollbar-track{
  background:linear-gradient(90deg,#080d15,#0d1420,#080d15);
  border:1px solid #202d40;
  border-radius:999px;
}
.flight-record-specs::-webkit-scrollbar-thumb{
  background:linear-gradient(90deg,#263b55,#3a526d);
  border:3px solid #080d15;
  border-radius:999px;
  min-width:56px;
}
.flight-record-specs::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(90deg,#3d5b78,#536f8d);
}
.flight-record-specs::-webkit-scrollbar-corner{background:transparent}
.flight-record-card{overflow:hidden}
.record-spec-group{
  position:relative;
  padding:9px 12px;
  border:1px solid rgba(48,65,88,.72);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(13,21,33,.72),rgba(7,12,20,.72));
}
.record-spec-group h3{color:#63eaff}
.record-spec-group-wide{padding-right:14px}
@media(min-width:901px){
  .flight-record-specs{padding-bottom:10px;gap:16px}
  .record-spec-group{gap:10px}
  .record-spec-grid{gap:12px}
}


/* v0.4.96 — Flight Records responsive header, site-native actions and REVIEW accent */
.flight-records-heading{min-width:0}
.flight-records-heading h1{margin-bottom:14px}
.flight-records-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.flight-page-action{margin:0!important;min-height:46px;padding:11px 16px!important;border-radius:13px!important;background:linear-gradient(180deg,#101a29,#0a111c)!important;border:1px solid #26364b!important;color:#e7edf7!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)!important;transition:border-color .15s,background .15s,transform .15s}
.flight-page-action span{font-size:17px;line-height:1;color:var(--cyan);margin-right:5px}
.flight-page-action-add{border-color:rgba(45,231,255,.32)!important}
.flight-page-action-pdf{border-color:rgba(255,43,214,.28)!important}
.flight-page-action-pdf span{color:var(--mag)}
.flight-page-action:hover{background:linear-gradient(180deg,#152235,#0c1522)!important;border-color:#3b526e!important;color:#fff!important;transform:translateY(-1px)}
.flight-count-badge{white-space:nowrap;min-height:46px;display:inline-flex;align-items:center;justify-content:center;padding:8px 13px!important}
.status-pill.status-review{color:var(--mag)!important;border-color:rgba(255,43,214,.55)!important;background:rgba(255,43,214,.055)!important}
.status-pill.status-confirmed{color:var(--cyan)!important}
.status-pill.status-pending,.status-pill.status-draft{color:#f3c66a!important;border-color:rgba(243,198,106,.45)!important}
@media(max-width:1000px){
  .page-head{display:flex;align-items:flex-start;flex-direction:column;gap:18px}
  .flight-records-actions{width:100%;justify-content:flex-start}
  .flight-records-heading h1{font-size:clamp(42px,8vw,64px)}
}
@media(max-width:560px){
  .flight-records-actions{gap:7px}
  .flight-page-action{min-height:40px;padding:9px 11px!important;font-size:12px}
  .flight-count-badge{min-height:40px}
}


/* v0.4.102 — edit-flight completion state: magenta incomplete / cyan complete */
body:has(.edit-form) .edit-section .section-icon{border-color:rgba(255,43,214,.72)!important;color:#ff5be2!important;background:rgba(255,43,214,.045)!important}
body:has(.edit-form) .edit-section.grid-complete .section-icon{border-color:rgba(45,231,255,.62)!important;color:var(--cyan)!important;background:rgba(45,231,255,.045)!important}
body:has(.edit-form) .edit-section.grid-incomplete .section-icon{border-color:rgba(255,43,214,.72)!important;color:#ff5be2!important}


/* v0.4.104 — coherent completion colors for New/Edit Flight grids
   Section 1 is source data: its color does not depend on Flight Number.
   FSTD becomes cyan as soon as at least one value is present.
   */
.add-flight-form .edit-section.edit-section-main,
body:has(.edit-form) .edit-section.edit-section-main{
  border-color:#233247!important;
  box-shadow:none!important;
}
.add-flight-form .edit-section.edit-section-main .section-icon,
body:has(.edit-form) .edit-section.edit-section-main .section-icon{
  border-color:rgba(45,231,255,.55)!important;
  color:var(--cyan)!important;
  background:rgba(45,231,255,.045)!important;
}
/* Keep the Takeoffs/Landings card and its four counters in the same state. */
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete{
  border-color:rgba(255,43,214,.72)!important;
  box-shadow:inset 2px 0 0 rgba(255,43,214,.78),0 0 0 1px rgba(255,43,214,.04)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete{
  border-color:rgba(45,231,255,.55)!important;
  box-shadow:inset 2px 0 0 rgba(45,231,255,.55)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count{
  border-color:rgba(255,43,214,.62)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count span{
  color:#ff5be2!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count{
  border-color:rgba(45,231,255,.48)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count span{
  color:var(--cyan)!important;
}
/* A partially completed FSTD section is still a cyan, active section. */
body:has(.edit-form) .edit-section.grid-complete input:not(.manual-input),
body:has(.edit-form) .edit-section.grid-complete textarea:not(.manual-input),
body:has(.edit-form) .edit-section.grid-complete .date-display:not(.manual-input){
  border-color:rgba(45,231,255,.55)!important;
  box-shadow:inset 0 0 14px rgba(45,231,255,.025)!important;
}


/* v0.4.105 — empty phase/remarks grids remain magenta until data exists. */
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .section-icon,
body:has(.edit-form) .edit-section.edit-section-remarks.grid-incomplete .section-icon{
  border-color:rgba(255,43,214,.72)!important;
  color:#ff5be2!important;
  background:rgba(255,43,214,.045)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count input{
  border-color:rgba(255,43,214,.72)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count span{color:#ff5be2!important}
.add-flight-form .edit-section.edit-section-phases.grid-incomplete .section-icon,
.add-flight-form .edit-section.edit-section-remarks.grid-incomplete .section-icon{
  border-color:rgba(255,43,214,.72)!important;
  color:#ff5be2!important;
}

/* v0.4.106 — restore the global delete action on Flight Records. */
.flight-delete-all-form{margin:0;display:flex;align-items:center}
.flight-page-action-danger{cursor:pointer!important;border-color:rgba(255,43,214,.28)!important;color:#e7edf7!important}
.flight-page-action-danger span{color:var(--mag)!important}
.flight-page-action-danger:hover{border-color:#3b526e!important;background:linear-gradient(180deg,#152235,#0c1522)!important;color:#fff!important}
.flight-page-action-danger:disabled{opacity:.4!important;cursor:not-allowed!important;transform:none!important}
@media(max-width:560px){
  .flight-delete-all-form{width:auto}
  .flight-page-action-danger{font-size:12px}
}


/* Import review: compact, scan-first completion workflow */
.review-page-head{align-items:center}
.review-summary-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.review-missing-badge{color:var(--mag);border-color:rgba(255,43,214,.5)}
.review-form{display:block}
.review-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 18px;margin-bottom:14px;border:1px solid var(--line);border-radius:14px;background:linear-gradient(145deg,#0d1420,#080c13)}
.review-toolbar strong{display:block;font-size:15px}
.review-toolbar span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.review-save-top{margin:0;white-space:nowrap}
.review-flight-card{padding:14px 16px;border-left:3px solid var(--line)}
.review-flight-card.has-missing{border-left-color:var(--mag)}
.review-flight-card.is-complete{border-left-color:var(--cyan)}
.review-flight-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.review-flight-identity{display:flex;align-items:baseline;gap:12px;min-width:0;flex-wrap:wrap}
.review-flight-identity strong{font-size:20px;color:#fff}
.review-date{color:var(--muted);font-size:12px}
.review-route-inline{color:var(--cyan);font-weight:700;letter-spacing:.04em}
.review-state{font-size:10px;text-transform:uppercase;letter-spacing:.1em;padding:5px 8px;border:1px solid;border-radius:99px;white-space:nowrap}
.review-state.needs-input{color:var(--mag);border-color:rgba(255,43,214,.55);background:rgba(255,43,214,.06)}
.review-state.ready-input{color:var(--cyan);border-color:rgba(45,231,255,.5);background:rgba(45,231,255,.05)}
.review-flight-meta{display:flex;gap:15px;flex-wrap:wrap;color:var(--muted);font-size:11px;margin:5px 0 12px}
.review-fields{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}
.review-fields label{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.04em}
.review-fields input,.review-fields select{width:100%;min-width:0;margin-top:4px;background:#070b12;border:1px solid var(--line);border-radius:8px;color:#fff;padding:9px;font:inherit;font-size:13px}
.review-fields input[type="text"],.review-fields input:not([type]),.review-fields select{text-transform:uppercase}
.review-fields .manual-input input{border-color:var(--mag);box-shadow:0 0 0 1px rgba(255,43,214,.08)}
.review-fields .filled-input input{border-color:rgba(45,231,255,.48)}
.review-submit-bottom{display:flex;justify-content:flex-end}
.review-submit-bottom button{margin-top:18px}
@media(max-width:1050px){.review-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.review-toolbar{display:block}.review-save-top{margin-top:12px}.review-flight-top{align-items:flex-start}.review-flight-identity{gap:7px}.review-fields{grid-template-columns:1fr 1fr}.review-summary-badges{justify-content:flex-start}.review-route-inline{width:100%}}
@media(max-width:430px){.review-fields{grid-template-columns:1fr}.review-flight-card{padding:12px}.review-flight-meta{gap:8px}}


/* v0.4.114 — local Enrichment validation engine */
.enrichment-test-panel,.night-test-tool{margin:0 0 22px;padding:22px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(145deg,#0d1624,#080e17)}
.enrichment-test-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.enrichment-test-heading h2{margin:8px 0;font-size:28px}
.enrichment-test-heading p,.test-tool-title p{margin:0;color:var(--muted);line-height:1.6}
.test-status{border:1px solid var(--line);border-radius:999px;padding:9px 13px;font-size:11px;letter-spacing:.08em;white-space:nowrap}
.test-status.ok,.ok-text{color:var(--cyan)}.test-status.bad,.bad-text{color:#ff8aae}
.test-check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.test-check{padding:14px;border:1px solid var(--line);border-radius:12px;display:grid;gap:5px}.test-check b{color:var(--muted);font-size:11px}.test-check span{color:#fff}.test-check a{color:var(--mag)}
.test-tools-grid{display:grid;grid-template-columns:1fr;gap:14px}.test-tool-title{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}.test-tool-title>span{color:var(--cyan);font-size:24px}.test-tool-title h3{margin:0 0 5px;font-size:19px}
.test-form,.night-test-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}.test-form label,.night-test-form label{display:grid;gap:6px;color:var(--muted);font-size:12px}.test-form input,.night-test-form input{width:100%;box-sizing:border-box;background:#070b12;border:1px solid var(--line);border-radius:10px;color:#fff;padding:12px;font:inherit}.test-form button,.night-test-form button{min-height:45px}
.test-result,.night-test-result{margin-top:14px;padding:14px;border-radius:12px;border:1px solid var(--line);display:grid;gap:6px}.test-result.success,.night-test-result.success{border-color:rgba(45,231,255,.45);background:rgba(45,231,255,.035)}.test-result.error,.night-test-result.error{border-color:rgba(255,43,214,.5);color:#ff8aae}.test-result small,.night-test-result small{color:var(--muted)}
.night-test-tool{border-color:rgba(255,43,214,.35)}.night-test-form{grid-template-columns:repeat(6,minmax(0,1fr))}.night-test-form button{grid-column:span 1}.night-result-main{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}.night-result-main strong{font-size:27px;color:var(--cyan)}.night-result-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.night-result-grid span{display:grid;gap:4px;color:var(--muted);font-size:12px}.night-result-grid b{color:#fff;font-size:14px}
@media(max-width:900px){.night-test-form{grid-template-columns:repeat(3,minmax(0,1fr))}.night-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.enrichment-test-heading{display:block}.test-check-grid,.test-form,.night-test-form{grid-template-columns:1fr}.night-result-grid{grid-template-columns:1fr}.enrichment-test-panel,.night-test-tool{padding:16px}}

.local-time-display{display:block;margin-top:4px;font-size:12px;opacity:.75;line-height:1.35;}


/* v0.4.128 — Takeoffs/Landings use the same cyan style as the other completed grids. */
body:has(.edit-form) .edit-section.edit-section-phases,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete{
  border-color:rgba(45,231,255,.55)!important;
  box-shadow:inset 2px 0 0 rgba(45,231,255,.55)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count{
  border-color:rgba(45,231,255,.48)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count span,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count span,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count span{
  color:var(--cyan)!important;
}

/* v0.4.129 — Section 6 Takeoffs/Landings matches Section 4 magenta styling. */
body:has(.edit-form) .edit-section.edit-section-phases,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete{
  border-color:rgba(255,43,214,.72)!important;
  box-shadow:inset 2px 0 0 rgba(255,43,214,.78),0 0 0 1px rgba(255,43,214,.04)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .section-icon,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .section-icon,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .section-icon{
  border-color:rgba(255,43,214,.65)!important;
  color:#ff5be2!important;
  background:rgba(255,43,214,.045)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count{
  border-color:rgba(255,43,214,.62)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count span,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count span,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count span{
  color:#ff5be2!important;
}

/* v0.4.130 — Section 6 Takeoffs/Landings restored to cyan styling. */
body:has(.edit-form) .edit-section.edit-section-phases,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete{
  border-color:rgba(45,231,255,.55)!important;
  box-shadow:inset 2px 0 0 rgba(45,231,255,.55)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .section-icon,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .section-icon,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .section-icon{
  border-color:rgba(45,231,255,.65)!important;
  color:var(--cyan)!important;
  background:rgba(45,231,255,.045)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count{
  border-color:rgba(45,231,255,.48)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count span,
body:has(.edit-form) .edit-section.edit-section-phases.grid-incomplete .phase-count span,
body:has(.edit-form) .edit-section.edit-section-phases.grid-complete .phase-count span{
  color:var(--cyan)!important;
}

/* v0.4.132 — Section 6 outer frame uses the same neutral blue as sections 2, 4, 5 and 7.
   Only the external card frame is normalized; internal counters remain cyan/magenta as designed. */
body:has(.edit-form) .edit-section.edit-section-phases,
body:has(.add-flight-form) .edit-section.edit-section-phases{
  border:1px solid #24364b!important;
  border-color:#24364b!important;
  box-shadow:none!important;
}

/* v0.4.135 — neutral outer border for Section 6; keep inner counters unchanged. */
body:has(.edit-form) .edit-section.edit-section-phases,
body:has(.add-flight-form) .edit-section.edit-section-phases{
  border-color:#233247!important;
  box-shadow:none!important;
}


/* v0.4.136 — Section 6 external frame definitively matches neutral section frames.
   This affects only the outer card; inner phase rows/counters retain their own colors. */
body:has(.edit-form) .edit-section.edit-section-phases,
body:has(.add-flight-form) .edit-section.edit-section-phases {
  border: 1px solid #24364b !important;
  border-color: #24364b !important;
  box-shadow: none !important;
  outline: none !important;
}


/* v0.4.137 — Force Section 6 outer frame to use the same neutral blue as the other section cards. */
html body.edit-page .edit-shell form.edit-form > section.edit-section.edit-section-phases,
html body:has(.add-flight-form) .edit-shell form.edit-form > section.edit-section.edit-section-phases,
html body:has(.edit-form) section.edit-section.edit-section-phases {
  border: 1px solid #24364b !important;
  border-color: #24364b !important;
  box-shadow: none !important;
  outline: none !important;
}


/* v0.4.138 — Uniform neutral-blue outer frames for every flight form grid.
   Only the external section borders are normalized; inner controls, counters and icons keep their own colors. */
html body:has(.edit-form) .edit-shell .edit-form > section.edit-section,
html body:has(.add-flight-form) .edit-shell .edit-form > section.edit-section {
  border: 1px solid #24364b !important;
  border-color: #24364b !important;
  box-shadow: none !important;
  outline: none !important;
}


/* v0.4.140 — Force visible grid lines in the generated paper logbook.
   The borders are defined both on screen and in print so the grid remains
   visible in the preview and in the saved PDF. */
.paper-grid {
  border-collapse: collapse !important;
  border: 1px solid #111 !important;
  outline: 1px solid #111 !important;
}
.paper-grid th,
.paper-grid td,
.paper-grid tfoot th,
.paper-grid tfoot td {
  border: 1px solid #111 !important;
  border-style: solid !important;
}
@media print {
  .paper-grid {
    border: 1px solid #111 !important;
    outline: 1px solid #111 !important;
  }
  .paper-grid th,
  .paper-grid td,
  .paper-grid tfoot th,
  .paper-grid tfoot td {
    border: 1px solid #111 !important;
    border-style: solid !important;
  }
}


/* v0.4.161 — eliminate the double page break that creates blank even pages.
   The two sections are emitted in the correct order by print-logbook.php:
   1-8 on odd sheets, then 9-13 on the following even sheet. */
@media print {
  .paper-preview > .paper-page-one {
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  .paper-preview > .paper-page-two {
    page-break-before: auto !important;
    break-before: auto !important;
    page-break-after: always !important;
    break-after: page !important;
  }
  .paper-preview > .paper-page-two:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }
}


/* v0.4.166 — high-contrast signature ink in the edit-flight form */
.signature-canvas-wrap{background:#ffffff!important}
.signature-canvas-wrap .signature-pad{background:#ffffff!important}
.signature-preview img{background:#ffffff!important;filter:none!important}
.record-signature img{background:#ffffff!important;filter:none!important}


/* v0.4.175 — ICAO / IATA display switch */
.airport-view-switch{display:inline-flex;align-items:center;gap:4px;height:34px;padding:3px 4px 3px 9px;border:1px solid #2c3d52;border-radius:999px;background:#070c13;white-space:nowrap;flex:0 0 auto}
.airport-view-switch>span{font-size:9px;letter-spacing:.12em;color:#7f8ea3;font-weight:700;margin-right:3px}
.airport-view-switch button{height:26px;min-width:46px;padding:0 10px;border:1px solid transparent;border-radius:999px;background:transparent;color:#7f8ea3;font:700 11px/1 inherit;cursor:pointer}
.airport-view-switch button:hover{color:#dfe7f3;border-color:#31465e}
.airport-view-switch button.active{color:#061019;background:var(--cyan);border-color:var(--cyan);box-shadow:0 0 12px rgba(45,231,255,.18)}
.print-toolbar .airport-view-switch{margin-left:auto;margin-right:auto}
@media(max-width:900px){.airport-view-switch>span{display:none}.airport-view-switch{padding-left:3px}.airport-view-switch button{min-width:42px;padding:0 8px}.topbar nav{gap:8px}}

/* v0.4.176 — ICAO / IATA switch polish */
.airport-view-switch{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  height:42px!important;
  padding:3px!important;
  border:1px solid #2d4057!important;
  border-radius:999px!important;
  background:linear-gradient(180deg,#0b121c,#080e16)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 4px 16px rgba(0,0,0,.18)!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
.airport-view-switch>span{
  display:flex!important;
  align-items:center!important;
  height:34px!important;
  padding:0 12px!important;
  margin:0 1px 0 3px!important;
  color:#8492a7!important;
  font-size:9px!important;
  line-height:1!important;
  letter-spacing:.16em!important;
  font-weight:800!important;
}
.airport-view-switch button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:34px!important;
  min-width:58px!important;
  padding:0 13px!important;
  margin:0!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  background:transparent!important;
  color:#7f8da2!important;
  font:800 11px/1 Inter,system-ui,sans-serif!important;
  letter-spacing:.04em!important;
  cursor:pointer!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .12s ease!important;
}
.airport-view-switch button:hover{color:#e8eef7!important;background:#101a27!important;border-color:#263a51!important}
.airport-view-switch button:active{transform:scale(.97)!important}
.airport-view-switch button.active{
  color:#061019!important;
  background:var(--cyan)!important;
  border-color:var(--cyan)!important;
  box-shadow:0 0 18px rgba(45,231,255,.16),inset 0 1px 0 rgba(255,255,255,.25)!important;
}
.print-toolbar .airport-view-switch{margin-left:auto!important;margin-right:auto!important}
@media(max-width:900px){
  .airport-view-switch{height:40px!important}
  .airport-view-switch>span{height:32px!important;padding:0 9px!important;margin-left:2px!important}
  .airport-view-switch button{height:32px!important;min-width:52px!important;padding:0 11px!important}
}
@media(max-width:520px){
  .airport-view-switch{height:38px!important}
  .airport-view-switch>span{display:flex!important;font-size:8px!important;padding:0 7px!important;letter-spacing:.12em!important}
  .airport-view-switch button{height:30px!important;min-width:48px!important;padding:0 9px!important;font-size:10px!important}
}


/* v0.4.178 — Takeoff/Landing counters: active (>0) cyan, inactive (0) magenta. */
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active{
  border-color:rgba(45,231,255,.72)!important;
  box-shadow:inset 0 0 12px rgba(45,231,255,.035)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active input,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active input{
  border-color:var(--cyan)!important;
  color:var(--cyan)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active span,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active span{
  color:var(--cyan)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty{
  border-color:rgba(255,43,214,.72)!important;
  box-shadow:inset 0 0 12px rgba(255,43,214,.025)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty input,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty input{
  border-color:rgba(255,43,214,.72)!important;
  color:#ff5be2!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty span,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty span{
  color:#ff5be2!important;
}

/* v0.4.177 — Takeoffs/Landings counters are manual and highlighted in cyan. */
body:has(.edit-form) .edit-section.edit-section-phases .phase-count input,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count input{
  border-color:rgba(45,231,255,.62)!important;
  color:var(--cyan)!important;
  box-shadow:inset 0 0 14px rgba(45,231,255,.035)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count input:focus,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count input:focus{
  border-color:var(--cyan)!important;
  box-shadow:0 0 0 2px rgba(45,231,255,.14),inset 0 0 14px rgba(45,231,255,.05)!important;
}

/* v0.4.180 — Takeoff/Landing phase guidance.
   Cyan = the phase/day-night that actually occurred from the sector times.
   Magenta = the alternative phase. These classes are visual only; counters
   remain manual and are never populated by this logic. */
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active{
  border-color:rgba(45,231,255,.82)!important;
  box-shadow:inset 0 0 16px rgba(45,231,255,.045),0 0 8px rgba(45,231,255,.06)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active input,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active input{
  border-color:var(--cyan)!important;
  color:var(--cyan)!important;
  box-shadow:0 0 10px rgba(45,231,255,.08)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active span,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active span{
  color:var(--cyan)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty{
  border-color:rgba(255,43,214,.78)!important;
  box-shadow:inset 0 0 14px rgba(255,43,214,.025)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty input,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty input{
  border-color:rgba(255,43,214,.78)!important;
  color:#ff5be2!important;
  box-shadow:0 0 8px rgba(255,43,214,.05)!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty span,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty span{
  color:#ff5be2!important;
}


/* v0.4.181 — authoritative Takeoff/Landing guidance state.
   The server/browser may retain legacy Section 6 rules, so these final
   selectors deliberately have higher specificity. Only the phase selected
   by the live DAY/NIGHT calculation is cyan; all other phase cards are magenta.
   Values remain manual and are never changed by this visual state. */
html body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty,
html body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty {
  border-color:rgba(255,43,214,.78)!important;
  box-shadow:inset 0 0 14px rgba(255,43,214,.025)!important;
}
html body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty input,
html body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty input {
  border-color:rgba(255,43,214,.78)!important;
  color:#ff5be2!important;
}
html body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-empty span,
html body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-empty span {
  color:#ff5be2!important;
}
html body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active,
html body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active {
  border-color:rgba(45,231,255,.82)!important;
  box-shadow:inset 0 0 16px rgba(45,231,255,.045),0 0 8px rgba(45,231,255,.06)!important;
}
html body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active input,
html body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active input {
  border-color:var(--cyan)!important;
  color:var(--cyan)!important;
}
html body:has(.edit-form) .edit-section.edit-section-phases .phase-count.phase-active span,
html body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count.phase-active span {
  color:var(--cyan)!important;
}

/* v0.4.182 — Section 6 visual polish. Keep the guidance state: active phase cyan, inactive phase magenta. */
.edit-section-phases .phase-count{
  min-height:58px!important;
  grid-template-columns:42px minmax(0,1fr) 64px!important;
  grid-template-rows:1fr!important;
  column-gap:10px!important;
  padding:7px 10px!important;
  border-radius:12px!important;
  transition:border-color .16s ease,box-shadow .16s ease,color .16s ease;
}
.edit-section-phases .phase-count span{
  grid-column:1!important;grid-row:1!important;
  justify-self:center!important;align-self:center!important;
  font-size:20px!important;line-height:1!important;
}
.edit-section-phases .phase-count b{
  grid-column:2!important;grid-row:1!important;
  font-size:14px!important;line-height:1.15!important;
  align-self:center!important;
}
.edit-section-phases .phase-count input{
  grid-column:3!important;grid-row:1!important;
  width:64px!important;min-width:64px!important;height:44px!important;
  border-radius:10px!important;
  font-size:20px!important;font-weight:800!important;
}
.edit-section-phases .phase-count.phase-active{
  border-color:var(--cyan)!important;
  box-shadow:inset 0 0 18px rgba(45,231,255,.045),0 0 8px rgba(45,231,255,.055)!important;
}
.edit-section-phases .phase-count.phase-active span,
.edit-section-phases .phase-count.phase-active b{color:#eafaff!important}
.edit-section-phases .phase-count.phase-active input{
  border-color:var(--cyan)!important;color:var(--cyan)!important;
}
.edit-section-phases .phase-count.phase-empty{
  border-color:rgba(255,43,214,.82)!important;
  box-shadow:inset 0 0 14px rgba(255,43,214,.025)!important;
}
.edit-section-phases .phase-count.phase-empty span{color:#ff5be2!important}
.edit-section-phases .phase-count.phase-empty input{
  border-color:rgba(255,43,214,.82)!important;color:#ff5be2!important;
}
@media(max-width:700px){
 .edit-section-phases .phase-count{min-height:54px!important;grid-template-columns:34px minmax(0,1fr) 58px!important;column-gap:8px!important;padding:6px 8px!important}
 .edit-section-phases .phase-count span{font-size:18px!important}
 .edit-section-phases .phase-count b{font-size:13px!important}
 .edit-section-phases .phase-count input{width:58px!important;min-width:58px!important;height:40px!important;font-size:18px!important}
}



/* v0.4.198 — Takeoff/Landing selector final geometry.
   One authoritative rule set: compact selector, fully inside each phase row,
   vertically centered, with no legacy absolute/grid overrides. */
body:has(.edit-form) .edit-section.edit-section-phases .phase-count,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count{
  position:relative!important;
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 76px!important;
  grid-template-rows:1fr!important;
  column-gap:10px!important;
  align-items:center!important;
  width:100%!important;
  min-width:0!important;
  min-height:58px!important;
  height:58px!important;
  padding:6px 10px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span:not(.count-stepper),
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span:not(.count-stepper){
  position:static!important;
  grid-column:1!important;
  grid-row:1!important;
  justify-self:center!important;
  align-self:center!important;
  width:auto!important;
  margin:0!important;
  transform:none!important;
  line-height:1!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > b,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > b{
  position:static!important;
  grid-column:2!important;
  grid-row:1!important;
  justify-self:start!important;
  align-self:center!important;
  min-width:0!important;
  width:auto!important;
  margin:0!important;
  transform:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  line-height:1.15!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper{
  position:static!important;
  grid-column:3!important;
  grid-row:1!important;
  justify-self:end!important;
  align-self:center!important;
  width:76px!important;
  min-width:76px!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 18px!important;
  grid-template-rows:1fr 1fr!important;
  border:1px solid currentColor!important;
  border-radius:10px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  z-index:1!important;
  transform:none!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input{
  position:static!important;
  grid-column:1!important;
  grid-row:1 / span 2!important;
  width:100%!important;
  min-width:0!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  text-align:center!important;
  font-size:19px!important;
  line-height:1!important;
  box-sizing:border-box!important;
  -moz-appearance:textfield!important;
  appearance:textfield!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input::-webkit-outer-spin-button,
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input::-webkit-inner-spin-button,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input::-webkit-outer-spin-button,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input::-webkit-inner-spin-button{
  -webkit-appearance:none!important;
  margin:0!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-btn,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-btn{
  position:static!important;
  grid-column:2!important;
  width:18px!important;
  min-width:18px!important;
  height:22px!important;
  min-height:22px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-left:1px solid currentColor!important;
  border-radius:0!important;
  background:transparent!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-family:Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:900!important;
  line-height:1!important;
  cursor:pointer!important;
  box-sizing:border-box!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-up,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-up{grid-row:1!important}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-down,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-down{grid-row:2!important}
@media(max-width:700px){
  body:has(.edit-form) .edit-section.edit-section-phases .phase-count,
  body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count{
    grid-template-columns:26px minmax(0,1fr) 68px!important;
    column-gap:8px!important;
    min-height:54px!important;
    height:54px!important;
    padding:5px 8px!important;
  }
  body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper,
  body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper{
    width:68px!important;
    min-width:68px!important;
    height:40px!important;
    min-height:40px!important;
    grid-template-columns:minmax(0,1fr) 16px!important;
  }
  body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input,
  body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper input{
    height:40px!important;
    min-height:40px!important;
    font-size:18px!important;
  }
  body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-btn,
  body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-btn{
    width:16px!important;
    min-width:16px!important;
    height:20px!important;
    min-height:20px!important;
    font-size:10px!important;
  }
}

/* v0.4.200 — uppercase text entry on New/Edit Flight. */
body:has(.edit-form) .edit-form input[data-uppercase="1"],
body:has(.edit-form) .edit-form textarea[data-uppercase="1"]{text-transform:uppercase;}


/* v0.4.201 — SIGNATURE MODAL: true viewport centering
   The modal is detached from the editor flow and anchored to the viewport.
   This prevents the editor's fixed-height/overflow layout from pushing or
   clipping the signature window toward the bottom of the page. */
.signature-modal[data-signature-modal]{
  position:fixed!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:100vw!important;
  height:100vh!important;
  min-height:100dvh!important;
  margin:0!important;
  padding:20px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  z-index:2147483000!important;
  overflow:auto!important;
}
.signature-modal[data-signature-modal][hidden]{display:none!important;}
.signature-modal[data-signature-modal] .signature-dialog{
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  margin:0!important;
  width:min(920px,calc(100vw - 40px))!important;
  max-height:calc(100vh - 40px)!important;
  overflow:auto!important;
  transform:none!important;
}
@media(max-width:700px){
  .signature-modal[data-signature-modal]{padding:10px!important;}
  .signature-modal[data-signature-modal] .signature-dialog{width:100%!important;max-height:calc(100vh - 20px)!important;}
}


/* v0.4.207 — Import Review: automatically extracted Flight No / Aircraft are
   retained in the POST payload but removed from the visible Review form.
   Takeoff/Landing keep their existing manual confirmation logic, resized to
   match the height of the normal Registration/PIC fields. */
.review-fields{grid-template-columns:repeat(5,minmax(0,1fr))}
.review-phase-field{min-width:0;height:46px;box-sizing:border-box;margin-top:4px;padding:0 8px;border:1px solid var(--line);border-radius:9px;background:#070b12;display:flex;align-items:center;justify-content:space-between;gap:6px}
.review-phase-field.cyan{border-color:rgba(45,231,255,.58);box-shadow:inset 2px 0 0 rgba(45,231,255,.34)}
.review-phase-field.mag{border-color:rgba(255,43,214,.58);box-shadow:inset 2px 0 0 rgba(255,43,214,.34)}
.review-phase-label{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.045em;white-space:nowrap}
.review-phase-field.cyan .review-phase-label,.review-phase-field.cyan .review-phase-unavailable{color:var(--cyan)}
.review-phase-field.mag .review-phase-label,.review-phase-field.mag .review-phase-unavailable{color:var(--mag)}
.review-phase-control{display:grid;grid-template-columns:42px 16px;grid-template-rows:22px 22px;overflow:hidden;border:1px solid currentColor;border-radius:8px;flex:0 0 60px;height:44px}
.review-phase-field.cyan .review-phase-control{color:var(--cyan)}
.review-phase-field.mag .review-phase-control{color:var(--mag)}
.review-phase-control input{grid-column:1;grid-row:1 / span 2;width:42px!important;height:42px!important;margin:0!important;padding:0 3px!important;border:0!important;border-radius:0!important;background:transparent!important;color:currentColor!important;text-align:center;font-size:17px!important;font-weight:800!important;outline:none}
.review-phase-control input::-webkit-outer-spin-button,.review-phase-control input::-webkit-inner-spin-button{margin:0;appearance:none}
.review-phase-control input[type=number]{-moz-appearance:textfield}
.review-step{grid-column:2;width:16px;height:22px;margin:0!important;padding:0!important;border:0!important;border-left:1px solid currentColor!important;border-radius:0!important;background:transparent!important;color:currentColor!important;font:800 12px/22px Inter,system-ui,sans-serif!important;box-shadow:none!important}
.review-step.up{grid-row:1}.review-step.down{grid-row:2;border-top:1px solid currentColor!important}
.review-step:hover{background:rgba(255,255,255,.05)!important;transform:none!important;box-shadow:none!important}
.review-phase-unavailable{font-size:10px;font-weight:800;letter-spacing:.08em}
@media(max-width:1050px){.review-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.review-fields{grid-template-columns:1fr 1fr}.review-phase-field{padding:0 8px}}
@media(max-width:430px){.review-fields{grid-template-columns:1fr}.review-phase-control{flex-basis:60px}}


/* v0.4.209 — REVIEW VISUAL POLISH ONLY
   No structure or business logic changes. Keep Review controls compact,
   aligned, and visually separated while preserving all existing inputs. */
.review-list{display:flex;flex-direction:column;gap:12px}
.review-flight-card{padding:15px 18px;border-radius:16px}
.review-flight-top{min-height:28px}
.review-flight-identity{gap:10px}
.review-flight-identity strong{font-size:21px;line-height:1.05}
.review-flight-meta{margin:6px 0 10px;gap:14px;font-size:11px}
.review-fields{
  grid-template-columns:minmax(150px,1.08fr) minmax(150px,1.08fr) minmax(185px,1fr) minmax(185px,1fr) minmax(150px,.92fr);
  gap:10px;
  align-items:end;
}
.review-fields>label{min-width:0}
.review-fields input,.review-fields select{height:36px;box-sizing:border-box;margin-top:4px;padding:7px 10px;border-radius:9px}
.review-phase-field{
  height:36px;
  min-height:36px;
  margin-top:4px;
  padding:0 7px 0 9px;
  border-radius:9px;
  gap:7px;
  align-items:center;
}
.review-phase-label{font-size:9px;letter-spacing:.04em;line-height:1;overflow:hidden;text-overflow:ellipsis}
.review-phase-control{
  grid-template-columns:38px 14px;
  grid-template-rows:17px 17px;
  flex-basis:52px;
  width:52px;
  min-width:52px;
  height:34px;
  border-radius:8px;
}
.review-phase-control input{
  width:38px!important;
  height:32px!important;
  font-size:16px!important;
  line-height:32px!important;
}
.review-step{width:14px;height:17px;font-size:10px!important;line-height:17px!important}
.review-step.down{border-top-width:1px!important}
.review-state{padding:5px 9px}
.provenance{margin-top:8px;font-size:9px;letter-spacing:.01em}
@media(max-width:1180px){
  .review-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:760px){
  .review-flight-card{padding:13px 14px}
  .review-fields{grid-template-columns:1fr 1fr;gap:9px}
  .review-phase-field{width:100%}
}
@media(max-width:430px){
  .review-fields{grid-template-columns:1fr}
}


/* v0.4.209 — Review phase selectors: compact and vertically fitted.
   Visual-only adjustment; no structure or business logic changes. */
.review-phase-field {
  height:36px !important;
  min-height:36px !important;
  box-sizing:border-box !important;
  padding:0 7px 0 9px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:6px !important;
}
.review-phase-control {
  flex:0 0 46px !important;
  width:46px !important;
  min-width:46px !important;
  height:30px !important;
  grid-template-columns:32px 14px !important;
  grid-template-rows:15px 15px !important;
  border-radius:7px !important;
  box-sizing:border-box !important;
  overflow:hidden !important;
}
.review-phase-control input {
  width:32px !important;
  height:28px !important;
  line-height:28px !important;
  padding:0 2px !important;
  font-size:15px !important;
  box-sizing:border-box !important;
}
.review-step {
  width:14px !important;
  height:15px !important;
  line-height:15px !important;
  font-size:9px !important;
  padding:0 !important;
  margin:0 !important;
}
.review-phase-label {
  min-width:0 !important;
  line-height:1 !important;
}
/* v0.4.210 — Center the stepper arrows precisely inside their own cells. */
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-btn,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-btn{
  display:grid!important;
  place-items:center!important;
  align-items:center!important;
  justify-items:center!important;
  align-self:stretch!important;
  line-height:1!important;
  padding:0!important;
  margin:0!important;
  transform:none!important;
  text-indent:0!important;
  vertical-align:middle!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-up,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-up{
  grid-row:1!important;
}
body:has(.edit-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-down,
body:has(.add-flight-form) .edit-section.edit-section-phases .phase-count > span.count-stepper .count-step-down{
  grid-row:2!important;
}


/* v0.4.235 · Fleet-backed aircraft selectors */
.edit-form select[data-fleet-model-select],
.edit-form select[data-fleet-registration-select],
.review-fields select[data-fleet-model-select],
.review-fields select[data-fleet-registration-select]{
  cursor:pointer;
}
.review-fields select[data-fleet-model-select],
.review-fields select[data-fleet-registration-select]{
  appearance:auto;
}


/* v0.4.249 — FSTD session: separate date and clock time */
.edit-form .fstd-session-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.edit-form .fstd-session-grid > label{
  min-width:0;
}
@media(max-width:1050px){
  .edit-form .fstd-session-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:700px){
  .edit-form .fstd-session-grid{grid-template-columns:1fr!important;}
}


/* v0.4.257 — Tighten grid 6 and left-align its heading.
   Keep TOTAL TIME / OF FLIGHT close to the left border so the column can
   be narrowed without changing any flight data or rules. */
.page-one-grid .group-head th:nth-child(6){
  text-align:left!important;
  padding-left:.3mm!important;
  padding-right:0!important;
}
.page-one-grid col.c-total{width:2%!important}
.page-one-grid col.c-pic{width:24.5%!important}
.page-one-grid tbody td:nth-child(11),
.page-one-grid thead .subhead th:nth-child(11),
.page-one-grid tfoot td:nth-child(11){
  padding-left:.15mm!important;
  padding-right:.15mm!important;
}

/* v0.4.370 — Paper Logbook Scanner, dashboard-integrated acquisition module. */
.paper-scan-divider{display:flex;align-items:center;gap:12px;margin:20px 0 14px;color:#65758a;font-size:10px;font-weight:900;letter-spacing:.2em}.paper-scan-divider:before,.paper-scan-divider:after{content:"";height:1px;background:#263448;flex:1}.paper-scan-entry{display:grid;grid-template-columns:46px 1fr auto;gap:12px;align-items:center}.paper-scan-entry-icon{width:44px;height:44px;display:grid;place-items:center;border:1px solid rgba(255,43,214,.5);border-radius:12px;color:var(--mag);font-size:25px}.paper-scan-entry-copy h3{margin:0 0 3px;font-size:15px}.paper-scan-entry-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.4}.paper-scan-open{margin:0;white-space:nowrap;background:linear-gradient(90deg,#9b35d6,#d72dbb);padding:11px 14px}.paper-scan-panel{margin:18px 0 24px;padding:24px}.paper-scan-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:20px}.paper-scan-head h2{font-size:25px;margin:5px 0}.paper-scan-head p{margin:0;color:var(--muted)}.paper-scan-close{margin:0;white-space:nowrap}.paper-scan-workspace{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:18px}.paper-camera-area,.paper-pages-area{min-width:0;border:1px solid #243448;border-radius:14px;background:#070c13;padding:14px}.paper-camera-area video{display:block;width:100%;max-height:480px;aspect-ratio:4/3;object-fit:contain;background:#020407;border-radius:10px}.paper-camera-placeholder{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#93a4ba;text-align:center}.paper-camera-placeholder span{font-size:48px;color:var(--cyan)}.paper-camera-placeholder strong{color:#e9f2fb}.paper-camera-placeholder small{max-width:270px;color:#718198}.paper-camera-actions{display:flex;gap:9px;flex-wrap:wrap}.paper-camera-actions button{margin:12px 0 0}.paper-camera-actions button:disabled,.paper-scan-save:disabled{opacity:.4;cursor:not-allowed}.paper-file-pick{display:inline-flex;margin-top:12px;border:1px solid #30465d;border-radius:10px;padding:10px 13px;color:var(--cyan);font-weight:800;cursor:pointer}.paper-file-pick input{display:none}.paper-camera-note{font-size:11px;color:#74849a;line-height:1.5}.paper-pages-title{display:flex;justify-content:space-between;gap:8px;align-items:center;padding-bottom:12px;border-bottom:1px solid #223145}.paper-pages-title span{color:var(--cyan);font-size:11px}.paper-page-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-height:390px;overflow:auto;padding:12px 0}.paper-pages-empty{grid-column:1/-1;padding:36px 10px;text-align:center;color:#708097;font-size:12px}.paper-page-thumb{position:relative;min-width:0;border:1px solid #293b50;border-radius:8px;overflow:hidden;background:#0d1520}.paper-page-thumb img{display:block;width:100%;height:112px;object-fit:cover}.paper-page-thumb span{display:block;padding:5px 7px;color:#aebdd0;font-size:10px}.paper-page-remove{position:absolute;right:5px;top:5px;margin:0;padding:3px 7px;border-radius:6px;background:#421526;color:#fff;font-size:12px}.paper-save-area{border-top:1px solid #223145;padding-top:12px}.paper-save-area div{font-size:11px;color:#8596ac;line-height:1.45}.paper-scan-save{width:100%;margin-top:12px;background:linear-gradient(90deg,#b52bc9,#ff2bd6)}.paper-scan-panel[hidden]{display:none!important}@media(max-width:760px){.paper-scan-entry{grid-template-columns:42px 1fr}.paper-scan-open{grid-column:1/-1;width:100%}.paper-scan-workspace{grid-template-columns:1fr}.paper-scan-head{align-items:flex-start}.paper-scan-head h2{font-size:21px}.paper-scan-panel{padding:14px}.paper-page-list{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:420px){.paper-scan-head{display:block}.paper-scan-close{margin-top:12px}.paper-camera-actions button{flex:1}.paper-page-list{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Universal Paper Logbook Lab v0.1.0 */
.paper-lab-link{display:block;margin:10px 0 0;color:#25dff3;text-decoration:none;font-size:13px;font-weight:800}
.paper-lab-link span{margin-left:5px}
.paper-lab-shell{max-width:1500px;margin:0 auto;padding:28px 0 48px}
.paper-lab-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:22px}
.paper-lab-top h1{font-size:clamp(30px,4vw,48px);margin:8px 0;color:#f2f6ff}
.paper-lab-top p,.paper-lab-control-copy p,.paper-lab-review-head p{color:#91a5bf;line-height:1.55;margin:6px 0}
.paper-lab-back{white-space:nowrap;text-decoration:none}
.paper-lab-notice{display:flex;flex-direction:column;gap:6px;padding:16px 18px;border:1px solid rgba(33,211,235,.35);border-radius:14px;background:rgba(14,39,52,.45);color:#a9bfd3;margin-bottom:18px}
.paper-lab-notice strong{color:#25dff3}
.paper-lab-controls,.paper-lab-review,.paper-lab-method{padding:22px;margin-bottom:18px;border:1px solid #24374d;border-radius:18px;background:rgba(8,15,24,.92)}
.paper-lab-control-copy h2,.paper-lab-review h2,.paper-lab-method h2{margin:0 0 6px;color:#f2f6ff}
.paper-lab-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.paper-lab-pick{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:10px;font-weight:800;cursor:pointer}
.paper-lab-pick.primary{background:linear-gradient(100deg,#f21bc5,#9b35f4);color:#fff}
.paper-lab-pick.secondary{border:1px solid #29425a;color:#26dff3;background:#0b1420}
.paper-lab-pick input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.paper-lab-review-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.paper-lab-count{color:#24dff3;font-weight:800;white-space:nowrap}
.paper-lab-empty{padding:28px;text-align:center;border:1px dashed #344b62;border-radius:14px;color:#91a5bf}
.paper-lab-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.paper-lab-card{overflow:hidden;border:1px solid #293c52;border-radius:14px;background:#0a121d}
.paper-lab-thumb{height:220px;background:#050a11;display:flex;align-items:center;justify-content:center;overflow:hidden}
.paper-lab-thumb img{max-width:100%;max-height:100%;object-fit:contain;transition:transform .2s}
.paper-lab-card-body{padding:14px}
.paper-lab-card-title{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#edf4ff}
.paper-lab-quality{font-size:11px;font-weight:800;padding:5px 8px;border-radius:20px}
.paper-lab-quality.q-good{color:#74e6b1;background:rgba(40,180,120,.13)}
.paper-lab-quality.q-check{color:#f5cf70;background:rgba(220,165,45,.13)}
.paper-lab-quality.q-poor{color:#ff929e;background:rgba(220,65,85,.13)}
.paper-lab-metrics,.paper-lab-flags{font-size:11px;color:#91a5bf;line-height:1.5;margin-top:8px}
.paper-lab-flags{min-height:17px;color:#e2bb73}
.paper-lab-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.paper-lab-fields label{display:flex;flex-direction:column;gap:5px;color:#9db1c8;font-size:11px}
.paper-lab-fields input,.paper-lab-fields select{min-width:0;width:100%;padding:9px;border:1px solid #34495f;border-radius:8px;background:#0d1825;color:#f1f6ff}
.paper-lab-card-actions{display:flex;gap:8px;margin-top:12px}
.paper-lab-card-actions button{border:1px solid #30465e;border-radius:8px;background:#101d2b;color:#27dff3;padding:8px 10px;font-size:12px;cursor:pointer}
.paper-lab-card-actions .danger-link{color:#ff9aa7}
.paper-lab-footer{display:flex;justify-content:space-between;align-items:center;gap:18px;border-top:1px solid #26394e;margin-top:20px;padding-top:16px}
.paper-lab-footer #lab-status{font-size:12px;line-height:1.5;color:#91a5bf}
.paper-lab-footer #lab-status.is-error{color:#ff8998}
.paper-lab-footer button{flex:0 0 auto}
.paper-lab-method-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:16px}
.paper-lab-method-grid div{padding:14px;border:1px solid #293c52;border-radius:12px;background:#0a121d}
.paper-lab-method-grid b{display:block;color:#25dff3;margin-bottom:6px}
.paper-lab-method-grid span{font-size:12px;line-height:1.5;color:#91a5bf}
@media(max-width:760px){.paper-lab-top{flex-direction:column}.paper-lab-back{white-space:normal}.paper-lab-footer{flex-direction:column;align-items:stretch}.paper-lab-footer button{width:100%}.paper-lab-method-grid{grid-template-columns:1fr 1fr}.paper-lab-controls,.paper-lab-review,.paper-lab-method{padding:16px}.paper-lab-thumb{height:190px}}

/* Universal Paper Logbook Lab v0.2.0 */
.paper-lab-grid-result{margin-top:7px;color:#25dff3;font-size:11px;line-height:1.45}
.paper-lab-footer button:disabled{opacity:.42;filter:saturate(.35);cursor:not-allowed;box-shadow:none}
.paper-lab-pick:focus-within,.paper-lab-fields input:focus,.paper-lab-fields select:focus{outline:2px solid rgba(37,223,243,.45);outline-offset:2px}


/* Pilotbook Paper Logbook private archive v0.1.1 */
.paper-lab-nav,.paper-archive-top-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.paper-archive-shell{display:flex;flex-direction:column;gap:22px}
.paper-archive-summary{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;padding:18px 22px}
.paper-archive-summary strong{font-size:32px;color:#27dff2}
.paper-archive-summary span{font-weight:700}
.paper-archive-summary small{margin-left:auto;color:#91a9c5}
.paper-archive-empty{text-align:center;padding:44px 22px}
.paper-archive-empty-icon{font-size:42px;color:#27dff2}
.paper-archive-empty h2{margin:10px 0}
.paper-archive-empty p{max-width:620px;margin:0 auto 20px;color:#91a9c5}
.paper-archive-list{display:flex;flex-direction:column;gap:18px}
.paper-archive-batch{padding:20px}
.paper-archive-batch-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.paper-archive-batch-head h2{margin:0 0 5px;font-size:19px}
.paper-archive-batch-head p{margin:0;color:#91a9c5;font-size:13px}
.paper-archive-batch-head code{color:#27dff2}
.paper-archive-delete{border:1px solid rgba(255,100,125,.45);background:rgba(255,75,105,.08);color:#ff8297;border-radius:10px;padding:10px 13px;font-weight:700;cursor:pointer}
.paper-archive-pages{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.paper-archive-page{min-width:0;border:1px solid #263b50;border-radius:13px;overflow:hidden;background:#07101b}
.paper-archive-image{height:220px;display:flex;align-items:center;justify-content:center;background:#03080f;padding:8px}
.paper-archive-image img{width:100%;height:100%;object-fit:contain}
.paper-archive-page-meta{display:flex;flex-direction:column;gap:5px;padding:11px}
.paper-archive-page-meta strong{color:#edf4ff}
.paper-archive-page-meta span{font-size:12px;color:#91a9c5}
.paper-archive-page-meta a{font-size:12px;color:#27dff2;text-decoration:none;margin-top:3px}
.paper-archive-success{padding:12px 15px;border:1px solid rgba(39,223,242,.35);border-radius:10px;color:#27dff2;background:rgba(39,223,242,.07)}
@media(max-width:640px){.paper-archive-summary small{width:100%;margin-left:0}.paper-archive-batch{padding:14px}.paper-archive-pages{grid-template-columns:repeat(2,minmax(0,1fr))}.paper-archive-image{height:160px}}


/* Pilotbook Paper Logbook Geometry Engine v0.4.0 */
.paper-lab-nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.paper-lab-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.paper-lab-card-actions button{margin-top:10px;padding:9px 12px;font-size:12px}
.plb-perspective-overlay{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;padding:18px}
.plb-perspective-dialog{width:min(1180px,100%);max-height:94vh;overflow:auto;background:#09111d;border:1px solid #29445d;border-radius:18px;padding:18px;box-shadow:0 24px 80px #000}
.plb-perspective-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px}
.plb-perspective-head b{font-size:20px;color:#eff6ff}
.plb-perspective-head p{margin:5px 0 0;color:#91a9c5}
.plb-perspective-head button{margin:0;padding:5px 12px;background:#172638;font-size:22px}
.plb-perspective-stage{display:flex;justify-content:center;align-items:center;background:#03070d;border:1px solid #20384e;border-radius:12px;padding:10px;min-height:180px;overflow:hidden}
.plb-perspective-stage canvas{display:block;max-width:100%;max-height:68vh;width:auto;height:auto;touch-action:none;cursor:crosshair}
.plb-perspective-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:14px}
.plb-perspective-actions span{margin-right:auto;color:#8da6c2;font-size:13px}
.plb-perspective-actions button{margin:0}
@media(max-width:640px){.plb-perspective-overlay{padding:6px}.plb-perspective-dialog{padding:10px}.plb-perspective-actions span{width:100%}.paper-lab-card-actions button{flex:1}}

.paper-archive-geometry{font-size:11px;color:#27dff2}


/* Pilotbook PDF Template Master v1.0 — replace manual 12-column calibration */
.paper-lab-thumb img{width:100%;height:100%;object-fit:contain;transform:none!important}
.paper-lab-fields .plb-template-select{grid-column:1/-1}
.paper-lab-card-actions button[data-action="template"]{border-color:rgba(255,43,214,.55);color:#ff72df}
.plb-template-overlay-label{color:#ff72df}

/* Pilotbook Personal AI Connector v0.1.0 */
.paper-lab-ai{display:flex;flex-direction:column;gap:16px}
.paper-lab-ai-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.paper-lab-ai-head h2{margin:5px 0 7px}
.paper-lab-ai-head p{margin:0;color:#91a9c5;max-width:850px}
.paper-lab-ai-tag{border:1px solid rgba(39,223,242,.4);background:rgba(39,223,242,.08);color:#27dff2;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:800;white-space:nowrap}
.paper-lab-ai-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.paper-lab-ai-steps>div{display:flex;flex-direction:column;gap:6px;border:1px solid #293c52;border-radius:12px;background:#0a121d;padding:14px}
.paper-lab-ai-steps b{color:#27dff2;font-size:13px}
.paper-lab-ai-steps span,.paper-lab-ai-note,.paper-lab-ai-import label span{font-size:12px;line-height:1.55;color:#91a5bf}
.paper-lab-ai-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.paper-lab-ai-actions button,.paper-lab-ai-actions a{margin:0}
.paper-lab-ai-note{margin:0;border-left:3px solid #d8a64b;padding:8px 12px;background:rgba(216,166,75,.06)}
.paper-lab-ai-import{display:flex;flex-direction:column;gap:10px;border-top:1px solid #26394e;padding-top:16px}
.paper-lab-ai-import label{display:flex;flex-direction:column;gap:4px}
.paper-lab-ai-import label b{color:#edf4ff}
.paper-lab-ai-import textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:150px;padding:12px;border:1px solid #34495f;border-radius:10px;background:#0d1825;color:#f1f6ff;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}
.paper-lab-ai-import textarea:focus{outline:2px solid rgba(37,223,243,.45);outline-offset:2px}
.paper-lab-ai-result{padding:11px 13px;border:1px solid #293c52;border-radius:9px;color:#91a9c5;font-size:12px;line-height:1.5;background:#0a121d}
.paper-lab-ai-result.is-error{color:#ff8998;border-color:rgba(255,100,125,.4)}
.paper-lab-ai-preview{display:flex;flex-direction:column;gap:10px}
.plb-ai-summary{margin:0;color:#27dff2;font-size:13px;font-weight:700}
.plb-ai-table-wrap{max-width:100%;overflow:auto;border:1px solid #293c52;border-radius:10px}
.plb-ai-table-wrap table{width:100%;border-collapse:collapse;min-width:900px;font-size:11px}
.plb-ai-table-wrap th,.plb-ai-table-wrap td{padding:8px 9px;border-bottom:1px solid #26394e;text-align:left;white-space:nowrap}
.plb-ai-table-wrap th{color:#27dff2;background:#0a121d;position:sticky;top:0}
.plb-ai-table-wrap td{color:#dce8f6}
.plb-ai-warnings{margin:0;color:#e2bb73;font-size:12px;line-height:1.5}
.paper-lab-ai button:disabled{opacity:.42;filter:saturate(.35);cursor:not-allowed}
@media(max-width:760px){.paper-lab-ai-steps{grid-template-columns:1fr}.paper-lab-ai-actions>*{flex:1 1 auto;text-align:center}.paper-lab-ai{padding:16px}}

/* Pilotbook AI review workspace v0.2.0 */
.plb-ai-total-check{padding:11px 13px;border:1px solid #34495f;border-radius:10px;background:#0a121d;color:#dce8f6;font-size:12px;line-height:1.5}
.plb-ai-total-check.is-match{border-color:rgba(39,223,242,.4);color:#27dff2}
.plb-ai-total-check.is-diff{border-color:rgba(226,187,115,.5);color:#e2bb73}
.plb-ai-compact-table{min-width:980px!important}
.plb-ai-flight-list{display:flex;flex-direction:column;gap:10px}
.plb-ai-flight{border:1px solid #293c52;border-radius:12px;background:#09121e;overflow:hidden}
.plb-ai-flight>summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:13px 15px;cursor:pointer;list-style:none}
.plb-ai-flight>summary::-webkit-details-marker{display:none}
.plb-ai-flight>summary:after{content:'＋';margin-left:auto;color:#27dff2;font-weight:800}
.plb-ai-flight[open]>summary:after{content:'−'}
.plb-ai-flight-title{font-weight:750;color:#edf4ff}
.plb-ai-confidence{font-size:12px;color:#91a9c5}
.plb-ai-row-state{font-size:11px;color:#e2bb73;border:1px solid rgba(226,187,115,.35);border-radius:99px;padding:4px 8px}
.plb-ai-row-state.is-reviewed{color:#27dfaa;border-color:rgba(39,223,170,.35)}
.plb-ai-uncertain{margin:0 14px 12px;padding:9px 11px;border-left:3px solid #e2bb73;background:rgba(226,187,115,.07);color:#e2bb73;font-size:12px;line-height:1.5}
.plb-ai-field-group{padding:12px 14px;border-top:1px solid #1d3044}
.plb-ai-field-group h4{margin:0 0 10px;color:#27dff2;font-size:13px}
.plb-ai-fields-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.plb-ai-field{display:flex;flex-direction:column;gap:5px;min-width:0;color:#91a9c5;font-size:11px}
.plb-ai-field input,.plb-ai-field textarea{box-sizing:border-box;width:100%;min-width:0;padding:8px 9px;border:1px solid #34495f;border-radius:8px;background:#0d1825;color:#f1f6ff;font:13px/1.4 inherit}
.plb-ai-field input:focus,.plb-ai-field textarea:focus{outline:2px solid rgba(37,223,243,.4);outline-offset:1px}
.plb-ai-field.is-uncertain input,.plb-ai-field.is-uncertain textarea{border-color:rgba(226,187,115,.7)}
.plb-ai-field small{color:#e2bb73;font-size:10px}
.plb-ai-review-check{display:flex;align-items:center;gap:8px;padding:12px 14px;border-top:1px solid #1d3044;color:#dce8f6;font-size:12px;cursor:pointer}
.plb-ai-review-check input{accent-color:#27dfaa;width:16px;height:16px}
.plb-ai-warnings{padding:12px 14px;border:1px solid rgba(226,187,115,.35);border-radius:10px;background:rgba(226,187,115,.05)}
.plb-ai-warnings b{color:#e2bb73;font-size:12px}
.plb-ai-warnings ul{margin:8px 0 0;padding-left:18px;color:#d7c49e;font-size:12px;line-height:1.6}
@media(max-width:900px){.plb-ai-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.plb-ai-fields-grid{grid-template-columns:1fr}.plb-ai-flight>summary{gap:7px}.plb-ai-flight-title{width:100%}.plb-ai-flight>summary:after{position:absolute;right:26px}}

/* Pilotbook AI Review v0.2.1 — explicit provenance and uncertainty resolution */
.plb-ai-review-legend{display:flex;flex-wrap:wrap;gap:8px;margin:0;color:#b8c9dc;font-size:11px}
.plb-ai-review-legend span{display:inline-flex;align-items:center;border:1px solid #34495f;border-radius:99px;padding:5px 9px;background:#0a1420}
.plb-ai-review-legend .is-ai{color:#8fb2d4}
.plb-ai-review-legend .is-edited{color:#27dff2;border-color:rgba(39,223,242,.4)}
.plb-ai-review-legend .is-pending{color:#e2bb73;border-color:rgba(226,187,115,.45)}
.plb-ai-field-state{display:block;font-size:10px;line-height:1.35}
.plb-ai-field-state.is-ai{color:#8fb2d4}
.plb-ai-field-state.is-edited{color:#27dff2}
.plb-ai-field-state.is-pending{color:#e2bb73}
.plb-ai-field.is-corrected input,.plb-ai-field.is-corrected textarea{border-color:rgba(39,223,242,.65)}
.plb-ai-corrections{margin:0 14px 12px;padding:9px 11px;border-left:3px solid #27dff2;background:rgba(39,223,242,.06);color:#a9dce5;font-size:12px;line-height:1.5}
.plb-ai-confirm-field{align-self:flex-start;padding:5px 9px;border:1px solid rgba(226,187,115,.55);border-radius:7px;background:rgba(226,187,115,.08);color:#f0c878;font-size:10px;font-weight:700;cursor:pointer}
.plb-ai-confirm-field:hover{background:rgba(226,187,115,.16)}
.plb-ai-review-check input:disabled{opacity:.35;cursor:not-allowed}
.plb-ai-review-check:has(input:disabled){color:#e2bb73}


/* Pilotbook Paper Logbook - consistent top action buttons */
.paper-archive-top-actions a,
.paper-lab-nav a,
.paper-lab-top .paper-lab-nav a,
.paper-archive-empty a.primary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 20px;
  border:1px solid #263b50;
  border-radius:22px;
  background:rgba(8,17,29,.72);
  color:#eaf1fb;
  font-size:15px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  transition:border-color .16s ease,background .16s ease,transform .16s ease;
}
.paper-archive-top-actions a:hover,
.paper-lab-nav a:hover,
.paper-archive-empty a.primary:hover {
  border-color:#27dff2;
  background:rgba(39,223,242,.07);
  color:#27dff2;
  transform:translateY(-1px);
}
.paper-archive-top-actions,
.paper-lab-nav {gap:10px}
@media(max-width:640px){
 .paper-archive-top-actions,.paper-lab-nav{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .paper-archive-top-actions a,.paper-lab-nav a{width:100%;padding:11px 12px;font-size:13px}
}
