:root{--bg:#f6f7fb;--card:#fff;--text:#1f2937;--muted:#6b7280;--line:#e5e7eb;--green:#dcfce7;--yellow:#fef9c3;--red:#fee2e2}*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text)}a{color:#174ea6;text-decoration:none}.top{display:flex;justify-content:space-between;align-items:center;padding:1rem;background:#111827;color:white}.brand{font-weight:700;color:white}.top nav{display:flex;gap:.75rem;align-items:center}.top a{color:white}.top form{display:inline}.container{max-width:1200px;margin:auto;padding:1rem}.card,.tile{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:1rem;box-shadow:0 1px 4px #0001}.auth{max-width:420px;margin:4rem auto}.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}.tile h2{font-size:1.1rem}.car-img{height:150px;border-radius:10px;background:#eef2ff;display:grid;place-items:center;font-size:4rem;overflow:hidden}.car-img img{width:100%;height:100%;object-fit:cover}.actions{display:flex;gap:.5rem;flex-wrap:wrap;margin:.75rem 0}.button,button{border:1px solid var(--line);background:white;border-radius:8px;padding:.55rem .8rem;cursor:pointer}.primary{background:#174ea6!important;color:white!important}.danger{background:#991b1b;color:white}.muted{color:var(--muted)}.alerts{padding-left:1.2rem}.green{background:var(--green)}.yellow{background:var(--yellow)}.red{background:var(--red)}label{display:flex;flex-direction:column;gap:.25rem}input,textarea,select{padding:.65rem;border:1px solid #cbd5e1;border-radius:8px;width:100%}textarea{min-height:90px}.gridform{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.inline{display:flex;gap:.5rem;align-items:end;flex-wrap:wrap}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:.55rem;border-bottom:1px solid var(--line);text-align:left}.wide{margin-top:1rem}.hidden{display:none}.timeline{overflow-x:auto}.bar{height:28px;min-width:900px;background:repeating-linear-gradient(90deg,#e5e7eb,#e5e7eb 1px,transparent 1px,transparent 60px);border:1px solid var(--line);position:relative;margin:.4rem 0 1rem}.marker{position:absolute;top:0;width:18px;height:100%;border:2px solid #111}@media(max-width:720px){.top,.top nav{display:block}.top nav>*{margin:.4rem}.container{padding:.6rem}th,td{font-size:.85rem}.actions{display:grid}.button,button{width:100%}}
.span2{grid-column:1/-1}.notice{border:1px solid var(--line);border-radius:10px;background:#f8fafc;padding:.75rem}.compact{gap:.25rem;margin:0}.compact .button,.compact button{padding:.35rem .5rem;font-size:.85rem}.pill{display:inline-block;border-radius:999px;padding:.2rem .5rem;border:1px solid #0002;font-size:.75rem;font-weight:700}.pill.green{background:var(--green)}.pill.yellow{background:var(--yellow)}.pill.red{background:var(--red)}.tight{margin:.25rem 0;padding-left:1rem}.tight li{margin:.1rem 0}small{color:var(--muted)}
.profile-panel{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:1rem;align-items:start}.car-img.profile{height:220px}.image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.75rem;margin-top:.75rem}.thumb{border:1px solid var(--line);border-radius:10px;padding:.5rem;margin:0;background:#fff}.thumb.selected{outline:3px solid #174ea6}.thumb img{width:100%;height:110px;object-fit:cover;border-radius:8px}.thumb figcaption{font-size:.8rem;color:var(--muted);overflow-wrap:anywhere;margin:.35rem 0}@media(max-width:720px){.profile-panel{grid-template-columns:1fr}.car-img.profile{height:180px}}
.form-section{border:1px solid var(--line);border-radius:12px;padding:1rem;margin:0;background:#f8fafc}.form-section legend{font-weight:700;padding:0 .4rem}.nested-grid{margin-top:.25rem}.status-profile-row td{background:transparent}.status-pill{display:inline-block;border-radius:999px;padding:.22rem .55rem;border:1px solid #0002;font-size:.78rem;font-weight:700}.color-profile-row{border:1px solid var(--line);border-radius:10px;padding:.75rem;background:#fff}.color-picker-line{display:flex;align-items:center;gap:.75rem}.color-picker-line input[type=color]{width:4rem;min-height:2.4rem;padding:.15rem}.color-swatch-label{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--muted)}
.color-preview-box{display:inline-block;width:4.5rem;height:2.5rem;min-width:4.5rem;border:2px solid #374151;border-radius:8px;box-shadow:inset 0 0 0 1px #fff}.color-profile-row .color-picker-line{margin-top:.35rem}.manage-images .thumb img{height:150px}.readonly-images .thumb img{height:110px}
.settings-form table input,.settings-form table select{min-width:8rem}.settings-stoplight-preview{display:inline-grid;place-items:center;width:4.8rem;height:4.8rem;border-radius:999px;border:3px solid #374151;font-size:.78rem;font-weight:800;text-align:center;line-height:1.05;padding:.25rem;color:#111827;box-shadow:0 1px 3px #0002}.stoplight-settings-row.add-row{background:#f8fafc}.compact-color-line{gap:.45rem}.checkbox-label{display:flex;flex-direction:row;align-items:center;gap:.4rem}.checkbox-label input{width:auto}.stoplight-circle{display:inline-grid;place-items:center;width:4.5rem;height:4.5rem;border-radius:999px;border:4px solid #374151;box-shadow:0 2px 5px #0002;text-align:center;font-weight:800;font-size:.78rem;line-height:1.05;padding:.3rem;color:#111827}.stoplight-circle span{display:block}.image-thumb-with-label{position:relative}.profile-image-badge{position:absolute;top:.6rem;left:.6rem;z-index:2;background:#111827;color:#fff;border:2px solid #fff;border-radius:999px;padding:.28rem .55rem;font-size:.78rem;font-weight:800;box-shadow:0 2px 6px #0005}
/* v016 stoplight settings layout */
.stoplight-settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;align-items:stretch}.stoplight-settings-card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:1rem;box-shadow:0 1px 4px #0001;display:flex;flex-direction:column;gap:.85rem}.stoplight-add-card{background:#f8fafc;border-style:dashed}.stoplight-settings-preview-wrap{display:flex;justify-content:center}.stoplight-settings-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem}.stoplight-settings-card input,.stoplight-settings-card select{min-width:0}.stoplight-card-actions{margin-top:auto;display:flex;justify-content:flex-end}.settings-stoplight-preview{display:inline-grid;place-items:center;width:5.5rem;height:5.5rem;border-radius:999px;border:4px solid #374151;font-size:.82rem;font-weight:900;text-align:center;line-height:1.05;padding:.35rem;box-shadow:0 2px 6px #0002;overflow:hidden}.settings-form .stoplight-settings-grid{overflow:visible}.settings-form table input,.settings-form table select{min-width:0}@media(max-width:720px){.stoplight-settings-grid{grid-template-columns:1fr}.stoplight-card-actions{justify-content:stretch}.stoplight-card-actions button{width:100%}}
/* v017 dashboard/action-image/subordinate-action updates */
.basic-info-layout{display:grid;grid-template-columns:minmax(220px,320px) 1fr;gap:1.25rem;align-items:start}.vehicle-summary-box{border:2px solid var(--line);border-radius:16px;background:#f8fafc;padding:1.25rem;box-shadow:0 2px 8px #0001}.vehicle-summary-row{display:flex;flex-direction:column;gap:.25rem;padding:.75rem 0;border-bottom:1px solid var(--line)}.vehicle-summary-row:last-child{border-bottom:0}.vehicle-summary-row span{font-size:1rem;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.04em}.vehicle-summary-row strong{font-size:1.85rem;line-height:1.1}.vehicle-images-panel{min-width:0}.section-title-row{display:flex;justify-content:space-between;align-items:center;gap:.75rem;flex-wrap:wrap}.action-thumb-row{display:flex;gap:.4rem;flex-wrap:wrap;align-items:center}.action-thumb{width:58px;height:58px;object-fit:cover;border-radius:8px;border:1px solid #cbd5e1;box-shadow:0 3px 8px #0004;background:white}.action-image-grid .thumb img,.action-image-card img{height:150px}.subordinate-action-picker{align-items:end}.selected-sub-actions{display:grid;gap:.5rem;margin-top:.75rem}.selected-sub-action-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;border:1px solid var(--line);border-radius:10px;background:#fff;padding:.55rem .75rem}.selected-sub-action-row span{font-weight:700}.selected-sub-action-row button{width:auto;padding:.35rem .6rem}@media(max-width:720px){.basic-info-layout{grid-template-columns:1fr}.vehicle-summary-row strong{font-size:1.45rem}.section-title-row{display:block}.selected-sub-action-row{align-items:stretch;flex-direction:column}.selected-sub-action-row button{width:100%}}
/* v018 layout, thumbnails, and action-library matrix updates */
.stoplight-settings-grid{display:flex;flex-direction:column;gap:1rem;width:100%;}
.stoplight-settings-card{border:2px solid #94a3b8;border-radius:16px;background:#fff;padding:1rem;box-shadow:0 2px 8px #0002;display:grid;grid-template-columns:auto 1fr auto;gap:1rem;align-items:center;}
.stoplight-add-card{background:#f8fafc;border:2px dashed #64748b;}
.stoplight-settings-preview-wrap{justify-content:flex-start;}
.stoplight-settings-fields{display:flex;flex-wrap:wrap;gap:.85rem 1rem;align-items:end;width:100%;}
.stoplight-settings-fields label{flex:1 1 11rem;min-width:10rem;}
.stoplight-settings-fields label:first-child{flex:2 1 16rem;}
.stoplight-card-actions{align-self:end;white-space:nowrap;}
@media(max-width:900px){.stoplight-settings-card{grid-template-columns:1fr}.stoplight-settings-preview-wrap{justify-content:center}.stoplight-card-actions{white-space:normal}.stoplight-card-actions button{width:100%}}

.basic-info-layout{grid-template-columns:minmax(210px,280px) minmax(0,1fr);gap:1.5rem;}
.vehicle-summary-box{border:2px solid #94a3b8;background:#f8fafc;}
.vehicle-summary-row{display:grid;grid-template-columns:1fr;gap:.35rem;padding:.9rem 0;}
.vehicle-summary-row span{display:block;font-size:1rem;color:#475569;font-weight:800;text-transform:uppercase;letter-spacing:.05em;margin-bottom:.15rem;}
.vehicle-summary-row strong{display:block;font-size:1.9rem;line-height:1.1;color:#111827;overflow-wrap:anywhere;}
.vehicle-images-panel .image-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));}
.vehicle-images-panel .thumb img{height:120px;}

.current-mileage-note{display:block;font-weight:700;color:#174ea6;margin-top:.25rem;}
.action-thumb{width:120px;height:90px;object-fit:cover;border-radius:10px;border:1px solid #cbd5e1;box-shadow:0 4px 12px #0004;background:#fff;}
.action-thumb-row{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;max-width:340px;}
.action-image-card img,.action-image-grid .thumb img{height:120px;object-fit:cover;}

.library-matrix th,.library-matrix td{vertical-align:top;}
.library-matrix th:not(:first-child):not(:last-child){min-width:9rem;}
.library-car-cell{text-align:center;min-width:8.5rem;}
.library-car-checkbox{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:.35rem;margin-bottom:.35rem;}
.library-car-checkbox input{width:auto;}
.master-car-ring{display:inline-grid;place-items:center;width:2.35rem;height:2.35rem;border:3px solid var(--line);border-radius:999px;background:var(--card);margin:auto;}
.master-car-ring input{width:1rem;height:1rem;}
.master-label{font-size:.75rem;font-weight:900;color:var(--link);margin-top:.2rem;text-transform:uppercase;letter-spacing:.04em;}
.compact-button{font-size:.75rem;padding:.28rem .45rem;width:auto!important;}
@media(max-width:720px){.basic-info-layout{grid-template-columns:1fr}.action-thumb{width:90px;height:70px}.library-matrix th,.library-matrix td{font-size:.8rem}}

/* v019 image manager, upload previews, version labels, and library buttons */
.brand-wrap{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.app-version,.page-version,.app-footer{font-size:.78rem;color:var(--muted)}.app-version{border:1px solid var(--line);border-radius:999px;padding:.15rem .5rem;background:#fff}.page-version{text-align:right;margin:.25rem 0 .75rem}.app-footer{display:flex;justify-content:space-between;gap:1rem;padding:1rem 2rem;border-top:1px solid var(--line);margin-top:2rem;background:#f8fafc}
.stoplight-settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:1rem;align-items:stretch}.stoplight-settings-card{border:2px solid #cbd5e1;border-radius:16px;background:#fff;box-shadow:0 4px 14px #0001;padding:1rem;display:flex;flex-wrap:wrap;gap:1rem;align-items:center}.stoplight-settings-preview-wrap{flex:0 0 auto}.stoplight-settings-fields{flex:1 1 620px;display:flex;flex-wrap:wrap;gap:.8rem 1rem;align-items:end}.stoplight-settings-fields label{flex:1 1 10rem;min-width:10rem}.stoplight-settings-fields label:first-child{flex-basis:14rem}.stoplight-card-actions{flex:0 1 auto;margin-left:auto}.color-picker-line{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.color-swatch-label{font-family:monospace;font-size:.8rem;color:var(--muted)}.stoplight-add-card{background:#f8fafc;border-style:dashed}
.drop-zone{border:3px dashed #94a3b8;border-radius:16px;background:#f8fafc;min-height:9rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;text-align:center;padding:1rem;transition:.15s}.drop-zone.dragover{border-color:#174ea6;background:#e0ecff}.drop-zone input[type=file]{margin-top:.75rem}.image-upload-options{display:flex;flex-wrap:wrap;gap:.75rem 1rem;align-items:center;margin-top:1rem}.image-upload-options label{display:flex;flex-direction:row;align-items:center;gap:.35rem}.image-upload-options input[type=number]{width:7rem}.image-upload-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.75rem;margin-top:1rem}.upload-preview-card img{height:110px;object-fit:cover}.upload-preview-card button{width:100%}.image-settings-card{border:2px solid #cbd5e1;background:#fff}.image-manager-table td,.image-manager-table th{vertical-align:top}.image-manager-thumb{width:150px;max-height:150px;object-fit:cover;border-radius:10px;border:1px solid #cbd5e1;box-shadow:0 4px 12px #0004;background:#fff}.alert-inline{color:#991b1b;font-weight:700}.orphan-row{background:#fff7ed}.action-thumb{width:72px;height:72px}.action-image-card figcaption,.upload-preview-card figcaption{font-size:.78rem;color:var(--muted);overflow-wrap:anywhere}.basic-info-layout{grid-template-columns:minmax(220px,300px) minmax(0,1fr)}.vehicle-summary-box{align-self:start}.vehicle-summary-row{display:grid;grid-template-columns:1fr;gap:.35rem}.vehicle-summary-row span{display:block}.vehicle-summary-row strong{display:block}@media(max-width:760px){.stoplight-settings-card{display:block}.stoplight-settings-fields{margin-top:.75rem}.stoplight-card-actions{margin-top:.75rem}.image-manager-thumb{width:110px;max-height:110px}.app-footer{padding:1rem;flex-direction:column}.page-version{text-align:left}}
/* v020 storage manager, image-manager selection, and dashboard refinements */
.tile-image-wrap{position:relative}.storage-badge{position:absolute;left:50%;bottom:.45rem;transform:translateX(-50%);background:#111827;color:white;border:2px solid #fff;border-radius:999px;padding:.18rem .55rem;font-size:.72rem;font-weight:900;box-shadow:0 2px 8px #0008;letter-spacing:.02em}.dashboard-alert-row,.highlight-due{outline:4px solid #f97316;border-radius:16px;box-shadow:0 0 0 4px #fed7aa;background:#fff7ed!important}.vehicle-left-column{display:grid;gap:1rem;align-content:start}.storage-summary-box{background:#f0f9ff;border-color:#38bdf8}.storage-summary-box h3{margin:.2rem 0}.storage-inline-card,.storage-slot-card{border:2px solid #cbd5e1;border-radius:16px;padding:1rem;margin:1rem 0;background:#fff;box-shadow:0 2px 8px #0001}.storage-slot-card{background:#f8fafc}.image-manager-preview-cell{position:relative}.optimized-badge,.as-is-badge{position:absolute;left:.45rem;bottom:.45rem;border-radius:999px;padding:.18rem .5rem;font-size:.72rem;font-weight:900;color:#fff;background:#065f46;box-shadow:0 2px 6px #0006}.as-is-badge{background:#92400e}.image-manager-table input[type=checkbox]{width:1.2rem;height:1.2rem}.image-manager-table small{display:block;margin-top:.25rem}.image-upload-form .drop-zone input[type=file]{display:block;background:white}.library-functions-card{margin-top:1rem}@media(max-width:760px){.vehicle-left-column{grid-template-columns:1fr}.storage-badge{font-size:.68rem}.storage-inline-card,.storage-slot-card{padding:.75rem}}
/* v021 image manager, storage manager, and settings refinements */
.image-manager-control-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;margin:1rem 0}.image-manager-control-box{border:2px solid #cbd5e1;border-radius:16px;background:#f8fafc;padding:1rem}.image-manager-control-box h3{margin-top:0}.image-search-form{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:1rem;align-items:end;margin:1rem 0}.image-select-actions{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;margin:.75rem 0}.image-actions-row td{padding-top:.25rem;padding-bottom:1rem;background:#f8fafc}.image-main-row td{border-bottom:0}.image-manager-wrap{overflow-x:auto}.image-manager-table th,.image-manager-table td{vertical-align:top}.as-is-badge{background:#c2410c;color:#fff;border-radius:999px}.image-upload-mode-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,2fr);gap:1rem;margin-top:1rem}.image-upload-mode-box{border:2px solid #cbd5e1;border-radius:14px;background:#fff;padding:1rem}.image-upload-mode-box h3{margin-top:0}.profile-first-option{margin-top:1rem}.mileage-car-preview .car-img.small{width:170px;height:120px;font-size:3rem}.mileage-car-preview img{width:100%;height:100%;object-fit:cover}.storage-status-in-use{background:#dcfce7!important;border-color:#16a34a!important}.storage-status-in-storage{background:#fee2e2!important;border-color:#dc2626!important}.storage-compact-form{gap:.55rem .8rem}.storage-compact-form label{gap:.15rem}.storage-compact-form input,.storage-compact-form select,.storage-compact-form textarea{padding:.45rem .55rem}.compact-fieldset{padding:.6rem}.compact-fieldset p{margin:.2rem 0}.storage-inline-card,.storage-slot-card{padding:.75rem!important;margin:.65rem 0!important}.compact-settings-card{padding:.55rem!important;gap:.45rem!important}.compact-settings-card .stoplight-settings-fields{gap:.45rem .65rem}.compact-settings-card label{gap:.12rem}.compact-settings-card input,.compact-settings-card select{padding:.45rem .55rem}.settings-form .notice.compact-notice{padding:.5rem}.notification-settings-list{display:grid;gap:.75rem}.storage-display-card{min-height:0}.storage-display-settings .stoplight-settings-card,.stoplight-settings-grid .stoplight-settings-card{padding:.65rem}.storage-display-settings .stoplight-settings-fields,.stoplight-settings-grid .stoplight-settings-fields{gap:.45rem .65rem}.storage-display-settings input,.storage-display-settings select,.stoplight-settings-grid input,.stoplight-settings-grid select{padding:.45rem .55rem}.storage-display-settings label,.stoplight-settings-grid label{gap:.12rem}@media(max-width:760px){.image-search-form{grid-template-columns:1fr}.image-upload-mode-grid{grid-template-columns:1fr}.image-manager-control-grid{grid-template-columns:1fr}}

/* v022 settings compaction and storage-history SQL fix support */
.settings-form{align-items:start!important;}
.settings-form h2{margin:.35rem 0 .1rem!important;}
.settings-form p{margin:.25rem 0!important;}
.settings-form .notice{padding:.45rem .65rem!important;margin:0!important;}
.settings-form .stoplight-settings-grid,
.settings-form .storage-display-settings,
.settings-form .notification-settings-list{display:flex!important;flex-direction:column!important;gap:.5rem!important;width:100%!important;align-items:stretch!important;}
.settings-form .stoplight-settings-card,
.settings-form .storage-display-card,
.settings-form .notification-card{min-height:0!important;height:auto!important;padding:.5rem .65rem!important;margin:0!important;gap:.45rem .65rem!important;display:flex!important;flex-wrap:wrap!important;align-items:flex-end!important;align-content:flex-start!important;border-radius:12px!important;}
.settings-form .stoplight-settings-preview-wrap{flex:0 0 auto!important;align-self:center!important;justify-content:flex-start!important;}
.settings-form .settings-stoplight-preview{width:3.5rem!important;height:3.5rem!important;min-width:3.5rem!important;border-width:2px!important;font-size:.62rem!important;line-height:1!important;padding:.2rem!important;}
.settings-form .stoplight-settings-fields{flex:1 1 34rem!important;display:flex!important;flex-wrap:wrap!important;gap:.35rem .55rem!important;align-items:flex-end!important;margin:0!important;width:auto!important;}
.settings-form .stoplight-settings-fields label{flex:1 1 9rem!important;min-width:8rem!important;margin:0!important;gap:.08rem!important;line-height:1.15!important;}
.settings-form .stoplight-settings-fields label:first-child{flex:1.4 1 12rem!important;}
.settings-form .notification-card .stoplight-settings-fields label{flex:1 1 12rem!important;min-width:10rem!important;}
.settings-form .storage-display-card .stoplight-settings-fields label{flex:1 1 12rem!important;min-width:10rem!important;}
.settings-form .stoplight-settings-fields input,
.settings-form .stoplight-settings-fields select,
.settings-form .stoplight-settings-fields textarea{padding:.38rem .5rem!important;min-height:0!important;line-height:1.15!important;}
.settings-form .color-picker-line{gap:.35rem!important;}
.settings-form .color-preview-box{width:2.8rem!important;height:1.6rem!important;min-width:2.8rem!important;border-width:1px!important;border-radius:6px!important;}
.settings-form .color-swatch-label{font-size:.72rem!important;}
.settings-form .stoplight-card-actions{flex:0 0 auto!important;align-self:flex-end!important;margin-left:auto!important;margin-top:0!important;white-space:nowrap!important;}
.settings-form .stoplight-card-actions button{padding:.42rem .7rem!important;}
.settings-form .compact-settings-card{padding:.5rem .65rem!important;}
@media(max-width:760px){
  .settings-form .stoplight-settings-card,
  .settings-form .storage-display-card,
  .settings-form .notification-card{display:block!important;}
  .settings-form .stoplight-card-actions{margin-top:.45rem!important;}
  .settings-form .stoplight-card-actions button{width:100%!important;}
}

/* v024 storage slot validation and inline errors */
.field-error{margin-top:.25rem;color:#991b1b;font-size:.9rem;font-weight:700;line-height:1.25}.field-error.form-error{background:#fee2e2;border:2px solid #dc2626;border-radius:10px;padding:.55rem .7rem}.has-error input,.has-error select,.has-error textarea,.compact-fieldset.has-error{border-color:#dc2626!important;box-shadow:0 0 0 3px #fecaca}.has-form-errors{border-color:#dc2626!important;background:#fff7f7!important}.checkbox-label{display:flex;flex-direction:row;align-items:center;gap:.4rem}.checkbox-label input{width:auto}.storage-slot-card .muted{margin:.2rem 0 .45rem}.storage-slot-card .actions{align-items:center}.storage-slot-card .form-section{margin-top:.25rem}

/* v025 storage slot form clarity */
.storage-slot-new-card{
  background:#eef6ff!important;
  border:3px solid #2563eb!important;
  box-shadow:0 3px 12px #1d4ed822!important;
}
.storage-slot-existing-card{
  background:#ffffff!important;
  border:2px solid #cbd5e1!important;
}
.storage-slot-form-header{
  border-bottom:1px solid #cbd5e1;
  padding-bottom:.45rem;
  margin-bottom:.15rem;
}
.storage-slot-form-header h3,
.storage-slot-list-title{
  margin:.15rem 0 .25rem 0;
}
.storage-slot-list-title{
  margin-top:1.1rem;
  padding-top:.75rem;
  border-top:2px solid #e2e8f0;
}
.storage-slot-new-card.has-form-errors,
.storage-slot-existing-card.has-form-errors{
  border-color:#dc2626!important;
  background:#fff7f7!important;
}

/* v026 storage current-status and payment-history layout refinements */
.current-storage-card{border:2px solid #cbd5e1;}
.current-storage-vehicle{display:flex;align-items:center;gap:1rem;margin:.35rem 0 1rem;padding:.75rem;border:2px solid #e2e8f0;border-radius:14px;background:#f8fafc;}
.current-storage-thumb{width:96px;height:72px;border-radius:12px;background:#eef2ff;display:grid;place-items:center;font-size:2.4rem;overflow:hidden;border:1px solid #cbd5e1;flex:0 0 auto;}
.current-storage-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.current-storage-title{font-size:1.45rem;font-weight:900;line-height:1.15;color:#111827;}
.storage-current-form{margin-top:.5rem;}
.storage-payment-add-card{background:#f0f7ff;border:3px solid #2563eb;border-radius:16px;padding:1rem;margin:.75rem 0 1.2rem;box-shadow:0 3px 12px #1d4ed822;}
.storage-payment-add-card h3{margin:.1rem 0 .25rem;}
.storage-payment-list-title{margin:1.1rem 0 .5rem;padding-top:.75rem;border-top:2px solid #e2e8f0;}
@media(max-width:760px){.current-storage-vehicle{align-items:flex-start}.current-storage-title{font-size:1.2rem}.current-storage-thumb{width:82px;height:62px}.storage-payment-add-card{padding:.75rem}}

/* v027 storage manager status/profile and duplicate-slot UI refinements */
.current-storage-card.current-storage-in-use{
  border-color:#16a34a;
  background:linear-gradient(180deg,#f0fdf4 0%,#ffffff 55%);
  box-shadow:0 0 0 3px #bbf7d0;
}
.current-storage-card.current-storage-in-storage{
  border-color:#dc2626;
  background:linear-gradient(180deg,#fef2f2 0%,#ffffff 55%);
  box-shadow:0 0 0 3px #fecaca;
}
.current-storage-title-block{display:grid;gap:.35rem;align-content:center;}
.current-storage-status-label{
  display:inline-flex;
  width:max-content;
  border-radius:999px;
  padding:.35rem .85rem;
  font-size:1.05rem;
  font-weight:900;
  letter-spacing:.02em;
  border:3px solid currentColor;
  box-shadow:0 2px 8px #0001;
}
.current-storage-status-label.status-use{background:#dcfce7;color:#166534;}
.current-storage-status-label.status-storage{background:#fee2e2;color:#991b1b;}
.current-storage-card .current-storage-thumb{background:#fff;}
.current-storage-card .current-storage-thumb img{image-rendering:auto;}

/* v028 settings page vertical compaction fix
   The settings form was using the global gridform layout, which allowed unrelated
   items in the same implicit grid row to stretch to the height of the tallest item.
   These overrides make Settings sections flow normally and keep each definition card
   only as tall as its content. */
.settings-form-compact{
  display:block!important;
  padding:.75rem!important;
}
.settings-form-compact > h2{
  margin:.7rem 0 .25rem!important;
  padding-top:.25rem!important;
  line-height:1.15!important;
}
.settings-form-compact > h2:first-of-type{
  margin-top:0!important;
  padding-top:0!important;
}
.settings-form-compact .notice{
  padding:.45rem .65rem!important;
  margin:.25rem 0 .55rem!important;
  line-height:1.25!important;
}
.settings-form-compact .notice p{
  margin:.2rem 0!important;
}
.settings-form-compact fieldset,
.settings-form-compact .form-section{
  padding:.55rem .7rem!important;
  margin:.45rem 0!important;
}
.settings-form-compact legend{
  padding:0 .25rem!important;
  line-height:1.1!important;
}
.settings-form-compact label{
  margin:0!important;
  gap:.12rem!important;
  line-height:1.15!important;
}
.settings-form-compact input,
.settings-form-compact select,
.settings-form-compact textarea{
  padding:.38rem .5rem!important;
  min-height:0!important;
  line-height:1.15!important;
}
.settings-form-compact textarea{
  min-height:3.8rem!important;
}
.settings-form-compact .stoplight-settings-grid,
.settings-form-compact .storage-display-settings,
.settings-form-compact .notification-settings-list{
  display:flex!important;
  flex-direction:column!important;
  gap:.45rem!important;
  margin:.35rem 0 .75rem!important;
  width:100%!important;
}
.settings-form-compact .stoplight-settings-card,
.settings-form-compact .storage-display-card,
.settings-form-compact .notification-card,
.settings-form-compact .compact-settings-card{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-end!important;
  align-content:flex-start!important;
  min-height:0!important;
  height:auto!important;
  padding:.5rem .65rem!important;
  margin:0!important;
  gap:.4rem .6rem!important;
  border-radius:12px!important;
}
.settings-form-compact .stoplight-settings-fields{
  flex:1 1 34rem!important;
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-end!important;
  gap:.35rem .55rem!important;
  margin:0!important;
  width:auto!important;
}
.settings-form-compact .stoplight-settings-fields label{
  flex:1 1 9rem!important;
  min-width:8rem!important;
}
.settings-form-compact .stoplight-settings-fields label:first-child{
  flex:1.35 1 12rem!important;
}
.settings-form-compact .stoplight-settings-preview-wrap{
  flex:0 0 auto!important;
  align-self:center!important;
  justify-content:flex-start!important;
}
.settings-form-compact .settings-stoplight-preview{
  width:3.25rem!important;
  height:3.25rem!important;
  min-width:3.25rem!important;
  border-width:2px!important;
  font-size:.58rem!important;
  line-height:1!important;
  padding:.16rem!important;
}
.settings-form-compact .stoplight-card-actions{
  flex:0 0 auto!important;
  margin:0 0 0 auto!important;
  align-self:flex-end!important;
  white-space:nowrap!important;
}
.settings-form-compact .stoplight-card-actions button,
.settings-form-compact button,
.settings-form-compact .button{
  padding:.38rem .65rem!important;
  line-height:1.1!important;
}
.settings-form-compact .color-picker-line{
  gap:.3rem!important;
}
.settings-form-compact .color-picker-line input[type=color]{
  width:2.8rem!important;
  height:1.7rem!important;
  min-height:1.7rem!important;
  padding:.08rem!important;
}
.settings-form-compact .color-preview-box{
  width:2.5rem!important;
  height:1.45rem!important;
  min-width:2.5rem!important;
  border-width:1px!important;
  border-radius:6px!important;
}
.settings-form-compact .color-swatch-label{
  font-size:.72rem!important;
}
.settings-form-compact .image-settings-card .nested-grid,
.settings-form-compact .nested-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  gap:.45rem .65rem!important;
}
.settings-form-compact > label{
  display:block!important;
  margin:.35rem 0!important;
  max-width:40rem!important;
}
.settings-form-compact > .actions{
  margin:.65rem 0 0!important;
}
@media(max-width:760px){
  .settings-form-compact .stoplight-settings-card,
  .settings-form-compact .storage-display-card,
  .settings-form-compact .notification-card,
  .settings-form-compact .compact-settings-card{display:block!important;}
  .settings-form-compact .stoplight-settings-fields{display:grid!important;grid-template-columns:1fr!important;margin:.45rem 0!important;}
  .settings-form-compact .stoplight-card-actions{margin-top:.45rem!important;}
  .settings-form-compact .stoplight-card-actions button{width:100%!important;}
}

/* v029 Stoplight Color Coding compact layout
   Keep each stoplight definition inside a visible box, but do not let a single
   row stretch vertically across the Settings page.  The header line and the
   detail fields wrap horizontally only when the available width requires it. */
.settings-form-compact .stoplight-compact-list{
  display:flex!important;
  flex-direction:column!important;
  gap:.45rem!important;
  align-items:stretch!important;
  margin:.35rem 0 .7rem!important;
}
.settings-form-compact .stoplight-compact-list .stoplight-definition-card{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:auto auto!important;
  gap:.35rem .55rem!important;
  min-height:0!important;
  height:auto!important;
  padding:.45rem .6rem!important;
  border:2px solid #cbd5e1!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 4px #0001!important;
  align-items:start!important;
  align-content:start!important;
}
.settings-form-compact .stoplight-compact-list .stoplight-add-card{
  background:#f8fafc!important;
  border-style:dashed!important;
}
.settings-form-compact .stoplight-definition-head{
  display:grid!important;
  grid-template-columns:auto minmax(14rem,1fr) auto!important;
  gap:.4rem .6rem!important;
  align-items:end!important;
  width:100%!important;
}
.settings-form-compact .stoplight-definition-fields{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(9.5rem,1fr))!important;
  gap:.32rem .55rem!important;
  align-items:end!important;
  width:100%!important;
  margin:0!important;
}
.settings-form-compact .stoplight-definition-head label,
.settings-form-compact .stoplight-definition-fields label{
  display:flex!important;
  flex-direction:column!important;
  gap:.08rem!important;
  min-width:0!important;
  margin:0!important;
  font-size:.9rem!important;
  line-height:1.1!important;
}
.settings-form-compact .stoplight-definition-head input,
.settings-form-compact .stoplight-definition-fields input,
.settings-form-compact .stoplight-definition-fields select{
  padding:.32rem .45rem!important;
  line-height:1.1!important;
}
.settings-form-compact .stoplight-definition-card .settings-stoplight-preview{
  width:2.8rem!important;
  height:2.8rem!important;
  min-width:2.8rem!important;
  border-width:2px!important;
  font-size:.52rem!important;
  line-height:1!important;
  padding:.12rem!important;
  align-self:end!important;
}
.settings-form-compact .stoplight-definition-card .color-picker-line{
  display:grid!important;
  grid-template-columns:auto auto 1fr!important;
  gap:.25rem!important;
  align-items:center!important;
}
.settings-form-compact .stoplight-definition-card .color-preview-box{
  width:2rem!important;
  min-width:2rem!important;
  height:1.25rem!important;
  border-radius:5px!important;
}
.settings-form-compact .stoplight-definition-card input[type=color]{
  width:2.35rem!important;
  height:1.45rem!important;
  min-height:1.45rem!important;
  padding:.05rem!important;
}
.settings-form-compact .stoplight-definition-card .color-swatch-label{
  font-size:.68rem!important;
  overflow-wrap:anywhere!important;
}
.settings-form-compact .stoplight-definition-head .stoplight-card-actions{
  margin:0!important;
  align-self:end!important;
}
.settings-form-compact .stoplight-definition-head .stoplight-card-actions button{
  padding:.34rem .62rem!important;
  white-space:nowrap!important;
}
@media(max-width:760px){
  .settings-form-compact .stoplight-definition-head{
    grid-template-columns:auto 1fr!important;
  }
  .settings-form-compact .stoplight-definition-head .stoplight-card-actions{
    grid-column:1 / -1!important;
    width:100%!important;
  }
  .settings-form-compact .stoplight-definition-head .stoplight-card-actions button{
    width:100%!important;
  }
}


/* v030 Settings compact layout for Storage Manager and Notification Actions
   Match the v029 Stoplight card behavior: each entry is a compact visible box,
   fields flow horizontally across usable width, and only wrap when necessary. */
.settings-form-compact .storage-display-settings,
.settings-form-compact .notification-settings-list{
  display:flex!important;
  flex-direction:column!important;
  gap:.45rem!important;
  align-items:stretch!important;
  margin:.35rem 0 .7rem!important;
  width:100%!important;
}
.settings-form-compact .storage-display-settings .storage-display-card,
.settings-form-compact .notification-settings-list .notification-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto!important;
  gap:.35rem .6rem!important;
  align-items:end!important;
  align-content:start!important;
  min-height:0!important;
  height:auto!important;
  padding:.45rem .6rem!important;
  margin:0!important;
  border:2px solid #cbd5e1!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 4px #0001!important;
}
.settings-form-compact .storage-display-settings .storage-display-card.stoplight-add-card,
.settings-form-compact .notification-settings-list .notification-card.stoplight-add-card{
  background:#f8fafc!important;
  border-style:dashed!important;
}
.settings-form-compact .storage-display-settings .storage-display-card .stoplight-settings-fields,
.settings-form-compact .notification-settings-list .notification-card .stoplight-settings-fields{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(10.5rem,1fr))!important;
  gap:.32rem .55rem!important;
  align-items:end!important;
  width:100%!important;
  margin:0!important;
  flex:none!important;
}
.settings-form-compact .storage-display-settings .storage-display-card .stoplight-settings-fields label,
.settings-form-compact .notification-settings-list .notification-card .stoplight-settings-fields label{
  display:flex!important;
  flex-direction:column!important;
  gap:.08rem!important;
  min-width:0!important;
  margin:0!important;
  font-size:.9rem!important;
  line-height:1.1!important;
  flex:none!important;
}
.settings-form-compact .storage-display-settings .storage-display-card .stoplight-settings-fields label:first-child,
.settings-form-compact .notification-settings-list .notification-card .stoplight-settings-fields label:first-child{
  flex:none!important;
}
.settings-form-compact .storage-display-settings .storage-display-card input,
.settings-form-compact .storage-display-settings .storage-display-card select,
.settings-form-compact .notification-settings-list .notification-card input,
.settings-form-compact .notification-settings-list .notification-card select{
  padding:.32rem .45rem!important;
  line-height:1.1!important;
  min-height:0!important;
}
.settings-form-compact .storage-display-settings .storage-display-card .stoplight-card-actions,
.settings-form-compact .notification-settings-list .notification-card .stoplight-card-actions{
  margin:0!important;
  align-self:end!important;
  justify-self:end!important;
  white-space:nowrap!important;
}
.settings-form-compact .storage-display-settings .storage-display-card .stoplight-card-actions button,
.settings-form-compact .notification-settings-list .notification-card .stoplight-card-actions button{
  padding:.34rem .62rem!important;
  white-space:nowrap!important;
}
@media(max-width:760px){
  .settings-form-compact .storage-display-settings .storage-display-card,
  .settings-form-compact .notification-settings-list .notification-card{
    grid-template-columns:1fr!important;
  }
  .settings-form-compact .storage-display-settings .storage-display-card .stoplight-card-actions,
  .settings-form-compact .notification-settings-list .notification-card .stoplight-card-actions{
    width:100%!important;
    justify-self:stretch!important;
  }
  .settings-form-compact .storage-display-settings .storage-display-card .stoplight-card-actions button,
  .settings-form-compact .notification-settings-list .notification-card .stoplight-card-actions button{
    width:100%!important;
  }
}

/* v031 Storage Manager navigation and visual section polish */
.section-emoji{
  display:inline-block;
  font-size:1.55em;
  line-height:1;
  vertical-align:-.12em;
  margin-right:.35rem;
}
.storage-location-list{
  display:flex;
  flex-direction:column;
  gap:.75rem;
  margin:.5rem 0 1rem;
}
.storage-location-record,
.storage-location-add-card{
  border:2px solid #cbd5e1;
  border-radius:14px;
  padding:.75rem;
  background:#fff;
  box-shadow:0 1px 4px #0001;
  margin:.5rem 0;
}
.storage-location-add-card{
  background:#f8fafc;
  border-style:dashed;
}
.storage-location-record-title h3{
  margin:.05rem 0 .2rem;
  font-size:1.15rem;
}
.storage-location-record-title p{
  margin:.1rem 0 .4rem;
}
.file-upload-row{
  display:flex;
  gap:.5rem;
  align-items:center;
  flex-wrap:wrap;
  margin-top:.35rem;
}
.file-upload-row input[type=file]{
  flex:1 1 16rem;
  min-width:14rem;
}
.storage-car-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(15rem,1fr));
  gap:1rem;
}
.storage-car-card{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.75rem;
  border:1px solid #d1d5db;
  border-radius:14px;
  background:#fff;
  text-decoration:none;
  color:inherit;
  box-shadow:0 1px 4px #0001;
}
.storage-car-card:hover{border-color:#93c5fd;box-shadow:0 2px 8px #0002;}
.storage-car-card-image{
  width:4.5rem;
  height:3.4rem;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:10px;
  background:#f3f4f6;
  font-size:2rem;
  flex:0 0 auto;
}
.storage-car-card-image img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.storage-list-status{
  display:inline-block;
  margin-top:.35rem;
  padding:.18rem .55rem;
  border-radius:999px;
  font-size:.8rem;
  font-weight:700;
}
.status-storage{background:#fee2e2;color:#991b1b;}
.status-use{background:#dcfce7;color:#166534;}

/* v032 action-library vehicle filter controls and image manager shortcut */
.library-car-heading{vertical-align:top;text-align:center;min-width:10rem;}
.library-car-filter-control{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:.35rem;min-height:0;}
.library-car-filter-control .button{white-space:nowrap;padding:.35rem .65rem;font-size:.85rem;}
.library-filter-banner{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;background:#eff6ff;border:1px solid #bfdbfe;border-radius:999px;padding:.35rem .65rem;color:#1e3a8a;}
.manage-images + .actions,.section-title-row .button{flex-shrink:0;}
@media(max-width:760px){.library-car-filter-control{align-items:flex-start}.library-filter-banner{border-radius:12px}}

/* v033 Managed Maintenance Event Library refinements */
.managed-event-library-matrix th:first-child{min-width:18rem;}
.managed-event-library-matrix .template-fields-cell{min-width:18rem;}
.inline-label{display:block;margin:.35rem 0;font-weight:600;}
.inline-label input,.inline-label textarea{margin-top:.15rem;width:100%;}
.compact-field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));gap:.45rem;margin-bottom:.5rem;}
.compact-field-grid label{font-size:.85rem;font-weight:600;}
.compact-field-grid input,.compact-field-grid select{width:100%;padding:.35rem .45rem;}
.compact-dl{display:grid;grid-template-columns:max-content 1fr;gap:.18rem .45rem;margin:.25rem 0 0;font-size:.85rem;}
.compact-dl dt{font-weight:700;color:#374151;}
.compact-dl dd{margin:0;}
.library-master-summary{min-width:10rem;}
.master-badge{display:inline-block;padding:.15rem .45rem;border-radius:999px;background:#dbeafe;border:2px solid #1d4ed8;color:#1e3a8a;font-weight:700;margin-bottom:.25rem;}
.library-vehicle-details{margin-top:.4rem;text-align:left;border-top:1px solid #d1d5db;padding-top:.35rem;font-size:.78rem;line-height:1.25;}
.small-text{font-size:.85rem;}
@media(max-width:900px){.managed-event-library-matrix th:first-child,.managed-event-library-matrix .template-fields-cell{min-width:14rem}.library-vehicle-details{font-size:.75rem}}

/* v034 managed event library subordinate action selector */
.section-emoji{font-size:1.25em;line-height:1;vertical-align:-0.08em;margin-right:.25rem}.managed-template-add-card h2{display:flex;align-items:center;gap:.35rem}.template-subordinate-actions-box{border:2px solid #cbd5e1;border-radius:14px;background:#f8fafc;padding:1rem}.template-subordinate-actions-box legend{font-weight:900;padding:0 .4rem}.template-subordinate-controls{display:flex;gap:.75rem;align-items:flex-end;flex-wrap:wrap}.template-subordinate-controls label{min-width:min(26rem,100%)}.template-subordinate-controls.is-disabled{opacity:.55;filter:grayscale(.2)}.disabled-note{display:block;margin-top:.35rem}.template-subaction-cell{min-width:14rem}.template-subaction-list{margin:.25rem 0;padding-left:1.1rem}.template-subaction-list li{margin:.15rem 0}.compact-list{line-height:1.25}.compact-title-row{justify-content:space-between;align-items:flex-start}.compact-title-row p{margin:.15rem 0;max-width:56rem}@media(max-width:760px){.template-subordinate-controls{display:block}.template-subordinate-controls button{margin-top:.5rem;width:100%}.template-subordinate-actions-box{padding:.75rem}}

/* v035 managed maintenance event library refinements */
.emoji-green-plus{
  display:inline-grid;
  place-items:center;
  color:#16a34a;
  background:#dcfce7;
  border:2px solid #16a34a;
  border-radius:999px;
  width:1.65em;
  height:1.65em;
  font-size:1.2em;
  line-height:1;
  box-shadow:0 2px 6px #16a34a33;
}
.interval-unit-row{display:grid;grid-template-columns:minmax(7rem,1fr) minmax(8rem,auto);gap:.45rem;align-items:center;}
.managed-template-card-list{display:grid;gap:1rem;margin-top:1rem;}
.managed-template-existing-card{display:block;background:#fff;border:3px solid #cbd5e1;border-radius:18px;padding:1rem;box-shadow:0 3px 12px #00000010;}
.managed-template-existing-card:hover{border-color:#94a3b8;box-shadow:0 5px 16px #00000014;}
.managed-template-card-header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;border-bottom:1px solid #e2e8f0;padding-bottom:.65rem;margin-bottom:.75rem;}
.managed-template-card-header h3{margin:.1rem 0 .2rem;font-size:1.25rem;}
.managed-template-fields-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.65rem .8rem;align-items:start;margin-bottom:.75rem;}
.managed-template-fields-grid textarea{min-height:4.6rem;}
.managed-template-summary-row{display:flex;flex-wrap:wrap;gap:.55rem 1rem;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:.6rem .75rem;margin:.65rem 0;}
.template-subaction-card{border:1px solid #cbd5e1;background:#f8fafc;border-radius:12px;padding:.65rem .75rem;margin:.65rem 0;}
.compact-master-badge{display:inline-block;font-size:.72rem;border-radius:999px;background:#dbeafe;color:#1d4ed8;border:1px solid #60a5fa;padding:.12rem .45rem;margin-right:.25rem;font-weight:900;}
.template-card-scroll{overflow-x:scroll;overflow-y:hidden;scrollbar-gutter:stable both-edges;border:2px solid #e2e8f0;border-radius:12px;background:#ffffff;padding:.55rem;margin-top:.75rem;}
.template-card-scroll::-webkit-scrollbar{height:14px;}
.template-card-scroll::-webkit-scrollbar-track{background:#e5e7eb;border-radius:999px;}
.template-card-scroll::-webkit-scrollbar-thumb{background:#64748b;border-radius:999px;border:3px solid #e5e7eb;}
.managed-event-template-card-matrix{min-width:max-content;border-collapse:separate;border-spacing:0;}
.managed-event-template-card-matrix th,.managed-event-template-card-matrix td{min-width:13rem;border:1px solid #e5e7eb;vertical-align:top;background:#fff;}
.managed-event-template-card-matrix th{background:#f1f5f9;font-weight:900;position:sticky;top:0;}
.managed-template-card-actions{margin:0;white-space:nowrap;}
@media(max-width:760px){.managed-template-card-header{display:block}.managed-template-card-actions{margin-top:.5rem}.interval-unit-row{grid-template-columns:1fr}.managed-template-existing-card{padding:.75rem}.template-card-scroll{padding:.4rem}}

/* v036 Managed Maintenance Event Library refinements */
.emoji-green-plus{
  color:#ffffff;
  background:linear-gradient(135deg,#16a34a,#22c55e);
  border-color:#15803d;
  font-weight:900;
  text-shadow:0 1px 1px #0005;
}
.managed-template-existing-card{
  border:4px solid #94a3b8;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 6px 18px #0f172a1a;
  margin-bottom:1.15rem;
  position:relative;
}
.managed-template-existing-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:.45rem;
  border-radius:14px 0 0 14px;
  background:#2563eb;
}
.managed-template-fields-grid{
  grid-template-columns:minmax(14rem,1fr) minmax(18rem,2fr);
}
.managed-template-interval-edit-row{
  display:grid;
  grid-template-columns:minmax(10rem,1fr) minmax(16rem,1.4fr) minmax(13rem,1fr);
  gap:.65rem .8rem;
  align-items:start;
  border:2px solid #dbeafe;
  border-radius:12px;
  background:#eff6ff;
  padding:.65rem;
}
.managed-template-interval-edit-row label{margin:0;}
.managed-template-interval-edit-row input,
.managed-template-interval-edit-row select{width:100%;}
.managed-template-summary-row{
  border:2px solid #cbd5e1;
  background:#f1f5f9;
  font-weight:600;
}
@media(max-width:900px){
  .managed-template-fields-grid{grid-template-columns:1fr;}
  .managed-template-interval-edit-row{grid-template-columns:1fr;}
}

/* v037 corrected: explicit one-row interval editor for Existing Managed Event Templates */
.managed-template-main-fields{
  display:grid;
  grid-template-columns:minmax(14rem,1fr) minmax(22rem,2fr);
  gap:.65rem .8rem;
  align-items:start;
  margin-bottom:.65rem;
}
.managed-template-interval-strip{
  display:grid !important;
  grid-template-columns:minmax(12rem,1fr) minmax(18rem,1.45fr) minmax(14rem,1fr) !important;
  gap:.65rem .8rem;
  align-items:start;
  border:3px solid #93c5fd;
  border-radius:14px;
  background:#eff6ff;
  padding:.75rem;
  margin:.6rem 0 .85rem;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-gutter:stable both-edges;
}
.managed-template-inline-field{
  min-width:12rem;
  display:flex;
  flex-direction:column;
  gap:.28rem;
}
.managed-template-inline-field > label{
  margin:0;
  font-weight:900;
  color:#1e3a8a;
}
.managed-template-inline-field input,
.managed-template-inline-field select{width:100%;}
.managed-template-time-inline-field{min-width:18rem;}
.managed-template-interval-strip::-webkit-scrollbar{height:12px;}
.managed-template-interval-strip::-webkit-scrollbar-track{background:#dbeafe;border-radius:999px;}
.managed-template-interval-strip::-webkit-scrollbar-thumb{background:#2563eb;border-radius:999px;border:3px solid #dbeafe;}
@media(max-width:900px){
  .managed-template-main-fields{grid-template-columns:1fr;}
  .managed-template-interval-strip{grid-template-columns:minmax(12rem,1fr) minmax(18rem,1.45fr) minmax(14rem,1fr) !important;}
}


/* v037.2 Managed Maintenance Event Library enforced layout */
.managed-template-card-list-v372{display:flex;flex-direction:column;gap:1.35rem;margin-top:1rem;}
.managed-template-existing-card-v372{display:block;border:4px solid #2563eb !important;border-radius:18px !important;background:#fff !important;box-shadow:0 8px 24px rgba(15,23,42,.18) !important;padding:1rem 1rem 1.15rem !important;margin:0 0 1.25rem !important;position:relative !important;overflow:hidden;}
.managed-template-existing-card-v372::before{content:"";position:absolute;left:0;top:0;bottom:0;width:.55rem;background:#16a34a;}
.managed-template-card-header-v372{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;border-bottom:2px solid #dbeafe;padding:.1rem 0 .7rem .3rem;margin-bottom:.8rem;}
.managed-template-main-fields-v372{display:grid;grid-template-columns:minmax(15rem,1fr) minmax(24rem,2.4fr);gap:.7rem .85rem;margin:.65rem 0;}
.managed-template-interval-row-v372{display:grid !important;grid-template-columns:minmax(10rem,1fr) minmax(18rem,1.5fr) minmax(13rem,1fr) !important;gap:.75rem;align-items:start;border:3px solid #93c5fd;border-radius:14px;background:#eff6ff;padding:.8rem;margin:.75rem 0;overflow-x:auto;scrollbar-gutter:stable both-edges;}
.managed-template-interval-field-v372{min-width:10rem;display:flex;flex-direction:column;gap:.3rem;}
.managed-template-time-pair-v372{display:grid;grid-template-columns:minmax(7rem,1fr) minmax(8rem,auto);gap:.45rem;align-items:center;}
.template-card-scroll-v372{overflow-x:scroll;overflow-y:hidden;scrollbar-gutter:stable both-edges;border:2px solid #cbd5e1;border-radius:12px;background:#fff;padding:.55rem;margin-top:.75rem;}
.green-add-emoji-v372{color:#16a34a !important;background:#dcfce7;border:2px solid #16a34a;border-radius:999px;padding:.1rem .35rem;display:inline-grid;place-items:center;font-size:1.3em;line-height:1;margin-right:.35rem;}
@media(max-width:900px){.managed-template-main-fields-v372{grid-template-columns:1fr}.managed-template-interval-row-v372{grid-template-columns:minmax(10rem,1fr) minmax(18rem,1.5fr) minmax(13rem,1fr) !important}.managed-template-card-header-v372{display:block}}

/* v038 Managed Maintenance Event Library subordinate action editor */
.existing-template-subaction-editor{border:2px solid #94a3b8;background:#f8fafc;border-radius:14px;padding:.75rem;margin:.75rem 0;}
.existing-template-subaction-editor .section-title-row{align-items:flex-start;gap:.75rem;}
.existing-sub-action-picker{display:flex;flex-wrap:wrap;align-items:end;gap:.65rem;margin:.5rem 0;}
.existing-sub-action-picker label{flex:1 1 18rem;margin:0;}
.selected-sub-actions{display:flex;flex-direction:column;gap:.4rem;margin-top:.55rem;}
.selected-sub-action-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;border:1px solid #cbd5e1;background:#fff;border-radius:10px;padding:.45rem .55rem;}
.selected-sub-action-row span{font-weight:700;}
.selected-sub-action-row .remove-sub-action{background:#991b1b;color:#fff;border-color:#991b1b;}

/* v039 Managed Maintenance Event Library filters and subordinate-action scoping */
.managed-template-filter-bar {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(16rem, 2fr) auto;
    gap: .75rem;
    align-items: end;
    border: 2px solid #dbeafe;
    border-radius: 14px;
    background: #f8fbff;
    padding: .85rem;
    margin: .75rem 0 1rem;
}
.managed-template-filter-actions { align-self: end; }
.managed-template-filter-note {
    margin: .35rem 0 1rem;
    padding: .45rem .65rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
}
.managed-template-action-scope-notice {
    margin: .45rem 0 .65rem;
    padding: .5rem .65rem;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
}
@media (max-width: 850px) {
    .managed-template-filter-bar { grid-template-columns: 1fr; }
}

/* v041 Managed Maintenance Event Library collapse/expand controls */
.managed-template-existing-toolbar{align-items:center;gap:1rem;flex-wrap:wrap;}
.managed-template-view-actions{margin-left:auto;display:flex;gap:.5rem;align-items:center;flex-wrap:wrap;}
.managed-template-view-actions .button.active{background:#1d4ed8;color:#fff;border-color:#1d4ed8;}
.managed-template-collapsed-table-wrap{border:3px solid #2563eb;border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.14);padding:.75rem;margin-top:1rem;overflow-x:auto;}
.managed-template-collapsed-table{width:100%;border-collapse:separate;border-spacing:0 .45rem;min-width:34rem;}
.managed-template-collapsed-table th{text-align:left;font-size:.95rem;color:#334155;padding:.35rem .6rem;border-bottom:2px solid #dbeafe;}
.managed-template-collapsed-table td{background:#f8fafc;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;padding:.55rem .6rem;vertical-align:middle;}
.managed-template-collapsed-table td:first-child{border-left:1px solid #e2e8f0;border-radius:10px 0 0 10px;}
.managed-template-collapsed-table td:last-child{border-right:1px solid #e2e8f0;border-radius:0 10px 10px 0;text-align:right;}
#managedTemplatesExpandedView[hidden],#managedTemplatesCollapsedView[hidden],.managed-template-existing-card[hidden]{display:none !important;}
@media(max-width:760px){.managed-template-view-actions{margin-left:0;width:100%;}.managed-template-view-actions .button{flex:1 1 auto;text-align:center;}}

.vehicle-images-top-actions { margin-bottom: .55rem; justify-content: flex-start; }

/* v044 file/PDF thumbnail icon handling */
.action-thumb[src$=".svg"],
.image-manager-thumb[src$=".svg"],
.thumb img[src$=".svg"]{
    object-fit:contain !important;
    padding:.35rem;
    background:#fff;
}
.image-manager-thumb[src$=".svg"]{box-sizing:border-box;}

/* v045 Maintenance Log sort/search controls and reliable date-order UI */
.action-log-controls{
  display:flex;
  align-items:flex-end;
  gap:.75rem 1rem;
  flex-wrap:wrap;
  width:100%;
}
.action-log-sort-control{
  flex:0 0 15rem;
  min-width:13rem;
}
.action-log-search-controls{
  display:flex;
  align-items:flex-end;
  gap:.5rem;
  flex:1 1 34rem;
  min-width:20rem;
}
.action-log-search-controls label{
  flex:1 1 22rem;
  min-width:16rem;
}
.action-log-search-controls .button,
.action-log-search-controls button{
  flex:0 0 auto;
  white-space:nowrap;
}
.action-log-filter-note{
  margin:.35rem 0 .65rem;
}
@media(max-width:760px){
  .action-log-controls,
  .action-log-search-controls{
    display:grid;
    grid-template-columns:1fr;
    min-width:0;
  }
  .action-log-sort-control,
  .action-log-search-controls label,
  .action-log-search-controls .button,
  .action-log-search-controls button{
    width:100%;
    min-width:0;
  }
}


/* v046 Attach Existing Files and Upload Files frames */
.attach-existing-section{
  background:#f8fafc;
}
.attach-existing-file-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(18rem,1fr));
  gap:.75rem;
  margin:.75rem 0;
}
.attach-existing-file-option{
  display:grid;
  grid-template-columns:auto 4.5rem minmax(0,1fr);
  align-items:center;
  gap:.65rem;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  padding:.55rem;
  cursor:pointer;
}
.attach-existing-file-option input[type=checkbox]{
  width:1.15rem;
  height:1.15rem;
}
.attach-existing-file-option img{
  width:4.5rem;
  height:4.5rem;
  object-fit:cover;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
}
.attach-existing-file-option img[src$=".svg"]{
  object-fit:contain;
  padding:.35rem;
}
.attach-existing-file-meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:.2rem;
}
.attach-existing-file-meta strong,
.attach-existing-file-meta small{
  overflow-wrap:anywhere;
}
.attach-existing-actions{
  margin:.5rem 0 1rem;
}
.attached-linked-files{
  border-top:1px solid #cbd5e1;
  margin-top:1rem;
  padding-top:1rem;
}
.attached-linked-files h3{
  margin:.1rem 0 .65rem;
}
.attached-linked-files .action-image-card button{
  width:100%;
}
@media(max-width:760px){
  .attach-existing-file-list{grid-template-columns:1fr;}
  .attach-existing-file-option{grid-template-columns:auto 3.75rem minmax(0,1fr);}
  .attach-existing-file-option img{width:3.75rem;height:3.75rem;}
}

/* v049 Image Manager duplicate-file tools */
.image-manager-dedupe-box{border-color:#f59e0b;background:#fffbeb;}
.image-manager-notice{margin:1rem 0;border-color:#93c5fd;background:#eff6ff;font-weight:700;}
#dedupeSelectedImages:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.3);}
.image-manager-table .pill{margin-top:.25rem;}


/* v051 Maintenance Log compact row layout */
.maintenance-action-log-table th,
.maintenance-action-log-table td{
  vertical-align:top;
}
.action-log-main-row td{
  border-bottom:0;
}
.action-log-sub-row td{
  padding-top:.15rem;
  border-bottom:2px solid #cbd5e1;
}
.action-log-due-line{
  display:block;
  margin-top:.25rem;
  color:#475569;
  font-size:.92em;
  font-weight:650;
  white-space:nowrap;
}
.action-log-due-line.is-overdue{
  color:#b91c1c;
  font-weight:900;
}
.action-log-sub-row-content{
  display:flex;
  align-items:center;
  gap:.65rem 1.1rem;
  flex-wrap:wrap;
}
.action-log-row-actions{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  flex-wrap:wrap;
}
.action-log-row-actions form{
  display:inline-flex;
  margin:0;
}
.action-log-row-actions .button,
.action-log-row-actions button{
  padding:.42rem .7rem;
}
@media(max-width:760px){
  .action-log-sub-row-content,
  .action-log-row-actions{
    display:grid;
    grid-template-columns:1fr;
    align-items:stretch;
  }
}


/* v052 Maintenance Log emphasis, empty values, and overdue due fields */
.maintenance-action-log-table .status-pill{
  border:0;
  border-radius:999px;
  padding:.32rem .7rem;
  font-weight:900;
  letter-spacing:.01em;
  box-shadow:0 1px 3px #0002;
}
.maintenance-action-log-table .status-pill-in-progress{
  background:#2563eb !important;
  color:#fff !important;
}
.maintenance-action-log-table .status-pill-to-do{
  background:#facc15 !important;
  color:#111827 !important;
}
.maintenance-action-log-table .status-pill-completed{
  background:#16a34a !important;
  color:#fff !important;
}
.maintenance-action-log-table .action-log-field-value.is-empty,
.maintenance-action-log-table .action-log-labelled-field.is-empty,
.maintenance-action-log-table .action-log-labelled-field.is-empty .field-label,
.maintenance-action-log-table .action-log-labelled-field.is-empty .field-value{
  color:#94a3b8 !important;
  font-weight:600;
}
.maintenance-action-log-table .action-log-labelled-field.is-overdue,
.maintenance-action-log-table .action-log-labelled-field.is-overdue .field-label,
.maintenance-action-log-table .action-log-labelled-field.is-overdue .field-value,
.maintenance-action-log-table .action-log-due-line.is-overdue,
.maintenance-action-log-table .action-log-due-line.is-overdue .field-label,
.maintenance-action-log-table .action-log-due-line.is-overdue .field-value{
  color:#b91c1c !important;
  font-weight:900;
}
.maintenance-action-log-table .field-label{
  font-weight:800;
}
.maintenance-action-log-table .field-value{
  font-weight:inherit;
}


/* v053 Maintenance Log dashboard and due/warranty emphasis */
.success-button{
  background:#16a34a !important;
  color:#fff !important;
  border-color:#15803d !important;
  font-weight:800;
}
.success-button:hover{background:#15803d !important;}
.recent-maintenance-note{
  margin:.35rem 0 .65rem;
  font-weight:700;
}
.recent-maintenance-bottom-actions{
  margin-top:.85rem;
}
.action-log-due-block{
  display:block;
  margin-top:.25rem;
}
.action-log-current-line{
  display:block;
  margin-top:.12rem;
  color:#475569;
  font-size:.9em;
  font-weight:650;
  white-space:nowrap;
}
.maintenance-action-log-table .action-log-due-block.is-empty,
.maintenance-action-log-table .action-log-due-block.is-empty .action-log-current-line,
.maintenance-action-log-table .action-log-due-block.is-empty .field-label,
.maintenance-action-log-table .action-log-due-block.is-empty .field-value{
  color:#94a3b8 !important;
  font-weight:600;
}
.maintenance-action-log-table .action-log-due-block.is-overdue,
.maintenance-action-log-table .action-log-due-block.is-overdue .action-log-current-line,
.maintenance-action-log-table .action-log-due-block.is-overdue .field-label,
.maintenance-action-log-table .action-log-due-block.is-overdue .field-value,
.maintenance-action-log-table .warranty-expiration-field.is-overdue,
.maintenance-action-log-table .warranty-expiration-field.is-overdue .action-log-current-line,
.maintenance-action-log-table .warranty-expiration-field.is-overdue .field-label,
.maintenance-action-log-table .warranty-expiration-field.is-overdue .field-value{
  color:#b91c1c !important;
  font-weight:900;
}
.warranty-expiration-field{
  display:inline-block;
}


/* v055 button icons and Maintenance Log form refinements */
.button-icon{
  display:inline-block;
  margin-right:.35rem;
  line-height:1;
  vertical-align:-.08em;
}
.button .button-icon,
button .button-icon,
.top nav .button-icon{
  margin-right:.35rem;
}


/* v056 car Dashboard basic information layout */
.car-dashboard-basic-info-layout{
  display:grid !important;
  grid-template-columns:minmax(260px,380px) minmax(0,1fr) !important;
  gap:1.25rem !important;
  align-items:start;
}
.vehicle-overview-box{
  grid-column:1 / -1;
  width:100%;
}
.vehicle-overview-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1.25rem 2rem;
}
.vehicle-overview-column{
  min-width:0;
}
.registration-summary-row small{
  display:block;
  margin-top:.15rem;
  color:#475569;
  font-weight:800;
  font-size:.95rem;
}
.car-dashboard-basic-info-layout .vehicle-images-panel{
  margin-top:.25rem;
}
.car-dashboard-basic-info-layout .vehicle-images-top-actions{
  margin-top:.2rem;
}
@media(max-width:760px){
  .car-dashboard-basic-info-layout,
  .vehicle-overview-grid{
    grid-template-columns:1fr !important;
  }
}

/* v057 Attach Existing Files filter and Managed Maintenance timeline */
.attach-existing-filter-bar{
  display:flex;
  align-items:end;
  gap:.65rem;
  flex-wrap:wrap;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:12px;
  padding:.65rem;
  margin:.75rem 0 .35rem;
}
.attach-existing-filter-bar label{
  flex:1 1 18rem;
  margin:0;
}
.attach-existing-filter-note{margin:.25rem 0 .75rem;}
.attach-existing-no-results{font-weight:800;color:#b45309;}
.attach-existing-file-option[hidden]{display:none !important;}

.managed-maintenance-top-actions{align-items:center;gap:.5rem;}
.managed-list-view[hidden],
.managed-timeline-view[hidden]{display:none !important;}
.managed-timeline-view{
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  padding:.85rem;
  margin-top:.85rem;
}
.managed-timeline-view.is-fullscreen{min-height:calc(100vh - 11rem);}
.managed-timeline-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
  margin-bottom:.75rem;
}
.timeline-help{flex:1 1 100%;margin:.1rem 0 0;}
.managed-timeline-stage{
  display:grid;
  grid-template-columns:minmax(13rem,18rem) minmax(0,1fr);
  border:1px solid #94a3b8;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.timeline-left-column{
  position:relative;
  z-index:2;
  background:#e2e8f0;
  border-right:1px solid #94a3b8;
}
.timeline-label-header{
  height:4.8rem;
  display:flex;
  align-items:center;
  padding:.5rem .75rem;
  font-weight:900;
  border-bottom:1px solid #94a3b8;
  background:#cbd5e1;
}
.timeline-label-row{
  min-height:3.2rem;
  padding:.45rem .75rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:.15rem;
  border-bottom:1px solid #cbd5e1;
}
.timeline-label-row small{font-weight:800;color:#475569;}
.timeline-scroll{
  overflow:auto;
  cursor:grab;
  touch-action:pan-x pan-y pinch-zoom;
}
.timeline-scroll.is-dragging{cursor:grabbing;user-select:none;}
.timeline-canvas{
  --timeline-cell-width:34px;
  --timeline-cols:1;
  position:relative;
  min-width:calc(var(--timeline-cols) * var(--timeline-cell-width));
}
.timeline-date-header,
.timeline-row-grid{
  display:grid;
  grid-template-columns:repeat(var(--timeline-cols), var(--timeline-cell-width));
  position:relative;
}
.timeline-year-month-row{height:2.3rem;}
.timeline-day-row{height:2.5rem;}
.timeline-scale-cell{
  border-right:1px solid #cbd5e1;
  border-bottom:1px solid #94a3b8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  font-weight:800;
  background:#f1f5f9;
  color:#1e293b;
  overflow:hidden;
  white-space:nowrap;
}
.timeline-month-cell{background:#dbeafe;color:#1e3a8a;}
.timeline-mileage-header .timeline-scale-cell{font-size:.72rem;}
.timeline-row-grid{
  min-height:3.2rem;
  border-bottom:1px solid #cbd5e1;
  background:repeating-linear-gradient(to right, #fff 0, #fff calc(var(--timeline-cell-width) - 1px), #e2e8f0 calc(var(--timeline-cell-width) - 1px), #e2e8f0 var(--timeline-cell-width));
}
.timeline-due-marker{
  align-self:center;
  justify-self:stretch;
  margin:0 .1rem;
  border-radius:7px;
  background:#dc2626;
  color:#fff;
  font-size:.68rem;
  font-weight:900;
  text-align:center;
  padding:.25rem .1rem;
  z-index:4;
  box-shadow:0 1px 4px #0003;
}
.timeline-overdue-span{
  align-self:stretch;
  background:rgba(250,204,21,.58);
  border-left:2px solid #ca8a04;
  border-right:2px solid #ca8a04;
  z-index:2;
}
.timeline-today-line{
  position:absolute;
  top:0;
  bottom:0;
  width:0;
  border-left:3px solid #111827;
  z-index:5;
  pointer-events:none;
}
.timeline-fullscreen-page{
  width:calc(100vw - 2rem);
  margin-left:calc(50% - 50vw + 1rem);
  max-width:none;
}
.timeline-fullscreen-title-row{align-items:center;gap:1rem;}
@media(max-width:760px){
  .managed-timeline-stage{grid-template-columns:minmax(10rem,42vw) minmax(0,1fr);}
  .timeline-label-header{height:4.8rem;}
  .timeline-label-row{min-height:3.6rem;}
  .timeline-row-grid{min-height:3.6rem;}
}

/* v058 Managed Maintenance timeline dark graph, Hide N/A, and sticky graph header */
.managed-timeline-view{
  border-color:#334155;
  background:#020617;
  color:#e5e7eb;
  box-shadow:0 1px 10px rgba(0,0,0,.28) inset;
}
.managed-timeline-view .timeline-help,
.managed-timeline-view .muted{color:#cbd5e1;}
.managed-timeline-view .button{
  border-color:#475569;
  background:#111827;
  color:#f8fafc;
}
.managed-timeline-view .button.primary{
  background:#2563eb!important;
  border-color:#60a5fa!important;
  color:#fff!important;
}
.managed-timeline-toolbar{
  position:sticky;
  top:.5rem;
  z-index:40;
  background:#020617;
  border:1px solid #1f2937;
  border-radius:12px;
  padding:.5rem;
  box-shadow:0 8px 18px rgba(0,0,0,.35);
}
.managed-timeline-stage{
  border-color:#334155;
  background:#020617;
  overflow:visible;
}
.timeline-left-column{
  background:#0f172a;
  border-right-color:#334155;
}
.timeline-label-header{
  position:sticky;
  top:4.35rem;
  z-index:35;
  background:#111827;
  color:#f8fafc;
  border-bottom-color:#334155;
  justify-content:space-between;
  gap:.5rem;
}
.timeline-hide-na-button{
  width:auto;
  white-space:nowrap;
  padding:.35rem .55rem;
  font-size:.78rem;
  line-height:1.05;
}
.timeline-label-row{
  background:#0f172a;
  color:#e2e8f0;
  border-bottom-color:#1e293b;
}
.timeline-label-row small{color:#93c5fd;}
.timeline-empty-label small{color:#fbbf24;}
.timeline-scroll{
  overflow-x:auto;
  overflow-y:visible;
  background:#020617;
  scrollbar-color:#475569 #020617;
}
.timeline-canvas{background:#020617;}
.timeline-date-header{
  z-index:30;
}
.timeline-year-month-row{
  position:sticky;
  top:4.35rem;
  z-index:34;
}
.timeline-day-row{
  position:sticky;
  top:6.65rem;
  z-index:33;
}
.timeline-mileage-header{
  top:4.35rem;
}
.timeline-scale-cell{
  border-right-color:#334155;
  border-bottom-color:#475569;
  background:#0f172a;
  color:#e5e7eb;
}
.timeline-month-cell{
  background:#1e3a8a;
  color:#dbeafe;
}
.timeline-row-grid{
  border-bottom-color:#1e293b;
  background:repeating-linear-gradient(to right, #020617 0, #020617 calc(var(--timeline-cell-width) - 1px), #1e293b calc(var(--timeline-cell-width) - 1px), #1e293b var(--timeline-cell-width));
}
.timeline-empty-row{min-height:3.2rem;}
.timeline-due-marker{
  background:#ef4444;
  color:#fff;
  border:1px solid #fecaca;
  box-shadow:0 0 0 1px rgba(127,29,29,.85), 0 1px 8px rgba(239,68,68,.45);
}
.timeline-overdue-span{
  background:rgba(250,204,21,.76);
  border-left-color:#fde047;
  border-right-color:#fde047;
  box-shadow:inset 0 0 0 1px rgba(133,77,14,.45);
}
.timeline-today-line{
  border-left-color:#22d3ee;
  filter:drop-shadow(0 0 5px rgba(34,211,238,.8));
}
@media(max-width:760px){
  .timeline-label-header,
  .timeline-year-month-row,
  .timeline-mileage-header{top:3.7rem;}
  .timeline-day-row{top:6rem;}
}
.managed-timeline-view{--timeline-header-top:5.8rem;}
.timeline-label-header,
.timeline-year-month-row,
.timeline-mileage-header{top:var(--timeline-header-top);}
.timeline-day-row{top:calc(var(--timeline-header-top) + 2.3rem);}

/* v058.2 Managed Maintenance timeline corrections */
.timeline-view-button,
.timeline-view-button-active{
  background:#c026d3!important;
  border-color:#f0abfc!important;
  color:#fff!important;
  font-weight:900;
}
.timeline-view-button .button-icon,
.timeline-view-button-active .button-icon{margin-right:.35rem;}
.managed-timeline-view{
  background:#000!important;
  color:#f8fafc;
  border-color:#1f2937;
}
.managed-timeline-toolbar{
  top:0!important;
  background:#000!important;
  border-color:#334155;
  align-items:flex-end;
}
.timeline-primary-actions,
.timeline-search-actions,
.timeline-zoom-actions{align-items:center;}
.timeline-search-actions input[type="search"]{
  width:min(24rem, 100%);
  min-width:14rem;
  background:#0f172a;
  color:#f8fafc;
  border-color:#475569;
}
.timeline-search-actions input[type="search"]::placeholder{color:#94a3b8;}
.managed-timeline-stage{
  background:#000!important;
  border-color:#334155;
  overflow:visible!important;
}
.timeline-left-column{
  background:#020617!important;
  border-right-color:#475569;
  overflow:hidden;
}
.timeline-label-header{
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem)!important;
  z-index:70!important;
  min-height:4.8rem;
  height:4.8rem;
  background:#020617!important;
  color:#f8fafc;
  box-shadow:0 7px 14px rgba(0,0,0,.65);
}
.timeline-label-title{font-weight:950;white-space:nowrap;}
.timeline-status-filter-label{
  flex:0 0 7.5rem;
  gap:.15rem;
  color:#cbd5e1;
  font-size:.72rem;
  font-weight:800;
}
.timeline-status-filter-label select{
  padding:.35rem .45rem;
  background:#111827;
  color:#f8fafc;
  border-color:#64748b;
}
.timeline-label-rows{will-change:transform;}
.timeline-label-row{background:#020617!important;color:#e5e7eb;}
.timeline-label-row.timeline-status-na strong,
.timeline-label-row.timeline-status-na small{color:#94a3b8!important;}
.timeline-label-row.timeline-status-overdue strong{color:#fca5a5;}
.timeline-label-row.timeline-status-ok strong{color:#86efac;}
.timeline-scroll{
  overflow-x:auto!important;
  overflow-y:visible!important;
  background:#000!important;
  cursor:grab;
}
.timeline-scroll.is-dragging{cursor:grabbing;user-select:none;}
.timeline-canvas{background:#000!important;}
.timeline-date-header{z-index:60!important;}
.timeline-year-month-row,
.timeline-mileage-header{
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem)!important;
  z-index:68!important;
  background:#000!important;
  box-shadow:0 7px 14px rgba(0,0,0,.65);
}
.timeline-day-row{
  top:calc(var(--timeline-toolbar-height, 4rem) + 2.8rem)!important;
  z-index:67!important;
  background:#000!important;
  box-shadow:0 7px 14px rgba(0,0,0,.65);
}
.timeline-scale-cell{
  background:#020617!important;
  color:#f8fafc!important;
  border-color:#334155!important;
}
.timeline-month-cell{
  background:#4c1d95!important;
  color:#f5d0fe!important;
}
.timeline-row-grid{
  background:repeating-linear-gradient(to right, #000 0, #000 calc(var(--timeline-cell-width) - 1px), #1e293b calc(var(--timeline-cell-width) - 1px), #1e293b var(--timeline-cell-width))!important;
  border-bottom-color:#1e293b!important;
}
.timeline-row-grid.timeline-status-na{
  background:repeating-linear-gradient(to right, #030712 0, #030712 calc(var(--timeline-cell-width) - 1px), #111827 calc(var(--timeline-cell-width) - 1px), #111827 var(--timeline-cell-width))!important;
}
.timeline-today-line{
  border-left-color:#22d3ee!important;
  filter:drop-shadow(0 0 7px rgba(34,211,238,.95));
  z-index:58!important;
}
.timeline-today-label{
  position:sticky;
  top:calc(var(--timeline-toolbar-height, 4rem) + .15rem);
  display:inline-block;
  transform:translateX(.3rem);
  background:#0891b2;
  color:#fff;
  border:1px solid #67e8f9;
  border-radius:999px;
  padding:.18rem .5rem;
  font-size:.72rem;
  font-weight:950;
  white-space:nowrap;
  box-shadow:0 2px 10px rgba(0,0,0,.55);
}
.timeline-fullscreen-page{
  width:100vw!important;
  max-width:none!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  margin-top:0!important;
  border-radius:0!important;
  border-left:0!important;
  border-right:0!important;
  background:#000!important;
  color:#f8fafc;
  box-shadow:none!important;
}
.timeline-fullscreen-page .managed-timeline-view{
  border-radius:0!important;
  border-left:0!important;
  border-right:0!important;
  margin-left:-1rem;
  margin-right:-1rem;
}
.timeline-fullscreen-page .timeline-fullscreen-title-row{
  padding:0 1rem;
}
@media(max-width:760px){
  .timeline-search-actions input[type="search"]{min-width:100%;}
  .timeline-label-header{height:5.2rem;min-height:5.2rem;flex-direction:column;align-items:flex-start;}
  .timeline-status-filter-label{width:100%;flex-basis:auto;}
}

/* v059 Timeline sticky-header correction: split header from scrollable graph body */
.managed-timeline-stage{
  display:grid!important;
  grid-template-columns:minmax(13rem,18rem) minmax(0,1fr)!important;
  align-items:start!important;
  overflow:visible!important;
}
.timeline-graph-column{
  min-width:0;
  background:#000;
}
.timeline-header-scroll{
  position:sticky;
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem);
  z-index:92;
  overflow:hidden!important;
  background:#000;
  border-bottom:2px solid #475569;
  box-shadow:0 8px 16px rgba(0,0,0,.78);
}
.timeline-header-canvas{
  --timeline-cell-width:34px;
  --timeline-cols:1;
  --timeline-today-col:1;
  position:relative;
  min-width:calc(var(--timeline-cols) * var(--timeline-cell-width));
  background:#000;
}
.timeline-header-canvas .timeline-date-header,
.timeline-header-canvas .timeline-year-month-row,
.timeline-header-canvas .timeline-day-row,
.timeline-header-canvas .timeline-mileage-header{
  position:relative!important;
  top:auto!important;
  z-index:1!important;
  background:#000!important;
  box-shadow:none!important;
}
.timeline-header-canvas .timeline-year-month-row,
.timeline-header-canvas .timeline-day-row,
.timeline-header-canvas .timeline-mileage-header{
  display:grid!important;
  grid-template-columns:repeat(var(--timeline-cols), var(--timeline-cell-width));
}
.timeline-header-today-label{
  position:absolute;
  top:.22rem;
  left:calc((var(--timeline-today-col, 1) - 1) * var(--timeline-cell-width));
  transform:translateX(.28rem);
  z-index:12;
  display:inline-block;
  background:#0891b2;
  color:#fff;
  border:1px solid #67e8f9;
  border-radius:999px;
  padding:.18rem .5rem;
  font-size:.72rem;
  font-weight:950;
  white-space:nowrap;
  box-shadow:0 2px 10px rgba(0,0,0,.75);
  pointer-events:none;
}
.timeline-left-column{
  overflow:visible!important;
}
.timeline-label-header{
  position:sticky!important;
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem)!important;
  z-index:95!important;
  height:4.8rem!important;
  min-height:4.8rem!important;
  box-shadow:0 8px 16px rgba(0,0,0,.78)!important;
}
.timeline-label-rows{
  transform:none!important;
  will-change:auto!important;
}
.timeline-scroll{
  overflow-x:auto!important;
  overflow-y:visible!important;
  background:#000!important;
  cursor:grab;
}
.timeline-canvas{
  --timeline-cell-width:34px;
  --timeline-cols:1;
  position:relative;
  min-width:calc(var(--timeline-cols) * var(--timeline-cell-width));
  background:#000!important;
}
.timeline-canvas .timeline-date-header,
.timeline-canvas .timeline-year-month-row,
.timeline-canvas .timeline-day-row,
.timeline-canvas .timeline-mileage-header{
  display:none!important;
}
.timeline-today-line{
  top:0!important;
  bottom:0!important;
  z-index:20!important;
}
.timeline-today-line .timeline-today-label{
  display:none!important;
}
.timeline-fullscreen-page .timeline-header-scroll,
.timeline-fullscreen-page .timeline-label-header{
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem)!important;
}
@media(max-width:760px){
  .managed-timeline-stage{grid-template-columns:minmax(10rem,42vw) minmax(0,1fr)!important;}
  .timeline-label-header{height:5.2rem!important;min-height:5.2rem!important;}
}

/* v060 Purchase Info and OE Managed MX Event Scheduling */
.purchase-info-section,
.oe-scheduling-settings-card{
  border:2px solid #dbeafe;
  background:#f8fbff;
}
.purchase-info-grid,
.oe-scheduling-grid{
  margin-top:.6rem;
}
.oe-scheduling-status{
  margin-top:.7rem;
  padding:.55rem .7rem;
  border:1px solid #bfdbfe;
  border-radius:10px;
  background:#eff6ff;
  color:#1e3a8a;
  font-weight:600;
}
.oe-override-checkbox{
  align-self:end;
  padding:.5rem .65rem;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#fff;
}


/* v061 OE scheduling settings links and per-section Save buttons */
.settings-section-save-actions{display:flex;justify-content:flex-end;align-items:center;margin:.35rem 0 1rem;}
.settings-save-button{background:#16a34a!important;border-color:#15803d!important;color:#fff!important;font-weight:700;}
.settings-save-button:hover{background:#15803d!important;}
.oe-scheduling-settings-link{margin:.5rem 0 0;}
.oe-scheduling-settings-link .button{background:#eef2ff;border-color:#bfdbfe;font-weight:700;}

/* v062 OE mileage scheduling and car profile layout */
.basic-information-title-row{
  margin-bottom:.85rem;
}
.basic-information-title-row h2{
  margin:0;
}
.car-profile-current-title{
  display:inline-block;
  margin:.15rem 0 1rem;
  padding:.55rem .85rem;
  border:2px solid #bfdbfe;
  border-radius:999px;
  background:#eff6ff;
  color:#1e3a8a;
  font-weight:900;
  font-size:1.08rem;
}
.oe-scheduling-grid{
  grid-template-columns:minmax(16rem,1fr) minmax(14rem,.8fr);
  align-items:end;
}
.oe-scheduling-status-panel{
  display:block;
}
.oe-scheduling-status-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
}
.oe-scheduling-status-head .button{
  background:#eef2ff;
  border-color:#bfdbfe;
  font-weight:800;
}
.oe-scheduling-status-list{
  margin:.55rem 0 0 1.25rem;
  padding:0;
  display:grid;
  gap:.22rem;
}
.oe-scheduling-status-list li{
  margin:0;
  line-height:1.25;
}
@media(max-width:760px){
  .oe-scheduling-grid{
    grid-template-columns:1fr;
  }
  .oe-scheduling-status-head{
    align-items:stretch;
    flex-direction:column;
  }
  .oe-scheduling-status-head .button{
    width:100%;
    text-align:center;
  }
}

/* v063 Dashboard/Profile polish and timeline row alignment */
.dashboard-page-title{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:.55rem;
}
.dashboard-page-title .dashboard-car-title{
  color:#2563eb;
}
.basic-information-title-row .edit-car-profile-button,
.oe-scheduling-options-button{
  background:#2563eb!important;
  border-color:#1d4ed8!important;
  color:#fff!important;
  font-weight:800;
}
.basic-information-title-row .edit-car-profile-button:hover,
.oe-scheduling-options-button:hover{
  background:#1d4ed8!important;
  color:#fff!important;
}
.managed-timeline-toolbar .timeline-help{display:none!important;}
.managed-timeline-help-outside{
  margin:.2rem 0 .85rem!important;
  padding:.55rem .7rem;
  border:1px solid #334155;
  border-radius:10px;
  background:#020617;
  color:#e5e7eb!important;
}
.timeline-label-row,
.timeline-row-grid{
  box-sizing:border-box;
  min-height:52px!important;
}
.timeline-row-grid{
  align-items:stretch;
}
.timeline-today-line{
  width:6px!important;
  border-left:3px solid #22d3ee!important;
  border-right:1px solid rgba(165,243,252,.95)!important;
  background:rgba(34,211,238,.16)!important;
  box-shadow:0 0 0 1px rgba(34,211,238,.45), 0 0 14px rgba(34,211,238,.95)!important;
  z-index:90!important;
}
.car-profile-header-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  margin-bottom:.9rem;
}
.car-profile-header-row h1{margin:0;}
.car-profile-title-media{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.8rem;
  margin-left:auto;
}
.car-profile-title-media .car-profile-current-title{
  margin:0;
}
.car-profile-header-thumb{
  display:block;
  width:7.5rem;
  height:5rem;
  border:2px solid #bfdbfe;
  border-radius:14px;
  overflow:hidden;
  background:#0f172a;
  box-shadow:0 2px 10px rgba(15,23,42,.18);
}
.car-profile-header-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.oe-scheduling-status-head .oe-scheduling-options-button{
  margin-left:auto;
}
@media(max-width:760px){
  .car-profile-header-row{display:block;}
  .car-profile-title-media{justify-content:flex-start;flex-wrap:wrap;margin-top:.6rem;}
}


/* v063 completion fixes */
.managed-maintenance-timeline-instructions{
  margin:.25rem 0 .85rem;
  padding:.55rem .7rem;
  border:1px solid #334155;
  border-radius:10px;
  background:#020617;
  color:#e5e7eb!important;
  font-weight:700;
}
.managed-timeline-stage{
  --timeline-row-height:52px;
}
.timeline-label-row,
.timeline-row-grid{
  min-height:var(--timeline-row-height)!important;
}
.timeline-label-row{
  border-bottom:1px solid #1e293b!important;
}
.timeline-row-grid{
  border-bottom:1px solid #1e293b!important;
}
.timeline-today-line{
  top:0!important;
  bottom:0!important;
  min-height:100%!important;
  pointer-events:none;
}
.timeline-header-today-label{
  background:#06b6d4!important;
  color:#fff!important;
  border:2px solid #a5f3fc!important;
  box-shadow:0 0 0 2px rgba(14,165,233,.25), 0 0 18px rgba(34,211,238,.85)!important;
}

/* v064 Dashboard managed-maintenance filters, timeline start marker, and profile header layout */
.managed-list-filter-row{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:.65rem;
  margin:.35rem 0 .85rem;
  padding:.65rem .75rem;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#f8fbff;
}
.managed-list-filter-row label{
  display:flex;
  flex-direction:column;
  gap:.2rem;
  font-weight:800;
  color:#1e3a8a;
}
.managed-list-filter-row select,
.managed-list-filter-row input[type="search"]{
  min-width:10rem;
  padding:.48rem .58rem;
}
.managed-list-search-label{flex:1 1 18rem;}
.managed-list-search-label input[type="search"]{width:100%;}
.managed-list-main-row td{border-bottom:0!important;}
.managed-list-actions-row td{
  border-top:0!important;
  padding-top:.25rem!important;
  padding-bottom:.8rem!important;
  background:#f8fafc;
}
.managed-list-row-actions{
  justify-content:flex-start;
  gap:.45rem;
}
.timeline-header-start-label{
  position:absolute;
  top:2.55rem;
  transform:translateX(.28rem);
  z-index:13;
  display:inline-block;
  background:#2563eb;
  color:#fff;
  border:2px solid #bfdbfe;
  border-radius:999px;
  padding:.2rem .55rem;
  font-size:.72rem;
  font-weight:950;
  white-space:nowrap;
  box-shadow:0 0 0 2px rgba(37,99,235,.25), 0 0 18px rgba(59,130,246,.85);
  pointer-events:none;
}
.timeline-start-line{
  grid-row:1 / -1;
  width:7px!important;
  border-left:4px solid #2563eb!important;
  border-right:1px solid rgba(191,219,254,.95)!important;
  background:rgba(37,99,235,.18)!important;
  box-shadow:0 0 0 1px rgba(37,99,235,.5), 0 0 16px rgba(59,130,246,.95)!important;
  z-index:89!important;
  pointer-events:none;
}
.timeline-no-history-span{
  align-self:center;
  height:11px;
  border-radius:999px;
  background:rgba(148,163,184,.72);
  border:1px solid rgba(203,213,225,.9);
  box-shadow:0 0 8px rgba(148,163,184,.35);
  z-index:17;
}
.timeline-header-scroll{overflow:hidden!important;}
.timeline-canvas{overflow:hidden!important;}
.timeline-today-line{
  grid-row:1 / -1;
}
.car-profile-header-row-v64{
  display:block!important;
}
.car-profile-title-media-under{
  justify-content:flex-start!important;
  margin:.45rem 0 1rem!important;
}
@media(max-width:760px){
  .managed-list-filter-row{align-items:stretch;}
  .managed-list-filter-row label,
  .managed-list-filter-row .button{width:100%;}
}


/* v065 Managed Maintenance timeline initial centering and marker clipping */
.timeline-graph-column{
  position:relative;
  overflow:hidden!important;
  isolation:isolate;
}
.timeline-scroll{
  position:relative;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  z-index:1;
}
.timeline-header-scroll{
  position:sticky;
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem);
  z-index:95!important;
  background:#000!important;
  overflow:hidden!important;
}
.timeline-header-canvas{
  position:relative;
  z-index:96;
  background:#000!important;
}
.timeline-canvas{
  position:relative;
  overflow:hidden!important;
  contain:paint;
}
.timeline-today-line,
.timeline-start-line{
  top:0!important;
  bottom:0!important;
  z-index:20!important;
  clip-path:inset(0 0 0 0);
}
.timeline-header-today-label,
.timeline-header-start-label{
  z-index:120!important;
}

/* v066 Timeline viewport, sticky scale, and Today vertical-line fixes */
.timeline-graph-column{
  position:relative;
  overflow:visible!important;
  isolation:auto!important;
}
.timeline-header-scroll{
  position:sticky!important;
  top:calc(var(--timeline-toolbar-height, 4rem) + .5rem)!important;
  z-index:140!important;
  overflow:hidden!important;
  background:#000!important;
}
.timeline-scroll{
  position:relative;
  overflow-x:auto!important;
  overflow-y:visible!important;
  background:#000!important;
}
.timeline-canvas{
  position:relative!important;
  overflow:hidden!important;
  contain:paint;
}
.timeline-header-today-line,
.timeline-header-start-line,
.timeline-today-line,
.timeline-start-line{
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  width:7px!important;
  transform:translateX(-3px);
  pointer-events:none;
}
.timeline-header-today-line,
.timeline-today-line{
  border-left:4px solid #22d3ee!important;
  border-right:1px solid rgba(165,243,252,.95)!important;
  background:rgba(34,211,238,.20)!important;
  box-shadow:0 0 0 1px rgba(34,211,238,.55), 0 0 18px rgba(34,211,238,1)!important;
}
.timeline-header-today-line{z-index:118!important;}
.timeline-today-line{z-index:90!important;}
.timeline-header-start-line,
.timeline-start-line{
  border-left:4px solid #2563eb!important;
  border-right:1px solid rgba(191,219,254,.95)!important;
  background:rgba(37,99,235,.18)!important;
  box-shadow:0 0 0 1px rgba(37,99,235,.5), 0 0 16px rgba(59,130,246,.95)!important;
}
.timeline-header-start-line{z-index:117!important;}
.timeline-start-line{z-index:89!important;}
.timeline-header-canvas{
  overflow:visible!important;
}
.timeline-header-scroll .timeline-header-canvas{
  overflow:hidden!important;
}
.timeline-header-today-label{
  left:calc((var(--timeline-today-col, 1) - 1) * var(--timeline-cell-width))!important;
}


/* v067 Timeline recentering, orange Today line, and mileage due markers */
.timeline-header-today-line,
.timeline-today-line{
  border-left-color:#ff7a00!important;
  filter:drop-shadow(0 0 8px rgba(255,122,0,.95)) drop-shadow(0 0 14px rgba(255,183,77,.55))!important;
}
.timeline-header-today-label{
  background:#c2410c!important;
  border-color:#fdba74!important;
  color:#fff7ed!important;
}
.timeline-mileage-due-marker{
  border-radius:3px!important;
  aspect-ratio:1 / 1;
  min-width:1.65rem;
  max-width:2.2rem;
  justify-self:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:.18rem!important;
}

/* v068 In-service lines and completed managed-maintenance markers */
.timeline-header-in-service-line,
.timeline-in-service-line{
  position:absolute!important;
  top:0!important;
  bottom:0!important;
  width:7px!important;
  transform:translateX(-3px);
  pointer-events:none;
  border-left:4px solid #7c3aed!important;
  border-right:1px solid rgba(221,214,254,.95)!important;
  background:rgba(124,58,237,.16)!important;
  box-shadow:0 0 0 1px rgba(124,58,237,.48), 0 0 16px rgba(167,139,250,.9)!important;
}
.timeline-header-in-service-line{z-index:116!important;}
.timeline-in-service-line{z-index:88!important;}
.timeline-header-in-service-label{
  position:absolute!important;
  top:.25rem!important;
  z-index:121!important;
  max-width:18rem;
  padding:.2rem .45rem;
  border:2px solid #c4b5fd;
  border-radius:999px;
  background:#5b21b6;
  color:#fff;
  font-size:.72rem;
  font-weight:900;
  white-space:nowrap;
  box-shadow:0 2px 10px rgba(0,0,0,.32);
}
.timeline-done-span{
  align-self:center;
  height:13px;
  border-radius:999px;
  background:rgba(34,197,94,.62);
  border:1px solid rgba(21,128,61,.95);
  box-shadow:0 0 9px rgba(34,197,94,.38);
  z-index:18;
}
.timeline-done-marker{
  align-self:center;
  justify-self:center;
  border-radius:3px!important;
  aspect-ratio:1 / 1;
  min-width:1.9rem;
  max-width:2.45rem;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:.18rem!important;
  background:#16a34a;
  color:#fff;
  font-size:.62rem;
  font-weight:900;
  text-align:center;
  z-index:26;
  box-shadow:0 1px 5px rgba(0,0,0,.35), 0 0 0 2px rgba(187,247,208,.85);
}
.timeline-mileage-done-marker{font-size:.6rem;}


/* v069 managed maintenance timeline/list refinements */
.managed-list-view .tablewrap{
  max-height:none;
  overflow:visible;
}
.managed-list-view table thead th{
  position:sticky;
  top:.5rem;
  z-index:30;
  background:#0f172a;
  color:#f8fafc;
  box-shadow:0 2px 0 rgba(148,163,184,.45), 0 8px 16px rgba(15,23,42,.25);
}
.managed-list-row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  justify-content:flex-end;
  min-width:13rem;
}
.managed-list-stacked{white-space:nowrap;line-height:1.35;}
.managed-list-camera{margin-right:.25rem;}
.managed-list-overdue-value{color:#dc2626;font-weight:950;}
.managed-list-ok-value{color:#16a34a;font-weight:950;}
.managed-list-row-highlight{outline:3px solid #f97316;outline-offset:-3px;animation:cml-v69-row-pulse 1.3s ease-in-out 2;}
@keyframes cml-v69-row-pulse{0%,100%{background-color:transparent;}50%{background-color:rgba(249,115,22,.16);}}
.timeline-label-row{position:relative;padding-right:2.1rem;}
.timeline-info-link{
  position:absolute;
  right:.55rem;
  bottom:.35rem;
  width:1.35rem;
  height:1.35rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#1d4ed8;
  color:#fff!important;
  text-decoration:none;
  font-weight:950;
  box-shadow:0 0 0 1px rgba(191,219,254,.75), 0 2px 8px rgba(0,0,0,.35);
}
.timeline-info-link:hover{background:#2563eb;transform:translateY(-1px);}
.timeline-today-line,
.timeline-header-today-line{
  border-left-color:#ff7a00!important;
  filter:drop-shadow(0 0 8px rgba(255,122,0,.95))!important;
}
.timeline-today-label,
.timeline-header-today-label{
  background:#ea580c!important;
  border-color:#fdba74!important;
  color:#fff!important;
}


/* v070 Managed-maintenance timeline bar sizing and Remaining text */
.timeline-row-grid,
.timeline-label-row{
  min-height:4.1rem!important;
}
.timeline-overdue-span{
  align-self:center!important;
  height:13px!important;
  border-radius:999px!important;
  background:rgba(249,115,22,.82)!important;
  border:1px solid rgba(251,146,60,.98)!important;
  box-shadow:0 0 9px rgba(249,115,22,.45)!important;
  z-index:19!important;
}
.managed-list-from-today{
  color:#94a3b8;
  font-size:.72em;
  font-weight:700;
  margin-left:.18rem;
  white-space:nowrap;
}

/* v071 skip interval workflow */
.managed-skip-summary{
  margin-top:.45rem;
  padding-top:.35rem;
  border-top:1px dashed rgba(148,163,184,.55);
  color:#92400e;
  font-size:.76rem;
  font-weight:800;
}
.button.tiny{padding:.18rem .45rem;font-size:.72rem;min-height:auto;}
.timeline-skipped-span{
  align-self:center;
  height:18px;
  border-radius:999px;
  background:rgba(250,204,21,.82);
  border:1px solid rgba(161,98,7,.95);
  color:#713f12;
  font-size:.68rem;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:21;
  box-shadow:0 0 8px rgba(250,204,21,.42);
  overflow:hidden;
  white-space:nowrap;
}
.skip-title-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem;}
.skip-car-title{font-size:1.05rem;font-weight:900;color:#1d4ed8;}
.skip-car-thumb{width:96px;height:72px;object-fit:cover;border-radius:14px;border:2px solid rgba(37,99,235,.35);box-shadow:0 2px 12px rgba(0,0,0,.18);}
.skip-interval-table td,.skip-interval-table th{text-align:left;vertical-align:top;}
.skip-action-stack{display:flex;flex-direction:column;gap:.45rem;align-items:flex-start;}
.skip-ok{color:#15803d;font-weight:900;}
.skip-overdue{color:#dc2626;font-weight:900;}

/* v073: clickable timeline markers and return highlighting */
.timeline-marker-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.timeline-marker-link:hover {
    filter: brightness(1.15);
    text-decoration: none;
}
.timeline-return-highlight {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(255, 122, 0, 0.45), 0 0 22px rgba(255, 122, 0, 0.75);
    z-index: 30;
}
.inline-form { display: inline; }
/* v074 session countdown, due deltas, and vehicle image ordering */
.session-countdown{position:absolute;left:50%;transform:translateX(-50%);top:14px;color:#d1d5db;font-size:.9rem;background:rgba(15,23,42,.75);border:1px solid rgba(148,163,184,.35);border-radius:999px;padding:5px 12px;white-space:nowrap}
.due-delta{font-size:.9em;font-weight:700}.due-delta-ok{color:#16a34a}.due-delta-overdue{color:#dc2626}
.image-reorder-form{margin:0}.manage-images [data-image-sort-item]{position:relative;cursor:grab}.manage-images [data-image-sort-item].dragging{opacity:.55}.drag-handle{position:absolute;top:6px;left:6px;z-index:2;background:rgba(15,23,42,.82);color:#fff;border-radius:999px;padding:2px 7px;font-weight:700;box-shadow:0 1px 5px rgba(0,0,0,.35)}


/* v077: make Due/Skipped timeline markers reliably clickable and return-focusable */
.timeline-marker-link,
.timeline-due-marker.timeline-marker-link,
.timeline-skipped-span.timeline-marker-link{
  position:relative!important;
  z-index:160!important;
  pointer-events:auto!important;
}
.timeline-overdue-span,
.timeline-done-span,
.timeline-no-history-span,
.timeline-today-line,
.timeline-start-line,
.timeline-in-service-line{
  pointer-events:none!important;
}
.timeline-marker-link:focus-visible{
  outline:3px solid #fff;
  outline-offset:3px;
  box-shadow:0 0 0 6px rgba(255,122,0,.45), 0 0 22px rgba(255,122,0,.75);
}

/* v077 Alerts page and alert target highlighting */
.alerts-page-card .section-title-row{align-items:center;gap:1rem;}
.alerts-year-filter{margin-left:auto;}
.alerts-table td{vertical-align:top;}
.alert-date-cell div{display:flex;gap:.45rem;align-items:baseline;white-space:nowrap;}
.alert-date-cell span:first-child{min-width:5.8rem;color:#64748b;font-size:.85rem;}
.alert-mileage-pair{margin-left:1.25rem;color:#64748b;}
.alert-row-actions{display:flex;flex-wrap:wrap;gap:.35rem;}
.alert-state-note{font-size:.82rem;color:#64748b;margin-top:.25rem;}
.alerts-table tr.is-dismissed{opacity:.68;}
.alerts-table tr.is-snoozed{box-shadow:inset 4px 0 0 #f59e0b;}
.alert-target-glow,:target{animation:cmlAlertPulse 1.25s ease-in-out 0s 4;box-shadow:0 0 0 3px rgba(239,68,68,.65),0 0 22px rgba(239,68,68,.75)!important;position:relative;z-index:3;}
@keyframes cmlAlertPulse{0%,100%{box-shadow:0 0 0 3px rgba(239,68,68,.55),0 0 14px rgba(239,68,68,.45);}50%{box-shadow:0 0 0 6px rgba(239,68,68,.85),0 0 30px rgba(239,68,68,.95);}}

/* v078 main menu alerts truncation and alert-history layout parity */
.dashboard-alerts-title-row h2{display:flex;align-items:baseline;gap:.65rem;flex-wrap:wrap;}
.subdued-title-note{font-size:.82rem;font-weight:600;color:#64748b;letter-spacing:0;text-transform:none;}
.dashboard-alerts-table td{vertical-align:top;}
.dashboard-alerts-table .alert-row-actions{margin:0;}
.more-alerts-row{display:flex;justify-content:center;margin:.85rem 0 .15rem;}
.more-alerts-row .button{min-width:7rem;text-align:center;}
.due-delta-ok{color:#16a34a!important;font-weight:800;}
.due-delta-overdue{color:#dc2626!important;font-weight:800;}
@media(max-width:760px){.dashboard-alerts-title-row h2{display:block}.subdued-title-note{display:block;margin-top:.2rem}.alert-date-cell div{white-space:normal}.alert-mileage-pair{display:block;margin-left:0}}

/* v079 project parent/action-log integration */
.project-status-label {
    color: #4b5563;
    font-size: 0.82rem;
    font-weight: 600;
}
.project-card-actions {
    margin-top: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.project-page-header {
    margin-bottom: 1rem;
}
.project-page-title-wrap {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}
.project-car-line {
    margin-top: 0.15rem;
}
.project-car-thumb {
    border-radius: 0.85rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    height: 84px;
    object-fit: cover;
    width: 112px;
}
.project-meta-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 1rem 0;
}
.project-actions-section .maintenance-action-log-table td {
    vertical-align: top;
}

/* v080 projects navigation and project index page */
.dashboard-projects-title-row,
.projects-index-title-row{
    align-items:flex-start;
}
.project-summary-grid,
.projects-index-grid{
    display:grid;
    gap:1rem;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}
.project-summary-card,
.project-index-card{
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    box-shadow:0 4px 14px rgba(15,23,42,.08);
    padding:1rem;
}
.project-summary-header,
.project-index-card-header{
    align-items:flex-start;
    display:flex;
    gap:.75rem;
    justify-content:space-between;
}
.project-summary-header h3,
.project-index-card h3{
    margin:.1rem 0 .25rem;
}
.project-summary-status{
    white-space:nowrap;
}
.project-summary-meta{
    display:grid;
    gap:.6rem;
    grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
    margin:.75rem 0;
}
.project-summary-meta div{
    border:1px solid var(--line);
    border-radius:10px;
    background:#f8fafc;
    padding:.55rem .65rem;
}
.project-summary-meta dt{
    color:#64748b;
    font-size:.76rem;
    font-weight:800;
    letter-spacing:.04em;
    margin-bottom:.2rem;
    text-transform:uppercase;
}
.project-summary-meta dd{
    margin:0;
    font-weight:800;
}
.project-summary-notes{
    color:#475569;
    margin:.65rem 0 0;
}
.projects-index-filter-card{
    margin-bottom:1rem;
}
.project-filter-form{
    align-items:end;
    display:flex;
    flex-wrap:wrap;
    gap:.75rem;
}
.project-filter-form label{
    min-width:260px;
}
.project-index-thumb{
    border-radius:.75rem;
    box-shadow:0 4px 14px rgba(0,0,0,.16);
    height:62px;
    object-fit:cover;
    width:86px;
}
.project-index-car-line{
    margin:.1rem 0 0;
}
@media(max-width:720px){
    .project-summary-header,
    .project-index-card-header{
        display:block;
    }
    .project-index-thumb{
        margin-top:.6rem;
    }
}

/* v081 project creation flow */
.project-filter-form .project-filter-spacer{flex:1 1 auto;min-width:1rem;}
.project-add-button{margin-left:auto;}
.project-add-error{margin-top:.65rem;}
.project-car-select-label.has-error select,
.project-select-error{border-color:#dc2626!important;box-shadow:0 0 0 3px #fecaca!important;}
.project-form-title-row{margin-bottom:1rem;}
.project-form-actions{justify-content:flex-end;}
@media(max-width:720px){.project-filter-form .project-filter-spacer{display:none}.project-add-button{margin-left:0;width:100%;}.project-form-actions{justify-content:flex-start;}}

/* v082 project rich notes and reminder event editor */
.project-reminders-section{
    border:1px solid var(--line);
    border-radius:14px;
    padding:1rem;
    background:#f8fafc;
}
.project-reminders-section legend{
    font-weight:800;
    padding:0 .35rem;
}
.project-reminders-grid{
    margin-bottom:1rem;
}
.project-reminder-enabled{
    justify-content:center;
}
.project-reminder-enabled input{
    width:auto;
}
.project-reminder-events-header{
    align-items:flex-start;
    display:flex;
    gap:.75rem;
    justify-content:space-between;
    margin-bottom:.75rem;
}
.project-reminder-events-header h3{
    margin:.1rem 0 .2rem;
}
.project-reminder-events-header p{
    margin:0;
}
.project-reminder-event-list{
    display:grid;
    gap:.75rem;
}
.project-reminder-event-row{
    align-items:end;
    background:#fff;
    border:1px solid var(--line);
    border-radius:12px;
    display:grid;
    gap:.75rem;
    grid-template-columns:minmax(180px,1.5fr) minmax(140px,1fr) minmax(140px,1fr) auto;
    padding:.75rem;
}
.project-notes-field{
    width:100%;
}
.rich-text-toolbar{
    align-items:center;
    background:#f8fafc;
    border:1px solid var(--line);
    border-bottom:0;
    border-radius:12px 12px 0 0;
    display:flex;
    flex-wrap:wrap;
    gap:.4rem;
    padding:.5rem;
}
.rich-text-toolbar .button{
    min-width:2.2rem;
    padding:.35rem .55rem;
}
.rich-text-color-control{
    align-items:center;
    flex-direction:row;
    gap:.4rem;
    margin-left:.35rem;
}
.rich-text-color-control select{
    min-width:120px;
    padding:.4rem;
}
.rich-text-editor{
    background:#fff;
    border:1px solid #cbd5e1;
    border-radius:0 0 12px 12px;
    min-height:180px;
    overflow:auto;
    padding:.75rem;
    resize:vertical;
    width:100%;
}
.rich-text-editor:focus{
    box-shadow:0 0 0 3px rgba(23,78,166,.16);
    outline:0;
}
.rich-text-hidden-textarea{
    display:none;
}
@media(max-width:820px){
    .project-reminder-events-header{display:block;}
    .project-reminder-events-header .button{margin-top:.5rem;}
    .project-reminder-event-row{grid-template-columns:1fr;}
}

/* v083 project creation header, reminder cleanup, and richer notes toolbar */
.project-create-title-row{
    align-items:center;
}
.project-create-title-main{
    align-items:center;
    display:flex;
    flex-wrap:wrap;
    gap:.8rem 1rem;
}
.project-create-title-main h1{
    margin:.2rem 0;
}
.project-create-car-badge{
    align-items:center;
    background:#eff6ff;
    border:2px solid #bfdbfe;
    border-radius:999px;
    box-shadow:0 4px 14px rgba(23,78,166,.12);
    color:#174ea6;
    display:flex;
    gap:.7rem;
    padding:.42rem .55rem .42rem .85rem;
}
.project-create-car-label{
    color:#64748b;
    display:block;
    font-size:.72rem;
    font-weight:800;
    letter-spacing:.05em;
    line-height:1;
    text-transform:uppercase;
}
.project-create-car-badge strong{
    color:#174ea6;
    display:block;
    font-size:1.05rem;
    line-height:1.18;
}
.project-create-car-thumb{
    border:2px solid #fff;
    border-radius:999px;
    box-shadow:0 3px 10px rgba(15,23,42,.22);
    height:52px;
    object-fit:cover;
    width:68px;
}
.project-reminders-grid-compact{
    display:block;
    margin-bottom:1rem;
}
.project-reminders-grid-compact .project-reminder-enabled{
    justify-content:flex-start;
}
.rich-text-editor,
.project-notes-editor{
    font-style:normal;
    font-weight:400;
    line-height:1.45;
}
.rich-text-editor b,
.rich-text-editor strong{
    font-weight:700;
}
.rich-text-editor ul,
.rich-text-editor ol{
    margin:.45rem 0 .45rem 1.35rem;
    padding-left:1.1rem;
}
.rich-text-editor li{
    margin:.18rem 0;
}
.rich-text-color-control input[type=color]{
    border:1px solid #cbd5e1;
    border-radius:8px;
    height:2.1rem;
    min-height:2.1rem;
    padding:.1rem;
    width:3.1rem;
}
.rich-text-swatches{
    align-items:center;
    display:flex;
    gap:.25rem;
}
.rich-text-swatch{
    background:var(--swatch);
    border:2px solid #fff;
    border-radius:999px;
    box-shadow:0 0 0 1px #94a3b8;
    height:1.35rem;
    min-width:0;
    padding:0;
    width:1.35rem;
}
.rich-text-swatch:hover,
.rich-text-swatch:focus{
    box-shadow:0 0 0 3px rgba(23,78,166,.22),0 0 0 1px #174ea6;
}
@media(max-width:720px){
    .project-create-title-main{display:block;}
    .project-create-car-badge{border-radius:16px;margin-top:.65rem;justify-content:space-between;}
    .project-create-car-thumb{height:58px;width:78px;}
}

/* v085 reusable Rich Text Editor and CSRF/session keepalive support */
.rich-text-module{
    display:block;
    width:100%;
}
.rich-text-heading-row{
    align-items:baseline;
    display:flex;
    gap:.7rem;
    justify-content:space-between;
    margin-bottom:.35rem;
}
.rich-text-heading-row h2{
    font-size:1rem;
    margin:.15rem 0;
}
.rich-text-block-control{
    align-items:center;
    flex-direction:row;
    gap:.4rem;
    margin-right:.25rem;
}
.rich-text-block-control select{
    min-width:8.5rem;
    padding:.38rem .55rem;
}
.rich-text-editor,
.project-notes-editor{
    font-style:normal!important;
    font-weight:400!important;
}
.rich-text-editor p,
.rich-text-editor div,
.rich-text-editor li,
.rich-text-editor span{
    font-weight:inherit;
}
.rich-text-editor b,
.rich-text-editor strong,
.rich-text-editor span[style*="font-weight:700"],
.rich-text-editor span[style*="font-weight: 700"],
.rich-text-editor span[style*="font-weight:bold"],
.rich-text-editor span[style*="font-weight: bold"]{
    font-weight:700!important;
}
.rich-text-editor h1,
.rich-text-editor h2,
.rich-text-editor h3,
.rich-text-editor h4,
.rich-text-editor h5,
.rich-text-editor h6{
    color:#111827;
    font-weight:800;
    line-height:1.15;
    margin:.35rem 0 .25rem;
}
.rich-text-editor h1{font-size:1.85rem;}
.rich-text-editor h2{font-size:1.55rem;}
.rich-text-editor h3{font-size:1.35rem;}
.rich-text-editor h4{font-size:1.15rem;}
.rich-text-editor h5{font-size:1rem;}
.rich-text-editor h6{font-size:.9rem;letter-spacing:.04em;text-transform:uppercase;}
.rich-text-editor p{margin:.3rem 0;}
.rich-text-toolbar [data-rich-command="justifyLeft"],
.rich-text-toolbar [data-rich-command="justifyCenter"],
.rich-text-toolbar [data-rich-command="justifyRight"]{
    min-width:4.8rem;
}
@media(max-width:720px){
    .rich-text-heading-row{display:block;}
    .rich-text-block-control{width:100%;}
    .rich-text-block-control select{width:100%;}
}
.rich-text-display{
    line-height:1.45;
}
.rich-text-display h1,
.rich-text-display h2,
.rich-text-display h3,
.rich-text-display h4,
.rich-text-display h5,
.rich-text-display h6{
    margin:.35rem 0 .25rem;
}
.rich-text-display ul,
.rich-text-display ol{
    margin:.45rem 0 .45rem 1.35rem;
    padding-left:1.1rem;
}

/* v086 project dashboard cards, project header, trash, and project phases */
.dashboard-project-card{
  display:flex;
  flex-direction:column;
  min-height:100%;
}
.dashboard-project-card-header{
  align-items:flex-start;
}
.project-status-colored{
  border-color:#0002;
  color:#111827;
  box-shadow:0 1px 3px #0002;
}
.project-card-bottom-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-top:auto;
  padding-top:1rem;
}
.project-card-bottom-actions form{
  margin:0;
}
.project-open-button,
.button.project-open-button{
  background:#0284c7 !important;
  border-color:#0369a1 !important;
  color:#fff !important;
}
.project-open-button:hover,
.button.project-open-button:hover{
  background:#0ea5e9 !important;
  color:#fff !important;
}
.project-trash-button,
button.project-trash-button{
  background:#dc2626 !important;
  border-color:#991b1b !important;
  color:#fff !important;
}
.project-page-header{
  display:grid;
  gap:1rem;
}
.project-header-top-row,
.project-title-actions-row,
.project-header-bottom-actions{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
}
.project-back-button{
  align-self:flex-start;
}
.project-page-car-lockup{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.75rem;
  margin-left:auto;
}
.project-page-car-text{
  color:#0f766e;
  font-size:1.28rem;
  font-weight:900;
  line-height:1.2;
  text-align:right;
}
.project-car-thumb-prominent{
  width:92px;
  height:72px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--line);
  box-shadow:0 5px 14px #0002;
}
.project-title-actions{
  align-self:center;
}
.project-header-bottom-actions{
  align-items:center;
}
.project-header-bottom-actions > form{
  margin:0;
}
.project-phases-section{
  scroll-margin-top:1rem;
}
.phase-add-form{
  display:flex;
  justify-content:center;
  margin:.75rem 0 1rem;
}
.project-phase-card{
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  padding:1rem;
  margin:1rem 0;
  box-shadow:0 1px 3px #00000012;
  scroll-margin-top:1rem;
}
.project-phase-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:.85rem;
}
.project-phase-header h3{
  margin:.15rem 0 0;
}
.project-phase-header-actions{
  display:flex;
  align-items:center;
  gap:.4rem;
  flex-wrap:wrap;
}
.project-phase-header-actions form{
  margin:0;
}
.project-phase-header-actions button[disabled]{
  opacity:.45;
  cursor:not-allowed;
}
.project-phase-form{
  margin:0;
}
.phase-notes-module{
  margin-top:.35rem;
}
.project-phase-save-actions{
  justify-content:flex-end;
}
.project-empty-phases{
  text-align:center;
  padding:.5rem 0;
}
@media(max-width:760px){
  .project-card-bottom-actions,
  .project-header-top-row,
  .project-title-actions-row,
  .project-header-bottom-actions,
  .project-page-car-lockup{
    display:grid;
    grid-template-columns:1fr;
    justify-items:stretch;
    text-align:left;
  }
  .project-page-car-text{
    text-align:left;
  }
  .project-car-thumb-prominent{
    width:100%;
    max-width:180px;
    height:auto;
  }
}

/* v087 project ordering and phase expand/collapse controls */
.dashboard-projects-title-actions,
.project-phases-expand-actions{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  justify-content:flex-end;
}
.project-card-status-controls,
.project-page-status-controls{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  justify-content:flex-end;
}
.project-card-move-buttons{
  align-items:center;
  display:inline-flex;
  gap:.25rem;
}
.project-card-move-buttons form{
  margin:0;
}
.project-move-button,
.button.project-move-button{
  min-width:2.05rem;
  padding:.25rem .45rem;
  line-height:1;
  font-size:1rem;
}
.dashboard-project-card-header .project-card-status-controls{
  margin-left:auto;
}
.project-phases-title-row{
  align-items:flex-start;
}
.project-phase-body{
  display:block;
}
.project-phase-card.is-collapsed .project-phase-body{
  display:none;
}
.project-phase-card.is-collapsed{
  padding-bottom:.85rem;
}
@media(max-width:760px){
  .dashboard-projects-title-actions,
  .project-card-status-controls,
  .project-page-status-controls,
  .project-phases-expand-actions{
    justify-content:flex-start;
  }
}

/* v088 Project Manager page and project detail refinements */
.projects-index-grid,
.dashboard-projects-section .project-summary-grid{
  grid-template-columns:1fr !important;
}
.project-index-card-right{
  align-items:flex-end;
  display:flex;
  flex-direction:column;
  gap:.55rem;
  margin-left:auto;
}
.project-index-status-controls{
  justify-content:flex-end;
}
.project-title-name{
  color:#2563eb;
  font-weight:900;
}
.project-description-block{
  border-top:1px solid var(--line);
  margin-top:.5rem;
  padding-top:.85rem;
}
.project-description-label{
  color:#334155;
  font-size:.9rem;
  letter-spacing:.05em;
  margin:0 0 .45rem;
  text-transform:uppercase;
}
.project-header-spacer{
  min-width:1px;
}
@media(max-width:760px){
  .project-index-card-right{
    align-items:flex-start;
    margin-left:0;
    width:100%;
  }
}

/* v089 project context badges, project reminders on detail page, and phase collapse persistence */
.project-context-car-badge{
  flex:0 1 auto;
}
.project-title-with-car,
.projects-manager-title-line,
.dashboard-projects-heading-with-car{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.75rem 1rem;
}
.project-title-with-car h1,
.projects-manager-title-line h1,
.dashboard-projects-heading-with-car h2{
  margin:.15rem 0;
}
.project-header-nav-row{
  align-items:center;
  display:grid;
  grid-template-columns:1fr auto 1fr;
}
.project-manager-top-button{
  justify-self:center;
}
.project-header-nav-spacer{
  min-width:1px;
}
.project-detail-title-row{
  align-items:center;
}
.project-detail-meta-grid .project-status-stack{
  align-items:flex-start;
  display:flex;
  flex-direction:column;
  gap:.35rem;
}
.project-detail-reminders-section{
  margin-top:.25rem;
}
.project-detail-reminders-form{
  margin:0;
}
.project-detail-reminders-section .project-reminder-enabled{
  align-items:center;
  display:flex;
  gap:.45rem;
  justify-content:flex-start;
  margin:.25rem 0 .75rem;
}
.project-detail-reminders-section .project-reminder-enabled input{
  width:auto;
}
.project-reminders-save-actions{
  justify-content:flex-end;
  margin-top:.85rem;
}
.projects-manager-title-main{
  min-width:0;
}
.project-manager-subtitle{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
  margin:.35rem 0 0;
}
.project-manager-inline-thumb{
  border:2px solid #fff;
  border-radius:999px;
  box-shadow:0 2px 8px rgba(15,23,42,.20);
  height:34px;
  object-fit:cover;
  width:46px;
}
.dashboard-project-car-badge .project-create-car-thumb,
.project-manager-car-badge .project-create-car-thumb{
  height:46px;
  width:62px;
}
@media(max-width:760px){
  .project-header-nav-row{
    display:flex;
    align-items:flex-start;
  }
  .project-manager-top-button{
    justify-self:auto;
  }
  .project-title-with-car,
  .projects-manager-title-line,
  .dashboard-projects-heading-with-car{
    align-items:flex-start;
    display:grid;
    grid-template-columns:1fr;
  }
}


/* v090 Project Manager / Project Details refinements */
.projects-manager-title-main .project-manager-subtitle,
.project-manager-inline-thumb { display: none !important; }
.project-readonly-reminders input[readonly],
.project-readonly-reminders input:disabled {
    opacity: .82;
    cursor: default;
    background: rgba(148, 163, 184, .12);
}
.project-reminder-event-row-readonly { align-items: end; }

/* v091 Project Details phase controls and compact reminder display */
.project-compact-reminders-section{
  padding:.6rem .75rem;
}
.project-compact-reminders{
  display:grid;
  gap:.45rem;
}
.project-compact-reminders-heading{
  align-items:baseline;
  display:flex;
  flex-wrap:wrap;
  gap:.5rem .75rem;
}
.project-compact-reminders-heading h2{
  font-size:1rem;
  margin:0;
}
.project-compact-reminders-status,
.project-compact-reminder-row{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.35rem .9rem;
  line-height:1.25;
}
.project-compact-reminder-list{
  display:grid;
  gap:.3rem;
}
.project-compact-reminder-row{
  background:#fff;
  border:1px solid rgba(148,163,184,.35);
  border-radius:10px;
  padding:.42rem .6rem;
}
.project-compact-reminder-name{
  color:#0f172a;
  font-weight:850;
}
.project-compact-label{
  color:#64748b;
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.025em;
  text-transform:uppercase;
}
.project-compact-reminders-empty{
  margin:0;
}
.project-detail-meta-grid .project-status-stack .status-pill{
  font-size:1.08rem;
  padding:.38rem .85rem;
}
.phase-toggle-button{
  min-width:6.15rem;
}
.project-phase-card.is-collapsed .phase-contract-button,
.project-phase-card:not(.is-collapsed) .phase-expand-button{
  display:none;
}
.project-phase-subsections{
  border-top:1px solid var(--line);
  display:grid;
  gap:.75rem;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:1rem;
  padding-top:1rem;
}
.project-phase-subsection{
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.45);
  border-radius:14px;
  padding:.8rem;
}
.project-phase-subsection-title{
  color:#334155;
  font-weight:900;
  margin-bottom:.55rem;
}
.phase-object-button,
a.phase-object-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:2.2rem;
  text-decoration:none;
}
.phase-object-button[data-phase-object]{
  cursor:default;
}
@media(max-width:820px){
  .project-phase-subsections{
    grid-template-columns:1fr;
  }
  .phase-toggle-button{
    min-width:0;
  }
}

/* v092 Project phase parts */
.project-phase-subsections{
  grid-template-columns:1fr!important;
}
.project-phase-parts-subsection{
  display:block;
}
.phase-part-list{
  display:grid;
  gap:.65rem;
  margin-bottom:.75rem;
}
.phase-part-card{
  background:#fff;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  padding:.7rem;
}
.phase-part-summary{
  display:grid;
  grid-template-columns:minmax(12rem,2fr) repeat(3,minmax(8rem,1fr));
  gap:.55rem;
  align-items:start;
}
.phase-part-description{
  border-top:1px solid rgba(148,163,184,.28);
  margin-top:.5rem;
  padding-top:.5rem;
  white-space:normal;
}
.phase-part-actions{
  justify-content:flex-end;
  margin:.55rem 0 0;
}
.phase-part-form{
  background:#fff;
  border:1px dashed rgba(37,99,235,.55);
  border-radius:12px;
  margin-top:.75rem;
  padding:.75rem;
}
.phase-part-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75rem;
}
.phase-part-form-actions{
  justify-content:flex-end;
  margin:.75rem 0 0;
}
.warning-button{
  background:#facc15!important;
  color:#713f12!important;
  border-color:#eab308!important;
  font-weight:850;
}
.warning-button:hover{background:#eab308!important;}
.phase-no-parts{margin:.25rem 0 .65rem;}
@media(max-width:820px){
  .phase-part-summary,
  .phase-part-form-grid{
    grid-template-columns:1fr;
  }
}

/* v093 Project phase read-only details, centered phase object buttons, and part reminder editor */
.project-phase-info-readonly{
  align-items:flex-start;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.45);
  border-radius:14px;
  display:grid;
  gap:.75rem;
  grid-template-columns:minmax(0,1fr) auto;
  padding:.85rem;
}
.project-phase-info-grid{
  display:grid;
  gap:.7rem;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.project-phase-info-label{
  color:#64748b;
  display:block;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.025em;
  margin-bottom:.15rem;
  text-transform:uppercase;
}
.project-phase-info-description{
  grid-column:1/-1;
}
.project-phase-readonly-notes{
  background:#f1f5f9;
  border:1px solid rgba(148,163,184,.35);
  border-radius:12px;
  max-height:9rem;
  overflow:auto;
  padding:.65rem .75rem;
}
.project-phase-info-actions{
  justify-content:flex-end;
  margin:0;
}
.phase-info-edit-form{
  background:#fff;
  border:1px dashed rgba(37,99,235,.5);
  border-radius:14px;
  padding:.85rem;
}
.phase-notes-module .rich-text-editor{
  background:#f8fafc;
}
.project-phase-subsection{
  overflow:visible;
}
.phase-object-button-row{
  align-items:center;
  display:flex;
  justify-content:center;
  margin:.35rem auto 0;
  max-width:100%;
  text-align:center;
}
.phase-object-button,
a.phase-object-button{
  flex:0 1 auto;
  max-width:100%;
  min-width:min(16rem, 100%);
  overflow-wrap:anywhere;
  padding:.6rem 1rem;
  text-align:center;
  white-space:normal;
  width:auto;
}
.phase-part-bold-label,
.phase-part-form label.phase-part-bold-label{
  font-weight:900;
}
.phase-part-form label.phase-part-bold-label input,
.phase-part-form label.phase-part-bold-label select{
  font-weight:400;
}
.phase-part-reminders-section{
  margin-top:.75rem;
  padding:.75rem;
}
.phase-part-reminder-events-header h4{
  margin:.1rem 0 .2rem;
}
.phase-part-reminder-summary{
  background:#f8fafc;
  border-top:1px solid rgba(148,163,184,.28);
  margin-top:.55rem;
  padding:.55rem .6rem 0;
}
.phase-part-reminder-summary-row{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.35rem .8rem;
  margin:.25rem 0;
}
.phase-part-reminders-missing{
  border:1px dashed rgba(148,163,184,.55);
  border-radius:10px;
  padding:.55rem;
}
@media(max-width:820px){
  .project-phase-info-readonly,
  .project-phase-info-grid{
    grid-template-columns:1fr;
  }
  .project-phase-info-actions{
    justify-content:flex-start;
  }
  .phase-object-button,
  a.phase-object-button{
    min-width:0;
    width:100%;
  }
}

/* v094 Project phase To Do objects and reminder defaults */
.project-settings-card .status-color-settings-grid,
.status-color-settings-grid{
  display:grid;
  gap:.65rem;
  grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));
}
.status-color-setting-row{
  align-items:center;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  display:flex;
  gap:.6rem;
  padding:.65rem;
}
.status-color-preview{
  border:1px solid rgba(15,23,42,.16);
  border-radius:999px;
  color:#0f172a;
  font-weight:900;
  min-width:8.5rem;
  padding:.35rem .65rem;
  text-align:center;
}
.status-color-value{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;}
.project-phase-todos-subsection{display:block;}
.phase-todo-list{
  display:grid;
  gap:.65rem;
  margin-bottom:.75rem;
}
.phase-todo-card{
  background:#fff;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  padding:.7rem;
}
.phase-todo-summary{
  align-items:center;
  display:grid;
  gap:.65rem;
  grid-template-columns:minmax(12rem,1fr) minmax(12rem,16rem) auto;
}
.phase-todo-title-block strong{font-size:1rem;}
.phase-todo-status-inline{margin:0;}
.phase-todo-status-inline label{margin:0;}
.phase-todo-status-inline select{
  border:1px solid rgba(15,23,42,.18);
  border-radius:10px;
  font-weight:900;
}
.phase-todo-description{
  background:#f8fafc;
  border-top:1px solid rgba(148,163,184,.28);
  margin-top:.55rem;
  max-height:7rem;
  overflow:auto;
  padding:.55rem .6rem 0;
}
.phase-todo-description .field-label{display:block;margin-bottom:.35rem;}
.phase-todo-actions{justify-content:flex-end;margin:0;}
.phase-todo-form{
  background:#fff;
  border:1px dashed rgba(37,99,235,.55);
  border-radius:12px;
  margin-top:.75rem;
  padding:.75rem;
}
.phase-todo-form-grid{
  display:grid;
  gap:.75rem;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.phase-todo-form-actions{
  justify-content:flex-end;
  margin:.75rem 0 0;
}
.phase-todo-reminders-section{
  margin-top:.75rem;
  padding:.75rem;
}
.phase-todo-reminder-summary{
  background:#f8fafc;
  border-top:1px solid rgba(148,163,184,.28);
  margin-top:.55rem;
  padding:.55rem .6rem 0;
}
.phase-todo-reminder-summary-row{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.35rem .8rem;
  margin:.25rem 0;
}
.phase-todo-reminders-missing{
  border:1px dashed rgba(148,163,184,.55);
  border-radius:10px;
  padding:.55rem;
}
.phase-no-todos{margin:.25rem 0 .65rem;}
@media(max-width:820px){
  .phase-todo-summary,
  .phase-todo-form-grid{
    grid-template-columns:1fr;
  }
  .phase-todo-actions,
  .phase-todo-form-actions{
    justify-content:flex-start;
  }
}

/* v095 Project phase attachments and phase-level reminders */
.project-phase-subsection-title{
  align-items:center;
  display:flex;
  gap:.45rem;
}
.phase-subsection-icon{
  display:inline-flex;
  font-size:1.15rem;
  line-height:1;
  min-width:1.4rem;
}
.project-phase-attachments-subsection,
.project-phase-reminders-subsection{
  display:block;
}
.phase-attachment-list-toolbar,
.phase-reminder-list-toolbar{
  display:flex;
  justify-content:flex-start;
  margin:.25rem 0 .65rem;
}
.phase-attachment-list,
.phase-reminder-list{
  display:grid;
  gap:.65rem;
  margin-bottom:.8rem;
}
.phase-attachment-card,
.phase-reminder-card{
  align-items:center;
  background:#fff;
  border:1px solid rgba(148,163,184,.45);
  border-radius:14px;
  display:grid;
  gap:.65rem;
  grid-template-columns:auto auto minmax(0,1fr) auto;
  padding:.65rem;
}
.phase-reminder-card{
  grid-template-columns:auto minmax(0,1fr);
}
.phase-attachment-select,
.phase-reminder-select{
  display:flex;
  margin:0;
}
.phase-attachment-thumb{
  align-items:center;
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.35);
  border-radius:10px;
  display:flex;
  height:4.25rem;
  justify-content:center;
  overflow:hidden;
  width:4.25rem;
}
.phase-attachment-thumb img{
  max-height:100%;
  max-width:100%;
  object-fit:contain;
}
.phase-attachment-meta{
  min-width:0;
}
.phase-attachment-meta strong{
  display:block;
  overflow-wrap:anywhere;
}
.phase-attachment-actions,
.phase-reminder-actions{
  align-items:center;
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
  justify-content:flex-end;
}
.inline-form{display:inline-flex;margin:0;}
.phase-attachment-upload-form,
.phase-reminder-add-form,
.phase-reminder-edit-form{
  background:#fff;
  border:1px dashed rgba(37,99,235,.55);
  border-radius:14px;
  margin-top:.75rem;
  padding:.8rem;
}
.phase-upload-dropzone{
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.45);
  border-radius:12px;
  padding:.8rem;
}
.phase-upload-dropzone label{
  font-weight:900;
}
.phase-upload-dropzone input[type=file]{
  display:block;
  margin-top:.4rem;
  width:100%;
}
.phase-upload-options{
  margin-top:.7rem;
}
.image-upload-options-grid{
  margin-top:.6rem;
}
.phase-attachment-upload-actions,
.phase-reminder-add-actions,
.phase-reminder-edit-actions{
  justify-content:flex-end;
  margin:.75rem 0 0;
}
.phase-reminder-readonly{
  align-items:center;
  display:grid;
  gap:.65rem;
  grid-template-columns:minmax(0,1fr) auto;
}
.phase-reminder-summary-row{
  background:#f8fafc;
  border:1px solid rgba(148,163,184,.28);
  border-radius:10px;
  padding:.5rem .6rem;
}
.phase-reminder-single-row{
  display:grid;
  gap:.65rem;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.phase-reminders-editor-section{
  margin-top:.25rem;
}
.sr-only{
  clip:rect(0,0,0,0);
  border:0;
  height:1px;
  margin:-1px;
  overflow:hidden;
  padding:0;
  position:absolute;
  width:1px;
}
@media(max-width:900px){
  .phase-attachment-card,
  .phase-reminder-readonly,
  .phase-reminder-single-row{
    grid-template-columns:1fr;
  }
  .phase-attachment-actions,
  .phase-reminder-actions,
  .phase-attachment-upload-actions,
  .phase-reminder-add-actions,
  .phase-reminder-edit-actions{
    justify-content:flex-start;
  }
}

/* v096 Project phase and library workflow refinements */
.project-phases-expand-actions .button,
.phase-toggle-button,
.phase-expand-button,
.phase-contract-button {
    background: #d946ef !important;
    border-color: #a21caf !important;
    color: #fff !important;
}
.rounded-phase-object-button,
.phase-object-button {
    border-radius: 999px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
}
.phase-link-picker-form {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: end;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    padding: .85rem;
    margin: .75rem 0;
}
.phase-link-picker-form label { flex: 1 1 20rem; font-weight: 800; }
.phase-linked-item-list { display: flex; flex-direction: column; gap: .55rem; margin: .7rem 0; }
.phase-linked-item-card {
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    gap: .75rem;
    align-items: center;
    border: 2px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    padding: .7rem .8rem;
}
.phase-linked-item-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.phase-linked-item-actions { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.phase-link-list-toolbar { display: flex; justify-content: flex-start; margin: .55rem 0; }
.project-reminder-event-row-with-custom-due { grid-template-columns: minmax(10rem,1fr) minmax(8rem,.7fr) minmax(8rem,.7fr) auto; }
.project-reminder-custom-due-row {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .55rem .65rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}
.project-reminder-inherit-toggle { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; }
.project-reminder-custom-due-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(12rem,1fr)); gap: .65rem; }
.library-highlight-target {
    outline: 4px solid #ef4444 !important;
    box-shadow: 0 0 0 6px rgba(239,68,68,.25), 0 0 22px rgba(239,68,68,.85) !important;
    animation: cml-v96-glow 1.3s ease-in-out infinite alternate;
}
@keyframes cml-v96-glow { from { box-shadow: 0 0 0 6px rgba(239,68,68,.15), 0 0 14px rgba(239,68,68,.55); } to { box-shadow: 0 0 0 8px rgba(239,68,68,.25), 0 0 28px rgba(239,68,68,.9); } }
.action-library-save-actions { justify-content: flex-end; margin: .7rem 0; }
.action-library-matrix-v96 textarea { width: 100%; min-width: 14rem; }
.action-library-child-row { background: #f8fafc; }
.action-library-child-row td:first-child { padding-left: 2rem; }
.library-car-column-buttons { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; margin-bottom: .35rem; }
.library-independent-checkbox { margin-top: .25rem; }
@media (max-width: 800px) {
    .phase-linked-item-card { grid-template-columns: auto minmax(0,1fr); }
    .phase-linked-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* v097 Managed Maintenance Event Library subordinate action filtering */
.template-action-library-search-controls{display:flex;align-items:flex-end;gap:.65rem;flex-wrap:wrap;margin:.65rem 0 .55rem}.template-action-library-search-controls label{min-width:min(34rem,100%);font-weight:800}.template-action-library-search-controls input{width:100%}.action-library-bold-select,.action-library-bold-select option{font-weight:800}.template-subordinate-controls select.action-library-bold-select{min-width:min(34rem,100%)}@media(max-width:760px){.template-action-library-search-controls{display:block}.template-action-library-search-controls button{margin-top:.45rem;width:100%}}

/* v099 Managed Maintenance Event car context blocks and split-action combobox */
.managed-event-form-title-row,
.managed-template-add-title-row{
    align-items:center;
}
.managed-template-title-with-car{
    align-items:center;
    display:flex;
    flex-wrap:wrap;
    gap:.75rem 1rem;
}
.managed-template-title-with-car h2{
    margin:.15rem 0;
}
.managed-event-car-badge .project-create-car-thumb,
.managed-template-master-car-badge .project-create-car-thumb,
.managed-template-subordinate-car-badge .project-create-car-thumb{
    height:46px;
    width:62px;
}
.managed-template-subordinate-car-badge{
    margin-left:auto;
}
.template-action-select-label{
    display:flex;
    flex-direction:column;
    gap:.25rem;
    min-width:min(38rem,100%);
}
.template-action-select-label > strong{
    color:#111827;
    font-weight:900;
}
.action-library-split-select-source{
    border:0 !important;
    clip:rect(0 0 0 0);
    clip-path:inset(50%);
    height:1px !important;
    margin:-1px !important;
    overflow:hidden !important;
    padding:0 !important;
    position:absolute !important;
    white-space:nowrap !important;
    width:1px !important;
}
.action-library-split-combobox{
    max-width:100%;
    position:relative;
    width:min(38rem,100%);
}
.action-library-split-combo-button{
    align-items:center;
    background:#fff;
    border:1px solid #94a3b8;
    border-radius:10px;
    color:#0f172a;
    display:flex;
    justify-content:space-between;
    min-height:2.55rem;
    padding:.45rem .65rem;
    text-align:left;
    width:100%;
}
.action-library-split-combo-button:disabled{
    background:#f1f5f9;
    color:#64748b;
    cursor:not-allowed;
}
.action-library-split-current{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.action-library-split-current strong,
.action-library-split-option strong{
    font-weight:900;
}
.action-library-option-context{
    font-weight:500;
}
.action-library-split-caret{
    margin-left:.8rem;
}
.action-library-split-combo-list{
    background:#fff;
    border:1px solid #94a3b8;
    border-radius:12px;
    box-shadow:0 16px 36px rgba(15,23,42,.25);
    left:0;
    margin-top:.25rem;
    max-height:18rem;
    overflow:auto;
    padding:.35rem;
    position:absolute;
    right:0;
    z-index:100;
}
.action-library-split-option{
    background:transparent;
    border:0;
    border-radius:8px;
    color:#0f172a;
    display:block;
    padding:.5rem .55rem;
    text-align:left;
    width:100%;
}
.action-library-split-option:hover,
.action-library-split-option.is-selected{
    background:#dbeafe;
}
@media(max-width:760px){
    .managed-template-subordinate-car-badge{margin-left:0;margin-top:.45rem;}
    .action-library-split-combobox{width:100%;}
}
.project-create-car-badge[hidden]{display:none !important;}

/* v101 Managed Maintenance Event Library toolbar/filter/collapse refinements */
.green-plus-circle-icon{
  display:inline-grid;
  place-items:center;
  width:1.55em;
  height:1.55em;
  border-radius:999px;
  background:#16a34a;
  color:#fff;
  border:2px solid #15803d;
  font-size:1.15em;
  font-weight:1000;
  line-height:1;
  box-shadow:0 2px 8px rgba(22,163,74,.35);
  margin-right:.35rem;
}
.managed-template-section-icon{
  display:inline-grid;
  place-items:center;
  width:1.7em;
  height:1.7em;
  border-radius:12px;
  background:#dbeafe;
  border:2px solid #2563eb;
  color:#1e3a8a;
  font-size:1.05em;
  line-height:1;
  margin-right:.4rem;
  vertical-align:-.12em;
}
.magenta-button,
button.magenta-button,
a.magenta-button{
  background:#c026d3 !important;
  border-color:#a21caf !important;
  color:#fff !important;
  font-weight:900 !important;
}
.magenta-button:hover,
button.magenta-button:hover,
a.magenta-button:hover{
  background:#a21caf !important;
  border-color:#86198f !important;
  color:#fff !important;
}
.managed-template-view-actions .button.magenta-button.active{
  background:#86198f !important;
  border-color:#701a75 !important;
  color:#fff !important;
}
.managed-template-filter-row-v101{
  grid-template-columns:minmax(16rem,1fr) minmax(18rem,2fr);
  align-items:stretch;
}
.managed-template-filter-panel-v101{
  border:2px solid #cbd5e1;
  border-radius:14px;
  background:#ffffff;
  padding:.75rem;
}
.managed-template-filter-panel-v101 label{
  font-weight:900;
  margin:0;
}
.managed-template-keyword-panel-v101{
  display:grid;
  grid-template-columns:minmax(14rem,1fr) auto;
  gap:.75rem;
  align-items:end;
}
.managed-template-filter-car-badge-v101{
  margin-top:.65rem;
}
.managed-template-filter-car-badge-v101 .project-create-car-thumb{
  height:46px;
  width:62px;
}
.managed-template-card-body-v101[hidden]{display:none !important;}
.managed-template-existing-card.is-collapsed .managed-template-card-header-v372{
  border-bottom:0;
  margin-bottom:0;
  padding-bottom:.1rem;
}
.managed-template-existing-card.is-collapsed{
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%) !important;
}
.managed-template-card-bottom-actions-v101{
  justify-content:flex-end;
  border-top:2px solid #dbeafe;
  margin-top:.9rem;
  padding-top:.75rem;
}
.managed-template-card-actions-v372 .success-button,
.managed-template-card-bottom-actions-v101 .success-button{
  border-radius:8px;
  padding:.45rem .75rem;
}
@media(max-width:850px){
  .managed-template-filter-row-v101{grid-template-columns:1fr;}
  .managed-template-keyword-panel-v101{grid-template-columns:1fr;}
  .managed-template-keyword-panel-v101 .managed-template-filter-actions{justify-content:flex-start;}
}

/* v102 task-library and project phase refinements */
.action-edit-title-row{align-items:center;gap:1rem;flex-wrap:wrap;}
.action-edit-title-row h1{margin:0;}
.action-edit-car-badge{margin-left:auto;}
.action-library-add-task-form textarea{min-height:5.5rem;width:100%;}
.action-library-add-task-form{grid-template-columns:repeat(2,minmax(0,1fr));}
.phase-collapsed-more-notice{display:none;margin:.55rem auto .1rem;max-width:30rem;border:3px solid #dc2626;border-radius:14px;background:#fee2e2;color:#991b1b;font-weight:1000;text-align:center;padding:.75rem 1rem;box-shadow:0 0 0 3px rgba(220,38,38,.18),0 0 22px rgba(220,38,38,.45);animation:cml-v102-more-pulse 1.25s ease-in-out infinite;}
.project-phase-card.is-collapsed .phase-collapsed-more-notice{display:block;}
@keyframes cml-v102-more-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.68;transform:scale(1.015)}}
.project-reminder-enabled{display:inline-flex;align-items:center;gap:.45rem;}
.managed-template-keyword-panel-v101{grid-template-columns:minmax(14rem,1fr) auto;}
.managed-template-keyword-panel-v101 input{width:100%;}
@media(max-width:760px){.action-edit-car-badge{margin-left:0}.action-library-add-task-form{grid-template-columns:1fr}.managed-template-keyword-panel-v101{grid-template-columns:1fr}}

/* v103 theme configuration and managed library live filtering */
a{color:var(--link)}
.top{background:var(--top-bg);color:var(--top-text)}
.brand,.top a{color:var(--top-text)}
.card,.tile,.stoplight-settings-card,.thumb,.managed-template-existing-card-v372{background:var(--card)!important;color:var(--text)}
.button,button{background:var(--button-bg);color:var(--button-text);border-color:var(--line)}
.primary,.success-button.primary{background:var(--primary-bg)!important;color:var(--primary-text)!important}
input,textarea,select{background:var(--input-bg);color:var(--input-text);border-color:var(--line)}
th{background:var(--table-header-bg)}
.notice,.form-section,.vehicle-summary-box,.template-subaction-card-v372{background:var(--notice-bg)!important;border-color:var(--line);color:var(--text)}
.theme-dark .muted,.theme-system .muted{color:var(--muted)}
.theme-dark .managed-template-existing-card-v372 h3,.theme-system .managed-template-existing-card-v372 h3{color:var(--text)}
.theme-settings-card{display:grid;gap:.75rem}.theme-mode-select{max-width:24rem}.theme-color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:.85rem}.theme-color-column{border:2px solid var(--line);border-radius:14px;background:var(--card);padding:.7rem;display:grid;gap:.45rem}.theme-color-column h3{margin:.1rem 0 .35rem}.theme-color-row{display:grid;grid-template-columns:minmax(10rem,1fr) auto;gap:.6rem;align-items:center;border:1px solid var(--line);border-radius:10px;padding:.45rem;background:var(--notice-bg)}.theme-color-row span:first-child{display:grid;gap:.1rem}.theme-color-row small{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.managed-template-existing-card[hidden]{display:none!important}.managed-template-filter-note{font-weight:700}.managed-template-keyword-panel-v101 input{max-width:34rem}
@media(max-width:720px){.theme-color-row{grid-template-columns:1fr}.theme-color-grid{grid-template-columns:1fr}}

/* v104 Maintenance Task Library AJAX save actions */
.action-library-row-actions{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:.4rem;
  min-width:10rem;
}
.action-library-row-save,
.action-library-global-save{
  box-shadow:0 0 0 0 rgba(22,163,74,.58);
  animation:cml-v104-save-pulse 1.15s ease-in-out infinite;
}
.action-library-row-dirty{
  background:rgba(34,197,94,.08);
  box-shadow:inset 4px 0 0 #16a34a;
}
.action-library-save-complete{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  font-weight:900;
  padding:.35rem .65rem;
  margin-left:.5rem;
}
@keyframes cml-v104-save-pulse{
  0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(22,163,74,.58)}
  50%{transform:scale(1.035);box-shadow:0 0 0 .38rem rgba(22,163,74,.16)}
}
@media(max-width:800px){.action-library-row-actions{min-width:0}}

/* v105 reminder alignment and expanded dark-theme coverage */
.reminder-enable-inline,
.phase-part-reminders-section .project-reminder-enabled,
.phase-todo-reminders-section .project-reminder-enabled,
.project-reminders-section .project-reminder-enabled{
  display:inline-flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:.45rem !important;
  width:auto !important;
  max-width:max-content !important;
}
.reminder-enable-inline input,
.project-reminders-section .project-reminder-enabled input{
  width:auto !important;
  min-width:1.1rem;
  height:1.1rem;
  margin:0;
  flex:0 0 auto;
}
.phase-part-card.is-editing .phase-part-reminder-summary,
.phase-todo-card.is-editing .phase-todo-reminder-summary{
  display:none !important;
}
.project-reminder-event-row-with-custom-due .project-reminder-custom-due-row{
  border-top:1px solid var(--line);
  margin-top:.15rem;
  padding-top:.55rem;
}
.project-reminder-inherit-toggle{
  display:inline-flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:.45rem !important;
  width:auto !important;
  max-width:max-content !important;
}
.project-reminder-inherit-toggle input{width:auto!important;}

body.theme-dark .card,
body.theme-dark .tile,
body.theme-dark .thumb,
body.theme-dark .form-section,
body.theme-dark .notice,
body.theme-dark .stoplight-settings-card,
body.theme-dark .stoplight-add-card,
body.theme-dark .notification-card,
body.theme-dark .color-profile-row,
body.theme-dark .vehicle-summary-box,
body.theme-dark .selected-sub-action-row,
body.theme-dark .image-manager-control-box,
body.theme-dark .image-upload-mode-box,
body.theme-dark .image-actions-row td,
body.theme-dark .current-storage-vehicle,
body.theme-dark .current-storage-thumb,
body.theme-dark .storage-inline-card,
body.theme-dark .storage-slot-card,
body.theme-dark .storage-display-card,
body.theme-dark .template-subordinate-actions-box,
body.theme-dark .template-subaction-card,
body.theme-dark .template-subaction-card-v372,
body.theme-dark .template-card-scroll,
body.theme-dark .template-card-scroll-v372,
body.theme-dark .managed-template-existing-card,
body.theme-dark .managed-template-existing-card-v372,
body.theme-dark .managed-template-summary-row,
body.theme-dark .managed-template-interval-row-v372,
body.theme-dark .existing-template-subaction-editor,
body.theme-dark .managed-template-collapsed-table-wrap,
body.theme-dark .managed-template-collapsed-table td,
body.theme-dark .managed-template-filter-panel-v101,
body.theme-dark .project-summary-card,
body.theme-dark .project-index-card,
body.theme-dark .project-summary-meta div,
body.theme-dark .dashboard-project-card,
body.theme-dark .project-phase-card,
body.theme-dark .project-phase-subsection,
body.theme-dark .project-phase-info-readonly,
body.theme-dark .project-phase-readonly-notes,
body.theme-dark .phase-part-card,
body.theme-dark .phase-todo-card,
body.theme-dark .phase-attachment-card,
body.theme-dark .phase-reminder-card,
body.theme-dark .phase-linked-item-card,
body.theme-dark .project-reminder-event-row,
body.theme-dark .rich-text-toolbar,
body.theme-dark .rich-text-editor,
body.theme-dark .rich-text-display,
body.theme-dark .phase-link-picker-form,
body.theme-dark .phase-part-form,
body.theme-dark .phase-todo-form,
body.theme-dark .phase-reminder-add-form,
body.theme-dark .phase-reminder-edit-form,
body.theme-dark .phase-attachment-upload-form,
body.theme-dark .action-library-row-dirty,
body.theme-dark .app-footer,
body.theme-dark .app-version{
  background:var(--card) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .notice,
body.theme-dark .form-section,
body.theme-dark .stoplight-add-card,
body.theme-dark .project-summary-meta div,
body.theme-dark .managed-template-summary-row,
body.theme-dark .template-subaction-card,
body.theme-dark .template-subaction-card-v372,
body.theme-dark .existing-template-subaction-editor,
body.theme-dark .phase-part-form,
body.theme-dark .phase-todo-form,
body.theme-dark .phase-reminder-add-form,
body.theme-dark .phase-reminder-edit-form,
body.theme-dark .phase-attachment-upload-form,
body.theme-dark .rich-text-toolbar,
body.theme-dark .project-reminder-event-row{
  background:var(--notice-bg) !important;
}
body.theme-dark .vehicle-summary-row strong,
body.theme-dark .current-storage-title,
body.theme-dark .project-summary-meta dd,
body.theme-dark .project-summary-notes,
body.theme-dark .field-label,
body.theme-dark dt,
body.theme-dark dd,
body.theme-dark strong,
body.theme-dark td,
body.theme-dark th,
body.theme-dark label,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6{
  color:var(--text) !important;
}
body.theme-dark .muted,
body.theme-dark small,
body.theme-dark .project-summary-meta dt,
body.theme-dark .project-create-car-label,
body.theme-dark .color-swatch-label{
  color:var(--muted) !important;
}
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark .rich-text-editor{
  background:var(--input-bg) !important;
  color:var(--input-text) !important;
  border-color:var(--line) !important;
}
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder{color:color-mix(in srgb,var(--muted) 80%, transparent);}
body.theme-dark .project-create-car-badge,
body.theme-dark .library-filter-banner,
body.theme-dark .image-manager-notice{
  background:var(--notice-bg) !important;
  color:var(--link) !important;
  border-color:var(--line) !important;
}
body.theme-dark .project-create-car-badge strong{color:var(--link)!important;}
body.theme-dark .success-button,
body.theme-dark button.success-button,
body.theme-dark a.success-button{
  background:#15803d !important;
  border-color:#166534 !important;
  color:#ffffff !important;
}
body.theme-dark .green,
body.theme-dark .storage-status-in-use,
body.theme-dark .status-pill-completed{
  background:#14532d !important;
  border-color:#22c55e !important;
  color:#ecfdf5 !important;
}
body.theme-dark .yellow{background:#713f12!important;color:#fffbeb!important;border-color:#a16207!important;}
body.theme-dark .red{background:#7f1d1d!important;color:#fef2f2!important;border-color:#ef4444!important;}
body.theme-dark .danger{background:#991b1b!important;color:#fff!important;border-color:#7f1d1d!important;}
body.theme-dark .warning-button{background:#a16207!important;color:#fff!important;border-color:#854d0e!important;}
body.theme-dark .color-preview-box,
body.theme-dark .settings-stoplight-preview,
body.theme-dark .stoplight-circle{border-color:var(--line)!important;box-shadow:0 2px 8px rgba(0,0,0,.45)!important;}
body.theme-dark table,
body.theme-dark tr,
body.theme-dark td,
body.theme-dark th{border-color:var(--line)!important;}
body.theme-dark .car-img,
body.theme-dark .current-storage-thumb{background:var(--notice-bg)!important;}
body.theme-dark .action-thumb{background:var(--notice-bg)!important;border-color:var(--line)!important;}
body.theme-dark .phase-collapsed-more-notice{background:#7f1d1d!important;color:#fee2e2!important;border-color:#f87171!important;}

@media (prefers-color-scheme: dark){
  body.theme-system .card,
  body.theme-system .tile,
  body.theme-system .thumb,
  body.theme-system .form-section,
  body.theme-system .notice,
  body.theme-system .stoplight-settings-card,
  body.theme-system .stoplight-add-card,
  body.theme-system .notification-card,
  body.theme-system .color-profile-row,
  body.theme-system .vehicle-summary-box,
  body.theme-system .selected-sub-action-row,
  body.theme-system .image-manager-control-box,
  body.theme-system .image-upload-mode-box,
  body.theme-system .image-actions-row td,
  body.theme-system .current-storage-vehicle,
  body.theme-system .current-storage-thumb,
  body.theme-system .storage-inline-card,
  body.theme-system .storage-slot-card,
  body.theme-system .storage-display-card,
  body.theme-system .template-subordinate-actions-box,
  body.theme-system .template-subaction-card,
  body.theme-system .template-subaction-card-v372,
  body.theme-system .template-card-scroll,
  body.theme-system .template-card-scroll-v372,
  body.theme-system .managed-template-existing-card,
  body.theme-system .managed-template-existing-card-v372,
  body.theme-system .managed-template-summary-row,
  body.theme-system .managed-template-interval-row-v372,
  body.theme-system .existing-template-subaction-editor,
  body.theme-system .managed-template-collapsed-table-wrap,
  body.theme-system .managed-template-collapsed-table td,
  body.theme-system .managed-template-filter-panel-v101,
  body.theme-system .project-summary-card,
  body.theme-system .project-index-card,
  body.theme-system .project-summary-meta div,
  body.theme-system .dashboard-project-card,
  body.theme-system .project-phase-card,
  body.theme-system .project-phase-subsection,
  body.theme-system .project-phase-info-readonly,
  body.theme-system .project-phase-readonly-notes,
  body.theme-system .phase-part-card,
  body.theme-system .phase-todo-card,
  body.theme-system .phase-attachment-card,
  body.theme-system .phase-reminder-card,
  body.theme-system .phase-linked-item-card,
  body.theme-system .project-reminder-event-row,
  body.theme-system .rich-text-toolbar,
  body.theme-system .rich-text-editor,
  body.theme-system .rich-text-display,
  body.theme-system .phase-link-picker-form,
  body.theme-system .phase-part-form,
  body.theme-system .phase-todo-form,
  body.theme-system .phase-reminder-add-form,
  body.theme-system .phase-reminder-edit-form,
  body.theme-system .phase-attachment-upload-form,
  body.theme-system .action-library-row-dirty,
  body.theme-system .app-footer,
  body.theme-system .app-version{background:var(--card)!important;color:var(--text)!important;border-color:var(--line)!important;}
  body.theme-system .notice,
  body.theme-system .form-section,
  body.theme-system .stoplight-add-card,
  body.theme-system .project-summary-meta div,
  body.theme-system .managed-template-summary-row,
  body.theme-system .template-subaction-card,
  body.theme-system .template-subaction-card-v372,
  body.theme-system .existing-template-subaction-editor,
  body.theme-system .phase-part-form,
  body.theme-system .phase-todo-form,
  body.theme-system .phase-reminder-add-form,
  body.theme-system .phase-reminder-edit-form,
  body.theme-system .phase-attachment-upload-form,
  body.theme-system .rich-text-toolbar,
  body.theme-system .project-reminder-event-row{background:var(--notice-bg)!important;}
  body.theme-system input,body.theme-system textarea,body.theme-system select,body.theme-system .rich-text-editor{background:var(--input-bg)!important;color:var(--input-text)!important;border-color:var(--line)!important;}
  body.theme-system .vehicle-summary-row strong,body.theme-system .current-storage-title,body.theme-system .project-summary-meta dd,body.theme-system .project-summary-notes,body.theme-system .field-label,body.theme-system dt,body.theme-system dd,body.theme-system strong,body.theme-system td,body.theme-system th,body.theme-system label,body.theme-system h1,body.theme-system h2,body.theme-system h3,body.theme-system h4,body.theme-system h5,body.theme-system h6{color:var(--text)!important;}
  body.theme-system .muted,body.theme-system small,body.theme-system .project-summary-meta dt,body.theme-system .project-create-car-label,body.theme-system .color-swatch-label{color:var(--muted)!important;}
  body.theme-system .project-create-car-badge,body.theme-system .library-filter-banner,body.theme-system .image-manager-notice{background:var(--notice-bg)!important;color:var(--link)!important;border-color:var(--line)!important;}
  body.theme-system .project-create-car-badge strong{color:var(--link)!important;}
  body.theme-system .success-button,body.theme-system button.success-button,body.theme-system a.success-button{background:#15803d!important;border-color:#166534!important;color:#fff!important;}
  body.theme-system .green,body.theme-system .storage-status-in-use,body.theme-system .status-pill-completed{background:#14532d!important;border-color:#22c55e!important;color:#ecfdf5!important;}
  body.theme-system .yellow{background:#713f12!important;color:#fffbeb!important;border-color:#a16207!important;}
  body.theme-system .red{background:#7f1d1d!important;color:#fef2f2!important;border-color:#ef4444!important;}
  body.theme-system .danger{background:#991b1b!important;color:#fff!important;border-color:#7f1d1d!important;}
  body.theme-system .warning-button{background:#a16207!important;color:#fff!important;border-color:#854d0e!important;}
  body.theme-system .color-preview-box,body.theme-system .settings-stoplight-preview,body.theme-system .stoplight-circle{border-color:var(--line)!important;box-shadow:0 2px 8px rgba(0,0,0,.45)!important;}
  body.theme-system table,body.theme-system tr,body.theme-system td,body.theme-system th{border-color:var(--line)!important;}
  body.theme-system .car-img,body.theme-system .current-storage-thumb{background:var(--notice-bg)!important;}
  body.theme-system .action-thumb{background:var(--notice-bg)!important;border-color:var(--line)!important;}
  body.theme-system .phase-collapsed-more-notice{background:#7f1d1d!important;color:#fee2e2!important;border-color:#f87171!important;}
}

/* v106 theme preset manager */
.theme-column-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;}
.theme-column-head h3{margin:0!important;}
.theme-reset-button{font-weight:900!important;}
.theme-color-category{border:1px solid var(--line);border-radius:12px;background:var(--card);padding:.55rem;display:grid;gap:.42rem;}
.theme-color-category h4{margin:.1rem 0 .2rem;font-size:.92rem;color:var(--muted);text-transform:uppercase;letter-spacing:.035em;}
.theme-preset-manager{border:2px solid var(--line);border-radius:14px;background:var(--notice-bg);padding:.7rem;display:grid;gap:.65rem;margin-top:.35rem;}
.theme-preset-manager h4{margin:0;color:var(--text);}
.theme-preset-save-row,.theme-preset-load-row{display:grid;grid-template-columns:minmax(10rem,1fr) auto auto;gap:.55rem;align-items:end;}
.theme-preset-save-row label,.theme-preset-load-row label{margin:0!important;}
.theme-preset-save-row input,.theme-preset-load-row select{width:100%;}
.theme-preset-update-existing[hidden],.theme-preset-trash[hidden]{display:none!important;}
.theme-column-dirty .theme-preset-save-as,.theme-column-dirty .theme-preset-update-existing{animation:cml-v106-theme-dirty-pulse 1.1s ease-in-out infinite;}
.theme-column-dirty{box-shadow:0 0 0 3px rgba(34,197,94,.12);}
@keyframes cml-v106-theme-dirty-pulse{0%,100%{box-shadow:0 0 0 0 rgba(22,163,74,.58);transform:scale(1)}50%{box-shadow:0 0 0 .35rem rgba(22,163,74,.16);transform:scale(1.025)}}
@media(max-width:840px){.theme-preset-save-row,.theme-preset-load-row{grid-template-columns:1fr}.theme-preset-save-row button,.theme-preset-load-row button{width:100%;}.theme-column-head{align-items:stretch}.theme-reset-button{width:100%;}}


/* v107 Stoplight Color Coding subsection theme variable */
.stoplight-settings-card,
.stoplight-definition-card{
  background:var(--stoplight-subsection-bg, var(--card)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.stoplight-add-card{
  background:color-mix(in srgb, var(--stoplight-subsection-bg, var(--card)) 88%, var(--accent) 12%) !important;
}
body.theme-dark .stoplight-settings-card,
body.theme-dark .stoplight-definition-card,
body.theme-dark .stoplight-add-card,
body.theme-system .stoplight-settings-card,
body.theme-system .stoplight-definition-card,
body.theme-system .stoplight-add-card{
  background:var(--stoplight-subsection-bg, var(--card)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .stoplight-settings-fields,
body.theme-dark .stoplight-definition-fields,
body.theme-system .stoplight-settings-fields,
body.theme-system .stoplight-definition-fields{
  background:transparent !important;
  color:var(--text) !important;
}
body.theme-dark .stoplight-settings-card input,
body.theme-dark .stoplight-settings-card select,
body.theme-system .stoplight-settings-card input,
body.theme-system .stoplight-settings-card select{
  background:var(--input-bg) !important;
  color:var(--input-text) !important;
  border-color:var(--line) !important;
}


/* v108: override compact Stoplight Color Coding cards that previously used hard-coded white fills.
   These selectors intentionally match/exceed the older compact-layout specificity. */
.settings-form-compact .stoplight-compact-list .stoplight-definition-card,
.settings-form-compact .stoplight-compact-list .stoplight-settings-card{
  background:var(--stoplight-subsection-bg, var(--section-bg, var(--card))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.settings-form-compact .stoplight-compact-list .stoplight-add-card,
.settings-form-compact .stoplight-compact-list .stoplight-definition-card.stoplight-add-card{
  background:color-mix(in srgb, var(--stoplight-subsection-bg, var(--section-bg, var(--card))) 88%, var(--accent) 12%) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .settings-form-compact .stoplight-compact-list .stoplight-definition-card,
body.theme-dark .settings-form-compact .stoplight-compact-list .stoplight-settings-card,
body.theme-system .settings-form-compact .stoplight-compact-list .stoplight-definition-card,
body.theme-system .settings-form-compact .stoplight-compact-list .stoplight-settings-card{
  background:var(--stoplight-subsection-bg, var(--section-bg, var(--card))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
  box-shadow:0 1px 6px rgba(0,0,0,.35) !important;
}
body.theme-dark .settings-form-compact .stoplight-compact-list .stoplight-add-card,
body.theme-dark .settings-form-compact .stoplight-compact-list .stoplight-definition-card.stoplight-add-card,
body.theme-system .settings-form-compact .stoplight-compact-list .stoplight-add-card,
body.theme-system .settings-form-compact .stoplight-compact-list .stoplight-definition-card.stoplight-add-card{
  background:color-mix(in srgb, var(--stoplight-subsection-bg, var(--section-bg, var(--card))) 88%, var(--accent) 12%) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.settings-form-compact .stoplight-definition-head,
.settings-form-compact .stoplight-definition-fields,
.settings-form-compact .stoplight-definition-head label,
.settings-form-compact .stoplight-definition-fields label{
  color:var(--text) !important;
}

/* v109: theme-aware Settings subsection fills and remaining hard-coded white card fixes.
   These high-specificity overrides intentionally come late in the file so they win
   over older compact settings rules that used background:#fff!important. */
.settings-form-compact .oe-override-checkbox,
.oe-override-checkbox{
  background:var(--oe-override-checkbox-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.settings-form-compact .storage-display-settings .storage-display-card,
.settings-form-compact .notification-settings-list .notification-card{
  background:var(--storage-manager-card-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.settings-form-compact .storage-display-settings .storage-display-card.stoplight-add-card,
.settings-form-compact .notification-settings-list .notification-card.stoplight-add-card{
  background:color-mix(in srgb, var(--storage-manager-card-bg, var(--settings-subsection-bg, var(--notice-bg))) 88%, var(--accent) 12%) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.status-color-setting-row,
.project-settings-card .status-color-setting-row{
  background:var(--project-status-row-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.settings-form-compact .compact-settings-card,
.settings-form-compact .stoplight-settings-card,
.settings-form-compact .stoplight-add-card,
.storage-display-settings,
.notification-settings-list,
.project-settings-card,
.theme-color-category,
.theme-preset-manager{
  background:var(--settings-subsection-bg, var(--notice-bg)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.theme-color-row{
  background:var(--settings-subsection-bg, var(--notice-bg)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}

body.theme-dark .settings-form-compact .oe-override-checkbox,
body.theme-dark .oe-override-checkbox{
  background:var(--oe-override-checkbox-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
  box-shadow:0 1px 6px rgba(0,0,0,.25) !important;
}
body.theme-dark .settings-form-compact .storage-display-settings .storage-display-card,
body.theme-dark .settings-form-compact .notification-settings-list .notification-card{
  background:var(--storage-manager-card-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
  box-shadow:0 1px 6px rgba(0,0,0,.25) !important;
}
body.theme-dark .status-color-setting-row,
body.theme-dark .project-settings-card .status-color-setting-row{
  background:var(--project-status-row-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .status-color-preview{color:var(--text) !important;border-color:var(--line) !important;}
body.theme-dark .settings-form-compact .compact-settings-card,
body.theme-dark .settings-form-compact .stoplight-settings-card,
body.theme-dark .settings-form-compact .stoplight-add-card,
body.theme-dark .storage-display-settings,
body.theme-dark .notification-settings-list,
body.theme-dark .project-settings-card,
body.theme-dark .theme-color-category,
body.theme-dark .theme-preset-manager,
body.theme-dark .image-settings-card,
body.theme-dark .storage-slot-existing-card,
body.theme-dark .storage-location-record,
body.theme-dark .storage-location-add-card,
body.theme-dark .storage-car-card,
body.theme-dark .attach-existing-file-option,
body.theme-dark .managed-timeline-stage,
body.theme-dark .action-library-split-combo-button,
body.theme-dark .action-library-split-combo-list{
  background:var(--settings-subsection-bg, var(--notice-bg)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}

@media (prefers-color-scheme: dark){
  body.theme-system .settings-form-compact .oe-override-checkbox,
  body.theme-system .oe-override-checkbox{
    background:var(--oe-override-checkbox-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
    box-shadow:0 1px 6px rgba(0,0,0,.25) !important;
  }
  body.theme-system .settings-form-compact .storage-display-settings .storage-display-card,
  body.theme-system .settings-form-compact .notification-settings-list .notification-card{
    background:var(--storage-manager-card-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
    box-shadow:0 1px 6px rgba(0,0,0,.25) !important;
  }
  body.theme-system .status-color-setting-row,
  body.theme-system .project-settings-card .status-color-setting-row{
    background:var(--project-status-row-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .status-color-preview{color:var(--text) !important;border-color:var(--line) !important;}
  body.theme-system .settings-form-compact .compact-settings-card,
  body.theme-system .settings-form-compact .stoplight-settings-card,
  body.theme-system .settings-form-compact .stoplight-add-card,
  body.theme-system .storage-display-settings,
  body.theme-system .notification-settings-list,
  body.theme-system .project-settings-card,
  body.theme-system .theme-color-category,
  body.theme-system .theme-preset-manager,
  body.theme-system .image-settings-card,
  body.theme-system .storage-slot-existing-card,
  body.theme-system .storage-location-record,
  body.theme-system .storage-location-add-card,
  body.theme-system .storage-car-card,
  body.theme-system .attach-existing-file-option,
  body.theme-system .managed-timeline-stage,
  body.theme-system .action-library-split-combo-button,
  body.theme-system .action-library-split-combo-list{
    background:var(--settings-subsection-bg, var(--notice-bg)) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
}

/* v111 retained: dark-theme contrast sweep for remaining hard-coded light backgrounds.
   This block intentionally appears at the end of the stylesheet so it wins over older
   feature-specific rules that used #fff / #f8fafc surfaces. */
.project-settings-card{
  background:var(--settings-projects-card-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.project-settings-card .status-color-setting-row,
.status-color-setting-row{
  background:var(--project-status-row-bg, var(--settings-projects-card-bg, var(--settings-subsection-bg, var(--notice-bg)))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
.project-settings-card .status-color-preview,
.status-color-preview{
  color:var(--status-preview-text, #111827) !important;
  text-shadow:none !important;
}
body.theme-dark .project-settings-card,
body.theme-dark .settings-form-compact .project-settings-card{
  background:var(--settings-projects-card-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
  box-shadow:0 1px 6px rgba(0,0,0,.28) !important;
}
body.theme-dark .project-settings-card .status-color-setting-row,
body.theme-dark .status-color-setting-row{
  background:var(--project-status-row-bg, var(--settings-projects-card-bg, var(--settings-subsection-bg, var(--notice-bg)))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .project-settings-card .status-color-preview,
body.theme-dark .status-color-preview{
  color:var(--status-preview-text, #111827) !important;
  border-color:rgba(15,23,42,.35) !important;
}
body.theme-dark .project-settings-card .status-color-value,
body.theme-dark .status-color-value{color:var(--muted) !important;}

body.theme-dark .notice,
body.theme-dark .form-section,
body.theme-dark .color-profile-row,
body.theme-dark .thumb,
body.theme-dark .stoplight-settings-card,
body.theme-dark .stoplight-add-card,
body.theme-dark .attach-existing-section,
body.theme-dark .attach-existing-file-option,
body.theme-dark .managed-timeline-view,
body.theme-dark .managed-timeline-grid,
body.theme-dark .project-index-card,
body.theme-dark .project-reminders-section,
body.theme-dark .project-reminder-event-row,
body.theme-dark .project-phase-card,
body.theme-dark .project-compact-reminder-row,
body.theme-dark .project-phase-subsection,
body.theme-dark .phase-part-card,
body.theme-dark .phase-part-form,
body.theme-dark .phase-info-edit-form,
body.theme-dark .phase-todo-card,
body.theme-dark .phase-todo-form,
body.theme-dark .phase-attachment-card,
body.theme-dark .phase-reminder-card,
body.theme-dark .phase-attachment-upload-form,
body.theme-dark .phase-reminder-add-form,
body.theme-dark .phase-reminder-edit-form,
body.theme-dark .project-phase-link-picker,
body.theme-dark .project-phase-linked-row,
body.theme-dark .action-library-child-row,
body.theme-dark .managed-template-filter-panel-v101,
body.theme-dark .managed-template-existing-card,
body.theme-dark .managed-template-existing-card-v372,
body.theme-dark .managed-template-collapsed-table-wrap,
body.theme-dark .selected-sub-action-row{
  background:var(--nested-surface-bg, var(--card)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .project-summary-meta div,
body.theme-dark .rich-text-toolbar,
body.theme-dark .project-phase-info-readonly,
body.theme-dark .phase-part-reminder-summary,
body.theme-dark .phase-todo-description,
body.theme-dark .phase-todo-reminder-summary,
body.theme-dark .phase-reminder-summary-row,
body.theme-dark .managed-template-summary-row-v372,
body.theme-dark .template-subaction-card-v372,
body.theme-dark .managed-template-collapsed-table td{
  background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .phase-upload-dropzone,
body.theme-dark .phase-attachment-thumb,
body.theme-dark .template-card-scroll,
body.theme-dark .template-card-scroll-v372{
  background:var(--upload-dropzone-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .rich-text-editor,
body.theme-dark .phase-notes-module .rich-text-editor{
  background:var(--input-bg) !important;
  color:var(--input-text) !important;
  border-color:var(--line) !important;
}
body.theme-dark th,
body.theme-dark thead th,
body.theme-dark .managed-template-collapsed-table th{
  background:var(--table-header-bg, var(--readonly-surface-bg)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark td{border-color:var(--line) !important;}
body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select{
  background:var(--input-bg) !important;
  color:var(--input-text) !important;
  border-color:var(--line) !important;
}

@media (prefers-color-scheme: dark){
  body.theme-system .project-settings-card,
  body.theme-system .settings-form-compact .project-settings-card{
    background:var(--settings-projects-card-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
    box-shadow:0 1px 6px rgba(0,0,0,.28) !important;
  }
  body.theme-system .project-settings-card .status-color-setting-row,
  body.theme-system .status-color-setting-row{
    background:var(--project-status-row-bg, var(--settings-projects-card-bg, var(--settings-subsection-bg, var(--notice-bg)))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .project-settings-card .status-color-preview,
  body.theme-system .status-color-preview{
    color:var(--status-preview-text, #111827) !important;
    border-color:rgba(15,23,42,.35) !important;
    text-shadow:none !important;
  }
  body.theme-system .notice,
  body.theme-system .form-section,
  body.theme-system .color-profile-row,
  body.theme-system .thumb,
  body.theme-system .stoplight-settings-card,
  body.theme-system .stoplight-add-card,
  body.theme-system .attach-existing-section,
  body.theme-system .attach-existing-file-option,
  body.theme-system .managed-timeline-view,
  body.theme-system .managed-timeline-grid,
  body.theme-system .project-index-card,
  body.theme-system .project-reminders-section,
  body.theme-system .project-reminder-event-row,
  body.theme-system .project-phase-card,
  body.theme-system .project-compact-reminder-row,
  body.theme-system .project-phase-subsection,
  body.theme-system .phase-part-card,
  body.theme-system .phase-part-form,
  body.theme-system .phase-info-edit-form,
  body.theme-system .phase-todo-card,
  body.theme-system .phase-todo-form,
  body.theme-system .phase-attachment-card,
  body.theme-system .phase-reminder-card,
  body.theme-system .phase-attachment-upload-form,
  body.theme-system .phase-reminder-add-form,
  body.theme-system .phase-reminder-edit-form,
  body.theme-system .project-phase-link-picker,
  body.theme-system .project-phase-linked-row,
  body.theme-system .action-library-child-row,
  body.theme-system .managed-template-filter-panel-v101,
  body.theme-system .managed-template-existing-card,
  body.theme-system .managed-template-existing-card-v372,
  body.theme-system .managed-template-collapsed-table-wrap,
  body.theme-system .selected-sub-action-row{
    background:var(--nested-surface-bg, var(--card)) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .project-summary-meta div,
  body.theme-system .rich-text-toolbar,
  body.theme-system .project-phase-info-readonly,
  body.theme-system .phase-part-reminder-summary,
  body.theme-system .phase-todo-description,
  body.theme-system .phase-todo-reminder-summary,
  body.theme-system .phase-reminder-summary-row,
  body.theme-system .managed-template-summary-row-v372,
  body.theme-system .template-subaction-card-v372,
  body.theme-system .managed-template-collapsed-table td{
    background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .phase-upload-dropzone,
  body.theme-system .phase-attachment-thumb,
  body.theme-system .template-card-scroll,
  body.theme-system .template-card-scroll-v372{
    background:var(--upload-dropzone-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .rich-text-editor,
  body.theme-system .phase-notes-module .rich-text-editor{
    background:var(--input-bg) !important;
    color:var(--input-text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system th,
  body.theme-system thead th,
  body.theme-system .managed-template-collapsed-table th{
    background:var(--table-header-bg, var(--readonly-surface-bg)) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system td{border-color:var(--line) !important;}
  body.theme-system input,
  body.theme-system textarea,
  body.theme-system select{
    background:var(--input-bg) !important;
    color:var(--input-text) !important;
    border-color:var(--line) !important;
  }
}

/* v111: theme-integrated status color settings and remaining light-background sweep */
.theme-embedded-section{
  background:var(--settings-subsection-bg, var(--notice-bg)) !important;
  border-color:var(--line) !important;
  color:var(--text) !important;
}
.theme-embedded-help{margin:.15rem 0 .45rem;}
.theme-status-color-list{display:grid;gap:.55rem;}
.theme-status-color-card{
  display:grid;
  gap:.55rem;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--nested-surface-bg, var(--card)) !important;
  color:var(--text) !important;
  padding:.65rem;
}
.theme-status-preview-wrap{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;}
.theme-status-preview-wrap small{font-weight:800;}
.theme-stoplight-structure-fields,
.theme-status-color-fields{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(8.5rem,1fr));
  gap:.5rem;
  align-items:end;
}
.theme-stoplight-structure-fields button{align-self:end;}
.theme-status-color-row{
  display:grid !important;
  grid-template-columns:minmax(7.5rem,1fr) auto auto;
  align-items:center;
  gap:.55rem;
  margin:0;
  padding:.55rem !important;
  background:var(--nested-surface-bg, var(--card)) !important;
  border-color:var(--line) !important;
  color:var(--text) !important;
}
.theme-status-color-row input[type=color]{width:3.8rem;min-width:3.8rem;}
.status-color-preview,
.project-status-colored{color:var(--status-preview-text, #111827) !important;}
.status-profile-row{color:var(--text) !important;}
.status-profile-row a{color:var(--link) !important;}
.managed-list-filter-row{
  background:var(--settings-subsection-bg, var(--notice-bg)) !important;
  border-color:var(--line) !important;
  color:var(--text) !important;
}
.managed-list-filter-row label{color:var(--text) !important;}
.vehicle-summary-box,
.storage-summary-box,
.current-storage-card,
.current-storage-card.current-storage-in-use,
.current-storage-card.current-storage-in-storage,
.storage-inline-card,
.storage-slot-card,
.storage-slot-existing-card,
.current-storage-summary,
.image-manager-control-box,
.image-upload-mode-box,
.drop-zone,
.image-settings-card,
.action-library-split-combo-button,
.action-library-split-combo-list,
.project-reminder-inherit-toggle,
.project-phase-link-picker,
.phase-linked-item-note,
.managed-list-filter-row{
  border-color:var(--line) !important;
}
body.theme-dark .vehicle-summary-box,
body.theme-dark .storage-summary-box,
body.theme-dark .current-storage-card,
body.theme-dark .current-storage-card.current-storage-in-use,
body.theme-dark .current-storage-card.current-storage-in-storage,
body.theme-dark .storage-inline-card,
body.theme-dark .storage-slot-card,
body.theme-dark .storage-slot-existing-card,
body.theme-dark .current-storage-summary,
body.theme-dark .image-manager-control-box,
body.theme-dark .image-upload-mode-box,
body.theme-dark .drop-zone,
body.theme-dark .image-settings-card,
body.theme-dark .action-log-controls,
body.theme-dark .action-log-search-controls,
body.theme-dark .managed-list-filter-row,
body.theme-dark .theme-status-color-card,
body.theme-dark .theme-status-color-row,
body.theme-dark .project-reminder-inherit-toggle,
body.theme-dark .project-phase-link-picker,
body.theme-dark .phase-linked-item-note{
  background:var(--nested-surface-bg, var(--card)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
  box-shadow:none !important;
}
body.theme-dark .car-img,
body.theme-dark .current-storage-thumb,
body.theme-dark .action-thumb,
body.theme-dark .project-create-car-badge,
body.theme-dark .project-context-car-badge{
  background:var(--readonly-surface-bg, var(--nested-surface-bg, var(--card))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .image-actions-row td,
body.theme-dark .action-library-child-row,
body.theme-dark .phase-linked-item-note{
  background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  color:var(--text) !important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .vehicle-summary-box,
  body.theme-system .storage-summary-box,
  body.theme-system .current-storage-card,
  body.theme-system .current-storage-card.current-storage-in-use,
  body.theme-system .current-storage-card.current-storage-in-storage,
  body.theme-system .storage-inline-card,
  body.theme-system .storage-slot-card,
  body.theme-system .storage-slot-existing-card,
  body.theme-system .current-storage-summary,
  body.theme-system .image-manager-control-box,
  body.theme-system .image-upload-mode-box,
  body.theme-system .drop-zone,
  body.theme-system .image-settings-card,
  body.theme-system .action-log-controls,
  body.theme-system .action-log-search-controls,
  body.theme-system .managed-list-filter-row,
  body.theme-system .theme-status-color-card,
  body.theme-system .theme-status-color-row,
  body.theme-system .project-reminder-inherit-toggle,
  body.theme-system .project-phase-link-picker,
  body.theme-system .phase-linked-item-note{
    background:var(--nested-surface-bg, var(--card)) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
    box-shadow:none !important;
  }
  body.theme-system .car-img,
  body.theme-system .current-storage-thumb,
  body.theme-system .action-thumb,
  body.theme-system .project-create-car-badge,
  body.theme-system .project-context-car-badge{
    background:var(--readonly-surface-bg, var(--nested-surface-bg, var(--card))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .image-actions-row td,
  body.theme-system .action-library-child-row,
  body.theme-system .phase-linked-item-note{
    background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
    color:var(--text) !important;
  }
}
@media(max-width:760px){.theme-status-color-row{grid-template-columns:1fr}.theme-status-color-row input[type=color]{width:100%;}}
body.theme-dark .status-color-preview,
body.theme-dark .project-status-colored,
body.theme-dark .phase-todo-status-inline select{color:#f8fafc !important;}
@media (prefers-color-scheme: dark){body.theme-system .status-color-preview,body.theme-system .project-status-colored,body.theme-system .phase-todo-status-inline select{color:#f8fafc !important;}}

/* v111 continued: explicit dark/system overrides for older hard-coded light panels found by CSS sweep */
body.theme-dark .current-storage-vehicle,
body.theme-dark .storage-location-record,
body.theme-dark .storage-location-add-card,
body.theme-dark .storage-car-card,
body.theme-dark .storage-car-card-image,
body.theme-dark .template-subordinate-actions-box,
body.theme-dark .managed-template-existing-card,
body.theme-dark .managed-template-existing-card.is-collapsed,
body.theme-dark .managed-template-summary-row,
body.theme-dark .template-subaction-card,
body.theme-dark .template-card-scroll,
body.theme-dark .existing-template-subaction-editor,
body.theme-dark .managed-template-filter-note,
body.theme-dark .managed-template-collapsed-table-wrap,
body.theme-dark .managed-template-collapsed-table td,
body.theme-dark .attach-existing-section,
body.theme-dark .attach-existing-file-option,
body.theme-dark .attach-existing-file-option img,
body.theme-dark .image-manager-dedupe-box,
body.theme-dark .managed-timeline-view,
body.theme-dark .managed-timeline-stage,
body.theme-dark .timeline-row-grid,
body.theme-dark .managed-list-actions-row td,
body.theme-dark .phase-link-picker-form,
body.theme-dark .phase-linked-item-card,
body.theme-dark .project-reminder-custom-due-row,
body.theme-dark .image-manager-thumb,
body.theme-dark .orphan-row,
body.theme-dark .dashboard-alert-row,
body.theme-dark .highlight-due,
body.theme-dark .has-form-errors,
body.theme-dark .storage-slot-new-card.has-form-errors,
body.theme-dark .storage-slot-existing-card.has-form-errors{
  background:var(--nested-surface-bg, var(--card)) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .managed-template-existing-card.is-collapsed,
body.theme-dark .current-storage-card.current-storage-in-use,
body.theme-dark .current-storage-card.current-storage-in-storage{
  background:var(--nested-surface-bg, var(--card)) !important;
  box-shadow:none !important;
}
body.theme-dark .managed-template-summary-row,
body.theme-dark .template-subaction-card,
body.theme-dark .managed-template-collapsed-table td,
body.theme-dark .managed-list-actions-row td,
body.theme-dark .project-reminder-custom-due-row{
  background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .current-storage-vehicle,
  body.theme-system .storage-location-record,
  body.theme-system .storage-location-add-card,
  body.theme-system .storage-car-card,
  body.theme-system .storage-car-card-image,
  body.theme-system .template-subordinate-actions-box,
  body.theme-system .managed-template-existing-card,
  body.theme-system .managed-template-existing-card.is-collapsed,
  body.theme-system .managed-template-summary-row,
  body.theme-system .template-subaction-card,
  body.theme-system .template-card-scroll,
  body.theme-system .existing-template-subaction-editor,
  body.theme-system .managed-template-filter-note,
  body.theme-system .managed-template-collapsed-table-wrap,
  body.theme-system .managed-template-collapsed-table td,
  body.theme-system .attach-existing-section,
  body.theme-system .attach-existing-file-option,
  body.theme-system .attach-existing-file-option img,
  body.theme-system .image-manager-dedupe-box,
  body.theme-system .managed-timeline-view,
  body.theme-system .managed-timeline-stage,
  body.theme-system .timeline-row-grid,
  body.theme-system .managed-list-actions-row td,
  body.theme-system .phase-link-picker-form,
  body.theme-system .phase-linked-item-card,
  body.theme-system .project-reminder-custom-due-row,
  body.theme-system .image-manager-thumb,
  body.theme-system .orphan-row,
  body.theme-system .dashboard-alert-row,
  body.theme-system .highlight-due,
  body.theme-system .has-form-errors,
  body.theme-system .storage-slot-new-card.has-form-errors,
  body.theme-system .storage-slot-existing-card.has-form-errors{
    background:var(--nested-surface-bg, var(--card)) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
  }
  body.theme-system .managed-template-existing-card.is-collapsed,
  body.theme-system .current-storage-card.current-storage-in-use,
  body.theme-system .current-storage-card.current-storage-in-storage{
    background:var(--nested-surface-bg, var(--card)) !important;
    box-shadow:none !important;
  }
  body.theme-system .managed-template-summary-row,
  body.theme-system .template-subaction-card,
  body.theme-system .managed-template-collapsed-table td,
  body.theme-system .managed-list-actions-row td,
  body.theme-system .project-reminder-custom-due-row{
    background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg))) !important;
  }
}


/* v112: keep Maintenance Task Library Master vehicle indicator from creating a light circle in dark/system themes. */
.library-master-cell .master-car-ring{
  background:var(--card) !important;
  border-color:var(--line) !important;
  color:var(--text) !important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent);
}
.library-master-cell .master-label{
  color:var(--link) !important;
}
body.theme-dark .library-master-cell .master-car-ring{
  background:var(--card) !important;
  border-color:var(--line) !important;
  color:var(--input-text) !important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--line) 75%, transparent);
}
body.theme-dark .library-master-cell .master-car-ring input{
  accent-color:var(--primary-bg);
}
@media (prefers-color-scheme: dark){
  body.theme-system .library-master-cell .master-car-ring{
    background:var(--card) !important;
    border-color:var(--line) !important;
    color:var(--input-text) !important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--line) 75%, transparent);
  }
  body.theme-system .library-master-cell .master-car-ring input{
    accent-color:var(--primary-bg);
  }
}

/* v113: keep Theme / Dark Theme subsection rows aligned left-to-right. */
.theme-color-column{align-content:start;}
.theme-color-column [data-theme-align-key]{box-sizing:border-box;}
@media(max-width:720px){.theme-color-column [data-theme-align-key]{min-height:0!important;}}

/* v115: Attach Existing Files search/filter bar dark-theme fix.
   The Add MX Log Entry -> Attach Existing Files -> Search existing files area used
   a hard-coded light blue fill; keep it theme-aware so it matches surrounding panels. */
.attach-existing-filter-bar{
  background:var(--nested-surface-bg, var(--notice-bg, var(--card))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
}
body.theme-dark .attach-existing-filter-bar{
  background:var(--nested-surface-bg, var(--notice-bg, var(--card))) !important;
  color:var(--text) !important;
  border-color:var(--line) !important;
  box-shadow:0 1px 6px rgba(0,0,0,.25) !important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .attach-existing-filter-bar{
    background:var(--nested-surface-bg, var(--notice-bg, var(--card))) !important;
    color:var(--text) !important;
    border-color:var(--line) !important;
    box-shadow:0 1px 6px rgba(0,0,0,.25) !important;
  }
}

/* v116 Storage Manager read-only/expandable location and slot cards */
.storage-section-title-row{
  align-items:flex-start;
  margin-bottom:.75rem;
}
.storage-section-title-row h2{margin:.1rem 0;}
.storage-add-toggle{white-space:nowrap;}
.storage-readonly-card{
  border:2px solid var(--line);
  border-radius:14px;
  padding:.75rem;
  margin:.65rem 0;
  background:var(--card);
  box-shadow:0 1px 4px #0001;
}
.storage-record-title-row{
  align-items:flex-start;
  border-bottom:1px solid var(--line);
  padding-bottom:.45rem;
  margin-bottom:.55rem;
}
.storage-record-title-row h3{margin:.05rem 0 .2rem;}
.storage-record-actions{
  justify-content:flex-end;
  align-items:center;
  margin:0;
}
.storage-inline-delete-form{display:inline-flex;margin:0;}
.storage-readonly-fields{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(13rem,1fr));
  gap:.55rem .85rem;
  margin:0;
}
.storage-readonly-fields div{
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--readonly-surface-bg, var(--nested-surface-bg, #f8fafc));
  padding:.55rem .65rem;
  min-width:0;
}
.storage-readonly-fields dt{
  color:var(--muted);
  font-weight:850;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.035em;
  margin:0 0 .2rem;
}
.storage-readonly-fields dd{
  margin:0;
  color:var(--text);
  font-weight:700;
  overflow-wrap:anywhere;
}
.storage-edit-form{
  border:2px solid var(--line);
  border-radius:14px;
  padding:.75rem;
  margin:.5rem 0 0;
  background:var(--nested-surface-bg, var(--notice-bg));
}
.storage-form-actions{
  justify-content:flex-end;
  align-items:center;
}
.storage-slot-list{
  display:grid;
  gap:.65rem;
}
.storage-history-notes{
  min-width:18rem;
  min-height:5rem;
  resize:vertical;
  overflow:hidden;
  white-space:pre-wrap;
}
.storage-payment-add-card{
  background:var(--nested-surface-bg, var(--notice-bg))!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
.storage-payment-add-card .image-upload-section,
.storage-payment-add-card .drop-zone,
.storage-payment-add-card .image-upload-options{
  background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--card)))!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body.theme-dark .storage-readonly-card,
body.theme-dark .storage-edit-form,
body.theme-dark .storage-readonly-fields div,
body.theme-dark .storage-payment-add-card,
body.theme-dark .storage-payment-add-card .image-upload-section,
body.theme-dark .storage-payment-add-card .drop-zone,
body.theme-dark .storage-payment-add-card .image-upload-options{
  background:var(--nested-surface-bg, var(--card))!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
  box-shadow:none!important;
}
body.theme-dark .storage-readonly-fields div,
body.theme-dark .storage-payment-add-card .image-upload-section,
body.theme-dark .storage-payment-add-card .drop-zone,
body.theme-dark .storage-payment-add-card .image-upload-options{
  background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg)))!important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .storage-readonly-card,
  body.theme-system .storage-edit-form,
  body.theme-system .storage-readonly-fields div,
  body.theme-system .storage-payment-add-card,
  body.theme-system .storage-payment-add-card .image-upload-section,
  body.theme-system .storage-payment-add-card .drop-zone,
  body.theme-system .storage-payment-add-card .image-upload-options{
    background:var(--nested-surface-bg, var(--card))!important;
    color:var(--text)!important;
    border-color:var(--line)!important;
    box-shadow:none!important;
  }
  body.theme-system .storage-readonly-fields div,
  body.theme-system .storage-payment-add-card .image-upload-section,
  body.theme-system .storage-payment-add-card .drop-zone,
  body.theme-system .storage-payment-add-card .image-upload-options{
    background:var(--readonly-surface-bg, var(--settings-subsection-bg, var(--notice-bg)))!important;
  }
}
@media(max-width:720px){
  .storage-add-toggle,.storage-record-actions,.storage-inline-delete-form{width:100%;}
  .storage-record-actions button,.storage-inline-delete-form button{width:100%;}
  .storage-readonly-fields{grid-template-columns:1fr;}
  .storage-history-notes{min-width:14rem;}
}

/* v118 Storage Manager location cards: edit in place instead of opening a separate edit subsection */
.storage-location-inline-form{
  display:block;
}
.storage-location-edit-panel{
  margin-top:.55rem;
}
.storage-location-edit-grid{
  margin:0;
}
.storage-hidden-delete-form{
  display:none!important;
}
body.theme-dark .storage-location-edit-panel,
body.theme-dark .storage-location-edit-grid{
  background:transparent!important;
  color:var(--text)!important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .storage-location-edit-panel,
  body.theme-system .storage-location-edit-grid{
    background:transparent!important;
    color:var(--text)!important;
  }
}


/* v119 Storage Manager: hidden add panels must override grid/card display rules */
#storageLocationAddForm[hidden],
#storageSlotAddForm[hidden],
#storagePaymentAddCard[hidden]{
  display:none!important;
}


/* v120: Existing Storage Slots in-place read-only/edit behavior. */
.storage-slot-existing-card [hidden]{
  display:none!important;
}
.storage-slot-existing-card .storage-slot-readonly-fields{
  gap:.35rem 1.25rem;
}
.storage-slot-existing-card .storage-slot-readonly-fields > div{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:.2rem 0!important;
}
body.theme-dark .storage-slot-existing-card .storage-slot-readonly-fields > div{
  background:transparent!important;
  border:0!important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .storage-slot-existing-card .storage-slot-readonly-fields > div{
    background:transparent!important;
    border:0!important;
  }
}


/* v121: Storage Location instances use reliable in-place edit mode and borderless read-only fields. */
.storage-location-record [hidden]{
  display:none!important;
}
.storage-location-record .storage-readonly-fields{
  gap:.35rem 1.25rem;
}
.storage-location-record .storage-readonly-fields > div{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  padding:.2rem 0!important;
}
body.theme-dark .storage-location-record .storage-readonly-fields > div{
  background:transparent!important;
  border:0!important;
}
@media (prefers-color-scheme: dark){
  body.theme-system .storage-location-record .storage-readonly-fields > div{
    background:transparent!important;
    border:0!important;
  }
}

/* v124: Hello SSO login, explicit identity linking, and account security UI. */
.auth-login-card{max-width:560px}.auth-method{padding:1rem 0}.auth-method+.auth-method{border-top:1px solid var(--line);margin-top:1rem}.auth-method h2{font-size:1.05rem;margin:.1rem 0 .35rem}.auth-method form{display:grid;gap:.8rem}.auth-wide-button{display:block;width:100%;text-align:center;margin-top:.75rem}.session-user{font-size:.8rem;color:#d1d5db;border:1px solid #4b5563;border-radius:999px;padding:.28rem .55rem;white-space:nowrap}.account-security-card h2{font-size:1.1rem}.account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.account-grid>div{border:1px solid var(--line);border-radius:12px;padding:1rem;background:var(--card)}.account-details{margin:0}.account-details>div{display:grid;grid-template-columns:minmax(130px,180px) minmax(0,1fr);gap:.75rem;padding:.6rem 0;border-top:1px solid var(--line)}.account-details>div:first-child{border-top:0}.account-details dt{font-weight:700;color:var(--muted)}.account-details dd{margin:0;overflow-wrap:anywhere}.hello-link-status{display:inline-block;border-radius:999px;padding:.25rem .6rem;font-weight:700}.hello-link-status.linked{background:#dcfce7;color:#14532d}.hello-link-status.unlinked{background:#fef3c7;color:#713f12}.account-legacy-note{margin-top:1rem}@media(max-width:800px){.account-grid{grid-template-columns:1fr}.account-details>div{grid-template-columns:1fr;gap:.15rem}.session-user{display:inline-block;margin:.4rem}}
body.theme-dark .auth-method+.auth-method{border-color:var(--line)}body.theme-dark .account-grid>div{background:var(--card);border-color:var(--line)}body.theme-dark .hello-link-status.linked{background:#14532d;color:#dcfce7}body.theme-dark .hello-link-status.unlinked{background:#713f12;color:#fef3c7}
