/* ============================================================
   HutiFlow WMS — Design System
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: var(--hf-text-base);
  line-height: 1.45;
  color: var(--hf-text-primary);
  background: var(--hf-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Login ---------- */
.hf-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 52px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.12), transparent 30%),
    linear-gradient(180deg, #EEF2F6 0%, #F8FAFC 100%);
  color: #0F172A;
}
.hf-login-card {
  width: min(100%, 430px);
  display: grid;
  gap: 16px;
  padding: 26px 28px 28px;
  border: 1px solid #CBD5E1;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}
.hf-login-logo {
  width: min(100%, 260px);
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 2px;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.18));
}
.hf-login-title {
  margin: 0;
  text-align: center;
  color: #0F172A;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hf-login-form {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}
.hf-login-field {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.hf-login-input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #94A3B8;
  border-radius: 7px;
  background: #FFFFFF;
  color: #0F172A;
  font: inherit;
  outline: none;
}
.hf-login-input:focus {
  border-color: #D97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}
.hf-login-error {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 7px;
  background: rgba(220, 38, 38, 0.08);
  color: #B91C1C;
  font-size: 12px;
  font-weight: 700;
}
.hf-login-submit {
  height: 42px;
  border: 1px solid #D97706;
  border-radius: 7px;
  background: #D97706;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.hf-login-submit:hover {
  background: #B45309;
  border-color: #B45309;
}
.hf-login-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---------- Design Tokens: Spacing ---------- */
:root {
  --hf-sp-1: 4px;
  --hf-sp-2: 8px;
  --hf-sp-3: 12px;
  --hf-sp-4: 16px;
  --hf-sp-5: 20px;
  --hf-sp-6: 24px;
  --hf-sp-7: 28px;
  --hf-sp-8: 32px;
  --hf-density-row-h: 28px;
  --hf-density-control-h: 26px;
  --hf-density-card-pad: 10px;

  /* Typography */
  --hf-font-sans: 'Inter', 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --hf-font-mono: 'Cascadia Code', 'Consolas', 'Menlo', monospace;
  --hf-text-2xs: 10px;
  --hf-text-xs: 11px;
  --hf-text-sm: 12px;
  --hf-text-base: 12px;
  --hf-text-lg: 14px;
  --hf-text-xl: 16px;
  --hf-text-2xl: 18px;

  /* Radius */
  --hf-radius-xs: 2px;
  --hf-radius-sm: 3px;
  --hf-radius: 5px;
  --hf-radius-lg: 6px;

  /* Layout */
  --hf-header-h: 40px;
  --hf-sidebar-w: 238px;
  --hf-sidebar-collapsed-w: 52px;

  /* Transitions */
  --hf-transition-fast: 120ms ease;
  --hf-transition: 200ms ease;

  /* Accent — shared across themes */
  --hf-accent: #D97706;
  --hf-accent-hover: #B45309;
  --hf-accent-subtle: rgba(217, 119, 6, 0.12);
  --hf-accent-ring: rgba(217, 119, 6, 0.45);

  /* Semantic */
  --hf-danger: #DC2626;
  --hf-danger-subtle: rgba(220, 38, 38, 0.12);
  --hf-success: #16A34A;
  --hf-success-subtle: rgba(22, 163, 74, 0.12);
  --hf-info: #2563EB;
  --hf-info-subtle: rgba(37, 99, 235, 0.12);
  --hf-warning: #F59E0B;
  --hf-warning-subtle: rgba(245, 158, 11, 0.12);
}

/* ---------- Dark Theme (default) ---------- */
[data-theme="dark"], :root {
  --hf-bg-primary: #080D14;
  --hf-bg-secondary: #0F1724;
  --hf-bg-card: #101722;
  --hf-bg-card-hover: #172131;
  --hf-bg-input: #090F18;
  --hf-bg-header: rgba(8, 13, 20, 0.96);
  --hf-bg-sidebar: #0A111B;
  --hf-bg-zebra: rgba(255, 255, 255, 0.02);

  --hf-text-primary: #E2E8F0;
  --hf-text-secondary: #94A3B8;
  --hf-text-muted: #64748B;
  --hf-text-heading: #F1F5F9;

  --hf-border: #223044;
  --hf-border-strong: #3A4A61;
  --hf-border-subtle: rgba(255, 255, 255, 0.06);

  --hf-selected-row: rgba(217, 119, 6, 0.08);
  --hf-hover-row: rgba(255, 255, 255, 0.03);

  --hf-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --hf-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
  --hf-bg-primary: #EEF2F6;
  --hf-bg-secondary: #E0E7EF;
  --hf-bg-card: #FFFFFF;
  --hf-bg-card-hover: #F8FAFC;
  --hf-bg-input: #FFFFFF;
  --hf-bg-header: rgba(255, 255, 255, 0.96);
  --hf-bg-sidebar: #FFFFFF;
  --hf-bg-zebra: rgba(0, 0, 0, 0.02);

  --hf-text-primary: #0F172A;
  --hf-text-secondary: #475569;
  --hf-text-muted: #94A3B8;
  --hf-text-heading: #0F172A;

  --hf-border: #CBD5E1;
  --hf-border-strong: #94A3B8;
  --hf-border-subtle: rgba(0, 0, 0, 0.06);

  --hf-selected-row: rgba(217, 119, 6, 0.08);
  --hf-hover-row: rgba(0, 0, 0, 0.02);

  --hf-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --hf-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   Utility Classes
   ============================================================ */

/* ---------- Buttons ---------- */
.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--hf-density-control-h);
  padding: 0 9px;
  font-size: var(--hf-text-sm);
  font-weight: 600;
  font-family: var(--hf-font-sans);
  line-height: 1;
  border-radius: var(--hf-radius-sm);
  border: 1px solid var(--hf-border);
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--hf-transition-fast), border-color var(--hf-transition-fast);
  text-decoration: none;
}
.hf-btn:hover { background: var(--hf-bg-card-hover); border-color: var(--hf-border-strong); }
.hf-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hf-btn-primary {
  background: var(--hf-accent);
  border-color: var(--hf-accent);
  color: #FFFFFF;
}
.hf-btn-primary:hover { background: var(--hf-accent-hover); border-color: var(--hf-accent-hover); }

.hf-btn-ghost {
  background: transparent;
  border-color: transparent;
}
.hf-btn-ghost:hover { background: var(--hf-bg-card-hover); border-color: var(--hf-border); }

.hf-btn-danger {
  background: var(--hf-danger-subtle);
  border-color: rgba(220, 38, 38, 0.35);
  color: #F87171;
}
[data-theme="light"] .hf-btn-danger { color: var(--hf-danger); }
.hf-btn-danger:hover { background: rgba(220, 38, 38, 0.2); }

.hf-btn-sm { height: 26px; padding: 0 8px; font-size: var(--hf-text-xs); }
.hf-btn-xs { height: 22px; padding: 0 6px; font-size: var(--hf-text-2xs); }

/* ============================================================
   Hutiflow WMS Presentation Site
   Scoped to .hp-site so the admin/scanner application keeps its
   existing enterprise UI rules.
   ============================================================ */

.hp-site {
  --hp-navy: #050b14;
  --hp-graphite: #0b1624;
  --hp-panel: #101a2a;
  --hp-panel-soft: rgba(255, 255, 255, 0.055);
  --hp-orange: #f97316;
  --hp-orange-dark: #c2410c;
  --hp-orange-soft: rgba(249, 115, 22, 0.12);
  --hp-amber: #fbbf24;
  --hp-green: #22c55e;
  --hp-blue: #38bdf8;
  --hp-red: #ef4444;
  --hp-ink: #0f172a;
  --hp-text: #334155;
  --hp-muted: #64748b;
  --hp-soft: #f6f8fb;
  --hp-line: #dbe3ee;
  --hp-white: #ffffff;
  --hp-shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
  --hp-shadow-dark: 0 28px 80px rgba(0, 0, 0, 0.38);
  --hp-radius: 24px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--hp-white);
  color: var(--hp-ink);
  font-family: Inter, "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

.hp-site *,
.hp-site *::before,
.hp-site *::after {
  box-sizing: border-box;
}

.hp-site a {
  color: inherit;
  text-decoration: none;
}

.hp-site button,
.hp-site input,
.hp-site textarea {
  font: inherit;
}

.hp-site img {
  display: block;
  max-width: 100%;
}

.hp-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hp-section,
.hp-hero {
  position: relative;
  scroll-margin-top: 92px;
}

.hp-section {
  padding: 104px 0;
}

.hp-dark-section {
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 4%, rgba(249, 115, 22, 0.22), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(56, 189, 248, 0.08), transparent 28%),
    linear-gradient(135deg, #050b14 0%, #08111e 55%, #0d1320 100%);
  color: #f8fafc;
}

.hp-white-section {
  background: #ffffff;
  color: var(--hp-ink);
}

.hp-soft-section {
  background:
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
  color: var(--hp-ink);
}

.hp-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

.hp-route-lines {
  position: absolute;
  inset: auto -10% 6% auto;
  width: 58%;
  height: 44%;
  pointer-events: none;
  opacity: 0.26;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(249, 115, 22, 0.7) 18% 19%, transparent 19% 100%),
    linear-gradient(0deg, transparent 0 45%, rgba(255, 255, 255, 0.18) 45% 46%, transparent 46% 100%);
  transform: rotate(-8deg);
}

.hp-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.hp-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 11, 20, 0.82);
  color: #ffffff;
  backdrop-filter: blur(18px);
}

.hp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
}

.hp-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.hp-nav-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
}

.hp-logo-crop-mark {
  object-fit: cover;
  object-position: left center;
}

.hp-nav-brand strong,
.hp-footer-brand strong {
  display: block;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0;
}

.hp-nav-brand small,
.hp-footer-brand small {
  display: block;
  margin-top: 3px;
  color: #fdba74;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hp-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.hp-nav-links a {
  transition: color 160ms ease;
}

.hp-nav-links a:hover,
.hp-nav-links a:focus-visible {
  color: #fed7aa;
}

.hp-nav-cta,
.hp-button,
.hp-mobile-cta,
.hp-demo-form button,
.hp-phone button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.hp-nav-cta,
.hp-button-primary,
.hp-demo-form button,
.hp-phone button {
  background: var(--hp-orange);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.24);
}

.hp-nav-cta {
  padding: 0 20px;
}

.hp-nav-cta:hover,
.hp-button-primary:hover,
.hp-demo-form button:hover,
.hp-phone button:hover {
  background: #fb923c;
  transform: translateY(-1px);
}

.hp-button {
  padding: 0 24px;
}

.hp-button-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.hp-button-secondary:hover {
  border-color: rgba(251, 146, 60, 0.7);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.hp-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  cursor: pointer;
}

.hp-mobile-menu {
  display: none;
}

.hp-hero {
  min-height: 100vh;
  padding: 132px 0 96px;
}

.hp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  gap: 54px;
  align-items: center;
}

.hp-hero-copy {
  max-width: 620px;
}

.hp-hero-logo {
  width: min(360px, 82vw);
  height: auto;
  margin-bottom: 22px;
  object-fit: contain;
}

.hp-hero h1 {
  max-width: 650px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 4.25vw, 58px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.06;
}

.hp-hero-copy > p,
.hp-cta p,
.hp-two-col > div > p,
.hp-brand-strip p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.hp-hero-actions,
.hp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hp-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.hp-stat-pill {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  padding: 14px;
}

.hp-stat-pill strong {
  display: block;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.hp-stat-pill span {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.hp-dashboard {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(17, 28, 46, 0.98), rgba(6, 13, 24, 0.98)),
    #0b1624;
  padding: 18px;
  box-shadow: var(--hp-shadow-dark);
}

.hp-dashboard-glow {
  position: absolute;
  top: -110px;
  right: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.22);
  filter: blur(45px);
  pointer-events: none;
}

.hp-dashboard-header,
.hp-dashboard-title,
.hp-dashboard-search,
.hp-panel-heading,
.hp-chart-legend,
.hp-chat-header,
.hp-footer-inner,
.hp-footer-brand {
  display: flex;
  align-items: center;
}

.hp-dashboard-header {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding-bottom: 16px;
}

.hp-dashboard-title {
  gap: 12px;
  min-width: 0;
}

