/* ==========================================================================
   HustleX application styles
   --------------------------------------------------------------------------
   Consumes hustlex_tokens.css. Every colour here resolves to a token.

   Structure
     1.  Reset and base
     2.  Accessibility and focus
     3.  Theme (light / dark mapping)
     4.  Layout primitives
     5.  Typography
     6.  Header and navigation
     7.  Buttons
     8.  Forms
     9.  Surfaces, cards, page headers
     10. Statistics
     11. Badges, pills, ratings
     12. Alerts and notices
     13. Job cards and list rows
     14. Empty states
     15. Tables and key-value lists
     16. Avatars
     17. Hero (marketing surface)
     18. Chat
     19. Pagination and breadcrumbs
     20. Footer
     21. Utilities
     22. Motion
     23. Responsive
   ========================================================================== */

/* ==========================================================================
   1. RESET AND BASE
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--hx-font-family);
  font-size: var(--hx-text-base);
  font-weight: var(--hx-font-weight-regular);
  line-height: var(--hx-leading-normal);
  color: var(--hx-text-primary);
  background: var(--hx-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
svg { height: auto; }

/* Numerals line up in columns and never shift width as they change. */
.num, .stat-value, .price, .table .num, .tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

hr {
  border: 0;
  border-top: 1px solid var(--hx-border);
  margin: var(--hx-space-8) 0;
}

/* Keeps the footer at the bottom on short pages, whether or not the page
   wraps its own content in .page. */
main { flex: 1 0 auto; }

::selection { background: var(--hx-accent-tint); color: var(--hx-accent-tint-text); }

/* ==========================================================================
   2. ACCESSIBILITY AND FOCUS
   ========================================================================== */

.skip-link {
  position: absolute;
  left: var(--hx-space-4);
  top: -100px;
  z-index: var(--hx-z-toast);
  padding: var(--hx-space-3) var(--hx-space-4);
  background: var(--hx-surface);
  color: var(--hx-hustle-blue);
  font-weight: var(--hx-font-weight-semibold);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-lg);
  transition: top var(--hx-transition);
}
.skip-link:focus { top: var(--hx-space-4); text-decoration: none; }

/* One visible focus treatment for every interactive element. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--hx-focus-ring);
  outline-offset: 2px;
  border-radius: var(--hx-radius-sm);
}

/* ==========================================================================
   3. THEME (LIGHT / DARK MAPPING)
   --------------------------------------------------------------------------
   The palette in hustlex_tokens.css defines the brand anchors once. This
   block re-maps only the surface, border and text tokens, so every component
   below flips themes without knowing that themes exist.

   Brand colours (Hustle Blue, Bidding Orange, Reputation Gold) are not
   re-mapped: they stay recognisable in both modes. Semantic callouts keep
   their light surface and dark text in dark mode, because that pairing is the
   one the token checker proves at 6.1 to 7.4:1.
   ========================================================================== */

:root {
  /* Semantic aliases. Components reference these and never a raw brand ramp,
     so the dark mapping below is the only place a theme is decided. */
  --hx-heading: var(--hx-hustle-800);
  --hx-link: var(--hx-hustle-blue);
  --hx-link-hover: var(--hx-platform-blue);
  --hx-tint: var(--hx-hustle-50);
  --hx-tint-text: var(--hx-hustle-700);
  --hx-accent-tint: var(--hx-platform-50);
  --hx-accent-tint-text: var(--hx-platform-700);
  --hx-ring: var(--hx-platform-100);
  --hx-ring-danger: var(--hx-danger-light);
  --hx-focus-ring: var(--hx-platform-blue);

  /* Layout */
  --hx-container-wide: 1280px;
  --hx-container-narrow: 720px;
  --hx-gutter: var(--hx-space-4);
  --hx-z-header: 100;
  --hx-z-nav: 110;
  --hx-z-overlay: 200;
  --hx-z-toast: 300;

  /* Rhythm: section spacing breathes on larger screens without a media
     query per component. */
  --hx-section-gap: var(--hx-space-10);
  --hx-card-padding: var(--hx-space-5);

  /* Motion */
  --hx-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --hx-transition-fast: 120ms var(--hx-ease);
  --hx-transition-slow: 280ms var(--hx-ease);

  /* Elevation on hover, tinted to the page hue rather than black. */
  --hx-shadow-hover: 0 10px 24px rgba(20, 32, 64, 0.10), 0 2px 6px rgba(20, 32, 64, 0.06);
}

@media (min-width: 768px) {
  :root {
    --hx-gutter: var(--hx-space-6);
    --hx-section-gap: var(--hx-space-12);
    --hx-card-padding: var(--hx-space-6);
  }
}

@media (min-width: 1024px) {
  :root { --hx-section-gap: var(--hx-space-16); }
}

/* Dark mapping, applied when the OS asks for it and no explicit choice has
   been stored, and when the in-page toggle sets data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hx-bg: #0f192f;
    --hx-heading: #ffffff;
    --hx-link: var(--hx-platform-300);
    --hx-link-hover: var(--hx-platform-200);
    --hx-tint: var(--hx-hustle-700);
    --hx-tint-text: var(--hx-hustle-100);
    --hx-accent-tint: var(--hx-platform-800);
    --hx-accent-tint-text: var(--hx-platform-200);
    --hx-ring: rgba(120, 147, 227, 0.3);
    --hx-ring-danger: rgba(196, 69, 58, 0.35);
    --hx-surface: #132140;
    --hx-surface-alt: #172a53;
    --hx-border: #1b3266;
    --hx-border-strong: #1f3b7a;
    --hx-text-primary: #f2f2f3;
    --hx-text-secondary: #c0c1c4;
    --hx-text-tertiary: #9b9ca1;
    --hx-text-disabled: #717379;
    --hx-focus-ring: var(--hx-platform-400);
    --hx-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --hx-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
    --hx-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    --hx-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
    --hx-shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --hx-bg: #0f192f;
  --hx-heading: #ffffff;
  --hx-link: var(--hx-platform-300);
  --hx-link-hover: var(--hx-platform-200);
  --hx-tint: var(--hx-hustle-700);
  --hx-tint-text: var(--hx-hustle-100);
  --hx-accent-tint: var(--hx-platform-800);
  --hx-accent-tint-text: var(--hx-platform-200);
  --hx-ring: rgba(120, 147, 227, 0.3);
  --hx-ring-danger: rgba(196, 69, 58, 0.35);
  --hx-surface: #132140;
  --hx-surface-alt: #172a53;
  --hx-border: #1b3266;
  --hx-border-strong: #1f3b7a;
  --hx-text-primary: #f2f2f3;
  --hx-text-secondary: #c0c1c4;
  --hx-text-tertiary: #9b9ca1;
  --hx-text-disabled: #717379;
  --hx-focus-ring: var(--hx-platform-400);
  --hx-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --hx-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45);
  --hx-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  --hx-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.5);
  --hx-shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   4. LAYOUT PRIMITIVES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--hx-container);
  margin: 0 auto;
  padding: 0 var(--hx-gutter);
}
.container-wide { max-width: var(--hx-container-wide); }
.container-narrow { max-width: var(--hx-container-narrow); }

/* Vertical rhythm owner. Sections stack, and only the spacing between them
   changes at breakpoints. */
.page { padding-top: var(--hx-section-gap); padding-bottom: var(--hx-section-gap); flex: 1 0 auto; }
.section + .section { margin-top: var(--hx-section-gap); }
.section-tight + .section-tight { margin-top: var(--hx-space-6); }

.stack > * + * { margin-top: var(--hx-space-4); }
.stack-sm > * + * { margin-top: var(--hx-space-2); }
.stack-lg > * + * { margin-top: var(--hx-space-8); }
.stack-0 > * + * { margin-top: 0; }

/* Row of small items that wraps cleanly. */
.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hx-space-3);
}
.cluster-sm { gap: var(--hx-space-2); }
.cluster-lg { gap: var(--hx-space-4); }
.cluster-between { justify-content: space-between; }

