.home-collection-link {
  display:inline-flex;
  align-items:center;
  max-width:clamp(64px, 24vw, 180px);
  min-height:35px;
  margin:0;
  padding:7px 12px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--card);
  color:var(--navy);
  font-size:12px;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.topbar { gap:12px; }
.topbar-actions { min-width:0; gap:6px; }
.topbar-actions .home-collection-link { display:block; flex:0 1 auto; min-width:0; }
.topbar-actions .icon-button { flex-shrink:0; }
.home-collection-link:hover { background:var(--paper); border-color:var(--navy); }
:root[data-mode="dark"] .home-collection-link { background:var(--card); border-color:var(--line); color:var(--accent); }
:root[data-mode="dark"] .home-collection-link:hover { background:var(--paper); border-color:var(--accent); color:var(--accent); }
.topbar-actions > :is(#homeFleetName, #customizeHome, #moreButton) {
  height:38px;
  min-height:38px;
  border:0;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  box-shadow:0 3px 10px color-mix(in srgb, var(--accent) 22%, transparent);
}
.topbar-actions > :is(#homeFleetName, #customizeHome, #moreButton):hover:not(:disabled) {
  background:color-mix(in srgb, var(--accent) 88%, black);
  color:#fff;
}
.topbar-actions > :is(#homeFleetName, #customizeHome, #moreButton):disabled { opacity:.5; cursor:default; }
.widget-sort-row { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:6px; margin-bottom:9px; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
.widget-sort-row--selected { border-color:color-mix(in srgb, var(--accent) 55%, var(--line)); }
.widget-sort-row .widget-choice { margin:0; padding:12px 8px 12px 12px; gap:8px; min-width:0; border:0; background:var(--card); }
.widget-sort-row .widget-choice input { flex-shrink:0; }
.widget-sort-row .widget-choice small { line-height:1.4; }
.widget-drag-handle { display:grid; place-items:center; width:42px; height:44px; margin-right:4px; border:0; border-radius:9px; background:transparent; color:var(--navy); font-size:28px; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.widget-drag-handle:disabled { opacity:.2; cursor:default; }
.widget-dragging { position:relative; z-index:2; box-shadow:0 6px 18px color-mix(in srgb,var(--navy) 25%,transparent); border-color:var(--accent); }
.widget-dragging .widget-drag-handle { cursor:grabbing; }
.widget-shifting { transition:transform .14s ease; }
#widgetChoices.is-dragging { user-select:none; -webkit-user-select:none; touch-action:none; }
.widget-order-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body:has(#widgetDialog[open]) { overflow:hidden; }
#widgetDialog { overflow:hidden; max-height:calc(100dvh - 24px); overscroll-behavior:none; }
#widgetForm { padding:18px; }
#widgetForm > .dialog-heading { margin-bottom:12px; }
#widgetForm .dialog-heading h2 { font-size:21px; }
#widgetForm .dialog-help { font-size:12px; line-height:1.4; margin:0 0 10px; }
.widget-tabs { display:flex; gap:4px; padding:3px; margin-bottom:12px; background:var(--paper); border:1px solid var(--line); border-radius:11px; }
.widget-tabs button { flex:1; border:0; border-radius:8px; padding:8px; background:transparent; color:var(--muted); font-size:12px; font-weight:750; }
.widget-tabs button[aria-selected="true"] { background:var(--navy); color:#fff; }
#widgetForm .widget-sort-row { min-height:48px; margin-bottom:6px; overflow:visible; }
#widgetForm .widget-choice { padding:8px 6px 8px 10px; }
#widgetForm .widget-choice small { display:none; }
#widgetForm .widget-choice strong { font-size:13px; }
#widgetForm > .save-button { margin-top:10px; padding:12px; }
#widgetAppearancePane { margin:0; padding:0; border:0; }
#widgetAppearancePane .mode-picker { margin-bottom:0; }
.widget-pane-title { display:none; }
@media (min-width:900px) and (min-height:500px) {
  #widgetDialog { width:min(780px, calc(100vw - 48px)); }
  #widgetForm { display:grid; grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr); column-gap:30px; padding:26px; }
  #widgetForm > .dialog-heading { grid-column:1/-1; margin-bottom:22px; }
  #widgetForm .widget-tabs { display:none; }
  #widgetOrderPane, #widgetAppearancePane.hidden { display:block !important; min-width:0; }
  #widgetAppearancePane { padding-left:26px; border-left:1px solid var(--line); }
  .widget-pane-title { display:block; margin:0 0 12px; color:var(--ink); font-size:15px; letter-spacing:-.2px; }
  #widgetForm > .save-button { grid-column:1/-1; justify-self:end; width:auto; min-width:200px; margin-top:22px; }
}
@media (max-height:500px) {
  #widgetForm { padding:10px 14px; }
  #widgetForm > .dialog-heading { margin-bottom:6px; }
  #widgetForm > .dialog-heading .eyebrow, #widgetForm .dialog-help { display:none; }
  .widget-tabs { margin-bottom:6px; }
  .widget-tabs button { padding:6px; }
  #widgetForm .widget-sort-row { min-height:32px; margin-bottom:3px; }
  #widgetForm .widget-choice { padding:4px 8px; }
  .widget-drag-handle { height:32px; }
  #widgetForm > .save-button { margin-top:6px; padding:8px; }
}
@media (max-height:700px) {
  #widgetDialog .tour-inline .tour-card { padding:10px; margin:8px; width:calc(100% - 16px); }
  #widgetDialog .tour-card #tourText, #widgetDialog .tour-card .guide-progress, #widgetDialog .tour-card .eyebrow { display:none; }
  #widgetDialog .tour-card-top { margin-bottom:5px; }
  #widgetDialog .tour-card h2 { font-size:15px; margin-bottom:5px; }
  #widgetDialog .tour-actions button { min-height:30px; padding:6px 10px; }
}
.collection-switcher { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:12px; }
.collection-switcher label { min-width:0; margin:0; }
.collection-switcher label > span { color:var(--muted); font-size:11px; font-weight:750; }
.collection-switcher select { min-width:0; min-height:46px; border-color:var(--line); border-radius:12px; background:var(--card); font-weight:700; }
.collection-actions { display:flex; gap:8px; }
.collection-actions button { min-height:46px; padding:11px 14px; border-radius:12px; font-size:12px; white-space:nowrap; }
.collection-help { margin:12px 0 20px; color:var(--muted); font-size:12px; line-height:1.55; }
.collection-empty { padding:38px 22px; border:1px dashed var(--line); border-radius:18px; background:var(--card); text-align:center; }
.collection-empty > span { display:grid; place-items:center; width:42px; height:42px; margin:0 auto 14px; border-radius:14px; background:var(--paper); color:var(--navy); font-size:25px; }
.collection-empty h3 { margin:0 0 8px; color:var(--ink); font-size:17px; letter-spacing:-.3px; }
.collection-empty p { max-width:360px; margin:0 auto; color:var(--muted); font-size:13px; line-height:1.6; }
.inspection-reminder-block { margin:22px 0 18px; padding:18px 0 2px; border-top:1px solid var(--line); }
.inspection-reminder-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.inspection-reminder-header h3 { margin:0; color:var(--ink); font-size:16px; }
.inspection-reminder-header .eyebrow { margin-bottom:5px; }
.inspection-reminder-header .secondary-button { width:auto; padding:9px 11px; font-size:11px; }
.inspection-status { margin:16px 0 12px; color:var(--muted); font-size:11px; line-height:1.6; }
.inspection-status:empty { margin:0; }
.inspection-popup-lookup { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px; border:1px solid var(--line); border-radius:13px; background:var(--paper); }
.inspection-popup-lookup > div { min-width:0; }
#inspectionRegistration { display:block; overflow:hidden; color:var(--ink); font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:17px; font-weight:800; letter-spacing:1px; text-overflow:ellipsis; white-space:nowrap; }
.inspection-popup-lookup small { display:block; margin:0 0 4px; color:var(--muted); font-size:11px; }
.inspection-popup-lookup button { flex:0 0 auto; min-height:42px; padding:10px 13px; border:0; border-radius:10px; background:var(--navy); color:#fff; font-size:12px; font-weight:750; }
.inspection-popup-lookup button:disabled { opacity:.5; cursor:default; }
.inspection-reminder-block input[type="date"] { min-width:0; border-color:var(--line); }
.inspection-reminder-block input[type="file"] { border:1px dashed var(--line); background:var(--paper); color:var(--muted); font-size:12px; line-height:1.5; }
.inspection-reminder-block input[type="file"]::file-selector-button { margin-right:9px; padding:7px 10px; border:1px solid var(--line); border-radius:7px; background:var(--card); color:var(--navy); font:inherit; font-weight:700; cursor:pointer; }
.inspection-attachment-list { display:grid; gap:8px; margin:12px 0 18px; }
.inspection-attachment-list:empty { display:none; }
.inspection-attachment-list button { display:flex; align-items:center; gap:9px; width:100%; min-height:44px; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--navy); font-size:12px; font-weight:650; line-height:1.4; text-align:left; overflow-wrap:anywhere; }
.inspection-attachment-list button:hover { background:var(--paper); }
.inspection-attachment-list button strong { min-width:0; overflow-wrap:anywhere; }
@media (max-width:600px) {
  .collection-switcher { grid-template-columns:minmax(0,1fr); gap:10px; }
  .collection-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .collection-actions button { min-height:43px; }
  .inspection-reminder-header { align-items:flex-start; flex-direction:column; }
  .inspection-reminder-header .secondary-button { width:100%; }
}
@media (max-width:360px) {
  .inspection-popup-lookup { padding:12px; gap:10px; }
  .inspection-popup-lookup button { padding:10px; font-size:11px; }
  #inspectionRegistration { font-size:15px; }
}