.hp-dashboard-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
}

.hp-dashboard-title strong,
.hp-panel-heading strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}

.hp-dashboard-title span,
.hp-panel-heading span {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.hp-live-badge,
.hp-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.hp-live-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  padding: 8px 11px;
}

.hp-dashboard-search {
  position: relative;
  z-index: 1;
  gap: 10px;
  margin: 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 17px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px 14px;
  color: #cbd5e1;
  font-size: 13px;
}

.hp-dashboard-search .hp-icon {
  width: 18px;
  height: 18px;
  color: #fdba74;
}

.hp-kpi-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hp-kpi-card {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  padding: 16px;
}

.hp-kpi-card span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hp-kpi-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.hp-kpi-card .hp-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 22px;
  height: 22px;
  color: #fdba74;
}

.hp-kpi-card small {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  color: #86efac;
  font-size: 12px;
  line-height: 1.25;
}

.hp-dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}

.hp-dashboard-panel,
.hp-chart-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
}

.hp-panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.hp-chart-svg {
  display: block;
  width: 100%;
  height: 210px;
}

.hp-dashboard-compact .hp-chart-svg {
  height: 178px;
}

.hp-dashboard-compact .hp-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hp-chart-grid {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-dasharray: 4 4;
}

.hp-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hp-chart-line-orange {
  stroke: #fb923c;
  stroke-width: 4;
}

.hp-chart-line-light {
  stroke: #e2e8f0;
  stroke-width: 2.5;
}

.hp-chart-label {
  fill: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.hp-chart-legend {
  gap: 14px;
  color: #94a3b8;
  font-size: 12px;
}

.hp-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-dot-orange,
.hp-dot-light {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.hp-dot-orange {
  background: #fb923c;
}

.hp-dot-light {
  background: #e2e8f0;
}

.hp-alert-list {
  display: grid;
  gap: 10px;
}

.hp-alert {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  padding: 13px;
}

.hp-alert b {
  display: block;
  color: #ffffff;
  font-size: 13px;
}

.hp-alert span {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.hp-alert-hot {
  border-color: rgba(249, 115, 22, 0.26);
  background: rgba(249, 115, 22, 0.1);
}

.hp-section-header {
  max-width: 790px;
  margin: 0 auto 48px;
  text-align: center;
}

.hp-section-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.1);
  color: #c2410c;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.hp-section-header-dark .hp-section-label,
.hp-dark-section .hp-section-label {
  color: #fdba74;
}

.hp-section-header h2,
.hp-brand-strip h2,
.hp-two-col h2,
.hp-cta h2 {
  margin: 0;
  color: var(--hp-ink);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
}

.hp-section-header p {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--hp-text);
  font-size: 17px;
  line-height: 1.75;
}

.hp-section-header-dark h2,
.hp-dark-section .hp-section-header h2,
.hp-cta h2 {
  color: #ffffff;
}

.hp-section-header-dark p,
.hp-dark-section .hp-section-header p {
  color: #cbd5e1;
}

.hp-brand-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 84px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 10%, rgba(249, 115, 22, 0.22), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0f172a 56%, #1f2937 100%);
  padding: 28px;
  color: #ffffff;
  box-shadow: var(--hp-shadow);
}

.hp-brand-strip h2 {
  color: #ffffff;
}

.hp-brand-strip p {
  color: #cbd5e1;
}

.hp-two-col > div > p {
  color: var(--hp-text);
}

.hp-brand-logo-frame {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    rgba(2, 6, 23, 0.66);
  padding: 24px;
  box-shadow: inset 0 0 42px rgba(249, 115, 22, 0.08);
}

.hp-brand-logo {
  width: min(420px, 100%);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.hp-card-grid {
  display: grid;
  gap: 18px;
}

.hp-card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hp-card-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hp-feature-card,
.hp-module-card,
.hp-use-card,
.hp-integration-box,
.hp-search-panel {
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.hp-feature-card,
.hp-module-card,
.hp-use-card {
  padding: 24px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.hp-feature-card:hover,
.hp-module-card:hover,
.hp-use-card:hover {
  border-color: rgba(249, 115, 22, 0.32);
  box-shadow: var(--hp-shadow);
  transform: translateY(-3px);
}

.hp-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--hp-orange-soft);
  color: var(--hp-orange-dark);
}

.hp-icon-box-dark {
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
}

.hp-feature-card h3,
.hp-module-card h3,
.hp-use-card h3,
.hp-flow-card h3,
.hp-question-panel h3,
.hp-integration-box h3 {
  margin: 18px 0 0;
  color: var(--hp-ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.hp-feature-card p,
.hp-module-card p,
.hp-use-card p,
.hp-flow-card p {
  margin: 10px 0 0;
  color: var(--hp-text);
  font-size: 14px;
  line-height: 1.65;
}

.hp-flow-section {
  padding-bottom: 118px;
}

.hp-flow-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.hp-flow-card {
  position: relative;
  min-height: 245px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
}

.hp-flow-card h3 {
  color: #ffffff;
}

.hp-flow-card p {
  color: #cbd5e1;
}

.hp-flow-index {
  display: block;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hp-flow-arrow {
  position: absolute;
  top: 48%;
  right: -16px;
  z-index: 2;
  width: 28px;
  height: 28px;
  color: #fdba74;
}

.hp-module-card {
  min-height: 250px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
}

.hp-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.hp-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  align-items: end;
  gap: 10px;
  height: 198px;
}

.hp-bar-column {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.hp-bar-track {
  display: flex;
  align-items: flex-end;
  min-height: 125px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.hp-bar-track span {
  display: block;
  width: 100%;
  border-radius: 13px 13px 0 0;
  background: linear-gradient(180deg, #fdba74 0%, #f97316 100%);
  box-shadow: 0 -12px 24px rgba(249, 115, 22, 0.16);
}

.hp-bar-column strong {
  color: #ffffff;
  font-size: 12px;
}

.hp-bar-column small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 750;
}

.hp-progress-card,
.hp-queue-card,
.hp-staffing-card {
  min-height: 270px;
}

.hp-progress-row {
  display: grid;
  grid-template-columns: 1fr minmax(80px, 35%) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 13px 0;
}

.hp-progress-row:first-of-type {
  border-top: 0;
}

.hp-progress-row strong,
.hp-queue-row strong,
.hp-staffing-row strong {
  display: block;
  color: #ffffff;
  font-size: 13px;
}

.hp-progress-row span,
.hp-queue-row span,
.hp-staffing-row span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
}

.hp-progress-row b {
  color: #fdba74;
  font-size: 12px;
}

.hp-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.hp-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316, #fdba74);
}

.hp-queue-row {
  display: grid;
  grid-template-columns: 0.7fr 0.9fr 1.2fr;
  gap: 10px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px 0;
}

.hp-queue-row b {
  justify-self: end;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
  padding: 6px 9px;
  font-size: 11px;
}

.hp-staffing-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 0;
}

.hp-staffing-row > b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
  font-size: 22px;
}

.hp-search-panel {
  overflow: hidden;
  padding: 18px;
  box-shadow: var(--hp-shadow);
}

.hp-search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 20px;
  background: var(--hp-navy);
  padding: 16px;
  color: #ffffff;
}

.hp-search-input {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  width: min(620px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 16px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
}

.hp-search-input .hp-icon {
  color: #fdba74;
}

.hp-status-pill {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
  padding: 8px 12px;
}

.hp-search-top .hp-status-pill {
  color: #86efac;
}

.hp-product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.hp-product-chips span {
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hp-line);
  border-radius: 20px;
  background: #ffffff;
}

.hp-search-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.hp-search-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 14px;
  text-align: left;
  font-weight: 850;
  white-space: nowrap;
}

.hp-search-table td {
  border-top: 1px solid #eef2f7;
  color: #334155;
  padding: 14px;
  white-space: nowrap;
}

.hp-search-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.hp-search-note {
  margin: 14px 0 0;
  color: var(--hp-muted);
  font-size: 13px;
}

.hp-two-col {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  gap: 56px;
  align-items: center;
}

.hp-fefo-timeline {
  position: relative;
  display: grid;
  gap: 14px;
}

.hp-fefo-timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 2px;
  background: linear-gradient(180deg, #f97316, rgba(249, 115, 22, 0.08));
}

.hp-fefo-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--hp-line);
  border-radius: 22px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.hp-fefo-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hp-orange);
  color: #ffffff;
  font-weight: 900;
}

.hp-fefo-card strong {
  display: block;
  color: var(--hp-ink);
  font-size: 17px;
  font-weight: 900;
}

.hp-fefo-card p {
  margin: 3px 0 0;
  color: var(--hp-muted);
  font-size: 13px;
}

.hp-fefo-card b {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.hp-fefo-urgent b {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

.hp-fefo-watch b {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.hp-fefo-normal b {
  background: rgba(34, 197, 94, 0.11);
  color: #15803d;
}

.hp-phone-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.hp-phone {
  border-radius: 28px;
  background: #111827;
  padding: 10px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.hp-phone-shell {
  min-height: 444px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  padding: 16px;
}

.hp-phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.hp-phone-top span {
  border-radius: 999px;
  background: var(--hp-orange-soft);
  color: var(--hp-orange-dark);
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hp-phone-top b {
  color: #15803d;
  font-size: 10px;
  text-align: right;
}

.hp-phone h3 {
  margin: 0 0 14px;
  color: var(--hp-ink);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.15;
}

.hp-phone-field {
  border-top: 1px solid #edf2f7;
  padding: 12px 0;
}

.hp-phone-field small {
  display: block;
  color: var(--hp-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hp-phone-field strong {
  display: block;
  margin-top: 4px;
  color: var(--hp-ink);
  font-size: 14px;
  line-height: 1.35;
}

.hp-phone-field span {
  display: block;
  margin-top: 3px;
  color: var(--hp-muted);
  font-size: 12px;
}

.hp-scan-line {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed rgba(249, 115, 22, 0.5);
  border-radius: 14px;
  background: rgba(249, 115, 22, 0.08);
  color: #c2410c;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
}

.hp-scan-line .hp-icon {
  width: 18px;
  height: 18px;
}

.hp-phone button {
  width: 100%;
  margin-top: 14px;
  border-radius: 14px;
}

.hp-chat-section {
  padding-bottom: 112px;
}

.hp-chat-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1fr);
  gap: 28px;
  align-items: start;
}

.hp-question-panel,
.hp-chat-phone,
.hp-ai-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  padding: 24px;
  box-shadow: var(--hp-shadow-dark);
}

.hp-question-panel h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.hp-question-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hp-question-list div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.16);
  padding: 12px;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.45;
}

.hp-question-list .hp-icon {
  width: 18px;
  height: 18px;
  color: #fdba74;
}

.hp-chat-phone {
  background: #07111f;
}

.hp-chat-header {
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.hp-chat-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.hp-chat-header strong {
  display: block;
  color: #ffffff;
  font-weight: 900;
}

.hp-chat-header span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.hp-chat-header b {
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  padding: 7px 10px;
  font-size: 11px;
}

.hp-chat-messages {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.hp-chat-pair {
  display: grid;
  gap: 8px;
}

.hp-chat-user,
.hp-chat-answer {
  margin: 0;
  border-radius: 18px;
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.hp-chat-user {
  justify-self: end;
  max-width: 82%;
  border-bottom-right-radius: 5px;
  background: var(--hp-orange);
  color: #ffffff;
  font-weight: 750;
}

.hp-chat-answer {
  max-width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom-left-radius: 5px;
  background: rgba(255, 255, 255, 0.065);
  color: #dbeafe;
}

.hp-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  color: #64748b;
  padding: 12px;
  font-size: 13px;
}

.hp-chat-input .hp-icon {
  width: 18px;
  height: 18px;
  color: #fdba74;
}

.hp-ai-proof {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: fit-content;
  max-width: 560px;
  margin-top: 28px;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 18px;
  background: rgba(249, 115, 22, 0.1);
  color: #9a3412;
  padding: 16px;
  font-weight: 750;
}

.hp-ai-proof .hp-icon {
  color: var(--hp-orange-dark);
}

.hp-ai-panel {
  border-color: var(--hp-line);
  background: var(--hp-navy);
}

.hp-ai-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 15px 0;
}

.hp-ai-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(249, 115, 22, 0.14);
  color: #fdba74;
  font-weight: 900;
}

.hp-ai-row p {
  margin: 0;
  color: #e2e8f0;
  font-size: 14px;
}

.hp-integration-diagram {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.9fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.hp-integration-box {
  padding: 24px;
}

.hp-integration-box h3 {
  margin: 0 0 18px;
}

.hp-integration-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #edf2f7;
  border-radius: 16px;
  background: #f8fafc;
  padding: 13px;
  color: var(--hp-ink);
  font-weight: 800;
}

.hp-integration-item + .hp-integration-item {
  margin-top: 10px;
}

.hp-integration-item .hp-icon {
  width: 20px;
  height: 20px;
  color: var(--hp-orange-dark);
}

.hp-integration-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 12%, rgba(249, 115, 22, 0.18), transparent 42%),
    var(--hp-navy);
  color: #ffffff;
  padding: 28px;
  text-align: center;
  box-shadow: var(--hp-shadow);
}

