/* [CAMO-HUB-V1 2026-09-17] Styles for CAMO Hub landing page.
   Isolated from the rest of the app via `ch-*` prefix so it can be
   ripped out cleanly if we ever remove the hub. Uses the existing
   CSS custom properties from canavia.css so it inherits the theme. */

/* [ENG-REG-V1 2026-09-17] Engine Registry styles */
.er-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}
.er-search {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  color: var(--tw, #fff);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.er-pill {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  color: var(--t3, #94a1b8);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.er-pill:hover { background: var(--bg2, #1d2534); color: var(--tw, #fff); }
.er-pill.active {
  background: rgba(34, 211, 238, 0.14);
  color: #22d3ee;
  border-color: rgba(34, 211, 238, 0.4);
}
.er-pill .n {
  background: rgba(255,255,255,0.08);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  margin-left: 4px;
  font-weight: 600;
}
.er-section-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t3, #94a1b8);
  font-weight: 600;
}
.er-section-hdr .n {
  background: var(--bg2, #1d2534);
  color: var(--t3, #94a1b8);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
}
.er-list { display: flex; flex-direction: column; gap: 10px; }
.er-row {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  border-radius: 10px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 16px;
  align-items: center;
  transition: all 0.15s ease;
}
.er-row:hover {
  background: var(--bg2, #1d2534);
  border-color: rgba(34, 211, 238, 0.35);
}
.er-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: var(--bg2, #1d2534);
}
.er-info { min-width: 0; }
.er-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--tw, #fff);
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.er-side {
  font-size: 9px;
  color: var(--t3);
  background: var(--bg, #0d1119);
  padding: 2px 6px;
  border-radius: 4px;
}
.er-meta {
  font-size: 11px;
  color: var(--t3, #94a1b8);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.er-meta .item b {
  color: var(--tw, #fff);
  font-variant-numeric: tabular-nums;
}
.er-tbo { min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.er-tbo-track {
  height: 6px;
  background: var(--bg, #0d1119);
  border-radius: 3px;
  overflow: hidden;
}
.er-tbo-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.er-tbo-fill.ok   { background: #22c55e; }
.er-tbo-fill.warn { background: #eab308; }
.er-tbo-fill.near { background: #f97316; }
.er-tbo-fill.crit { background: #ef4444; }
.er-tbo-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--t3, #94a1b8);
  font-variant-numeric: tabular-nums;
}
.er-tbo-labels .rem { color: var(--tw, #fff); font-weight: 600; }
.er-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.er-pill-status {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.er-pill-status.p-installed { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.er-pill-status.p-spare     { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.er-pill-status.p-ohv       { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.er-pill-status.p-near      { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.er-pill-status.p-oc        { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.er-oc-lbl { color: #22c55e !important; }
.er-sec-dim { opacity: 0.5; }
.er-loc { font-size: 11px; color: var(--t3, #94a1b8); text-align: right; }
.er-empty, .er-placeholder {
  padding: 20px;
  color: var(--t3, #94a1b8);
  text-align: center;
  border: 1px dashed var(--b, #2a344a);
  border-radius: 8px;
  font-size: 12px;
  margin: 8px 0;
}
@media (max-width: 800px) {
  .er-row { grid-template-columns: 1fr; }
  .er-status { align-items: flex-start; }
  .er-loc { text-align: left; }
  .er-tbo { min-width: 0; }
}

/* Engine detail drawer (inside #detov) */
#detov.er-wide .dpn { width: 900px; }
@media (max-width: 960px) {
  #detov.er-wide .dpn { width: 95vw; }
}
.er-det-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--b, #2a344a);
}
.er-det-title { margin: 0; font-size: 18px; color: var(--tw, #fff); }
.er-det-sub   { font-size: 12px; color: var(--t3, #94a1b8); margin-top: 4px; }
.er-det-tbo   { margin: 10px 0 18px; }
.er-det-oc    {
  padding: 10px;
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  margin: 10px 0 18px;
}
.er-det-h4 {
  margin: 18px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t3, #94a1b8);
}
.er-det-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.er-det-grid > div {
  background: var(--bg2, #1d2534);
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.er-det-grid .lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--t3, #94a1b8);
  letter-spacing: 0.03em;
}
.er-det-grid b { font-size: 13px; color: var(--tw, #fff); }
.er-det-actions {
  display: flex;
  gap: 8px;
  margin: 14px 0 4px;
  flex-wrap: wrap;
}
.er-det-tl {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.er-det-tl.er-det-tl-scroll {
  max-height: 260px;
  overflow-y: auto;
}
.er-det-tl-row {
  display: grid;
  grid-template-columns: 110px 140px 1fr;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg2, #1d2534);
  border-radius: 4px;
  font-size: 12px;
  align-items: center;
}
.er-det-tl-row .d { color: var(--t3, #94a1b8); font-family: monospace; }
.er-det-tl-row .t { color: var(--tw, #fff); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 0.03em; }
.er-det-tl-row .n { color: var(--t2, #cbd5e1); }
.er-det-empty {
  padding: 12px;
  color: var(--t3, #94a1b8);
  font-size: 12px;
  font-style: italic;
  text-align: center;
  border: 1px dashed var(--b, #2a344a);
  border-radius: 6px;
}
@media (max-width: 600px) {
  .er-det-tl-row { grid-template-columns: 90px 1fr; }
  .er-det-tl-row .n { grid-column: 1 / -1; }
}
.er-det-children .er-det-tl-row { grid-template-columns: 110px 1fr auto; }
.er-det-child .n, .er-det-cand .n { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.er-det-cand { border-left: 3px solid #3b82f6; }
.er-det-child { border-left: 3px solid #22c55e; }
.u-ml6 { margin-left: 6px; }

/* Used History Wizard (import last-compliance for used engine/prop) */
.uhw-hdr { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--b, #2a344a); }
.uhw-title { font-size: 16px; font-weight: 600; color: var(--tw, #fff); margin-bottom: 4px; }
.uhw-sub { font-size: 12px; color: var(--t2, #cbd5e1); line-height: 1.5; }
.uhw-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.uhw-tbl thead th {
  text-align: left;
  padding: 8px 10px;
  background: var(--bg2, #1d2534);
  color: var(--t3, #94a1b8);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--b, #2a344a);
}
.uhw-tbl tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--b, #2a344a);
  vertical-align: top;
}
.uhw-ref { font-family: monospace; font-weight: 600; color: var(--tw, #fff); width: 90px; }
.uhw-desc { min-width: 220px; }
.uhw-hint { font-size: 10px; color: var(--t3, #94a1b8); margin-top: 2px; }
.uhw-mode { width: 200px; display: flex; flex-direction: column; gap: 4px; }
.uhw-radio { font-size: 11px; color: var(--t2, #cbd5e1); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.uhw-inputs { width: 160px; }
.uhw-inputs input {
  width: 100%;
  padding: 5px 8px;
  background: var(--bg1, #131824);
  color: var(--tw, #fff);
  border: 1px solid var(--b, #2a344a);
  border-radius: 4px;
  font-size: 12px;
  box-sizing: border-box;
}
.uhw-inputs input:disabled { opacity: 0.35; }
.uhw-na { color: var(--t3, #94a1b8); font-style: italic; font-size: 11px; }
.uhw-info {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--blue, #3b82f6);
  border-radius: 4px;
  font-size: 12px;
  color: var(--t2, #cbd5e1);
}
.er-det-logbook-row { border-left: 3px solid #22c55e; }
.er-det-logbook-meta {
  font-size: 10px;
  color: var(--t3, #94a1b8);
  margin-top: 2px;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.er-logbook-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.er-logbook-search {
  flex: 1;
  min-width: 200px;
  padding: 6px 10px;
  background: var(--bg2, #1d2534);
  color: var(--tw, #fff);
  border: 1px solid var(--b, #2a344a);
  border-radius: 4px;
  font-size: 12px;
}
.er-logbook-filter {
  padding: 6px 8px;
  background: var(--bg2, #1d2534);
  color: var(--tw, #fff);
  border: 1px solid var(--b, #2a344a);
  border-radius: 4px;
  font-size: 12px;
}
.er-logbook-year {
  margin-bottom: 10px;
  background: rgba(59, 130, 246, 0.04);
  border-radius: 6px;
  padding: 8px 10px;
}
.er-logbook-year-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}
.er-logbook-year-chevron { font-size: 10px; color: var(--t3, #94a1b8); width: 12px; }
.er-logbook-year-label { font-size: 13px; font-weight: 600; color: var(--tw, #fff); }
.er-logbook-year-count {
  background: var(--bg1, #131824);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  color: var(--tw, #fff);
}
.er-logbook-year-entries {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}
.er-log-src {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.er-log-src.src-wo  { background: rgba(59, 130, 246, 0.18); color: #3b82f6; }
.er-log-src.src-log { background: rgba(34, 197, 94, 0.18); color: #22c55e; }
.er-log-src.src-imp { background: rgba(168, 85, 247, 0.18); color: #a855f7; }
.er-log-src.src-new { background: rgba(249, 115, 22, 0.18); color: #f97316; }
.er-log-ver {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
}
.er-log-ver.ver-ok { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.er-log-ver.ver-pending { background: rgba(234, 179, 8, 0.12); color: #eab308; }
.er-log-evidence {
  color: var(--t2, #cbd5e1);
  font-size: 10px;
  font-style: italic;
}
/* Wizard: previous banner + evidence columns */
.uhw-prev {
  font-size: 10px;
  color: var(--t3, #94a1b8);
  margin-top: 3px;
  padding: 3px 6px;
  background: rgba(34, 197, 94, 0.06);
  border-radius: 3px;
  border-left: 2px solid #22c55e;
}
.uhw-vok { color: #22c55e; font-weight: 600; }
.uhw-vpending { color: #eab308; font-weight: 600; }
.uhw-evtype, .uhw-evref {
  width: 100%;
  padding: 5px 8px;
  background: var(--bg1, #131824);
  color: var(--tw, #fff);
  border: 1px solid var(--b, #2a344a);
  border-radius: 4px;
  font-size: 11px;
  box-sizing: border-box;
}
.uhw-uploadbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px dashed #3b82f6;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uhw-uploadbtn:hover { background: rgba(59, 130, 246, 0.25); }
.uhw-uploadlbl { font-weight: 600; }
.er-log-evfile {
  color: #3b82f6;
  text-decoration: underline;
  font-size: 10px;
  margin-left: 4px;
}
.er-log-evfile:hover { color: #60a5fa; }
.er-log-ver.ver-rej { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.er-log-verinfo { font-size: 10px; color: var(--t3, #94a1b8); font-style: italic; }
.er-log-verifybar { margin-top: 5px; display: flex; gap: 6px; }
.er-log-verifybtn, .er-log-rejectbtn {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid;
  cursor: pointer;
  background: transparent;
  font-weight: 600;
}
.er-log-verifybtn { color: #22c55e; border-color: #22c55e; }
.er-log-verifybtn:hover { background: rgba(34, 197, 94, 0.1); }
.er-log-rejectbtn { color: #ef4444; border-color: #ef4444; }
.er-log-rejectbtn:hover { background: rgba(239, 68, 68, 0.1); }
.er-pill-retired {
  background: rgba(148, 161, 184, 0.15);
  color: #94a1b8;
}
.er-det-notes {
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--blue, #3b82f6);
  border-radius: 4px;
  font-size: 12px;
  color: var(--t2, #cbd5e1);
  margin-bottom: 12px;
}
.er-row { cursor: pointer; }
.er-row:hover { background: rgba(59, 130, 246, 0.04); }
.er-row-spare { grid-template-columns: 40px 1fr 160px 130px !important; }
.er-spare-loc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  padding-right: 12px;
}
.er-spare-loc-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t3, #94a1b8);
}
.er-spare-loc-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--tw, #fff);
}
.er-spare-cert {
  margin-top: 4px;
  font-size: 11px;
  color: var(--t2, #cbd5e1);
  line-height: 1.4;
}
.er-spare-cert .lbl {
  color: var(--t3, #94a1b8);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 2px;
}
.er-spare-notesline {
  margin-top: 3px;
  font-size: 10px;
  color: var(--t3, #94a1b8);
  font-style: italic;
  line-height: 1.4;
}
.er-cert-link {
  color: #3b82f6;
  text-decoration: underline;
}
.er-cert-link:hover { color: #60a5fa; }
.er-cert-openbtn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.er-cert-openbtn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
.rlsc-hdr {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--b, #2a344a);
}
.rlsc-title { font-size: 16px; font-weight: 600; color: var(--tw, #fff); }
.rlsc-sub { font-size: 12px; color: var(--t3, #94a1b8); margin-top: 4px; }
.rlsc-info {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--blue, #3b82f6);
  border-radius: 4px;
  font-size: 12px;
  color: var(--t2, #cbd5e1);
}
.rlsc-uploadbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px dashed #3b82f6;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  width: fit-content;
}
.rlsc-uploadbtn:hover { background: rgba(59, 130, 246, 0.25); }
.rrof-info {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid #22c55e;
  border-radius: 4px;
  font-size: 12px;
  color: var(--t2, #cbd5e1);
}
.er-det-ohv-info {
  padding: 12px 14px;
  background: rgba(249, 115, 22, 0.08);
  border-left: 3px solid #f97316;
  border-radius: 4px;
  font-size: 12px;
  color: var(--t2, #cbd5e1);
  line-height: 1.6;
  margin-bottom: 8px;
}
/* Stock module — receive from OHV modal */
.stk-ohv-hdr { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--b, #2a344a); }
.stk-ohv-title { font-size: 16px; font-weight: 600; color: var(--tw, #fff); }
.stk-ohv-sub { font-size: 12px; color: var(--t3, #94a1b8); margin-top: 4px; }
.stk-ohv-info {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--blue, #3b82f6);
  border-radius: 4px;
  font-size: 12px;
  color: var(--t2, #cbd5e1);
}
.stk-ohv-info ol { margin: 6px 0 0 22px; padding: 0; }
.stk-ohv-info li { margin: 2px 0; }
.stk-ohv-uploadbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px dashed #3b82f6;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  width: fit-content;
}
.stk-ohv-uploadbtn:hover { background: rgba(59, 130, 246, 0.25); }
.uhw-badge {
  display: inline-block;
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-right: 4px;
  vertical-align: middle;
}
/* Candidates search + grouped list */
.er-cand-search {
  width: 100%;
  padding: 8px 12px;
  margin: 6px 0 10px;
  background: var(--bg2, #1d2534);
  color: var(--tw, #fff);
  border: 1px solid var(--b, #2a344a);
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
}
.er-cand-search:focus { outline: 2px solid var(--blue, #3b82f6); }
.er-det-cand-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.er-cand-group {
  background: rgba(59, 130, 246, 0.04);
  border-radius: 6px;
  padding: 8px 10px;
}
.er-cand-group-hdr {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t3, #94a1b8);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.er-cand-group-hdr .n {
  background: var(--bg1, #131824);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10px;
  color: var(--tw, #fff);
}
.er-cand-group-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sidebar expandable dropdown for CAMO & Maintenance */
.sb-item.sb-expandable {
  position: relative;
}
.sb-chevron {
  margin-left: auto;
  font-size: 8px;
  color: var(--t3, #94a1b8);
  transition: transform 0.18s ease;
  transform: rotate(0deg);
  display: inline-block;
}
.sb-item.sb-expanded .sb-chevron {
  transform: rotate(90deg);
}
.sb-sub-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  display: flex;
  flex-direction: column;
}
.sb-item.sb-expanded + .sb-sub-wrap {
  max-height: 500px;
}
.sb-item.sb-sub {
  padding-left: 42px !important;
  font-size: 12px !important;
  opacity: 0.9;
  border-left: 3px solid transparent;
}
.sb-item.sb-sub:hover {
  opacity: 1;
}
.sb-item.sb-sub.on {
  opacity: 1;
  border-left-color: var(--sidebar-active-border, #22d3ee) !important;
  background: rgba(34, 211, 238, 0.08);
  color: var(--tw, #fff) !important;
  font-weight: 500;
}
.sb-item.sb-sub .sb-icon {
  font-size: 13px;
  width: 18px;
}
.sb-preview {
  margin-left: auto;
  font-size: 9px;
  color: rgba(168, 85, 247, 0.8);
  opacity: 0.7;
}

/* [CAMO-HUB-V1 2026-09-17] Collapsed sidebar (icon-only mode) — hide
   chevron, sub-item labels and the whole sub-menu. Parent stays as a
   clickable icon that navigates to the hub landing. Expanding the
   sidebar reveals the full dropdown again. */
.sidebar.collapsed .sb-chevron,
.sidebar.collapsed .sb-preview,
.sidebar.collapsed .sb-sub-wrap {
  display: none !important;
}
.sidebar.collapsed .sb-item.sb-sub {
  display: none !important;
}
/* When collapsed the expandable parent behaves like any other sb-item —
   just an icon that navigates on click. */
.sidebar.collapsed .sb-item.sb-expandable {
  padding: 9px 12px;
}

.ch-dev-banner {
  background: linear-gradient(90deg, rgba(168,85,247,0.14), rgba(34,211,238,0.10));
  border: 1px solid rgba(168,85,247,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--t3, #94a1b8);
  margin-bottom: 18px;
}
.ch-dev-banner b { color: var(--tw, #fff); }

.ch-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.ch-kpi {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.ch-kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #6b7691;
}
.ch-kpi.k-ok::before   { background: #22c55e; }
.ch-kpi.k-warn::before { background: #eab308; }
.ch-kpi.k-near::before { background: #f97316; }
.ch-kpi.k-crit::before { background: #ef4444; }
.ch-kpi.k-info::before { background: #22d3ee; }
.ch-kpi-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--t3, #94a1b8);
  font-weight: 500;
  margin-bottom: 4px;
}
.ch-kpi-val {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--tw, #fff);
}
.ch-kpi-hint {
  font-size: 11px;
  color: var(--t3, #94a1b8);
  margin-top: 2px;
}

.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.ch-card {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  position: relative;
}
.ch-card:hover {
  background: var(--bg2, #1d2534);
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.ch-card:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
.ch-card:hover .ch-arrow { transform: translateX(3px); }
.ch-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.ch-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tw, #fff);
  letter-spacing: -0.005em;
}
.ch-emoji {
  font-size: 17px;
  margin-right: 6px;
  display: inline-block;
}
.ch-badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.bdg-ok   { background: rgba(34, 197, 94, 0.14);  color: #22c55e; }
.bdg-warn { background: rgba(234, 179, 8, 0.15);  color: #eab308; }
.bdg-near { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.bdg-crit { background: rgba(239, 68, 68, 0.15);  color: #ef4444; }
.bdg-info { background: rgba(34, 211, 238, 0.15); color: #22d3ee; }
.ch-card-desc {
  color: var(--t3, #94a1b8);
  font-size: 11.5px;
  margin: 0 0 14px;
  min-height: 3em;
  line-height: 1.4;
}
.ch-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--b, #2a344a);
  border-bottom: 1px solid var(--b, #2a344a);
}
.ch-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ch-stat-n {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--tw, #fff);
}
.ch-stat-n.warn { color: #eab308; }
.ch-stat-n.near { color: #f97316; }
.ch-stat-n.crit { color: #ef4444; }
.ch-stat-n.ok   { color: #22c55e; }
.ch-stat-n.info { color: #22d3ee; }
.ch-stat-l {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--t3, #94a1b8);
  margin-top: 2px;
}
.ch-card-cta {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #22d3ee;
}
.ch-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}
.ch-preview-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  color: rgba(168, 85, 247, 0.85);
  background: rgba(168, 85, 247, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: none;
}
.ch-card:has(.ch-preview-tag) .ch-badge { display: none; }
.ch-card .ch-preview-tag { display: inline-block; }

/* [KIT-ASSEMBLY-VIEW 2026-09-18 Iteration 3.6] Rotables tab tree
   visualization: kit children render indented under their parent
   with a subtle bg shade + tree connector, so an engine + its
   accessories read as a single assembly at a glance. */
.stk-kit-row {
  background: rgba(59, 130, 246, 0.05);
}
.stk-kit-row td {
  border-top: 1px dashed rgba(59, 130, 246, 0.15);
}
.stk-kit-indent {
  padding-left: 32px !important;
  color: var(--t2, #c8d0dd);
}
.stk-kit-tree {
  color: var(--blue, #3b82f6);
  font-family: 'Consolas', 'Courier New', monospace;
  font-weight: 600;
  margin-right: 4px;
  user-select: none;
}
.stk-kit-parent-dim {
  opacity: 0.7;
}
.stk-kit-parent-dim td {
  color: var(--t3, #94a1b8);
}

/* [KIT-CHIP 2026-09-18 Iteration 3.6 Phase 6] Kit child rows in the
   Component Status list get a subtle left border stripe + tiny indent
   on the description cell so operators can visually pick out kits at
   a glance without reading every desc. */
tr.u-kit-child-row td:first-child {
  padding-left: 22px;
  border-left: 3px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.03);
}

/* [KIT-LOGBOOK-AGG 2026-09-18 Iteration 3.6 Phase 7] Kit-aggregated
   logbook rows in the parent's Engine Logbook get a subtle left
   stripe + small chip so operators can quickly tell them apart from
   parent entries when auditing engine history. */
.er-det-logbook-row.er-log-kit-row {
  border-left: 3px solid rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.04);
  padding-left: 8px;
}
.er-log-kit {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue, #3b82f6);
  font-weight: 500;
  vertical-align: middle;
}

/* [KIT-BATCH-CSS 2026-09-18 Iteration 3.6 Phase 8] Move inline styles
   out of the Batch add textarea + preview into CSS classes to keep
   the CSP style-src-attr report clean. */
.rakb-textarea {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  white-space: pre;
}
.rakb-preview-hidden { display: none; }

/* [CENTRAL-VERIFY-V1 2026-09-18 Iteration 2.6 Phase 2] Central
   Verification Dashboard layout. Rows are compact horizontal cards:
   checkbox · source (icon + name + S/N) · entry (ref + date + hrs +
   source badge + desc + meta) · age chip · Verify/Reject buttons. */
.ver-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.ver-kpi {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  border-radius: 10px;
  padding: 14px 18px;
}
.ver-kpi.k-r { border-color: rgba(239, 68, 68, 0.5); }
.ver-kpi.k-a { border-color: rgba(245, 158, 11, 0.5); }
.ver-kpi.k-b { border-color: rgba(59, 130, 246, 0.5); }
.ver-kpi.k-p { border-color: rgba(168, 85, 247, 0.5); }
.ver-kpi-n {
  font-size: 28px;
  font-weight: 700;
  color: var(--tw, #fff);
}
.ver-kpi-l {
  font-size: 11px;
  color: var(--t3, #94a1b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.ver-bulk-bar {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tw, #fff);
}
.ver-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.ver-row {
  background: var(--bg3, #161c29);
  border: 1px solid var(--b, #2a344a);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 32px 220px 1fr 80px 180px;
  gap: 14px;
  align-items: center;
}
.ver-row-sel {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.4);
}
.ver-check { display: flex; align-items: center; justify-content: center; }
.ver-checkbox { width: 18px; height: 18px; cursor: pointer; }
.ver-src { display: flex; align-items: center; gap: 10px; }
.ver-src-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--bg2, #1d2534);
}
.ver-src-info { min-width: 0; }
.ver-src-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tw, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ver-src-sub {
  font-size: 11px;
  color: var(--t3, #94a1b8);
  margin-top: 2px;
}
.ver-entry { min-width: 0; }
.ver-entry-hdr {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  margin-bottom: 3px;
}
.ver-ref {
  font-weight: 600;
  color: var(--tw, #fff);
  font-family: 'Consolas', 'Courier New', monospace;
}
.ver-date, .ver-hrs {
  color: var(--t3, #94a1b8);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 11px;
}
.ver-hrs { font-weight: 600; }
.ver-entry-desc {
  font-size: 12px;
  color: var(--t2, #c8d0dd);
  margin-bottom: 3px;
}
.ver-entry-meta {
  font-size: 10px;
  color: var(--t3, #94a1b8);
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}
.ver-age-col { display: flex; align-items: center; justify-content: center; }
.ver-age {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.ver-age-ok { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.ver-age-warn { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.ver-age-crit { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ver-age-nd { background: var(--bg2, #1d2534); color: var(--t3, #94a1b8); }
.ver-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
@media (max-width: 1200px) {
  .ver-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ver-row { grid-template-columns: 32px 1fr; grid-auto-flow: row; }
  .ver-src, .ver-entry, .ver-age-col, .ver-actions { grid-column: 1 / -1; }
}

.ver-clickable { cursor: pointer; }
.ver-clickable:hover { opacity: 0.85; }

/* [SPARE-AMP-HISTORY 2026-09-19 Iteration 2.7] Import History modal */
.rih-info {
  padding: 8px 10px;
  margin: 8px 0;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--t2, #cbd5e1);
  font-size: 12.5px;
  line-height: 1.45;
}
.rih-new-hdr {
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--t1, #e2e8f0);
}
.rih-existing {
  margin: 10px 0 14px;
  border: 1px solid var(--b, #334155);
  border-radius: 6px;
  overflow: hidden;
}
.rih-existing-hdr {
  padding: 6px 10px;
  background: var(--bg2, #1d2534);
  font-weight: 600;
  font-size: 12.5px;
  border-bottom: 1px solid var(--b, #334155);
}
.rih-existing-tbl,
.rih-rows-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.rih-existing-tbl th,
.rih-rows-tbl th {
  text-align: left;
  padding: 6px 8px;
  background: var(--bg2, #1d2534);
  color: var(--t2, #cbd5e1);
  font-weight: 600;
  border-bottom: 1px solid var(--b, #334155);
}
.rih-existing-tbl td,
.rih-rows-tbl td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--b, #334155);
}
.rih-rows-tbl input {
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  background: var(--bg, #0f1524);
  border: 1px solid var(--b, #334155);
  color: var(--t1, #e2e8f0);
  border-radius: 4px;
}
