/*
 * Authenticated workspace theme. Deployable delta = this file + class hooks
 * (fpl-workspace on Layout root; fpl-tabbar/fpl-tab/fpl-dept-* in DepartmentPage;
 * fpl-tabbar on the Customs tab strip) + decorative utility swaps in Geodis*.tsx.
 * Specificity: form/table/focus baseline rules use :where() (zero, utilities win).
 * Typography and .fpl-tabbar > button rules are NON-zero on purpose (beat .font-display / text-xs).
 * Portal rule: [role=dialog] headings inherit body font; no layout/colour changes.
 * Never recolor status chips, readiness/pickup rows or map semantics here.
 */
:root { --font-sans: 'Inter', sans-serif; --font-display: var(--font-sans); }
.fpl-workspace { font-feature-settings: "tnum" 1, "cv11" 1; }
.fpl-workspace :where(table) { font-variant-numeric: tabular-nums; }
.fpl-workspace :where(th) { font-weight: 600; letter-spacing: 0.01em; }
.fpl-workspace :where(td) { font-variant-numeric: tabular-nums; }
.fpl-workspace :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea) {
  border-radius: calc(var(--radius) - 2px);
}
.fpl-workspace :where(input:not([type=checkbox]):not([type=radio]), select, textarea):focus-visible {
  outline: none;
  border-color: hsl(var(--primary) / 0.6);
  box-shadow: 0 0 0 2px hsl(var(--primary) / 0.18);
}
.fpl-workspace :where(button, [role=button], a):focus-visible {
  outline: 2px solid hsl(var(--ring) / 0.55);
  outline-offset: 1px;
}
.fpl-workspace :where(button:not(:disabled)) { cursor: pointer; }

/* Navigation tabs shared by department containers */
.fpl-tabbar { background: hsl(var(--card)); border-bottom: 1px solid hsl(var(--border)); }
.fpl-tab {
  display: inline-flex; align-items: center; gap: 0.375rem; white-space: nowrap;
  padding: 0.5rem 0.75rem; font-size: 0.8125rem; font-weight: 600;
  color: hsl(var(--muted-foreground));
  border-bottom: 2px solid transparent; border-radius: 0.375rem 0.375rem 0 0;
  transition: color .15s, background-color .15s, border-color .15s;
}
.fpl-tab:hover { color: hsl(var(--foreground)); background: hsl(var(--muted) / 0.5); }
.fpl-tab[data-active="true"] {
  color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.06);
}

/* Department shell: one calm header, department identity only as a small marker */
.fpl-dept-stripe { height: 2px; background: hsl(var(--primary)); }
.fpl-dept-header { background: hsl(var(--card) / 0.92); }
.fpl-dept-icon {
  background: hsl(var(--muted)); border: 1px solid hsl(var(--border));
  box-shadow: none;
}
.fpl-dept-body { background: hsl(var(--card)); border-radius: var(--radius); box-shadow: none; }

/* Single typeface: headings share the body family (Inter) everywhere, incl. portals */
.fpl-workspace h1, .fpl-workspace h2, .fpl-workspace h3, .fpl-workspace h4,
.fpl-workspace .font-display, [role=dialog] h1, [role=dialog] h2, [role=dialog] h3 {
  font-family: var(--font-sans); letter-spacing: -0.005em;
}
.fpl-workspace h2 { font-size: 1rem; font-weight: 600; }
.fpl-workspace h3 { font-size: 0.875rem; font-weight: 600; }
[role=dialog] { font-family: var(--font-sans); }

/* Tab strips that live inside workspaces (Customs 10 tabs, others): explicit, beats utility classes */
.fpl-tabbar > button, .fpl-tabbar > div > button {
  font-size: 0.8125rem; font-weight: 600; border-radius: 0.375rem 0.375rem 0 0;
}
.fpl-tabbar > button:hover:not([data-active="true"]):not(.border-primary) { background: hsl(var(--muted) / 0.5); }
.fpl-tabbar > button.border-primary { background: hsl(var(--primary) / 0.06); }

/* Native compatibility: these overrides target decorative roles only. */
:root{--font-display:var(--font-sans)}
.fpl-workspace .fpl-dept-stripe{background:hsl(var(--primary))!important}
.fpl-workspace .fpl-dept-icon{background:hsl(var(--muted))!important;color:hsl(var(--primary))}
.fpl-workspace .fpl-tab{font-family:var(--font-sans);color:hsl(var(--muted-foreground))!important;background:transparent!important}
.fpl-workspace .fpl-tab[data-active="true"],.fpl-workspace .fpl-tab.border-primary{color:hsl(var(--primary))!important;border-bottom-color:hsl(var(--primary))!important;background:hsl(var(--primary)/.06)!important}
.fpl-sidebar a svg{color:inherit!important}
.fpl-sidebar a[class~="bg-sidebar-accent"],.fpl-sidebar a[class~="bg-emerald-500/10"],.fpl-sidebar a[class~="bg-blue-500/10"],.fpl-sidebar a[class~="bg-amber-500/10"]{color:hsl(var(--primary))!important;background:hsl(var(--primary)/.08)!important}
.fpl-sidebar a>span.absolute{background:hsl(var(--primary))!important}
