/* Mobile nav hidden by default — mobile.css shows it at ≤768px */
#mobile-nav { display: none; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease;
  overflow: hidden;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}
.sidebar.collapsed { width: 48px; }

.sidebar-toggle {
  background: none; border: none; color: var(--txt-dim);
  font-size: 17px; padding: 15px 15px; cursor: pointer;
  text-align: left; line-height: 1; flex-shrink: 0; transition: color 0.15s;
}
.sidebar-toggle:hover { color: var(--accent); }

.sidebar-logo {
  padding: 0 15px 20px;
  white-space: nowrap;
}
.sidebar-logo img { display: block; width: 100%; height: auto; }
.sidebar.collapsed .sidebar-logo { display: none; }

.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 15px;
  color: var(--txt-muted); cursor: pointer;
  font-family: 'Saira Condensed', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
  white-space: nowrap; border-left: 2px solid transparent;
  user-select: none; transition: all 0.15s;
}
.nav-item:hover { color: var(--txt); background: var(--bg-hover); }
.nav-item.active { color: var(--accent); background: var(--accent-dim); border-left-color: var(--accent); }
.nav-icon { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.nav-label { overflow: hidden; }
.sidebar.collapsed .nav-label { display: none; }

.nav-version {
  padding: 6px 15px 10px;
  font-size: 11px; color: var(--txt-dim);
  white-space: nowrap; overflow: hidden;
}
.sidebar.collapsed .nav-version { display: none; }

/* ── Main content & pages ── */
.main-content { flex: 1; padding: 24px; min-width: 0; }
.page { display: none; }
.page.active { display: block; }

/* ── Parts layout ── */
.parts-container { max-width: var(--panel-sm); margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.part-row { display: flex; gap: 20px; align-items: flex-start; }
.part-form-card {
  flex: 0 0 356px; background: var(--bg-panel);
  padding: 16px; border-radius: 6px; border: 1px solid var(--border);
}
.part-form-title {
  font-family: 'Saira Condensed', sans-serif;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--accent);
  margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.part-preview-slot { flex: 0 0 384px; }

/* ── WO Detail Header ── */
.wo-detail-header {
  max-width: var(--panel-md); margin: 0 auto 16px; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; background: var(--bg-panel); padding: 12px 20px;
  border-radius: 6px; border: 1px solid var(--border);
}
.back-btn {
  background: none; border: 1px solid var(--border-hi); color: var(--txt-muted);
  padding: 6px 12px; border-radius: 4px;
  font-family: 'Saira Condensed', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.back-btn:hover { color: var(--txt); border-color: var(--txt-muted); }
.wo-title-text {
  font-family: 'Saira Condensed', sans-serif;
  font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--txt);
}
.wo-vendor-info { font-size: 11px; color: var(--txt-muted); margin-top: 2px; }
.wo-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ── Sub-tabs ── */
.subtab-nav {
  max-width: var(--panel-md); margin: 0 auto 20px; display: flex;
  justify-content: center; /* buttons centered; container keeps panel-md width */
  gap: 0; border-bottom: 1px solid var(--border);
}
.tab-btn {
  padding: 6px 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Saira Condensed', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--txt-muted); cursor: pointer; transition: all 0.15s;
}
.tab-btn:hover { color: var(--txt); border-color: var(--border-hi); }
.tab-btn.active { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.subtab-btn {
  padding: 9px 20px; background: none; border: none;
  font-family: 'Saira Condensed', sans-serif;
  font-size: 13px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--txt-muted); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: color 0.15s; white-space: nowrap;
}
.subtab-btn:hover { color: var(--txt); }
.subtab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Lucide icon sizing ── */
.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
  flex-shrink: 0;
}
.subtab-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
  vertical-align: -2px;
  margin-right: 4px;
}
.mnav-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
}