.hp-integration-logo {
  width: min(265px, 80%);
  height: auto;
  object-fit: contain;
}

.hp-integration-center strong {
  display: block;
  margin-top: 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.hp-integration-center > span:not(.hp-diagram-arrow) {
  display: block;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.hp-diagram-arrow {
  position: absolute;
  top: 50%;
  left: -52px;
  border-radius: 999px;
  background: var(--hp-orange);
  color: #ffffff;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
  transform: translateY(-50%);
}

.hp-diagram-arrow-out {
  right: -56px;
  left: auto;
}

.hp-benefit-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hp-benefit {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 70px;
  border: 1px solid var(--hp-line);
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
  color: var(--hp-ink);
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.hp-benefit .hp-icon {
  width: 19px;
  height: 19px;
  color: var(--hp-orange-dark);
}

.hp-use-card .hp-icon {
  color: var(--hp-orange-dark);
}

.hp-cta {
  padding: 106px 0;
}

.hp-cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
  gap: 56px;
  align-items: center;
}

.hp-cta-logo {
  width: min(360px, 80vw);
  height: auto;
  margin-bottom: 26px;
  object-fit: contain;
}

.hp-cta p {
  color: #cbd5e1;
}

.hp-demo-form {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
  padding: 22px;
  box-shadow: var(--hp-shadow-dark);
}

.hp-demo-form label {
  display: grid;
  gap: 7px;
}

.hp-demo-form span {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 850;
}

.hp-demo-form input,
.hp-demo-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  color: #ffffff;
  padding: 12px 13px;
  outline: none;
}

.hp-demo-form input:focus,
.hp-demo-form textarea:focus {
  border-color: rgba(249, 115, 22, 0.75);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.hp-demo-form button {
  width: 100%;
  margin-top: 4px;
  border-radius: 15px;
}

.hp-footer {
  background: #030712;
  color: #ffffff;
  padding: 34px 0;
}

.hp-footer-inner {
  justify-content: space-between;
  gap: 24px;
}

.hp-footer-brand {
  gap: 12px;
}

.hp-footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.hp-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.hp-footer-links a:hover {
  color: #fdba74;
}

.hp-preview-checks {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: grid;
  gap: 4px;
  max-width: 330px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(3, 7, 18, 0.92);
  color: #e2e8f0;
  padding: 12px;
  font-size: 11px;
  box-shadow: var(--hp-shadow-dark);
  backdrop-filter: blur(14px);
}

.hp-preview-checks strong {
  color: #fdba74;
}

@media (prefers-reduced-motion: reduce) {
  .hp-site *,
  .hp-site *::before,
  .hp-site *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1180px) {
  .hp-nav-links {
    gap: 14px;
    font-size: 12px;
  }

  .hp-flow-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hp-flow-arrow {
    display: none;
  }

  .hp-card-grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hp-phone-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hp-section {
    padding: 82px 0;
  }

  .hp-hero {
    padding-top: 112px;
  }

  .hp-hero-grid,
  .hp-brand-strip,
  .hp-two-col,
  .hp-chat-grid,
  .hp-cta-grid {
    grid-template-columns: 1fr;
  }

  .hp-hero-copy {
    max-width: none;
  }

  .hp-dashboard-main,
  .hp-ops-grid,
  .hp-integration-diagram {
    grid-template-columns: 1fr;
  }

  .hp-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-card-grid-3,
  .hp-card-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-flow-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-diagram-arrow {
    display: none;
  }
}

@media (max-width: 860px) {
  .hp-nav-links,
  .hp-nav-cta {
    display: none;
  }

  .hp-nav-toggle {
    display: inline-flex;
  }

  .hp-mobile-menu {
    position: relative;
    z-index: 52;
    display: grid;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(5, 11, 20, 0.98);
    padding: 0 18px;
    transition: max-height 180ms ease, padding 180ms ease;
  }

  .hp-mobile-menu.is-open {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 14px 18px 18px;
  }

  .hp-mobile-menu a {
    border-radius: 13px;
    color: #e2e8f0;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 800;
  }

  .hp-mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .hp-mobile-cta {
    background: var(--hp-orange);
    color: #ffffff !important;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .hp-shell {
    width: min(100% - 28px, 1180px);
  }

  .hp-nav-inner {
    width: calc(100% - 28px);
    min-height: 70px;
  }

  .hp-nav-brand small {
    display: none;
  }

  .hp-hero {
    min-height: auto;
    padding-bottom: 72px;
  }

  .hp-hero-logo {
    width: min(330px, 86vw);
  }

  .hp-hero h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .hp-hero-copy > p,
  .hp-cta p,
  .hp-two-col > div > p,
  .hp-brand-strip p {
    font-size: 16px;
    line-height: 1.7;
  }

  .hp-hero-stats,
  .hp-card-grid-3,
  .hp-card-grid-4,
  .hp-flow-rail,
  .hp-phone-grid,
  .hp-benefit-grid,
  .hp-question-list {
    grid-template-columns: 1fr;
  }

  .hp-kpi-grid {
    grid-template-columns: 1fr;
  }

  .hp-dashboard {
    border-radius: 24px;
    padding: 14px;
  }

  .hp-dashboard-header,
  .hp-search-top,
  .hp-panel-heading,
  .hp-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hp-chart-svg {
    height: 185px;
  }

  .hp-brand-strip,
  .hp-demo-form,
  .hp-question-panel,
  .hp-chat-phone,
  .hp-ai-panel {
    border-radius: 22px;
    padding: 18px;
  }

  .hp-section-header {
    margin-bottom: 34px;
    text-align: left;
  }

  .hp-section-header p {
    margin-left: 0;
    margin-right: 0;
  }

  .hp-fefo-card {
    grid-template-columns: 44px 1fr;
  }

  .hp-fefo-card b {
    grid-column: 2;
    justify-self: start;
  }

  .hp-queue-row,
  .hp-progress-row {
    grid-template-columns: 1fr;
  }

  .hp-queue-row b {
    justify-self: start;
  }

  .hp-phone-shell {
    min-height: 0;
  }

  .hp-footer-links {
    justify-content: flex-start;
  }

  .hp-preview-checks {
    display: none;
  }
}

/* ---------- Compact Toolbars / Filters ---------- */
.hf-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 6px;
  align-items: center;
  margin: 0 0 8px;
}

.hf-toolbar .hf-input {
  min-width: 0;
}

.hf-toolbar > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Inputs ---------- */
.hf-input {
  display: block;
  width: 100%;
  height: var(--hf-density-control-h);
  padding: 0 8px;
  font-size: var(--hf-text-base);
  font-family: var(--hf-font-sans);
  line-height: 1;
  border-radius: var(--hf-radius-sm);
  border: 1px solid var(--hf-border);
  background: var(--hf-bg-input);
  color: var(--hf-text-primary);
  outline: none;
  transition: border-color var(--hf-transition-fast);
}
.hf-input:focus { border-color: var(--hf-accent); box-shadow: 0 0 0 2px var(--hf-accent-ring); }
.hf-input:disabled { opacity: 0.5; cursor: not-allowed; }
.hf-input::placeholder { color: var(--hf-text-muted); }

select.hf-input { cursor: pointer; }
textarea.hf-input { height: auto; min-height: 60px; padding: 8px 10px; line-height: 1.4; resize: vertical; }

/* ---------- Cards ---------- */
.hf-card {
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background: var(--hf-bg-card);
  padding: var(--hf-density-card-pad);
}

.hf-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hf-sp-2);
  margin-bottom: 7px;
}

.hf-card-title {
  margin: 0;
  font-size: var(--hf-text-base);
  font-weight: 650;
  color: var(--hf-text-heading);
  letter-spacing: 0.01em;
}

/* ---------- Tables ---------- */
.hf-table-wrap {
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  overflow: hidden;
}
.hf-table-scroll {
  overflow-x: auto;
  overflow-y: auto;
}

.hf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--hf-text-sm);
}
.hf-table th {
  text-align: left;
  padding: 5px 7px;
  font-size: var(--hf-text-xs);
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--hf-text-muted);
  background: var(--hf-bg-card);
  border-bottom: 1px solid var(--hf-border);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
.hf-table td {
  padding: 4px 7px;
  border-bottom: 1px solid var(--hf-border-subtle);
  vertical-align: middle;
  color: var(--hf-text-primary);
}
.hf-table tbody tr { transition: background var(--hf-transition-fast); }
.hf-table tbody tr:hover { background: var(--hf-hover-row); }
.hf-table tbody tr:nth-child(even) { background: var(--hf-bg-zebra); }
.hf-table tbody tr:nth-child(even):hover { background: var(--hf-hover-row); }
.hf-table tbody tr.hf-row-selected { background: var(--hf-selected-row); }
.hf-table tbody tr.hf-row-selected:hover { background: var(--hf-selected-row); }
.hf-table tbody tr[data-clickable] { cursor: pointer; }