.grid { display: grid; gap: var(--hx-space-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-fill { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-tight { gap: var(--hx-space-3); }
.grid-loose { gap: var(--hx-space-6); }

/* Main content beside a rail. Collapses to one column under 900px. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--hx-space-6);
  align-items: start;
}
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
  .split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split-wide { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
}

.rail-sticky { position: sticky; top: calc(var(--hx-header-height) + var(--hx-space-4)); }

/* A toolbar is the control strip above a list: filters, sorts, counts. */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--hx-space-4);
}

/* ==========================================================================
   5. TYPOGRAPHY
   --------------------------------------------------------------------------
   Hierarchy is carried by size, weight and colour together. Only one family
   is used; weight does the work a second typeface would otherwise do.
   ========================================================================== */

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--hx-space-3);
  font-weight: var(--hx-font-weight-bold);
  line-height: var(--hx-leading-tight);
  color: var(--hx-heading);
  text-wrap: balance;
}
h1 { font-size: var(--hx-text-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--hx-text-2xl); letter-spacing: -0.015em; }
h3 { font-size: var(--hx-text-lg); }
h4 { font-size: var(--hx-text-base); }
h5 { font-size: var(--hx-text-sm); }

@media (min-width: 768px) {
  h1 { font-size: var(--hx-text-4xl); }
}

p { margin: 0 0 var(--hx-space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--hx-link); text-decoration: none; transition: color var(--hx-transition-fast); }
a:hover { color: var(--hx-link-hover); text-decoration: underline; text-underline-offset: 2px; }

strong, b { font-weight: var(--hx-font-weight-semibold); }

/* Introductory paragraph under a page or section title. */
.lede {
  font-size: var(--hx-text-lg);
  line-height: var(--hx-leading-relaxed);
  color: var(--hx-text-secondary);
  max-width: 68ch;
}

.muted { color: var(--hx-text-secondary); }
.tertiary { color: var(--hx-text-tertiary); }
.small { font-size: var(--hx-text-sm); }
.micro { font-size: var(--hx-text-xs); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }

/* Two-line clamp for list excerpts. */
.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A label above a value, or above a group. Used sparingly: the page structure
   already carries most of the categorisation. */
.label {
  display: block;
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hx-text-tertiary);
  margin-bottom: var(--hx-space-1);
}

/* Money and other emphasised values. */
.price {
  font-size: var(--hx-text-xl);
  font-weight: var(--hx-font-weight-bold);
  color: var(--hx-heading);
  letter-spacing: -0.01em;
}
.price-sm { font-size: var(--hx-text-base); }

/* ==========================================================================
   6. HEADER AND NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--hx-z-header);
  background: var(--hx-hustle-blue);
  color: var(--hx-text-inverted);
  border-bottom: 1px solid var(--hx-hustle-700);
}

.site-header .navbar {
  display: flex;
  align-items: center;
  gap: var(--hx-space-4);
  min-height: var(--hx-header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--hx-space-2);
  font-size: var(--hx-text-xl);
  font-weight: var(--hx-font-weight-bold);
  color: var(--hx-text-inverted);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand:hover { color: var(--hx-text-inverted); text-decoration: none; }
.brand span { color: var(--hx-bidding-orange); }

/* The mark: two-letter monogram in the brand's own colour pair. */
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--hx-bidding-orange);
  color: var(--hx-text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-bold);
  letter-spacing: 0;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--hx-space-1);
  margin-left: auto;
}

.nav a.nav-link {
  color: var(--hx-hustle-100);
  padding: var(--hx-space-2) var(--hx-space-3);
  border-radius: var(--hx-radius);
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  white-space: nowrap;
  transition: background var(--hx-transition-fast), color var(--hx-transition-fast);
}
.nav a.nav-link:hover {
  color: var(--hx-text-inverted);
  background: var(--hx-hustle-700);
  text-decoration: none;
}
.nav a.nav-link[aria-current="page"] {
  color: var(--hx-text-inverted);
  background: var(--hx-hustle-700);
}

.nav-badge {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  margin-left: 6px;
  background: var(--hx-bidding-orange);
  color: var(--hx-text-dark);
  border-radius: var(--hx-radius-full);
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-bold);
  text-align: center;
  line-height: 20px;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--hx-hustle-700);
  margin: 0 var(--hx-space-1);
  flex-shrink: 0;
}

.nav-actions { display: flex; align-items: center; gap: var(--hx-space-2); }

/* Sign out is a form so it can carry a CSRF token. It should read as a link
   inside the nav, not as a boxed button competing with the primary CTA. */
.nav-signout {
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  color: var(--hx-hustle-100);
  padding: var(--hx-space-2) var(--hx-space-3);
  border-radius: var(--hx-radius);
  transition: background var(--hx-transition-fast), color var(--hx-transition-fast);
}
.nav-signout:hover { color: var(--hx-text-inverted); background: var(--hx-hustle-700); }

/* Theme toggle reads as an icon button in the header. */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--hx-radius);
  background: transparent;
  color: var(--hx-hustle-100);
  cursor: pointer;
  transition: background var(--hx-transition-fast), color var(--hx-transition-fast);
}
.icon-button:hover { background: var(--hx-hustle-700); color: var(--hx-text-inverted); }
.icon-button svg { width: 18px; height: 18px; }

/* Burger, hidden until the nav collapses. */
.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: var(--hx-space-2);
  padding: var(--hx-space-2) var(--hx-space-3);
  background: var(--hx-hustle-700);
  color: var(--hx-text-inverted);
  border: 1px solid var(--hx-hustle-700);
  border-radius: var(--hx-radius);
  font-family: inherit;
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle:hover { background: var(--hx-hustle-600); }

/* ==========================================================================
   7. BUTTONS
   --------------------------------------------------------------------------
   Contrast pairings follow section 5 of the palette. Bidding Orange and
   Reputation Gold always carry dark text: white on orange is 2.34:1.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hx-space-2);
  padding: var(--hx-space-3) var(--hx-space-5);
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--hx-radius);
  font-family: inherit;
  font-size: var(--hx-text-base);
  font-weight: var(--hx-font-weight-semibold);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--hx-transition-fast),
    border-color var(--hx-transition-fast),
    color var(--hx-transition-fast),
    transform var(--hx-transition-fast),
    box-shadow var(--hx-transition-fast);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Primary: Hustle Blue on white text, 10.69:1 */
.btn-primary { background: var(--hx-hustle-blue); color: var(--hx-text-inverted); }
.btn-primary:hover { background: var(--hx-hustle-700); color: var(--hx-text-inverted); box-shadow: var(--hx-shadow-sm); }

/* Secondary: Platform Blue on white text, 4.85:1 */
.btn-secondary { background: var(--hx-platform-blue); color: var(--hx-text-inverted); }
.btn-secondary:hover { background: var(--hx-platform-600); color: var(--hx-text-inverted); box-shadow: var(--hx-shadow-sm); }

/* Accent: dark text is mandatory on orange */
.btn-accent { background: var(--hx-bidding-orange); color: var(--hx-text-dark); }
.btn-accent:hover { background: var(--hx-orange-600); color: var(--hx-text-dark); box-shadow: var(--hx-shadow-sm); }

/* Neutral: the default for secondary actions in dense areas. */
.btn-neutral { background: var(--hx-surface); color: var(--hx-text-primary); border-color: var(--hx-border-strong); }
.btn-neutral:hover { background: var(--hx-surface-alt); color: var(--hx-heading); border-color: var(--hx-hustle-300); }

.btn-outline { background: transparent; border-color: var(--hx-border-strong); color: var(--hx-text-primary); }
.btn-outline:hover { background: var(--hx-surface-alt); color: var(--hx-heading); border-color: var(--hx-hustle-300); }

.btn-ghost { background: transparent; color: var(--hx-link); border-color: transparent; }
.btn-ghost:hover { background: var(--hx-accent-tint); color: var(--hx-link-hover); }

.btn-danger { background: var(--hx-danger-light); color: var(--hx-danger-dark); border-color: var(--hx-danger); }
.btn-danger:hover { background: var(--hx-danger); color: var(--hx-text-inverted); }

