/* Sub-nav strip used by the three "Admin" views: Auth / Jobs / Workers.
   Lives inside #lf-view as the first child of each view's root.

   Visual: a clean underline-style tab bar with a small "ADMIN" eyebrow
   label on the left. Active tab shows the accent color and a 2px
   underline. Hover gets a softer underline so the affordance is obvious. */

:root {
  --lf-subnav-h: 52px;
}

.admin-subnav {
  height: var(--lf-subnav-h);
  background: var(--lf-panel);
  border-bottom: 1px solid var(--lf-border);
  flex-shrink: 0;
  /* Horizontal scroll only. overflow-x:auto alone forces overflow-y to
     compute to auto as well (CSS spec), which lets the strip sprout a
     stray vertical scrollbar — clamp the y axis explicitly. */
  overflow-x: auto;
  overflow-y: hidden;
}

/* Dealer-section views (Dealers / Applications / Orders) pin the shell to
   the viewport and let their root flex into the space left below the
   subnav strip — no fragile "100vh minus summed pixel heights" math, so
   the strip can be any height without producing a stray body scrollbar.
   The view toggles .lf-view-dealer on #lf-view in init()/destroy(). */
#lf-view.lf-view-dealer {
  height: calc(100dvh - var(--lf-nav-h, 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-subnav-inner {
  display: flex;
  align-items: stretch;
  gap: 18px;
  height: 100%;
  padding: 0 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.admin-subnav-title {
  display: inline-flex;
  align-items: center;
  color: var(--lf-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  /* tiny visual separator between the eyebrow label and the tabs */
  padding-right: 18px;
  border-right: 1px solid var(--lf-border);
}

.admin-subnav-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 100%;
}

.admin-subnav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: var(--lf-text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  /* Reserve the active underline space so non-active tabs don't shift
     when their state changes. */
  border-bottom: 2px solid transparent;
  margin-bottom: -1px; /* overlap the .admin-subnav border-bottom */
}

.admin-subnav-tab:hover {
  color: var(--lf-text);
  background: var(--lf-panel-hover);
  border-bottom-color: var(--lf-border-strong);
}

.admin-subnav-tab.active {
  color: var(--lf-accent);
  font-weight: 600;
  border-bottom-color: var(--lf-accent);
  background: var(--lf-accent-bg);
}

.admin-subnav-tab.active:hover {
  /* Keep the active state stable on hover - just bump background a touch. */
  background: var(--lf-accent-bg);
  border-bottom-color: var(--lf-accent);
}

@media (max-width: 640px) {
  .admin-subnav-inner {
    padding: 0 12px;
    gap: 10px;
  }
  .admin-subnav-title {
    display: none;
  }
  .admin-subnav-tab {
    padding: 0 12px;
    font-size: 13px;
  }
}