/* ---------- Badges ---------- */
.hf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: var(--hf-radius-sm);
  border: 1px solid var(--hf-border);
  font-size: var(--hf-text-2xs);
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.6;
  background: var(--hf-bg-card);
  color: var(--hf-text-secondary);
}
.hf-badge-green  { border-color: rgba(22, 163, 74, 0.5); background: var(--hf-success-subtle); color: #22C55E; }
.hf-badge-amber  { border-color: rgba(245, 158, 11, 0.5); background: var(--hf-warning-subtle); color: #F59E0B; }
.hf-badge-red    { border-color: rgba(220, 38, 38, 0.5); background: var(--hf-danger-subtle); color: #F87171; }
.hf-badge-blue   { border-color: rgba(37, 99, 235, 0.5); background: var(--hf-info-subtle); color: #60A5FA; }
.hf-badge-orange { border-color: rgba(217, 119, 6, 0.5); background: var(--hf-accent-subtle); color: var(--hf-accent); }

[data-theme="light"] .hf-badge-green  { color: #15803D; }
[data-theme="light"] .hf-badge-amber  { color: #B45309; }
[data-theme="light"] .hf-badge-red    { color: #DC2626; }
[data-theme="light"] .hf-badge-blue   { color: #2563EB; }
[data-theme="light"] .hf-badge-orange { color: #B45309; }

/* ---------- Form Layout ---------- */
.hf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hf-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
}
.hf-label {
  font-size: var(--hf-text-xs);
  font-weight: 550;
  color: var(--hf-text-muted);
  letter-spacing: 0.01em;
}
.hf-checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--hf-text-sm);
  cursor: pointer;
}
.hf-checkbox-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--hf-accent);
  cursor: pointer;
}

/* ---------- Section Header ---------- */
.hf-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hf-sp-3);
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hf-page-title {
  margin: 0;
  font-size: var(--hf-text-xl);
  font-weight: 700;
  color: var(--hf-text-heading);
  letter-spacing: -0.01em;
}
.hf-page-subtitle {
  margin: 2px 0 0 0;
  font-size: var(--hf-text-sm);
  color: var(--hf-text-muted);
}

/* ---------- Status Bar ---------- */
.hf-status-bar {
  display: flex;
  align-items: center;
  gap: var(--hf-sp-2);
  padding: 5px 8px;
  border-radius: var(--hf-radius);
  border: 1px solid var(--hf-border);
  background: var(--hf-bg-card);
  font-size: var(--hf-text-sm);
  color: var(--hf-text-secondary);
}

/* ---------- KPI Card ---------- */
.hf-kpi-card {
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background: var(--hf-bg-card);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

button.hf-kpi-card {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.hf-kpi-action {
  cursor: pointer;
}

.hf-kpi-action:hover,
.hf-kpi-action.active {
  border-color: var(--hf-accent);
  background: var(--hf-bg-card-hover);
  box-shadow: inset 3px 0 0 var(--hf-accent);
}

.hf-kpi-label {
  font-size: var(--hf-text-xs);
  font-weight: 550;
  color: var(--hf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hf-kpi-value {
  font-size: var(--hf-text-2xl);
  font-weight: 700;
  color: var(--hf-text-heading);
  line-height: 1.2;
}
.hf-kpi-accent .hf-kpi-value { color: var(--hf-accent); }

/* ---------- Grid Utilities ---------- */
.hf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.hf-grid { display: grid; gap: var(--hf-sp-3); }
.hf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hf-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hf-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hf-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.hf-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.hf-flex { display: flex; align-items: center; gap: var(--hf-sp-2); flex-wrap: wrap; }

/* ---------- Attendance / Workforce Time Tracking ---------- */
.hf-attendance-page {
  display: grid;
  gap: 10px;
}

.hf-att-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.hf-att-kpi {
  min-height: 52px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 56%),
    var(--hf-bg-card);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hf-att-kpi span {
  color: var(--hf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--hf-text-2xs);
  font-weight: 750;
}

.hf-att-kpi strong {
  color: var(--hf-text-heading);
  font-size: 22px;
  line-height: 1;
}

.hf-att-kpi-accent {
  border-color: rgba(217, 119, 6, 0.45);
  box-shadow: inset 3px 0 0 var(--hf-accent);
}

.hf-att-kpi-accent strong { color: var(--hf-accent); }

.hf-att-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.hf-att-lane {
  min-height: 154px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}

[data-theme="light"] .hf-att-lane {
  background: rgba(15, 23, 42, 0.018);
}

.hf-att-lane header {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 9px;
  border-bottom: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-heading);
  font-size: var(--hf-text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hf-att-lane-green { box-shadow: inset 3px 0 0 var(--hf-success); }
.hf-att-lane-red { box-shadow: inset 3px 0 0 var(--hf-danger); }
.hf-att-lane-blue { box-shadow: inset 3px 0 0 var(--hf-info); }
.hf-att-lane-gray { box-shadow: inset 3px 0 0 var(--hf-border-strong); }
.hf-att-lane-amber { box-shadow: inset 3px 0 0 var(--hf-warning); }

.hf-att-lane-list {
  display: grid;
  gap: 6px;
  padding: 8px;
  max-height: 260px;
  overflow: auto;
}

.hf-att-person-card {
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius);
  background: var(--hf-bg-input);
  padding: 7px 8px;
  display: grid;
  gap: 2px;
}

.hf-att-person-card strong {
  color: var(--hf-text-heading);
  font-size: var(--hf-text-sm);
}

.hf-att-person-card span,
.hf-att-person-card small {
  color: var(--hf-text-muted);
  font-size: var(--hf-text-xs);
  line-height: 1.3;
}

.hf-att-empty {
  margin: 0;
  padding: 8px;
  color: var(--hf-text-muted);
  font-size: var(--hf-text-xs);
  border: 1px dashed var(--hf-border);
  border-radius: var(--hf-radius);
  text-align: center;
}

.hf-att-timeline-axis {
  margin: 0 0 4px 174px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  color: var(--hf-text-muted);
  font-size: var(--hf-text-2xs);
}

.hf-att-timeline-axis span:last-child { text-align: right; }

.hf-att-timeline {
  display: grid;
  gap: 6px;
}

.hf-att-timeline-row {
  display: grid;
  grid-template-columns: 160px minmax(260px, 1fr) 210px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius);
  background: rgba(255, 255, 255, 0.018);
}

[data-theme="light"] .hf-att-timeline-row {
  background: rgba(15, 23, 42, 0.018);
}

.hf-att-timeline-person {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.hf-att-timeline-person strong {
  color: var(--hf-text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-att-timeline-person span,
.hf-att-timeline-meta span {
  color: var(--hf-text-muted);
  font-size: var(--hf-text-xs);
}

.hf-att-track {
  position: relative;
  height: 18px;
  border: 1px solid var(--hf-border);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent calc(20% - 1px), var(--hf-border-subtle) calc(20% - 1px), var(--hf-border-subtle) 20%),
    var(--hf-bg-input);
  overflow: hidden;
}

.hf-att-scheduled-bar {
  position: absolute;
  inset: 4px 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.hf-att-actual-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.04);
}

.hf-att-status-present { background: linear-gradient(90deg, #16A34A, #22C55E); }
.hf-att-status-late,
.hf-att-status-early_leave { background: linear-gradient(90deg, #D97706, #F59E0B); }
.hf-att-status-vacation { background: linear-gradient(90deg, #2563EB, #60A5FA); }
.hf-att-status-sick { background: repeating-linear-gradient(45deg, #DC2626 0, #DC2626 7px, #F87171 7px, #F87171 13px); }
.hf-att-status-day_off { background: repeating-linear-gradient(45deg, #64748B 0, #64748B 6px, #94A3B8 6px, #94A3B8 12px); }

.hf-att-break-marker {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 22px;
  background: var(--hf-text-heading);
  opacity: 0.8;
}

.hf-att-timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.hf-att-bottom-grid {
  align-items: start;
}

.hf-att-year-page .hf-card {
  min-width: 0;
}

.hf-att-planning-grid {
  align-items: stretch;
}

.hf-att-message {
  margin: 8px 0 0;
  padding: 6px 8px;
  border-radius: var(--hf-radius);
  font-size: var(--hf-text-xs);
  border: 1px solid var(--hf-border);
}

.hf-att-message.success {
  color: #22C55E;
  background: var(--hf-success-subtle);
  border-color: rgba(22, 163, 74, 0.35);
}

.hf-att-message.error {
  color: #F87171;
  background: var(--hf-danger-subtle);
  border-color: rgba(220, 38, 38, 0.35);
}

.hf-year-axis {
  display: grid;
  grid-template-columns: 190px repeat(12, minmax(52px, 1fr));
  align-items: center;
  gap: 0;
  margin-bottom: 6px;
  color: var(--hf-text-muted);
  font-size: var(--hf-text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hf-year-axis strong {
  text-align: center;
  padding: 0 4px;
  font-weight: 800;
}

.hf-year-timeline {
  display: grid;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.hf-year-row {
  min-width: 930px;
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 0;
  min-height: 44px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius);
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}

[data-theme="light"] .hf-year-row {
  background: rgba(15, 23, 42, 0.018);
}

.hf-year-person {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 7px 9px;
  border-right: 1px solid var(--hf-border);
  background: var(--hf-bg-card);
}

.hf-year-person strong {
  color: var(--hf-text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-year-person span {
  color: var(--hf-text-muted);
  font-size: var(--hf-text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-year-track {
  position: relative;
  height: 44px;
  display: grid;
  grid-template-columns: repeat(12, minmax(52px, 1fr));
  background: var(--hf-bg-input);
}

.hf-year-month-cell {
  border-right: 1px solid var(--hf-border-subtle);
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.018));
}

[data-theme="light"] .hf-year-month-cell {
  background:
    linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.02));
}

.hf-year-absence {
  position: absolute;
  top: 11px;
  height: 22px;
  min-width: 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.hf-year-absence span {
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.hf-year-sick {
  background: repeating-linear-gradient(45deg, #B91C1C 0, #B91C1C 8px, #EF4444 8px, #EF4444 14px);
}

.hf-year-vacation {
  background: linear-gradient(90deg, #1D4ED8, #38BDF8);
}

.hf-year-day_off {
  background: repeating-linear-gradient(45deg, #475569 0, #475569 7px, #94A3B8 7px, #94A3B8 13px);
}

.hf-year-other {
  background: linear-gradient(90deg, #7C3AED, #A78BFA);
}

.hf-year-requested {
  background: linear-gradient(90deg, #D97706, #F59E0B);
  border-style: dashed;
}

.hf-year-muted {
  background: linear-gradient(90deg, #334155, #64748B);
  opacity: 0.55;
  text-decoration: line-through;
}

@media (max-width: 1180px) {
  .hf-att-kpi-strip,
  .hf-att-lanes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hf-att-timeline-row {
    grid-template-columns: 140px minmax(180px, 1fr);
  }

  .hf-att-timeline-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .hf-att-bottom-grid {
    grid-template-columns: 1fr;
  }

  .hf-att-planning-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hf-att-kpi-strip,
  .hf-att-lanes {
    grid-template-columns: 1fr;
  }

  .hf-att-timeline-axis {
    margin-left: 0;
  }

  .hf-att-timeline-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Modal Utilities ---------- */
.hf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 24px;
  background: rgba(0, 0, 0, 0.48);
  overflow: auto;
}
.hf-modal {
  width: min(720px, 100%);
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  box-shadow: var(--hf-shadow-lg);
  padding: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .hf-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hf-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hf-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   App Shell: Header
   ============================================================ */
.hf-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--hf-header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--hf-sp-4);
  border-bottom: 1px solid var(--hf-border);
  background: var(--hf-bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hf-header-logo {
  text-decoration: none;
  margin-right: 14px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}
.hf-logo-image {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.38));
}
[data-theme="light"] .hf-logo-image {
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.58)) drop-shadow(0 0 4px rgba(15, 23, 42, 0.18));
}
.hf-logo-icon {
  display: none;
}
.hf-header-logo.collapsed {
  width: 40px;
  max-width: 40px;
  justify-content: center;
  margin-right: 10px;
}
.hf-header-logo.collapsed .hf-logo-full {
  display: none;
}
.hf-header-logo.collapsed .hf-logo-icon {
  display: block;
  height: 32px;
  max-width: 32px;
}
.hf-header-logo .hf-logo-light {
  display: none;
}
[data-theme="light"] .hf-header-logo .hf-logo-dark {
  display: none;
}
[data-theme="light"] .hf-header-logo:not(.collapsed) .hf-logo-full.hf-logo-light,
[data-theme="light"] .hf-header-logo.collapsed .hf-logo-icon.hf-logo-light {
  display: block;
}
.hf-header-actions {
  display: flex;
  align-items: center;
  gap: var(--hf-sp-1);
  margin-left: auto;
}
.hf-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  font-size: var(--hf-text-xs);
  font-weight: 550;
  font-family: var(--hf-font-sans);
  border-radius: var(--hf-radius);
  border: none;
  background: transparent;
  color: var(--hf-text-secondary);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--hf-transition-fast), color var(--hf-transition-fast);
}
.hf-header-btn:hover { background: var(--hf-bg-card-hover); color: var(--hf-text-primary); }
.hf-header-btn-accent {
  color: #FFFFFF;
  background: var(--hf-accent);
}
.hf-header-btn-accent:hover {
  color: #FFFFFF;
  background: var(--hf-accent-hover);
}
.hf-header-divider {
  width: 1px;
  height: 20px;
  background: var(--hf-border);
  margin: 0 4px;
}

/* ============================================================
   App Shell: Sidebar
   ============================================================ */
.hf-sidebar {
  position: fixed;
  top: var(--hf-header-h);
  left: 0;
  bottom: 0;
  width: var(--hf-sidebar-w);
  background: var(--hf-bg-sidebar);
  border-right: 1px solid var(--hf-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
  transition: width var(--hf-transition);
}
.hf-sidebar.collapsed {
  width: var(--hf-sidebar-collapsed-w);
}
.hf-sidebar-section {
  padding: 5px 8px;
}
.hf-sidebar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 20px;
  padding: 0 8px;
  margin-bottom: 3px;
  border: 0;
  border-radius: var(--hf-radius-sm);
  background: transparent;
  font-size: var(--hf-text-2xs);
  font-family: var(--hf-font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hf-text-muted);
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: color var(--hf-transition-fast), background var(--hf-transition-fast);
}
.hf-sidebar-label:hover {
  background: var(--hf-bg-card-hover);
  color: var(--hf-text-secondary);
}
.hf-sidebar-section.group-active > .hf-sidebar-label {
  color: color-mix(in srgb, var(--hf-accent) 74%, var(--hf-text-muted));
}
.hf-sidebar-section.group-collapsed > .hf-sidebar-label {
  margin-bottom: 0;
}
.hf-sidebar-label-chev {
  color: var(--hf-text-muted);
  font-size: 9px;
  font-weight: 900;
}
.hf-sidebar-links {
  display: grid;
  gap: 0;
}
.hf-sidebar.collapsed .hf-sidebar-label {
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.hf-sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  height: 27px;
  border-radius: var(--hf-radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--hf-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background var(--hf-transition-fast), color var(--hf-transition-fast);
  border-left: 2px solid transparent;
  margin-left: -2px;
}
.hf-sidebar-link:hover {
  background: var(--hf-bg-card-hover);
  color: var(--hf-text-primary);
}
.hf-sidebar-link.active {
  background: var(--hf-accent-subtle);
  color: var(--hf-accent);
  border-left-color: var(--hf-accent);
  font-weight: 650;
}
.hf-sidebar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 18px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.hf-sidebar-link-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.hf-sidebar.collapsed .hf-sidebar-link-text {
  display: none;
}
.hf-sidebar-footer {
  margin-top: auto;
  padding: var(--hf-sp-2);
  border-top: 1px solid var(--hf-border);
}
.hf-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 30px;
  border-radius: var(--hf-radius);
  border: none;
  background: transparent;
  color: var(--hf-text-muted);
  cursor: pointer;
  font-size: var(--hf-text-xs);
  font-family: var(--hf-font-sans);
  transition: background var(--hf-transition-fast);
}
.hf-sidebar-toggle:hover { background: var(--hf-bg-card-hover); }

/* ============================================================
   App Shell: Main Content
   ============================================================ */
.hf-main {
  margin-left: var(--hf-sidebar-w);
  margin-top: var(--hf-header-h);
  min-height: calc(100vh - var(--hf-header-h));
  padding: 10px;
  transition: margin-left var(--hf-transition);
  overflow-x: hidden;
}

/* ============================================================
   Admin Enterprise Density Layer
   Scoped to the admin shell so scanner pages stay touch-first.
   ============================================================ */
.hf-main,
.hf-main * {
  min-width: 0;
}

.hf-main {
  width: calc(100vw - var(--hf-sidebar-w));
  max-width: calc(100vw - var(--hf-sidebar-w));
}
.hf-main.sidebar-collapsed {
  width: calc(100vw - var(--hf-sidebar-collapsed-w));
  max-width: calc(100vw - var(--hf-sidebar-collapsed-w));
}

.hf-main > div {
  width: 100%;
  max-width: 100%;
}

.hf-main h1 {
  font-size: var(--hf-text-xl) !important;
  line-height: 1.2 !important;
}

.hf-main h2 {
  font-size: var(--hf-text-base) !important;
  line-height: 1.2 !important;
}

.hf-main p {
  line-height: 1.35;
}

.hf-main section,
.hf-main .hf-card {
  box-shadow: none;
}

.hf-main input,
.hf-main select {
  height: var(--hf-density-control-h) !important;
  min-height: var(--hf-density-control-h) !important;
  padding: 0 8px !important;
  border-radius: var(--hf-radius-sm) !important;
  font-size: 12px !important;
}

.hf-main textarea {
  min-height: 54px !important;
  padding: 6px 8px !important;
  border-radius: var(--hf-radius-sm) !important;
  font-size: 12px !important;
}

.hf-main button,
.hf-main a[style*="inline-flex"],
.hf-main a[style*="grid"] {
  min-height: var(--hf-density-control-h);
}

.hf-main table {
  table-layout: auto;
  width: 100%;
  font-size: 11px !important;
}

.hf-main th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 5px 7px !important;
  background: var(--hf-bg-secondary) !important;
  border-bottom: 1px solid var(--hf-border-strong) !important;
}

.hf-main td {
  padding: 4px 7px !important;
}

.hf-main tr {
  min-height: var(--hf-density-row-h);
}

.hf-main img {
  max-width: 100%;
}

/* ============================================================
   Control Tower
   ============================================================ */
.ct-page {
  display: grid;
  gap: 10px;
}

.ct-status-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  overflow: hidden;
  background: var(--hf-border);
}

.ct-status-bar > div {
  background: var(--hf-bg-card);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}

.ct-status-bar span {
  color: var(--hf-text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ct-status-bar strong {
  color: var(--hf-text-heading);
  font-size: 15px;
  line-height: 1;
}

.ct-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ct-grid-main {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
}

.ct-grid-wide {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
}

.ct-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ct-feed,
.ct-list,
.ct-zone-list,
.ct-ai-list,
.ct-timeline {
  display: grid;
  gap: 5px;
}

.ct-feed-row,
.ct-list-row,
.ct-timeline-row,
.ct-ai-row {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) minmax(80px, 1.2fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 27px;
  padding: 4px 6px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background: color-mix(in srgb, var(--hf-bg-card) 92%, var(--hf-bg-primary));
}

.ct-list-row {
  grid-template-columns: minmax(100px, 1fr) auto minmax(60px, 0.8fr);
}

.ct-ai-row {
  grid-template-columns: auto 1fr;
}

.ct-timeline-row {
  grid-template-columns: 130px minmax(130px, 1fr) minmax(90px, 1fr) auto;
}

.ct-feed-row span,
.ct-list-row span,
.ct-timeline-row span,
.ct-zone-row span,
.ct-feed-row em,
.ct-list-row em,
.ct-timeline-row em {
  color: var(--hf-text-muted);
  font-size: 11px;
  font-style: normal;
}

.ct-feed-row strong,
.ct-list-row strong,
.ct-timeline-row strong,
.ct-zone-row strong,
.ct-op-cell strong {
  color: var(--hf-text-heading);
  font-size: 12px;
}

.ct-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ct-op-cell {
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-primary);
  padding: 7px;
  display: grid;
  gap: 2px;
}

.ct-op-cell span {
  color: var(--hf-text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ct-op-cell strong {
  font-size: 18px;
  line-height: 1;
}

.ct-op-cell em {
  color: var(--hf-text-secondary);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ct-zone-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background: color-mix(in srgb, var(--hf-bg-card) 92%, var(--hf-bg-primary));
}

.ct-zone-row > div {
  display: grid;
  gap: 1px;
}

.ct-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--hf-bg-primary);
  border: 1px solid var(--hf-border-subtle);
  overflow: hidden;
}

.ct-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

@media (max-width: 1320px) {
  .ct-status-bar,
  .ct-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ct-grid-main,
  .ct-grid-wide,
  .ct-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Modular Dashboard Widgets
   ============================================================ */
.dashboard-page {
  display: grid;
  gap: 10px;
}

.dashboard-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--hf-text-muted);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.dashboard-widget {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 132px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius);
  background: var(--hf-bg-card);
  box-shadow: var(--hf-shadow-sm);
  overflow: hidden;
}

.dashboard-widget-sm {
  grid-column: span 3;
}

.dashboard-widget-md {
  grid-column: span 4;
}

.dashboard-widget-lg {
  grid-column: span 6;
}

.dashboard-widget-xl {
  grid-column: span 12;
}

.dashboard-widget-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--hf-border-subtle);
  background: var(--hf-bg-panel);
}

.dashboard-widget-header h2 {
  margin: 0;
  color: var(--hf-text-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.dashboard-widget-header p {
  margin: 2px 0 0 0;
  color: var(--hf-text-muted);
  font-size: 10px;
  line-height: 1.35;
}

.dashboard-widget-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px 9px;
}

.dashboard-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-mini-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-panel);
}

.dashboard-mini-metric span {
  color: var(--hf-text-muted);
  font-size: 10px;
}

.dashboard-mini-metric strong {
  color: var(--hf-info);
  font-size: 16px;
  line-height: 1;
}

.dashboard-mini-metric strong[data-tone='green'] {
  color: var(--hf-success);
}

.dashboard-mini-metric strong[data-tone='amber'],
.dashboard-mini-metric strong[data-tone='orange'] {
  color: var(--hf-warning);
}

.dashboard-mini-metric strong[data-tone='red'] {
  color: var(--hf-danger);
}

.dashboard-list,
.dashboard-feed {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dashboard-list-row,
.dashboard-feed-row {
  display: grid;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 26px;
  padding: 4px 6px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-panel);
}

.dashboard-list-row {
  grid-template-columns: minmax(90px, 1fr) auto minmax(62px, 0.8fr);
}

.dashboard-feed-row {
  grid-template-columns: 48px minmax(120px, 1fr) minmax(80px, 0.8fr) auto;
}

.dashboard-list-row strong,
.dashboard-feed-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--hf-text-heading);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-row span,
.dashboard-feed-row span,
.dashboard-feed-row em,
.dashboard-note {
  min-width: 0;
  overflow: hidden;
  color: var(--hf-text-muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-progress {
  height: 6px;
  min-width: 64px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hf-bg-muted);
}

.dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.dashboard-table-wrap {
  overflow: auto;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
}

.dashboard-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.dashboard-heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-heatmap div {
  display: grid;
  min-height: 52px;
  align-content: space-between;
  padding: 7px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background: color-mix(in srgb, var(--hf-success) 10%, var(--hf-bg-panel));
}

.dashboard-heatmap div[data-level='1'] {
  background: color-mix(in srgb, var(--hf-warning) 12%, var(--hf-bg-panel));
}

.dashboard-heatmap div[data-level='2'] {
  background: color-mix(in srgb, var(--hf-accent) 12%, var(--hf-bg-panel));
}

.dashboard-heatmap strong {
  color: var(--hf-text-heading);
  font-size: 11px;
}

.dashboard-heatmap span {
  color: var(--hf-text-muted);
  font-size: 10px;
}

@media (max-width: 1440px) {
  .dashboard-widget-md {
    grid-column: span 6;
  }

  .dashboard-widget-lg {
    grid-column: span 12;
  }
}

@media (max-width: 900px) {
  .dashboard-widget-sm,
  .dashboard-widget-md,
  .dashboard-widget-lg,
  .dashboard-widget-xl {
    grid-column: span 12;
  }

  .dashboard-metric-row,
  .dashboard-heatmap {
    grid-template-columns: 1fr;
  }
}
.hf-sidebar.collapsed ~ .hf-main,
.hf-main.sidebar-collapsed {
  margin-left: var(--hf-sidebar-collapsed-w);
}

/* ============================================================
   Scrollbar (Webkit)
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hf-border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--hf-text-muted); }

/* ============================================================
   Scanner / Android device ergonomics — applied globally
   ============================================================ */
* { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
input, textarea, button, select { font-size: 16px; } /* prevent mobile zoom */
input:focus, textarea:focus { outline: none; }

/* Override font-size for admin UI controls only (not scanner) */
.hf-input, .hf-btn, .hf-table, select.hf-input {
  font-size: inherit;
}

/* ============================================================
   Global Notification Center
   ============================================================ */
.gn-root {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.gn-root.scanner {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 1500;
}

.gn-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  font-size: var(--hf-text-xs);
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
}

.gn-bell.active {
  border-color: rgba(217, 119, 6, 0.55);
  background: rgba(217, 119, 6, 0.10);
  color: var(--hf-accent);
}

.gn-bell.critical {
  border-color: rgba(220, 38, 38, 0.75);
  background: rgba(220, 38, 38, 0.12);
  color: var(--hf-danger);
}

.gn-bell.scanner {
  min-width: 76px;
  height: 46px;
  border-radius: 14px;
  border-color: #2b3b52;
  background: #18263a;
  color: #f3f7ff;
  font-size: 14px;
}

.gn-bell strong {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--hf-danger);
  color: #fff;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  border: 1px solid var(--hf-bg-header);
}

.gn-bell-icon {
  display: grid;
  place-items: center;
}

.gn-bell-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.gn-bell.scanner .gn-bell-icon svg {
  width: 20px;
  height: 20px;
}

.gn-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(430px, calc(100vw - 18px));
  max-height: min(680px, calc(100vh - 58px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid var(--hf-border-strong);
  border-radius: 10px;
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.30);
  overflow: hidden;
  z-index: 1800;
}

.gn-root.scanner .gn-panel {
  position: fixed;
  top: 62px;
  right: 10px;
  width: min(460px, calc(100vw - 20px));
  max-height: calc(100vh - 74px);
  border-color: #2b3b52;
  background: #0f1621;
  color: #f3f7ff;
}

.gn-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hf-border);
  background: var(--hf-bg-subtle);
}

.gn-panel h2 {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
}

.gn-panel header span {
  display: block;
  margin-top: 2px;
  color: var(--hf-text-muted);
  font-size: 11px;
}

.gn-panel nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--hf-border);
}

.gn-panel nav button {
  min-width: 0;
  height: 36px;
  border: 0;
  border-right: 1px solid var(--hf-border);
  background: transparent;
  color: var(--hf-text-secondary);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.gn-panel nav button:last-child { border-right: 0; }
.gn-panel nav button.active {
  background: rgba(217, 119, 6, 0.10);
  color: var(--hf-accent);
}

.gn-panel nav button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--hf-bg-header);
  color: var(--hf-text-primary);
  font-size: 10px;
}

.gn-list {
  min-height: 0;
  overflow: auto;
}

.gn-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hf-border);
  background: var(--hf-bg-card);
}

.gn-item.unread {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.09), transparent 68%);
}

.gn-item.critical {
  border-left: 3px solid var(--hf-danger);
}

.gn-item.high {
  border-left: 3px solid var(--hf-accent);
}

.gn-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.gn-item span,
.gn-popup small {
  color: var(--hf-text-muted);
  font-size: 11px;
}

.gn-item p {
  margin: 4px 0 0;
  color: var(--hf-text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.gn-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 142px;
}

.gn-actions a,
.gn-actions button,
.gn-popup-actions a,
.gn-popup-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--hf-border);
  border-radius: 5px;
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.gn-actions button:hover,
.gn-actions a:hover,
.gn-popup-actions button:hover,
.gn-popup-actions a:hover {
  border-color: var(--hf-accent);
  color: var(--hf-accent);
}

.gn-empty {
  margin: 0;
  padding: 18px 12px;
  color: var(--hf-text-muted);
  font-size: 12px;
}

.gn-popup-wrap {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1900;
  pointer-events: none;
}

body > .gn-popup-wrap.admin:not(.blocking) {
  position: fixed !important;
  top: auto !important;
  left: 50% !important;
  right: auto !important;
  bottom: 24px !important;
  transform: translateX(-50%) !important;
  z-index: 3000 !important;
}

.gn-popup-wrap.blocking {
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, 0.45);
  pointer-events: auto;
  transform: none;
}

.gn-popup-wrap.scanner {
  left: 10px;
  right: 10px;
  bottom: 10px;
  transform: none;
}

.gn-popup {
  width: min(420px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--hf-border-strong);
  border-left: 4px solid var(--hf-info);
  border-radius: 12px;
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
  pointer-events: auto;
}

.gn-popup-wrap.scanner .gn-popup {
  width: min(620px, calc(100vw - 20px));
  padding: 16px;
  border-radius: 18px;
  border-color: #2b3b52;
  background: #0f1621;
  color: #f3f7ff;
}

.gn-popup.medium,
.gn-popup.high {
  border-left-color: var(--hf-accent);
}

.gn-popup.critical {
  border-left-color: var(--hf-danger);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.20), 0 24px 60px rgba(0, 0, 0, 0.42);
}

.gn-popup header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.gn-popup header span {
  color: var(--hf-text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gn-popup header button {
  border: 0;
  background: transparent;
  color: var(--hf-text-muted);
  cursor: pointer;
}

.gn-popup h2 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.2;
}

.gn-popup p {
  margin: 0 0 8px;
  color: var(--hf-text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.gn-popup textarea {
  width: 100%;
  min-height: 74px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--hf-border);
  border-radius: 8px;
  background: var(--hf-bg-input);
  color: var(--hf-text-primary);
  resize: vertical;
}

.gn-popup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

.gn-popup-actions .danger,
.gn-popup-actions button.danger {
  border-color: var(--hf-danger);
  background: rgba(220, 38, 38, 0.10);
  color: var(--hf-danger);
}

@media (max-width: 720px) {
  .gn-panel {
    position: fixed;
    top: 48px;
    right: 8px;
    left: 8px;
    width: auto;
  }

  .gn-item {
    grid-template-columns: 1fr;
  }

  .gn-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

/* ============================================================
   Access Management - Enterprise WMS Layout
   ============================================================ */
:root {
  --hf-sidebar-w: 224px;
  --hf-header-h: 38px;
}

.hf-button,
.hf-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--hf-density-control-h);
  padding: 0 9px;
  border-radius: var(--hf-radius-sm);
  border: 1px solid var(--hf-border);
  background: var(--hf-bg-card);
  color: var(--hf-text-primary);
  font-size: var(--hf-text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.hf-button-primary {
  border-color: var(--hf-accent);
  background: var(--hf-accent);
  color: #fff;
}

.hf-access-page {
  display: grid;
  gap: 7px;
  min-height: calc(100vh - var(--hf-header-h) - 20px);
  min-width: 0;
  overflow-x: hidden;
}

.hf-access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 0 4px;
}

.hf-access-header h1 {
  margin: 0;
  color: var(--hf-text-heading);
  font-size: 16px !important;
  line-height: 1.1;
}

.hf-access-header p,
.hf-access-help {
  margin: 2px 0 0;
  color: var(--hf-text-muted);
  font-size: 11px;
}

.hf-access-actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
  background: linear-gradient(180deg, var(--hf-bg-card), var(--hf-bg-secondary));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hf-access-actions-bar .hf-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1;
}

.hf-access-actions-bar .hf-btn-primary {
  min-width: 92px;
}

.hf-access-summary-strip {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 30px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-card);
  overflow-x: auto;
}

.hf-access-summary-strip span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-right: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.hf-access-summary-strip span:last-child { border-right: none; }
.hf-access-summary-strip strong { color: var(--hf-text-heading); font-size: 14px; }

.hf-access-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--hf-border);
}

.hf-access-tabs button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--hf-text-secondary);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.hf-access-tabs button.active {
  border-bottom-color: var(--hf-accent);
  color: var(--hf-text-heading);
  background: var(--hf-accent-subtle);
}

.hf-access-status { min-height: 26px; padding: 3px 7px; }

.hf-access-users-card {
  display: grid;
  gap: 7px;
  padding: 8px;
  min-width: 0;
  overflow-x: hidden;
}

.hf-access-table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.hf-access-table-title h2 {
  margin: 0;
  color: var(--hf-text-heading);
  font-size: 13px !important;
}

.hf-access-table-title span {
  color: var(--hf-text-muted);
  font-size: 10px;
}

.hf-access-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(6, minmax(96px, 0.75fr));
  gap: 5px;
  align-items: center;
}

.hf-access-users-card .hf-table-scroll {
  max-height: calc(100vh - var(--hf-header-h) - 190px);
  min-height: 360px;
  overflow-x: hidden !important;
  width: 100%;
}

.hf-access-users-card .hf-table-wrap {
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.hf-access-users-card .hf-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.hf-access-users-card .hf-table th,
.hf-access-users-card .hf-table td {
  padding: 4px 6px !important;
  white-space: nowrap;
  font-size: 10px;
}

.hf-access-users-card .hf-table tbody tr {
  height: 34px;
}

.hf-access-users-card .hf-table th:nth-child(1) { width: 8.5%; }
.hf-access-users-card .hf-table th:nth-child(2) { width: 9.5%; }
.hf-access-users-card .hf-table th:nth-child(3) { width: 9%; }
.hf-access-users-card .hf-table th:nth-child(4) { width: 9%; }
.hf-access-users-card .hf-table th:nth-child(5) { width: 8.5%; }
.hf-access-users-card .hf-table th:nth-child(6) { width: 10%; }
.hf-access-users-card .hf-table th:nth-child(7) { width: 8.5%; }
.hf-access-users-card .hf-table th:nth-child(8) { width: 5.5%; }
.hf-access-users-card .hf-table th:nth-child(9) { width: 8.5%; }
.hf-access-users-card .hf-table th:nth-child(10) { width: 6.5%; }
.hf-access-users-card .hf-table th:nth-child(11) { width: 7.5%; }
.hf-access-users-card .hf-table th:nth-child(12) { width: 8%; }

.hf-access-users-card .hf-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-access-cell-strong { font-weight: 750; color: var(--hf-text-heading); }

.hf-access-users-card .hf-badge {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hf-access-landing { font-family: var(--hf-font-mono); font-size: 10px; color: var(--hf-text-secondary); }
.hf-muted { color: var(--hf-text-muted); }

.hf-access-row-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.hf-access-more {
  position: relative;
  display: inline-flex;
}

.hf-access-more summary {
  list-style: none;
}

.hf-access-more summary::-webkit-details-marker { display: none; }

.hf-access-more > div {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 166px;
  padding: 6px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-card);
  box-shadow: var(--hf-shadow);
}

.hf-access-row-more > div { min-width: 122px; }
.hf-access-more:not([open]) > div { display: none; }

.hf-access-advanced-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr) 120px auto;
  gap: 6px;
  align-items: center;
}

.hf-access-drawer-backdrop {
  justify-content: flex-end;
  align-items: stretch;
  padding: calc(var(--hf-header-h) + 8px) 10px 10px;
}

.hf-access-drawer {
  width: min(620px, 100%);
  max-height: calc(100vh - var(--hf-header-h) - 20px);
  overflow: auto;
  border-radius: var(--hf-radius-lg);
}

.hf-access-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hf-access-form-grid label,
.hf-access-compact-modal label {
  display: grid;
  gap: 3px;
  color: var(--hf-text-muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hf-access-permission-matrix {
  margin-top: 10px;
}

.hf-access-permission-matrix h3 {
  margin: 0 0 6px;
  font-size: 12px;
}

.hf-access-permission-matrix > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.hf-access-permission-matrix section {
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  padding: 7px;
  background: var(--hf-bg-primary);
}

.hf-access-permission-matrix label {
  display: block;
  margin-top: 4px;
  color: var(--hf-text-secondary);
  font-size: 10px;
}

.hf-access-drawer-footer,
.hf-access-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--hf-border-subtle);
}

.hf-access-compact-modal {
  width: min(520px, 100%);
}

.hf-sidebar-section { padding: 3px 7px; }
.hf-sidebar-label { margin-bottom: 1px; padding: 0 7px; font-size: 9px; letter-spacing: 0.05em; }
.hf-sidebar-link { height: 24px; gap: 6px; padding: 0 7px; font-size: 11px; border-radius: 3px; }
.hf-sidebar-link-icon { width: 18px; height: 16px; font-size: 9px; }
.hf-sidebar-footer { padding: 5px 7px; }
.hf-sidebar-toggle { height: 26px; }

@media (max-width: 1180px) {
  .hf-access-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hf-access-header { align-items: stretch; flex-direction: column; }
  .hf-access-actions-bar { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .hf-access-filters,
  .hf-access-advanced-row,
  .hf-access-form-grid,
  .hf-access-permission-matrix > div { grid-template-columns: 1fr; }
  .hf-access-users-card .hf-table-scroll { max-height: none; min-height: 240px; }
  .hf-access-tabs { overflow-x: auto; }
}

/* ============================================================
   Live Operations - Enterprise WMS Dashboard
   ============================================================ */
.lo-page {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow-x: hidden;
}

.lo-hero,
.lo-customizer,
.lo-kpi-strip,
.lo-panel {
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background: var(--hf-bg-card);
  box-shadow: var(--hf-shadow-sm);
}

.lo-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(234, 88, 12, 0.08), transparent 28%),
    linear-gradient(180deg, var(--hf-bg-card), var(--hf-bg-secondary));
}