/* On the navy header or another dark surface. */
.btn-on-dark-outline {
  background: transparent;
  color: var(--hx-text-inverted);
  border-color: var(--hx-hustle-300);
}
.btn-on-dark-outline:hover { background: var(--hx-hustle-700); color: var(--hx-text-inverted); border-color: var(--hx-hustle-200); }

.btn-sm { padding: var(--hx-space-2) var(--hx-space-3); min-height: 36px; font-size: var(--hx-text-sm); }
.btn-lg { padding: var(--hx-space-4) var(--hx-space-6); min-height: 52px; font-size: var(--hx-text-lg); }
.btn-block { width: 100%; }

/* ==========================================================================
   8. FORMS
   ========================================================================== */

.field { margin-bottom: var(--hx-space-4); }
.field:last-child { margin-bottom: 0; }

.field > label,
.form-label {
  display: block;
  font-weight: var(--hx-font-weight-semibold);
  font-size: var(--hx-text-sm);
  color: var(--hx-heading);
  margin-bottom: var(--hx-space-2);
}

.field .required { color: var(--hx-danger); margin-left: 2px; }
.field .hint { font-size: var(--hx-text-xs); color: var(--hx-text-secondary); margin-top: var(--hx-space-2); }
.field .error {
  font-size: var(--hx-text-xs);
  color: var(--hx-danger-dark);
  margin-top: var(--hx-space-2);
  font-weight: var(--hx-font-weight-semibold);
  display: flex;
  align-items: flex-start;
  gap: var(--hx-space-1);
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="url"], input[type="search"], input[type="date"],
input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%;
  padding: var(--hx-space-3);
  min-height: 44px;
  border: 1px solid var(--hx-border-strong);
  border-radius: var(--hx-radius);
  font-family: inherit;
  font-size: var(--hx-text-base);
  color: var(--hx-text-primary);
  background: var(--hx-surface);
  transition: border-color var(--hx-transition-fast), box-shadow var(--hx-transition-fast);
}

input::placeholder, textarea::placeholder { color: var(--hx-text-tertiary); }

input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
input[type="number"]:hover, input[type="tel"]:hover, select:hover, textarea:hover {
  border-color: var(--hx-neutral-400);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--hx-platform-blue);
  box-shadow: 0 0 0 3px var(--hx-ring);
}

input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--hx-danger);
}
input[aria-invalid="true"]:focus, textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--hx-ring-danger);
}

textarea { min-height: 132px; resize: vertical; line-height: var(--hx-leading-relaxed); }

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--hx-text-secondary) 50%),
    linear-gradient(135deg, var(--hx-text-secondary) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% + 2px),
    calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--hx-space-10);
}

input[type="file"] { padding: var(--hx-space-2); min-height: 44px; }
input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  padding: var(--hx-space-2) var(--hx-space-3);
  margin-right: var(--hx-space-3);
  border: 1px solid var(--hx-border-strong);
  border-radius: var(--hx-radius-sm);
  background: var(--hx-surface-alt);
  color: var(--hx-text-primary);
  cursor: pointer;
}

.form-row {
  display: grid;
  gap: var(--hx-space-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: start;
}
.form-actions { display: flex; flex-wrap: wrap; gap: var(--hx-space-3); align-items: center; margin-top: var(--hx-space-6); }

/* Inline choice cards: used for role selection, because choosing who you are
   is the first real decision a new user makes. */
.choice-group { display: grid; gap: var(--hx-space-3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.choice {
  display: flex;
  gap: var(--hx-space-3);
  padding: var(--hx-space-4);
  border: 1px solid var(--hx-border-strong);
  border-radius: var(--hx-radius);
  background: var(--hx-surface);
  cursor: pointer;
  transition: border-color var(--hx-transition-fast), background var(--hx-transition-fast), box-shadow var(--hx-transition-fast);
}
.choice:hover { border-color: var(--hx-hustle-300); }
.choice input[type="radio"] { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; }
.choice-title { font-weight: var(--hx-font-weight-semibold); display: block; color: var(--hx-heading); }
.choice-desc { font-size: var(--hx-text-sm); color: var(--hx-text-secondary); }
.choice:has(input:checked) {
  border-color: var(--hx-platform-blue);
  background: var(--hx-accent-tint);
  box-shadow: 0 0 0 1px var(--hx-platform-blue);
}

/* Star rating input. */
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: var(--hx-space-1); }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { cursor: pointer; font-size: 2rem; line-height: 1; color: var(--hx-neutral-300); transition: color var(--hx-transition-fast); }
.rating-input label:hover, .rating-input label:hover ~ label,
.rating-input input:checked ~ label { color: var(--hx-reputation-gold); }
.rating-input input:focus-visible + label { outline: 3px solid var(--hx-focus-ring); outline-offset: 2px; }

/* ==========================================================================
   9. SURFACES, CARDS, PAGE HEADERS
   ========================================================================== */

.card {
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-card-padding);
  box-shadow: var(--hx-shadow-xs);
}
.card + .card { margin-top: var(--hx-space-4); }
.card-title { margin: 0 0 var(--hx-space-3); font-size: var(--hx-text-lg); }
.card-title:last-child { margin-bottom: 0; }
.card-flush { padding: 0; overflow: hidden; }

/* A card whose whole surface is clickable. The link inside is stretched over
   the card so the hit area matches the visual boundary. */
.card-link { position: relative; transition: border-color var(--hx-transition-fast), box-shadow var(--hx-transition-fast), transform var(--hx-transition-fast); }
.card-link:hover { border-color: var(--hx-hustle-300); box-shadow: var(--hx-shadow-hover); transform: translateY(-2px); }
.card-link:focus-within { border-color: var(--hx-platform-blue); }

/* Rail card: holds actions related to the page's main object. */
.card-rail { position: sticky; top: calc(var(--hx-header-height) + var(--hx-space-4)); }
@media (max-width: 899px) { .card-rail { position: static; } }

.panel {
  background: var(--hx-surface-alt);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-card-padding);
}

/* Page header: title, context, actions. One message per header. */
.page-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hx-space-4);
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: var(--hx-space-5);
  border-bottom: 1px solid var(--hx-border);
  margin-bottom: var(--hx-space-6);
}
.page-head h1 { margin-bottom: var(--hx-space-1); }
.page-head .lede { font-size: var(--hx-text-base); margin-bottom: 0; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: var(--hx-space-3); align-items: center; }

/* Section header inside a page. */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--hx-space-3);
  margin-bottom: var(--hx-space-4);
}
.section-head h2, .section-head h3 { margin: 0; }

/* Definition rows: label left, value right, no table markup needed. */
.kv { display: grid; gap: 0; margin: 0; }
.kv > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--hx-space-4);
  padding: var(--hx-space-3) 0;
  border-bottom: 1px solid var(--hx-border);
}
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv > div:first-child { padding-top: 0; }
.kv dt, .kv .kv-key { color: var(--hx-text-secondary); font-size: var(--hx-text-sm); margin: 0; }
.kv dd, .kv .kv-value { margin: 0; font-weight: var(--hx-font-weight-semibold); color: var(--hx-heading); text-align: right; }

/* ==========================================================================
   10. STATISTICS
   ========================================================================== */