.lo-eyebrow {
  color: var(--hf-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lo-hero h1 {
  margin: 2px 0;
  color: var(--hf-text-heading);
  font-size: 22px;
  line-height: 1.1;
}

.lo-hero p {
  margin: 0;
  color: var(--hf-text-muted);
  font-size: 12px;
}

.lo-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--hf-text-secondary);
  font-size: 11px;
  white-space: nowrap;
}

.lo-customizer {
  display: grid;
  grid-template-columns: minmax(190px, 0.4fr) 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
}

.lo-customizer strong,
.lo-customizer span {
  display: block;
}

.lo-customizer span {
  color: var(--hf-text-muted);
  font-size: 11px;
}

.lo-widget-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.lo-widget-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: 999px;
  background: var(--hf-bg-secondary);
  color: var(--hf-text-secondary);
  font-size: 11px;
}

.lo-kpi-strip {
  display: grid;
  grid-template-columns: repeat(13, minmax(92px, 1fr));
  gap: 1px;
  overflow: hidden;
}

.lo-kpi {
  display: grid;
  grid-template-rows: auto auto 18px;
  gap: 1px;
  min-width: 0;
  min-height: 74px;
  padding: 8px;
  border-right: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-primary);
  text-decoration: none;
  background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.05));
}

.lo-kpi:last-child { border-right: none; }
.lo-kpi span { overflow: hidden; color: var(--hf-text-muted); font-size: 10px; font-weight: 750; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.lo-kpi strong { color: var(--hf-text-heading); font-size: 21px; line-height: 1; }
.lo-kpi:hover { background: var(--hf-bg-card-hover); }
.lo-tone-green { border-top: 3px solid var(--hf-success); }
.lo-tone-yellow { border-top: 3px solid var(--hf-warning); }
.lo-tone-orange { border-top: 3px solid var(--hf-accent); }
.lo-tone-red { border-top: 3px solid var(--hf-danger); }
.lo-tone-blue { border-top: 3px solid var(--hf-info); }

.lo-spark {
  width: 100%;
  height: 18px;
  color: var(--hf-accent);
  opacity: 0.8;
}

.lo-chart-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}