.stat-tile {
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--hx-space-1);
}
.stat-tile .stat-label {
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hx-text-tertiary);
}
.stat-tile .stat-value {
  font-size: var(--hx-text-2xl);
  font-weight: var(--hx-font-weight-bold);
  color: var(--hx-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Legacy pair, still used by a few views. */
.stat { text-align: center; }
.stat-value {
  font-size: var(--hx-text-2xl);
  font-weight: var(--hx-font-weight-bold);
  color: var(--hx-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.stat-label { font-size: var(--hx-text-sm); color: var(--hx-text-secondary); }

/* ==========================================================================
   11. BADGES, PILLS, RATINGS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--hx-space-1);
  padding: 3px var(--hx-space-2);
  border-radius: var(--hx-radius-full);
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-semibold);
  text-transform: capitalize;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* The dot is reserved for status, where it carries real meaning. It is not
   used as decoration anywhere else. */
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.badge-open       { background: var(--hx-info-light);    color: var(--hx-info-dark); }
.badge-inprogress { background: var(--hx-warning-light); color: var(--hx-warning-dark); }
.badge-completed  { background: var(--hx-success-light); color: var(--hx-success-dark); }
.badge-cancelled  { background: var(--hx-danger-light);  color: var(--hx-danger-dark); }
.badge-neutral    { background: var(--hx-neutral-100);   color: var(--hx-text-secondary); }

/* Reputation Gold: dark text mandatory, white on gold is 1.40:1 */
.badge-gold { background: var(--hx-reputation-gold); color: var(--hx-text-dark); }
.badge-verified { background: var(--hx-gold-100); color: var(--hx-gold-800); }

/* Urgency and other low-emphasis tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--hx-space-2);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-sm);
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-semibold);
  color: var(--hx-text-secondary);
  background: var(--hx-surface);
  text-transform: capitalize;
}
.tag-urgent { border-color: var(--hx-danger); color: var(--hx-danger-dark); background: var(--hx-danger-light); }
.tag-high   { border-color: var(--hx-warning); color: var(--hx-warning-dark); background: var(--hx-warning-light); }

.stars { color: var(--hx-gold-700); letter-spacing: 1px; }
.rating { display: inline-flex; align-items: center; gap: var(--hx-space-2); font-size: var(--hx-text-sm); }
.rating .stars { font-size: var(--hx-text-base); }
.rating-value { font-weight: var(--hx-font-weight-semibold); color: var(--hx-heading); }
.rating-count { color: var(--hx-text-secondary); }

/* ==========================================================================
   12. ALERTS AND NOTICES
   ========================================================================== */

.alert {
  display: flex;
  gap: var(--hx-space-3);
  padding: var(--hx-space-3) var(--hx-space-4);
  border-radius: var(--hx-radius);
  border: 1px solid transparent;
  margin-bottom: var(--hx-space-4);
  font-size: var(--hx-text-sm);
  line-height: var(--hx-leading-normal);
}
.alert > svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.alert p:last-child { margin-bottom: 0; }
.alert a { text-decoration: underline; text-underline-offset: 2px; }

.alert-success { background: var(--hx-success-light); color: var(--hx-success-dark); border-color: var(--hx-success); }
.alert-danger  { background: var(--hx-danger-light);  color: var(--hx-danger-dark);  border-color: var(--hx-danger); }
/* Warning base carries no text: light surface plus dark text is the readable form. */
.alert-warning { background: var(--hx-warning-light); color: var(--hx-warning-dark); border-color: var(--hx-warning); }
.alert-info    { background: var(--hx-info-light);    color: var(--hx-info-dark);    border-color: var(--hx-info); }

.alert a { color: inherit; }
.alert-success a:hover { color: var(--hx-success-dark); }
.alert-info a:hover { color: var(--hx-info-dark); }

/* ==========================================================================
   13. JOB CARDS AND LIST ROWS
   ========================================================================== */

.job-card {
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-card-padding);
  display: flex;
  flex-direction: column;
  gap: var(--hx-space-3);
  position: relative;
  transition: border-color var(--hx-transition-fast), box-shadow var(--hx-transition-fast), transform var(--hx-transition-fast);
}
a.job-card { color: inherit; }
a.job-card:hover { text-decoration: none; }
.job-card:hover { border-color: var(--hx-hustle-300); box-shadow: var(--hx-shadow-hover); transform: translateY(-2px); }
.job-card:focus-within { border-color: var(--hx-platform-blue); }

.job-card h3 {
  margin: 0;
  font-size: var(--hx-text-lg);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.job-card h3 a { color: var(--hx-heading); }
.job-card h3 a::after { content: ""; position: absolute; inset: 0; }
.job-card h3 a:hover { color: var(--hx-link); text-decoration: none; }

.job-card .job-excerpt { margin: 0; color: var(--hx-text-secondary); font-size: var(--hx-text-sm); }

/* The bottom row of a card: price on the left, everything else as quiet
   context on the right. */
.job-card .job-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--hx-space-2);
  margin-top: auto;
  padding-top: var(--hx-space-3);
  border-top: 1px solid var(--hx-border);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--hx-space-3);
  font-size: var(--hx-text-sm);
  color: var(--hx-text-secondary);
}

/* Row-style list item, for dense lists inside a card. */
.list-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hx-space-3);
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--hx-space-4);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  background: var(--hx-surface);
  transition: border-color var(--hx-transition-fast), background var(--hx-transition-fast);
}
.list-row + .list-row { margin-top: var(--hx-space-3); }
.list-row:hover { border-color: var(--hx-hustle-300); }
.list-row-title { font-weight: var(--hx-font-weight-semibold); color: var(--hx-heading); }

/* ==========================================================================
   14. EMPTY STATES
   ========================================================================== */

.empty {
  text-align: center;
  padding: var(--hx-space-10) var(--hx-space-6);
  background: var(--hx-surface);
  border: 1px dashed var(--hx-border-strong);
  border-radius: var(--hx-radius-lg);
}
.empty-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--hx-space-4);
  border-radius: var(--hx-radius-full);
  background: var(--hx-tint);
  color: var(--hx-tint-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-mark svg { width: 22px; height: 22px; }
.empty-title { font-size: var(--hx-text-lg); font-weight: var(--hx-font-weight-semibold); color: var(--hx-heading); margin-bottom: var(--hx-space-2); }
.empty-text { color: var(--hx-text-secondary); font-size: var(--hx-text-sm); max-width: 46ch; margin: 0 auto var(--hx-space-5); }
.empty-actions { display: flex; flex-wrap: wrap; gap: var(--hx-space-3); justify-content: center; }
.empty-compact { padding: var(--hx-space-6); }

/* ==========================================================================
   15. TABLES AND KEY-VALUE LISTS
   ========================================================================== */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; border-collapse: collapse; font-size: var(--hx-text-sm); }
.table caption { text-align: left; color: var(--hx-text-secondary); padding-bottom: var(--hx-space-3); font-size: var(--hx-text-sm); }
.table th, .table td { padding: var(--hx-space-3); text-align: left; }
.table th {
  font-weight: var(--hx-font-weight-semibold);
  color: var(--hx-text-secondary);
  font-size: var(--hx-text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--hx-border);
  white-space: nowrap;
}
.table td { border-bottom: 1px solid var(--hx-border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--hx-surface-alt); }
.table .num { text-align: right; }
.table-compact th, .table-compact td { padding: var(--hx-space-2) var(--hx-space-3); }

/* ==========================================================================
   16. AVATARS
   ========================================================================== */

.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--hx-radius-full);
  background: var(--hx-tint);
  color: var(--hx-tint-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--hx-font-weight-bold);
  font-size: var(--hx-text-sm);
  flex-shrink: 0;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid var(--hx-border);
}
.avatar-lg { width: 72px; height: 72px; font-size: var(--hx-text-2xl); }
.avatar-sm { width: 32px; height: 32px; font-size: var(--hx-text-xs); }

.identity { display: flex; align-items: center; gap: var(--hx-space-3); min-width: 0; }
.identity-name { font-weight: var(--hx-font-weight-semibold); color: var(--hx-heading); }

/* ==========================================================================
   17. HERO (MARKETING SURFACE)
   ========================================================================== */

.hero {
  background: var(--hx-hustle-blue);
  color: var(--hx-text-inverted);
  padding: var(--hx-space-12) 0;
  border-bottom: 1px solid var(--hx-hustle-700);
}
@media (min-width: 768px) { .hero { padding: var(--hx-space-16) 0; } }

.hero-grid {
  display: grid;
  gap: var(--hx-space-10);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); }
}