.lo-main-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 10px;
  min-width: 0;
}

.lo-panel {
  min-width: 0;
  overflow: hidden;
}

.lo-panel > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 0 9px;
  border-bottom: 1px solid var(--hf-border-subtle);
  background: linear-gradient(180deg, var(--hf-bg-card), var(--hf-bg-secondary));
}

.lo-panel h2 {
  margin: 0;
  color: var(--hf-text-heading);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lo-panel > header a {
  color: var(--hf-accent);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.lo-chart {
  display: grid;
  gap: 4px;
  height: 180px;
  padding: 8px;
}

.lo-chart svg {
  width: 100%;
  height: 145px;
  border: 1px solid var(--hf-border-subtle);
  border-radius: var(--hf-radius-sm);
  background:
    linear-gradient(var(--hf-border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--hf-border-subtle) 1px, transparent 1px);
  background-size: 100% 25%, 12.5% 100%;
}

.lo-line {
  fill: none;
  stroke: var(--hf-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.lo-axis {
  stroke: var(--hf-border-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.lo-chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--hf-text-muted);
  font-size: 9px;
}

.lo-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 7px;
  height: 180px;
  padding: 10px 10px 6px;
}

.lo-bar-item {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 4px;
  height: 100%;
  min-width: 0;
}

.lo-bar-item span {
  display: block;
  min-height: 6px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--hf-accent), rgba(234, 88, 12, 0.55));
}

.lo-bar-item small {
  color: var(--hf-text-muted);
  font-size: 9px;
  text-align: center;
}

.lo-donut-wrap {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 180px;
  padding: 12px;
}

.lo-donut {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 22px var(--hf-bg-card), 0 0 0 1px var(--hf-border);
}

.lo-donut strong {
  color: var(--hf-text-heading);
  font-size: 20px;
}

.lo-legend {
  display: grid;
  gap: 6px;
  color: var(--hf-text-secondary);
  font-size: 11px;
}

.lo-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lo-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.lo-hbars {
  display: grid;
  gap: 7px;
  min-height: 180px;
  padding: 10px;
}

.lo-hbar-row {
  display: grid;
  grid-template-columns: minmax(80px, 0.8fr) 1fr 34px 34px;
  gap: 6px;
  align-items: center;
  color: var(--hf-text-secondary);
  font-size: 11px;
}

.lo-hbar-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lo-hbar-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hf-bg-secondary);
}