.hero h1 {
  color: var(--hx-text-inverted);
  font-size: clamp(2rem, 1.35rem + 2.7vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: var(--hx-space-4);
}
.hero p {
  color: var(--hx-hustle-100);
  font-size: var(--hx-text-lg);
  line-height: var(--hx-leading-relaxed);
  max-width: 52ch;
  margin-bottom: var(--hx-space-6);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--hx-space-3); }

/* Search sits in the hero because finding work is the primary action for a
   visitor who has not signed up yet. */
.hero-search {
  background: var(--hx-surface);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-space-4);
  box-shadow: var(--hx-shadow-lg);
  margin-top: var(--hx-space-6);
}
.hero-search .form-row { gap: var(--hx-space-3); }
.hero-search .field { margin-bottom: 0; }

.hero-aside {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-card-padding);
}
.hero-aside h2 { color: var(--hx-text-inverted); font-size: var(--hx-text-lg); margin-bottom: var(--hx-space-4); }
.hero-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--hx-space-4); }
.hero-step { display: flex; gap: var(--hx-space-3); }
.hero-step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--hx-radius-full);
  background: var(--hx-bidding-orange);
  color: var(--hx-text-dark);
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-step-title { color: var(--hx-text-inverted); font-weight: var(--hx-font-weight-semibold); display: block; }
.hero-step-text { color: var(--hx-hustle-100); font-size: var(--hx-text-sm); margin: 0; }

/* The same ordered list, restyled for a light surface. */
.steps-light .hero-step-title { color: var(--hx-heading); }
.steps-light .hero-step-text { color: var(--hx-text-secondary); }
.steps-light .hero-step-num { background: var(--hx-hustle-blue); color: var(--hx-text-inverted); }

/* Trust strip under the hero: plain facts, no invented logos. */
.trust-strip { border-bottom: 1px solid var(--hx-border); background: var(--hx-surface); }
.trust-strip-inner {
  display: grid;
  gap: var(--hx-space-4);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  padding: var(--hx-space-6) 0;
}
.trust-item { display: flex; flex-direction: column; gap: 2px; }
.trust-item .trust-value { font-size: var(--hx-text-xl); font-weight: var(--hx-font-weight-bold); color: var(--hx-heading); letter-spacing: -0.02em; }
.trust-item .trust-label { font-size: var(--hx-text-sm); color: var(--hx-text-secondary); }

/* Category chips: a scannable index rather than a second navigation list. */
.chips { display: flex; flex-wrap: wrap; gap: var(--hx-space-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--hx-space-2);
  padding: var(--hx-space-2) var(--hx-space-4);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-full);
  background: var(--hx-surface);
  color: var(--hx-text-primary);
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  transition: border-color var(--hx-transition-fast), background var(--hx-transition-fast), color var(--hx-transition-fast);
}
.chip:hover {
  border-color: var(--hx-platform-blue);
  background: var(--hx-accent-tint);
  color: var(--hx-accent-tint-text);
  text-decoration: none;
}
.chip-count { color: var(--hx-text-tertiary); font-weight: var(--hx-font-weight-regular); }

/* The chip for the filter currently in force. */
.chip.is-selected {
  border-color: var(--hx-hustle-blue);
  background: var(--hx-hustle-blue);
  color: var(--hx-text-inverted);
}
.chip.is-selected:hover {
  border-color: var(--hx-hustle-700);
  background: var(--hx-hustle-700);
  color: var(--hx-text-inverted);
}

/* A closing call to action on a marketing surface. */
.cta-band {
  background: var(--hx-hustle-blue);
  color: var(--hx-text-inverted);
  border-radius: var(--hx-radius-lg);
  padding: var(--hx-space-10) var(--hx-card-padding);
}
.cta-band h2 { color: var(--hx-text-inverted); }
.cta-band p { color: var(--hx-hustle-100); max-width: 56ch; }
.cta-band .hero-actions { margin-top: var(--hx-space-6); }

/* ==========================================================================
   18. CHAT
   ========================================================================== */

.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--hx-space-4); }
@media (min-width: 860px) { .chat-layout { grid-template-columns: 300px minmax(0, 1fr); } }

/* On a narrow screen the conversation is the reason the user is here, so it
   comes first and the job context follows underneath. */
@media (max-width: 859px) {
  .chat-layout > aside { order: 2; }
  .chat-layout > .chat-window { order: 1; }
}

.chat-room-list { display: flex; flex-direction: column; gap: var(--hx-space-2); }

.chat-room-item {
  display: block;
  padding: var(--hx-space-3);
  border-radius: var(--hx-radius);
  border: 1px solid var(--hx-border);
  background: var(--hx-surface);
  color: inherit;
  transition: border-color var(--hx-transition-fast), background var(--hx-transition-fast);
}
.chat-room-item:hover { background: var(--hx-surface-alt); border-color: var(--hx-hustle-300); text-decoration: none; }
.chat-room-item.is-active { border-color: var(--hx-platform-blue); background: var(--hx-accent-tint); }
.chat-room-item.is-active .chat-room-name { color: var(--hx-accent-tint-text); }

.chat-window {
  display: flex;
  flex-direction: column;
  height: min(72vh, 720px);
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius-lg);
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hx-space-3);
  padding: var(--hx-space-3) var(--hx-space-4);
  border-bottom: 1px solid var(--hx-border);
  background: var(--hx-surface-alt);
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--hx-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--hx-space-3);
  background: var(--hx-bg);
}
.chat-message {
  max-width: 72%;
  padding: var(--hx-space-3) var(--hx-space-4);
  border-radius: var(--hx-radius-lg);
  font-size: var(--hx-text-sm);
  line-height: var(--hx-leading-normal);
}
.chat-message.is-own {
  align-self: flex-end;
  background: var(--hx-hustle-blue);
  color: var(--hx-text-inverted);
  border-bottom-right-radius: var(--hx-radius-sm);
}
.chat-message.is-other {
  align-self: flex-start;
  background: var(--hx-surface);
  color: var(--hx-text-primary);
  border: 1px solid var(--hx-border);
  border-bottom-left-radius: var(--hx-radius-sm);
}
.chat-message .meta { font-size: var(--hx-text-xs); color: var(--hx-text-tertiary); margin-top: var(--hx-space-2); }
.chat-message.is-own .meta { color: var(--hx-hustle-200); }
.chat-message a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chat-message img { border-radius: var(--hx-radius); margin-bottom: var(--hx-space-2); }

.chat-composer {
  border-top: 1px solid var(--hx-border);
  padding: var(--hx-space-3);
  display: flex;
  gap: var(--hx-space-2);
  align-items: center;
  background: var(--hx-surface);
}
.chat-composer input[type="text"] { flex: 1; }
.chat-typing { font-size: var(--hx-text-xs); color: var(--hx-text-tertiary); padding: 0 var(--hx-space-4); min-height: 1.2em; }
.chat-status { font-size: var(--hx-text-xs); display: inline-flex; align-items: center; gap: var(--hx-space-2); }
.chat-status.is-connected { color: var(--hx-success-dark); }
.chat-status.is-reconnecting { color: var(--hx-warning-dark); }
.chat-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ==========================================================================
   19. PAGINATION AND BREADCRUMBS
   ========================================================================== */

.pagination { display: flex; flex-wrap: wrap; gap: var(--hx-space-2); justify-content: center; margin-top: var(--hx-space-8); align-items: center; }
.pagination a, .pagination span {
  padding: var(--hx-space-2) var(--hx-space-3);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  font-size: var(--hx-text-sm);
  min-width: 40px;
  text-align: center;
  color: var(--hx-text-primary);
  background: var(--hx-surface);
}
.pagination a:hover { border-color: var(--hx-hustle-300); background: var(--hx-surface-alt); text-decoration: none; }
.pagination .is-current { background: var(--hx-hustle-blue); color: var(--hx-text-inverted); border-color: var(--hx-hustle-blue); font-weight: var(--hx-font-weight-semibold); }
.pagination .is-gap { border-color: transparent; background: transparent; color: var(--hx-text-tertiary); min-width: 20px; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--hx-space-2); font-size: var(--hx-text-sm); color: var(--hx-text-secondary); margin-bottom: var(--hx-space-4); }
.breadcrumbs a { color: var(--hx-text-secondary); }
.breadcrumbs a:hover { color: var(--hx-link); }
.breadcrumbs .sep { color: var(--hx-text-tertiary); }

/* ==========================================================================
   20. FOOTER
   ========================================================================== */

.site-footer {
  margin-top: auto;
  padding: var(--hx-space-10) 0 var(--hx-space-6);
  border-top: 1px solid var(--hx-border);
  background: var(--hx-surface);
  color: var(--hx-text-secondary);
  font-size: var(--hx-text-sm);
}
.footer-grid {
  display: grid;
  gap: var(--hx-space-8);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: var(--hx-space-8);
}
.footer-brand { min-width: 220px; }
.footer-brand .brand { color: var(--hx-heading); font-size: var(--hx-text-lg); margin-bottom: var(--hx-space-3); }
.footer-brand .brand span { color: var(--hx-bidding-orange); }
.footer-brand p { font-size: var(--hx-text-sm); max-width: 34ch; margin: 0; }
.footer-col h2, .footer-col h3 {
  font-size: var(--hx-text-xs);
  font-weight: var(--hx-font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hx-text-tertiary);
  margin-bottom: var(--hx-space-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--hx-space-2); }
.footer-col a { color: var(--hx-text-secondary); }
.footer-col a:hover { color: var(--hx-link); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hx-space-3);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--hx-space-6);
  border-top: 1px solid var(--hx-border);
  color: var(--hx-text-tertiary);
  font-size: var(--hx-text-xs);
}

/* ==========================================================================
   21. UTILITIES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--hx-space-2); }
.mt-3 { margin-top: var(--hx-space-3); }
.mt-4 { margin-top: var(--hx-space-4); }
.mt-6 { margin-top: var(--hx-space-6); }
.mt-8 { margin-top: var(--hx-space-8); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--hx-space-2); }
.mb-3 { margin-bottom: var(--hx-space-3); }
.mb-4 { margin-bottom: var(--hx-space-4); }
.mb-6 { margin-bottom: var(--hx-space-6); }
.mb-8 { margin-bottom: var(--hx-space-8); }
.full-width { width: 100%; }
.hide { display: none; }
.wrap-text { overflow-wrap: anywhere; }
.pre-wrap { white-space: pre-wrap; }

/* ==========================================================================
   22. MOTION
   --------------------------------------------------------------------------
   Only transform, opacity and colour are animated. Entrance motion is
   one-shot and cheap; nothing loops.
   ========================================================================== */

@keyframes hx-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.animate-in { animation: hx-fade-up var(--hx-transition-slow) both; }
.animate-in-delay-1 { animation-delay: 60ms; }
.animate-in-delay-2 { animation-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .job-card:hover, .card-link:hover { transform: none; }
}

/* ==========================================================================
   23. RESPONSIVE
   ========================================================================== */

@media (max-width: 1050px) {
  /* Navigation collapses into a drawer. The toggle is only rendered when the
     same breakpoint hides the inline nav, so the two can never disagree. */
  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: var(--hx-z-nav);
    flex-direction: column;
    align-items: stretch;
    gap: var(--hx-space-1);
    margin: 0;
    padding: var(--hx-space-3);
    background: var(--hx-hustle-800);
    border-bottom: 1px solid var(--hx-hustle-700);
    box-shadow: var(--hx-shadow-lg);
  }
  .nav[data-open="true"] { display: flex; }

  .nav a.nav-link,
  .nav-signout {
    padding: var(--hx-space-3);
    font-size: var(--hx-text-base);
    text-align: left;
    width: 100%;
  }
  .nav-divider { display: none; }
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: var(--hx-space-2);
    padding-top: var(--hx-space-3);
    border-top: 1px solid var(--hx-hustle-700);
  }
  .nav-actions .btn { width: 100%; }

  .page-head { align-items: flex-start; }
  .page-head-actions { width: 100%; }
}

@media (max-width: 640px) {
  .hero h1 { max-width: none; }
  .hero-actions .btn { flex: 1 1 auto; }
  .chat-message { max-width: 88%; }
  .toolbar { align-items: stretch; }
  .toolbar .field { flex: 1 1 100%; }
  .pagination a, .pagination span { padding: var(--hx-space-2); min-width: 36px; }
}

/* ==========================================================================
   24. USER MENU
   --------------------------------------------------------------------------
   Secondary account links (wallet, profile, sign out) live behind one
   disclosure so the top-level navigation stays on a single line. Built on
   <details> so it works without JavaScript; the script only adds
   close-on-outside-click and Escape.
   ========================================================================== */

.user-menu { position: relative; }

.user-menu > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--hx-space-2);
  padding: var(--hx-space-2) var(--hx-space-3);
  border-radius: var(--hx-radius);
  color: var(--hx-hustle-100);
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  white-space: nowrap;
  transition: background var(--hx-transition-fast), color var(--hx-transition-fast);
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--hx-transition-fast);
}
.user-menu[open] > summary::after { transform: rotate(180deg); }
.user-menu > summary:hover,
.user-menu[open] > summary { background: var(--hx-hustle-700); color: var(--hx-text-inverted); }

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--hx-space-2));
  min-width: 216px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--hx-space-2);
  background: var(--hx-surface);
  border: 1px solid var(--hx-border);
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-lg);
  z-index: var(--hx-z-nav);
}

.user-menu-panel a,
.user-menu-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--hx-space-3);
  border: 0;
  border-radius: var(--hx-radius-sm);
  background: none;
  font-family: inherit;
  font-size: var(--hx-text-sm);
  font-weight: var(--hx-font-weight-semibold);
  color: var(--hx-text-primary);
  cursor: pointer;
  transition: background var(--hx-transition-fast), color var(--hx-transition-fast);
}
.user-menu-panel a:hover,
.user-menu-panel button:hover {
  background: var(--hx-surface-alt);
  color: var(--hx-heading);
  text-decoration: none;
}
.user-menu-panel .menu-sep { height: 1px; background: var(--hx-border); margin: var(--hx-space-1) 0; }