.lo-hbar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hf-info);
}

.lo-hbar-row strong,
.lo-hbar-row em {
  color: var(--hf-text-heading);
  font-style: normal;
  text-align: right;
}

.lo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: auto;
}

.lo-table th {
  position: sticky;
  top: 32px;
  z-index: 1;
  padding: 5px 7px;
  border-bottom: 1px solid var(--hf-border);
  background: var(--hf-bg-secondary);
  color: var(--hf-text-muted);
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.lo-table td {
  padding: 5px 7px;
  border-bottom: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-primary);
  vertical-align: middle;
}

.lo-table tbody tr:nth-child(even) { background: var(--hf-bg-zebra); }
.lo-table tbody tr:hover { background: var(--hf-hover-row); }
.lo-table span { color: var(--hf-text-muted); font-size: 10px; }

.lo-row-link {
  color: inherit;
  text-decoration: none;
}

.lo-row-link:hover {
  color: var(--hf-accent);
}

.lo-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--hf-border-subtle);
}

.lo-feed {
  display: grid;
  max-height: 486px;
  overflow: auto;
}

.lo-feed .lo-row-link {
  display: grid;
  grid-template-columns: 44px 112px 86px 1fr 98px;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 6px 8px;
  border-bottom: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-primary);
}

.lo-feed span,
.lo-feed small {
  color: var(--hf-text-muted);
  font-size: 10px;
}

.lo-feed strong,
.lo-feed em,
.lo-feed small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lo-feed em {
  color: var(--hf-text-secondary);
  font-style: normal;
}

.lo-mini-progress {
  display: inline-block;
  width: 54px;
  height: 7px;
  margin-right: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hf-bg-secondary);
  vertical-align: middle;
}

.lo-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--hf-accent);
}

.lo-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--hf-text-muted);
}

.lo-dot.on {
  background: var(--hf-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.lo-message-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--hf-border-subtle);
}

.lo-message-grid span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-right: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.lo-message-grid strong {
  color: var(--hf-text-heading);
  font-size: 18px;
}

.lo-empty {
  margin: 0;
  padding: 12px;
  color: var(--hf-text-muted);
  font-size: 12px;
}

@media (max-width: 1500px) {
  .lo-kpi-strip { grid-template-columns: repeat(7, minmax(110px, 1fr)); }
  .lo-chart-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .lo-main-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
}

@media (max-width: 900px) {
  .lo-hero,
  .lo-customizer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .lo-hero {
    display: grid;
  }

  .lo-toolbar {
    justify-content: flex-start;
  }

  .lo-kpi-strip,
  .lo-chart-grid,
  .lo-main-grid {
    grid-template-columns: 1fr;
  }

  .lo-feed .lo-row-link {
    grid-template-columns: 42px 1fr;
  }

  .lo-feed small {
    display: none;
  }
}

/* ============================================================
   Global Admin Search
   ============================================================ */
.hf-global-search {
  position: fixed;
  top: 5px;
  left: clamp(300px, 38vw, 720px);
  z-index: 160;
  width: min(360px, 28vw);
  min-width: 270px;
  margin: 0;
  flex: 0 0 auto;
}

.hf-global-search-box {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 22px;
  align-items: center;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--hf-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hf-bg-input) 88%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hf-global-search-box .hf-global-search-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--hf-accent-subtle);
  color: var(--hf-accent);
}

.hf-global-search-icon svg {
  width: 13px;
  height: 13px;
  display: block;
}

.hf-global-search-box input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--hf-text-primary);
  font-family: var(--hf-font-sans);
  font-size: 12px;
}

.hf-global-search-box input::placeholder {
  color: var(--hf-text-muted);
}

.hf-global-search-box:focus-within {
  border-color: var(--hf-accent);
  box-shadow: 0 0 0 2px var(--hf-accent-subtle), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hf-global-search-box em {
  color: var(--hf-text-muted);
  font-size: 11px;
  font-style: normal;
}

.hf-global-search-panel {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  max-height: min(640px, calc(100vh - 72px));
  overflow: auto;
  border: 1px solid var(--hf-border-strong);
  border-radius: 10px;
  background: color-mix(in srgb, var(--hf-bg-card) 96%, #000 4%);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
}

.hf-global-search-state {
  padding: 12px;
  color: var(--hf-text-secondary);
  font-size: 12px;
}

.hf-global-search-group {
  border-bottom: 1px solid var(--hf-border-subtle);
}

.hf-global-search-group:last-child {
  border-bottom: 0;
}

.hf-global-search-group header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hf-border-subtle);
  background: color-mix(in srgb, var(--hf-bg-secondary) 92%, transparent);
  color: var(--hf-text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hf-global-search-group header span {
  color: var(--hf-accent);
}

.hf-global-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-primary);
  text-decoration: none;
}

.hf-global-search-result:last-child {
  border-bottom: 0;
}

.hf-global-search-result:hover,
.hf-global-search-result.active {
  background: var(--hf-selected-row);
}

.hf-global-search-result strong,
.hf-global-search-result small,
.hf-global-search-result p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hf-global-search-result strong {
  color: var(--hf-text-heading);
  font-size: 12px;
}

.hf-global-search-result small,
.hf-global-search-result p {
  margin: 1px 0 0;
  color: var(--hf-text-secondary);
  font-size: 10.5px;
}

.hf-global-search-result > span {
  align-self: start;
  max-width: 90px;
  overflow: hidden;
  border: 1px solid var(--hf-border);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--hf-text-secondary);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================================
   Premium Control Tower
   ============================================================ */
.tower-page {
  display: grid;
  gap: 10px;
  min-height: calc(100vh - var(--hf-header-h));
  margin: -10px;
  padding: 12px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.13), transparent 30%),
    linear-gradient(135deg, #07111d 0%, #0b1220 42%, #0f1724 100%);
  color: var(--hf-text-primary);
}

[data-theme="light"] .tower-page {
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.12), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.10), transparent 30%),
    linear-gradient(135deg, #eef3f8 0%, #f8fafc 46%, #e6edf5 100%);
}

.tower-hero,
.tower-card,
.tower-kpi {
  border: 1px solid color-mix(in srgb, var(--hf-border) 78%, transparent);
  background: color-mix(in srgb, var(--hf-bg-card) 86%, transparent);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tower-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
}

.tower-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hf-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tower-hero h1 {
  margin: 2px 0 1px;
  color: var(--hf-text-heading);
  font-size: clamp(22px, 2.1vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.tower-hero p {
  margin: 0;
  color: var(--hf-text-secondary);
  font-size: 13px;
}

.tower-hero-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.tower-hero-actions label {
  display: grid;
  gap: 3px;
  color: var(--hf-text-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.tower-hero-actions input,
.tower-card select {
  height: 28px;
  border: 1px solid var(--hf-border);
  border-radius: 7px;
  background: var(--hf-bg-input);
  color: var(--hf-text-primary);
  font-family: var(--hf-font-sans);
  font-size: 12px;
}

.tower-hero-actions input {
  width: 138px;
  padding: 0 8px;
}

.tower-card select {
  padding: 0 8px;
}

.tower-hero-actions button {
  height: 28px;
  border: 1px solid var(--hf-border);
  border-radius: 7px;
  background: var(--hf-bg-card);
  color: var(--hf-text-secondary);
  cursor: pointer;
  font-family: var(--hf-font-sans);
  font-size: 11px;
  font-weight: 700;
}

.tower-hero-actions button.active,
.tower-hero-actions button:hover {
  border-color: var(--hf-accent);
  background: var(--hf-accent-subtle);
  color: var(--hf-accent);
}

.tower-refresh-state {
  align-self: center;
  color: var(--hf-text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.tower-kpi-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  gap: 8px;
  min-width: 0;
}

.tower-kpi {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 72px;
  padding: 10px;
  border-radius: 12px;
  color: var(--hf-text-primary);
  text-decoration: none;
}

.tower-kpi:hover {
  border-color: var(--tone-color);
  transform: translateY(-1px);
}

.tower-kpi-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--tone-color) 16%, transparent);
  color: var(--tone-color);
  font-size: 10px;
  font-weight: 900;
}

.tower-kpi em,
.tower-kpi b {
  color: var(--hf-text-muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.tower-kpi strong {
  display: block;
  margin-top: 3px;
  color: var(--hf-text-heading);
  font-size: 22px;
  line-height: 1;
}

.tower-kpi b {
  align-self: start;
  color: var(--tone-color);
}

.tower-tone-green { --tone-color: var(--hf-success); }
.tower-tone-blue { --tone-color: var(--hf-info); }
.tower-tone-orange { --tone-color: var(--hf-accent); }
.tower-tone-red { --tone-color: var(--hf-danger); }
.tower-tone-yellow { --tone-color: var(--hf-warning); }

.tower-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
  gap: 10px;
  min-width: 0;
}

.tower-secondary-grid,
.tower-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.tower-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
}

.tower-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--hf-border-subtle);
}