@media (max-width: 1050px) {
  .user-menu { width: 100%; }
  .user-menu > summary { width: 100%; padding: var(--hx-space-3); font-size: var(--hx-text-base); }
  .user-menu-panel {
    position: static;
    min-width: 0;
    padding: 0 0 0 var(--hx-space-3);
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .user-menu-panel a,
  .user-menu-panel button { color: var(--hx-hustle-100); padding: var(--hx-space-3); font-size: var(--hx-text-base); }
  .user-menu-panel a:hover,
  .user-menu-panel button:hover { background: var(--hx-hustle-700); color: var(--hx-text-inverted); }
  .user-menu-panel .menu-sep { background: var(--hx-hustle-700); }
}


/* Shared navigation and footer */
.site-header { background: var(--hx-hustle-800); border-bottom-color: var(--hx-platform-400); }
.site-header .navbar { min-height: 72px; }
.brand { gap: 0; font-size: var(--hx-text-2xl); letter-spacing: -0.04em; }
.nav { gap: var(--hx-space-1); }
.nav-actions-guest { margin-left: var(--hx-space-4); gap: var(--hx-space-3); }
.nav-search, .nav-signin {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; color: var(--hx-text-inverted); font-weight: var(--hx-font-weight-semibold);
  font-size: var(--hx-text-sm); border-radius: var(--hx-radius);
}
.nav-search { width: 44px; }
.nav-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.nav-signin { padding: 0 var(--hx-space-4); border: 1px solid var(--hx-hustle-200); }
.nav-search:hover, .nav-signin:hover { background: var(--hx-hustle-700); color: var(--hx-text-inverted); text-decoration: none; }
.site-footer { background: var(--hx-hustle-900); color: var(--hx-hustle-100); border-top: 0; padding: var(--hx-space-10) 0 var(--hx-space-6); }
.site-footer .footer-grid { grid-template-columns: 1.5fr repeat(4, 1fr) 1.5fr; gap: var(--hx-space-6); }
.site-footer .footer-brand { min-width: 0; padding-right: var(--hx-space-5); border-right: 1px solid var(--hx-hustle-300); }
.site-footer .footer-brand .brand { color: var(--hx-text-inverted); font-size: var(--hx-text-2xl); margin-bottom: var(--hx-space-2); }
.site-footer .footer-brand p, .footer-payments p { max-width: 24ch; line-height: 1.5; }
.site-footer .footer-col h2, .footer-payments h2 { color: var(--hx-text-inverted); font-size: var(--hx-text-sm); font-weight: var(--hx-font-weight-bold); text-transform: none; letter-spacing: 0; margin: 0 0 var(--hx-space-3); }
.site-footer .footer-col ul { gap: var(--hx-space-1); }
.site-footer a { color: var(--hx-hustle-100); }
.site-footer a:hover { color: var(--hx-text-inverted); }
.site-footer .footer-brand .brand, .site-footer .footer-brand .brand:hover { color: var(--hx-text-inverted); }
.footer-payments { padding-left: var(--hx-space-5); border-left: 1px solid var(--hx-hustle-300); }
.footer-payment-name { color: var(--hx-text-inverted); font-size: var(--hx-text-lg); font-weight: var(--hx-font-weight-bold); }
.footer-payment-name span { color: var(--hx-orange-400); }
.footer-payments p { margin: var(--hx-space-2) 0 0; font-size: var(--hx-text-xs); }
.site-footer .footer-bottom { border-color: var(--hx-hustle-300); color: var(--hx-hustle-100); }
.site-footer .footer-bottom a { font-size: inherit; }
@media (max-width: 1050px) {
  .site-header .navbar { flex-wrap: wrap; }
  .nav-toggle { display: none; min-height: 44px; }
  .js-nav .nav-toggle { display: inline-flex; }
  .nav { display: flex; position: static; flex: 1 0 100%; padding: 0 0 var(--hx-space-3); box-shadow: none; }
  .js-nav .nav { display: none; position: absolute; padding: var(--hx-space-3); box-shadow: var(--hx-shadow-lg); }
  .js-nav .nav[data-open="true"] { display: flex; }
  .nav-actions-guest { margin-left: 0; }
  .nav-search, .nav-signin { width: 100%; justify-content: flex-start; padding: var(--hx-space-3); }
  .nav-search span { position: static; width: auto; height: auto; clip: auto; margin-left: var(--hx-space-3); }
  .nav-signin { justify-content: center; }
  .site-footer .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .footer-brand { border-right: 0; }
}
@media (max-width: 640px) {
  .site-header .navbar { min-height: 64px; }
  .site-footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hx-space-6); }
  .site-footer .footer-brand { grid-column: 1 / -1; }
  .footer-payments { border-left: 0; padding-left: 0; }
}
@media (max-width: 340px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .site-footer .footer-brand { grid-column: auto; }
}
@media (max-width: 1050px) {
  .js-nav .nav { max-height: calc(100dvh - 64px); overflow-y: auto; }
}
#categories, #pricing { scroll-margin-top: 90px; }

/* Landing page */
.site-header, .site-footer { background: var(--hx-hustle-blue); }
@media (max-width: 1050px) { .js-nav .nav { background: var(--hx-hustle-blue); } }
.landing-hero {
  min-height: 540px;
  display: flex;
  align-items: center;
  padding: var(--hx-space-12) 0 var(--hx-space-16);
  background-color: var(--hx-hustle-900);
  background-image: url('/images/hustlex-hero.jpeg');
  background-size: cover;
  background-position: center center;
  border: 0;
}
.landing-hero .container { width: 100%; }
.landing-hero-content { max-width: 680px; }
.landing-hero h1 { font-size: clamp(2.7rem, 4.5vw, 4.7rem); max-width: 16ch; line-height: 1.04; letter-spacing: -0.045em; }
.landing-hero h1 span { color: var(--hx-bidding-orange); }
.landing-hero p { max-width: 44ch; font-size: clamp(1rem, 1.2vw, 1.25rem); color: var(--hx-text-inverted); }
.landing-hero .hero-actions .btn { min-width: 180px; }
.landing-highlights {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -38px; padding: var(--hx-space-5) var(--hx-space-6);
  background: var(--hx-hustle-800); border: 1px solid var(--hx-hustle-300);
  border-radius: var(--hx-radius-lg); box-shadow: var(--hx-shadow-lg); color: var(--hx-text-inverted);
}
.landing-highlight { display: flex; align-items: center; gap: var(--hx-space-3); min-width: 0; padding: 0 var(--hx-space-4); }
.landing-highlight + .landing-highlight { border-left: 1px solid var(--hx-hustle-300); }
.landing-highlight-icon { color: var(--hx-bidding-orange); font-size: 2rem; font-weight: var(--hx-font-weight-bold); line-height: 1; }
.landing-highlight strong, .landing-highlight small { display: block; }
.landing-highlight strong { color: var(--hx-text-inverted); font-size: var(--hx-text-sm); }
.landing-highlight small { color: var(--hx-hustle-100); font-size: var(--hx-text-xs); }
.landing-content { padding-top: var(--hx-space-10); }
.landing-section-head { align-items: end; gap: var(--hx-space-4); margin-bottom: var(--hx-space-6); }
.landing-section-head h2 { margin: 0; }
.landing-section-head h2::before { content: ''; display: inline-block; width: 34px; height: 4px; margin: 0 var(--hx-space-3) 0.25em 0; border-radius: var(--hx-radius-full); background: var(--hx-bidding-orange); }
.landing-section-head p { color: var(--hx-text-secondary); margin: var(--hx-space-2) 0 0; }
.landing-section-head > a { white-space: nowrap; font-weight: var(--hx-font-weight-semibold); }
.landing-section-head > a span { color: var(--hx-orange-600); font-size: 1.3em; padding-left: var(--hx-space-1); }
.landing-category-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--hx-space-3); }
.landing-category { min-width: 0; min-height: 146px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--hx-space-3); padding: var(--hx-space-4) var(--hx-space-2); background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius-lg); color: var(--hx-heading); text-align: center; font-size: var(--hx-text-sm); font-weight: var(--hx-font-weight-bold); transition: border-color var(--hx-transition-fast), box-shadow var(--hx-transition-fast); }
.landing-category:hover { color: var(--hx-link); border-color: var(--hx-platform-400); box-shadow: var(--hx-shadow-hover); text-decoration: none; }
.landing-category-art { display: grid; place-items: center; width: 68px; height: 68px; border-radius: var(--hx-radius-full); background: var(--hx-hustle-50); color: var(--hx-hustle-blue); }
.landing-category-art svg { width: 48px; height: 48px; }
.landing-search { margin-top: var(--hx-space-10); }
@media (max-width: 1050px) {
  .landing-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .landing-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--hx-space-5); }
  .landing-highlight:nth-child(3) { border-left: 0; }
}
@media (max-width: 640px) {
  .landing-hero { min-height: 520px; padding: var(--hx-space-12) 0 var(--hx-space-16); background-position: 65% center; background-image: linear-gradient(90deg, color-mix(in srgb, var(--hx-hustle-900) 96%, transparent), color-mix(in srgb, var(--hx-hustle-900) 45%, transparent)), url('/images/hustlex-hero.jpeg'); }
  .landing-hero h1 { font-size: clamp(2.4rem, 9vw, 3.5rem); }
  .landing-hero .hero-actions .btn { min-width: 0; }
  .landing-highlights { margin-top: -30px; padding: var(--hx-space-4) var(--hx-space-2); }
  .landing-highlight { padding: 0 var(--hx-space-2); gap: var(--hx-space-2); }
  .landing-highlight-icon { font-size: 1.4rem; }
  .landing-section-head { align-items: start; flex-direction: column; }
  .landing-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-category { min-height: 125px; }
}