.tower-card h2 {
  margin: 0;
  color: var(--hf-text-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.tower-card-large {
  min-height: 290px;
}

.tower-chart-legend {
  display: flex;
  gap: 14px;
  padding: 8px 12px 0;
  color: var(--hf-text-secondary);
  font-size: 11px;
}

.tower-chart-legend span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
}

.tower-chart-legend .received::before { background: var(--hf-accent); }
.tower-chart-legend .shipped::before { background: var(--hf-info); }

.tower-chart-wrap {
  width: 100%;
  padding: 6px 10px 10px;
}

.tower-chart-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 245px;
}

.tower-grid-line {
  stroke: var(--hf-border-subtle);
  stroke-width: 1;
}

.tower-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tower-line-received { stroke: var(--hf-accent); }
.tower-line-shipped { stroke: var(--hf-info); }
.tower-chart-label {
  fill: var(--hf-text-muted);
  font-size: 10px;
}

.tower-status-list,
.tower-activity-list,
.tower-message-list,
.tower-exception-list,
.tower-movement-list {
  display: grid;
}

.tower-status-row,
.tower-activity-row,
.tower-message-list a,
.tower-exception-list a,
.tower-movement-list a {
  display: grid;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-primary);
  text-decoration: none;
}

.tower-status-row {
  grid-template-columns: 8px minmax(0, 1fr) auto;
}

.tower-status-row i {
  width: 8px;
  height: 36px;
  border-radius: 999px;
  background: var(--tone-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone-color) 12%, transparent);
}

.tower-status-row strong,
.tower-activity-row strong,
.tower-message-list strong,
.tower-exception-list strong,
.tower-movement-list a {
  color: var(--hf-text-heading);
  font-size: 12px;
}

.tower-status-row span,
.tower-activity-row small,
.tower-message-list small,
.tower-exception-list small,
.tower-movement-list span {
  display: block;
  overflow: hidden;
  color: var(--hf-text-secondary);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-status-row b {
  min-width: 32px;
  border-radius: 999px;
  padding: 3px 8px;
  background: color-mix(in srgb, var(--tone-color) 14%, transparent);
  color: var(--tone-color);
  font-size: 12px;
  text-align: center;
}

.tower-status-row:hover,
.tower-activity-row:hover,
.tower-message-list a:hover,
.tower-exception-list a:hover,
.tower-movement-list a:hover,
.tower-feed-table a:hover {
  background: var(--hf-selected-row);
}

.tower-activity-row {
  grid-template-columns: 10px minmax(0, 1fr) 44px;
}

.tower-activity-row em {
  color: var(--hf-text-muted);
  font-size: 10px;
  font-style: normal;
  text-align: right;
}

.tower-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hf-info);
}

.tower-event-dot.warning,
.tower-event-dot.high { background: var(--hf-warning); }
.tower-event-dot.critical,
.tower-event-dot.error { background: var(--hf-danger); }
.tower-event-dot.info { background: var(--hf-info); }

.tower-alert-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--hf-border-subtle);
}

.tower-alert-stack > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-right: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-secondary);
  font-size: 11px;
}

.tower-movement-list a {
  grid-template-columns: 120px minmax(0, 1fr);
}

.tower-message-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--hf-border-subtle);
}

.tower-message-metrics div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid var(--hf-border-subtle);
}

.tower-message-metrics strong {
  color: var(--hf-text-heading);
  font-size: 20px;
  line-height: 1;
}

.tower-message-metrics span {
  color: var(--hf-text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.tower-message-list a,
.tower-exception-list a {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tower-feed-table {
  display: grid;
  max-height: 360px;
  overflow: auto;
}

.tower-feed-table a {
  display: grid;
  grid-template-columns: 48px 90px 118px minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--hf-border-subtle);
  color: var(--hf-text-primary);
  text-decoration: none;
}

.tower-feed-table span,
.tower-feed-table em {
  color: var(--hf-text-muted);
  font-size: 10px;
  font-style: normal;
}

.tower-feed-table b,
.tower-feed-table strong,
.tower-feed-table em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-feed-table b {
  color: var(--hf-text-heading);
  font-size: 11px;
}

.tower-feed-table strong {
  color: var(--hf-text-primary);
  font-size: 11px;
}

.tower-throughput {
  display: grid;
  grid-template-columns: repeat(2, 116px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.tower-donut {
  --tower-value: 0%;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--tone-color) var(--tower-value), rgba(148, 163, 184, 0.16) 0);
}

.tower-donut > div {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--hf-bg-card);
  text-align: center;
}

.tower-donut strong {
  color: var(--hf-text-heading);
  font-size: 20px;
  line-height: 1;
}

.tower-donut span {
  max-width: 58px;
  color: var(--hf-text-muted);
  font-size: 9px;
  line-height: 1.15;
}

.tower-operator-ranking {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tower-operator-ranking div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: center;
}

.tower-operator-ranking span,
.tower-operator-ranking b,
.tower-operator-ranking p {
  color: var(--hf-text-secondary);
  font-size: 11px;
}

.tower-operator-ranking b {
  color: var(--hf-text-heading);
  text-align: right;
}

.tower-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.tower-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone-color);
}

.tower-empty {
  padding: 14px;
  color: var(--hf-text-muted);
  font-size: 12px;
}

@media (max-width: 1500px) {
  .hf-global-search {
    width: min(320px, 25vw);
    min-width: 240px;
  }

  .tower-kpi-row {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .tower-main-grid,
  .tower-secondary-grid,
  .tower-bottom-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1050px) {
  .hf-global-search {
    width: 240px;
    min-width: 210px;
  }

  .tower-hero,
  .tower-main-grid,
  .tower-secondary-grid,
  .tower-bottom-grid {
    grid-template-columns: 1fr;
  }

  .tower-hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .tower-kpi-row {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .tower-feed-table a {
    grid-template-columns: 48px 90px minmax(0, 1fr);
  }

  .tower-feed-table em,
  .tower-feed-table .hf-badge,
  .tower-feed-table .hf-status-badge,
  .tower-feed-table .hf-severity-badge {
    display: none;
  }
}

@media (max-width: 760px) {
  .hf-global-search {
    display: block;
    left: 54px;
    width: 178px;
    min-width: 0;
    margin: 0;
  }

  .hf-global-search-box {
    height: 28px;
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .hf-global-search-box em {
    display: none;
  }

  .hf-global-search-box input {
    font-size: 11px;
  }

  .hf-global-search-panel {
    left: auto;
    right: -96px;
    width: min(420px, calc(100vw - 12px));
  }

  .hf-header {
    padding: 0 6px;
  }

  .hf-header-logo {
    flex: 0 0 38px;
    max-width: 38px;
    overflow: hidden;
    white-space: nowrap;
    justify-content: center;
  }

  .hf-header-logo .hf-logo-full {
    display: none;
  }

  .hf-header-logo .hf-logo-icon {
    display: block;
    height: 30px;
    max-width: 30px;
  }

  .hf-header-logo .hf-logo-light {
    display: none;
  }

  [data-theme="light"] .hf-header-logo .hf-logo-dark {
    display: none;
  }

  [data-theme="light"] .hf-header-logo .hf-logo-icon.hf-logo-light {
    display: block;
  }

  .hf-header-divider,
  .hf-header-actions a[title="Open Scanner"],
  .hf-header-actions a[title="TV KPI"],
  .hf-header-actions span[title] {
    display: none;
  }

  .hf-header-actions {
    flex: 0 0 auto;
    gap: 3px;
  }

  .hf-header-btn {
    height: 28px;
    padding: 0 6px;
  }

  .tower-kpi-row,
  .tower-alert-stack,
  .tower-message-metrics,
  .tower-throughput {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Client Portal MVP
   ============================================================ */
.hf-client-shell {
  min-height: 100vh;
  background: var(--hf-bg-primary);
  color: var(--hf-text-primary);
}

.hf-client-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--hf-border);
  background: color-mix(in srgb, var(--hf-bg-card) 92%, transparent);
  backdrop-filter: blur(12px);
}

.hf-client-brand,
.hf-client-header nav,
.hf-client-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hf-client-brand {
  color: var(--hf-text-heading);
  text-decoration: none;
}

.hf-client-brand span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--hf-accent);
  color: #fff;
  font-weight: 900;
}

.hf-client-header nav a,
.hf-client-header-actions a {
  color: var(--hf-text-secondary);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.hf-client-header nav a:hover,
.hf-client-header-actions a:hover { color: var(--hf-accent); }

.hf-client-main {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.hf-client-page {
  display: grid;
  gap: 14px;
}

.hf-client-hero,
.hf-client-card,
.hf-client-kpis > div {
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-lg);
  background: var(--hf-bg-card);
  box-shadow: var(--hf-shadow-sm);
}

.hf-client-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(234, 88, 12, 0.14), transparent 34%),
    linear-gradient(180deg, var(--hf-bg-card), var(--hf-bg-secondary));
}

.hf-client-hero span {
  color: var(--hf-accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hf-client-hero h1,
.hf-client-card h1,
.hf-client-card h2 {
  margin: 0;
  color: var(--hf-text-heading);
}

.hf-client-hero h1 { font-size: 28px; }
.hf-client-card h1 { font-size: 19px; }
.hf-client-card h2 { font-size: 15px; }

.hf-client-hero p,
.hf-client-card-title span {
  margin: 5px 0 0;
  color: var(--hf-text-muted);
  font-size: 12px;
}

.hf-client-primary,
.hf-client-form button,
.hf-client-card-title button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 13px;
  border: 1px solid var(--hf-accent);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.hf-client-card-title button,
.hf-client-form button[type='button'] {
  border-color: var(--hf-border);
  background: var(--hf-bg-secondary);
  color: var(--hf-text-primary);
}

.hf-client-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.hf-client-kpis > div {
  padding: 10px 12px;
}

.hf-client-kpis span {
  display: block;
  color: var(--hf-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hf-client-kpis strong {
  display: block;
  margin-top: 5px;
  color: var(--hf-text-heading);
  font-size: 24px;
}

.hf-client-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.hf-client-card-title,
.hf-client-toolbar,
.hf-client-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hf-client-alert {
  border-left: 3px solid var(--hf-accent);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-accent-subtle);
  color: var(--hf-text-heading);
  padding: 8px 10px;
  font-size: 12px;
}

.hf-client-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.hf-client-form label,
.hf-client-lines {
  display: grid;
  gap: 4px;
  color: var(--hf-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hf-client-form .wide { grid-column: 1 / -1; }

.hf-client-form input,
.hf-client-form select,
.hf-client-form textarea,
.hf-client-toolbar input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
  background: var(--hf-bg-input);
  color: var(--hf-text-primary);
  padding: 0 9px;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.hf-client-form textarea {
  min-height: 62px;
  padding-top: 8px;
  resize: vertical;
}

.hf-client-line-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 100px 150px auto;
  gap: 7px;
  align-items: center;
}

.hf-client-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hf-border);
  border-radius: var(--hf-radius-sm);
}

.hf-client-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.hf-client-table th,
.hf-client-table td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--hf-border-subtle);
  text-align: left;
  vertical-align: middle;
}

.hf-client-table th {
  position: sticky;
  top: 0;
  background: var(--hf-bg-secondary);
  color: var(--hf-text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hf-client-status {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(234, 88, 12, 0.45);
  border-radius: 4px;
  background: rgba(234, 88, 12, 0.12);
  color: var(--hf-accent);
  font-size: 10px;
  font-weight: 850;
}

@media (max-width: 980px) {
  .hf-client-header { grid-template-columns: 1fr; padding: 10px 14px; }
  .hf-client-header nav { overflow-x: auto; }
  .hf-client-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-client-form { grid-template-columns: 1fr; }
  .hf-client-line-grid { grid-template-columns: 1fr; }
  .hf-client-hero { align-items: flex-start; flex-direction: column; }
}