/* Administration portal */
.admin-portal { background: var(--hx-bg); }
.admin-shell { min-height: 100dvh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: var(--hx-space-8) var(--hx-space-4); background: var(--hx-hustle-900); color: var(--hx-hustle-100); }
.admin-brand { margin: 0 var(--hx-space-3) var(--hx-space-2); color: var(--hx-text-inverted); }
.admin-sidebar-label { margin: 0 var(--hx-space-3) var(--hx-space-10); color: var(--hx-hustle-200); font-size: var(--hx-text-xs); font-weight: var(--hx-font-weight-bold); letter-spacing: .14em; }
.admin-nav { display: flex; flex-direction: column; gap: var(--hx-space-1); }
.admin-nav-link { display: flex; align-items: center; gap: var(--hx-space-3); min-height: 46px; padding: var(--hx-space-3); border-radius: var(--hx-radius); color: var(--hx-hustle-100); font-weight: var(--hx-font-weight-semibold); font-size: var(--hx-text-sm); }
.admin-nav-link span { width: 20px; color: var(--hx-hustle-200); font-size: 1.2rem; text-align: center; }
.admin-nav-link:hover, .admin-nav-link.is-active { background: var(--hx-hustle-700); color: var(--hx-text-inverted); text-decoration: none; }
.admin-nav-link.is-active span { color: var(--hx-bidding-orange); }
.admin-sidebar-bottom { margin-top: auto; border-top: 1px solid var(--hx-hustle-700); padding: var(--hx-space-5) var(--hx-space-3) 0; display: grid; gap: var(--hx-space-4); }
.admin-sidebar-bottom a, .admin-sidebar-bottom button { color: var(--hx-hustle-100); font-size: var(--hx-text-sm); }
.admin-sidebar-bottom button, .admin-mobile-panel button { border: 0; background: none; font: inherit; cursor: pointer; padding: 0; }
.admin-sidebar-bottom a:hover, .admin-sidebar-bottom button:hover { color: var(--hx-text-inverted); }
.admin-workspace { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: var(--hx-space-4); padding: var(--hx-space-3) clamp(20px, 4vw, 54px); border-bottom: 1px solid var(--hx-border); background: var(--hx-surface); }
.admin-topbar > div:first-child, .admin-topbar-account > span:last-child { display: flex; flex-direction: column; }
.admin-topbar-kicker, .admin-eyebrow { font-size: var(--hx-text-xs); font-weight: var(--hx-font-weight-bold); letter-spacing: .1em; color: var(--hx-text-secondary); }
.admin-topbar-account { display: flex; align-items: center; gap: var(--hx-space-3); font-size: var(--hx-text-sm); }
.admin-topbar-account small { color: var(--hx-text-secondary); }
.admin-avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--hx-radius-full); background: var(--hx-hustle-100); color: var(--hx-hustle-800); font-weight: var(--hx-font-weight-bold); }
.admin-main { width: 100%; max-width: 1500px; margin: 0 auto; padding: var(--hx-space-10) clamp(20px, 4vw, 54px) var(--hx-space-12); flex: 1; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: var(--hx-space-5); margin-bottom: var(--hx-space-8); }
.admin-heading h1 { font-size: clamp(1.7rem, 2.5vw, 2.5rem); margin: var(--hx-space-2) 0; }
.admin-heading p, .admin-panel-head p { color: var(--hx-text-secondary); margin: 0; }
.admin-heading .admin-eyebrow, .admin-panel-head .admin-eyebrow { color: var(--hx-link); }
.admin-notice { display: flex; gap: var(--hx-space-3); flex-wrap: wrap; margin-bottom: var(--hx-space-6); padding: var(--hx-space-3) var(--hx-space-4); background: var(--hx-info-light); color: var(--hx-info-dark); border-radius: var(--hx-radius); font-size: var(--hx-text-sm); }
.admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--hx-space-4); margin-bottom: var(--hx-space-6); }
.admin-metric, .admin-panel { background: var(--hx-surface); border: 1px solid var(--hx-border); border-radius: var(--hx-radius-lg); }
.admin-metric { padding: var(--hx-space-5); display: flex; flex-direction: column; min-width: 0; }
.admin-metric-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--hx-radius); background: var(--hx-hustle-50); color: var(--hx-hustle-blue); font-weight: var(--hx-font-weight-bold); margin-bottom: var(--hx-space-4); }
.admin-metric-label { color: var(--hx-text-secondary); font-size: var(--hx-text-sm); }
.admin-metric strong { color: var(--hx-heading); font-size: clamp(1.3rem, 1.9vw, 1.9rem); line-height: 1.2; margin: var(--hx-space-2) 0; overflow-wrap: anywhere; }
.admin-metric small, .admin-panel-note { color: var(--hx-text-secondary); font-size: var(--hx-text-xs); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--hx-space-5); align-items: start; }
.admin-panel { padding: var(--hx-space-6); min-width: 0; }
.admin-panel-head { display: flex; justify-content: space-between; align-items: start; gap: var(--hx-space-3); margin-bottom: var(--hx-space-5); }
.admin-panel-head h2 { margin: var(--hx-space-1) 0; font-size: var(--hx-text-lg); }
.admin-panel-head p:not(.admin-eyebrow) { font-size: var(--hx-text-sm); }
.admin-panel-head a, .admin-panel-action { font-size: var(--hx-text-sm); font-weight: var(--hx-font-weight-semibold); white-space: nowrap; }
.admin-empty { padding: var(--hx-space-6) var(--hx-space-4); text-align: center; background: var(--hx-surface-alt); border-radius: var(--hx-radius); }
.admin-empty p { color: var(--hx-text-secondary); font-size: var(--hx-text-sm); margin: var(--hx-space-1) 0 0; }
.admin-queue { display: flex; align-items: baseline; gap: var(--hx-space-3); padding: var(--hx-space-4) 0; }
.admin-queue strong { color: var(--hx-heading); font-size: 2.25rem; line-height: 1; }
.admin-queue span { color: var(--hx-text-secondary); font-size: var(--hx-text-sm); }
.admin-panel-action { display: flex; align-items: center; justify-content: space-between; padding: var(--hx-space-3) var(--hx-space-4); border: 1px solid var(--hx-border); border-radius: var(--hx-radius); }
.admin-panel-note { margin: var(--hx-space-3) 0 0; }
.admin-activity-row { display: flex; align-items: center; justify-content: space-between; gap: var(--hx-space-3); padding: var(--hx-space-3) 0; border-bottom: 1px solid var(--hx-border); }
.admin-activity-row:last-child { border-bottom: 0; }
.admin-activity-row small { display: block; color: var(--hx-text-secondary); margin-top: var(--hx-space-1); }
.admin-footer { padding: var(--hx-space-4) clamp(20px, 4vw, 54px); color: var(--hx-text-secondary); font-size: var(--hx-text-xs); }
.admin-mobile-menu { display: none; }
@media (max-width: 1050px) { .admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .admin-shell { display: block; }
  .admin-sidebar { display: none; }
  .admin-topbar { position: relative; min-height: 68px; }
  .admin-topbar-account { margin-left: auto; }
  .admin-topbar-account > span:last-child { display: none; }
  .admin-mobile-menu { display: block; }
  .admin-mobile-menu summary { cursor: pointer; list-style: none; padding: var(--hx-space-2) var(--hx-space-3); border: 1px solid var(--hx-border); border-radius: var(--hx-radius); font-weight: var(--hx-font-weight-semibold); }
  .admin-mobile-menu summary::-webkit-details-marker { display: none; }
  .admin-mobile-panel { position: absolute; top: 100%; left: 0; right: 0; z-index: var(--hx-z-nav); display: grid; gap: var(--hx-space-3); padding: var(--hx-space-4); background: var(--hx-hustle-900); box-shadow: var(--hx-shadow-lg); }
  .admin-mobile-panel > a, .admin-mobile-panel button { display: block; padding: var(--hx-space-2) var(--hx-space-3); color: var(--hx-hustle-100); }
  .admin-main { padding-top: var(--hx-space-6); }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .admin-metrics { grid-template-columns: 1fr; } .admin-panel { padding: var(--hx-space-4); } .admin-panel-head { flex-wrap: wrap; } }
