/* ==========================================================================
   JustJi — Premium UI (Phase 2)
   Vanilla CSS3. No frameworks. Custom properties drive the whole system.
   ========================================================================== */

:root {
  /* ---- Color: restrained, professional ---- */
  --color-bg: #ffffff;
  --color-bg-subtle: #f7f7f8;
  --color-bg-muted: #f0f1f3;
  --color-surface: #ffffff;
  --color-border: #e6e7ea;
  --color-border-strong: #d7d9de;

  --color-text: #16181d;
  --color-text-muted: #5b606b;
  --color-text-faint: #8a8f99;

  --color-primary: #0f6b52;
  --color-primary-dark: #0b543f;
  --color-primary-light: #e7f3ee;
  --color-primary-contrast: #ffffff;

  --color-accent: #c7801a;
  --color-accent-light: #fbf1e2;

  /* Exact colors sampled from the official JustJi logo — used
     specifically for brand/wordmark contexts (navbar, footer, auth
     pages), kept separate from --color-primary (the site's existing
     green button/accent scheme) since re-theming every button/badge
     site-wide to orange is a much bigger, separate design decision. */
  --color-brand-navy: #001c48;
  --color-brand-orange: #fe8311;

  --color-danger: #b3261e;
  --color-danger-light: #fbeceb;
  --color-success: #0f6b52;
  --color-success-light: #e7f3ee;

  --color-focus-ring: rgba(15, 107, 82, 0.35);

  /* ---- Elevation ---- */
  --shadow-xs: 0 1px 2px rgba(16, 20, 24, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 20, 24, 0.06), 0 1px 2px rgba(16, 20, 24, 0.04);
  --shadow-md: 0 6px 16px rgba(16, 20, 24, 0.08), 0 2px 4px rgba(16, 20, 24, 0.04);
  --shadow-lg: 0 16px 40px rgba(16, 20, 24, 0.12), 0 4px 10px rgba(16, 20, 24, 0.05);

  /* ---- Shape ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* ---- Type ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* ---- Layout ---- */
  --max-width: 1160px;
  --max-width-narrow: 760px;
  --header-height: 78px;
  /* Separate from the public marketing site's header height above —
     the dashboard topbar (admin/freelancer/client) is a compact
     application header, not tied to the marketing logo's size. Used
     by .dashboard-sidebar's sticky/fixed positioning below, which
     needs to know the ACTUAL dashboard topbar height, not the
     marketing site's. */
  --dashboard-header-height: 60px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 140ms var(--ease-out);
  --transition-base: 220ms var(--ease-out);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Defensive safety net, deliberately on <html> and NOT <body> —
     position: sticky (used by .site-header below) requires every
     ancestor up to the viewport to have overflow: visible, and setting
     overflow-x: hidden on <body> (an ancestor of .site-header) would
     silently break the header's sticky behavior. The document root is
     the one place this constraint doesn't apply the same way, so this
     is the standard, safe location for it. Exists to catch
     admin-authored rich text (blog posts, static pages) containing an
     element this stylesheet doesn't specifically constrain — a wide
     table, a long unbroken code line — that would otherwise silently
     push the ENTIRE PAGE wider than the viewport, making the whole
     site horizontally scrollable on mobile rather than just that one
     element. */
  overflow-x: hidden;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--color-text-muted); }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

/* A <button> that reads as a plain text link — for actions that must
   be a real form submit (e.g. "resend code"), not a GET navigation an
   <a> tag would imply. */
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.link-button:hover { color: var(--color-primary-dark); }

/* ---- Focus states (accessible, visible) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  border-radius: var(--radius-sm);
}

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: 5rem 0;
}

.section--tight { padding: 3rem 0; }

.section--muted {
  background: var(--color-bg-subtle);
}

.section-heading {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3rem;
}

.section-heading .eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  background: var(--color-primary-light);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-heading h2 { margin-bottom: 0.6rem; }
.section-heading p { margin: 0; }

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

@media (max-width: 960px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
  .section { padding: 3rem 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  line-height: 1.2;
}

.btn:active { transform: translateY(1px); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  box-shadow: 0 8px 20px rgba(15, 107, 82, 0.22);
  color: var(--color-primary-contrast);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--color-bg-muted);
  color: var(--color-text);
}

/* Login button in the navbar: previously "ghost" (fully transparent),
   which read as too plain/invisible next to the solid green "Join as
   a Freelancer" button. Uses the brand navy from the JustJi logo so it
   carries real visual weight while staying clearly secondary to the
   primary green CTA — not competing with it, just no longer invisible. */
.btn-login {
  background: var(--color-brand-navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-login:hover:not(:disabled) {
  background: #002d6e;
  box-shadow: 0 8px 20px rgba(0, 28, 72, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ==========================================================================
   Badges / skill chips
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge--busy { background: var(--color-accent-light); color: var(--color-accent); }
.badge--unavailable { background: var(--color-bg-muted); color: var(--color-text-faint); }

.skill-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.32rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin: 0 0.4rem 0.4rem 0;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

a.skill-badge:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.card--interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-strong);
  transform: translateY(-2px);
}

.card h3 { margin-top: 0; }

/* Developer / freelancer card */
.dev-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
}

.dev-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dev-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dev-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.dev-card__name a { color: var(--color-text); }
.dev-card__name a:hover { color: var(--color-primary); }

.dev-card__meta {
  font-size: 0.85rem;
  color: var(--color-text-faint);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dev-card__bio {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dev-card__skills { margin-top: auto; padding-top: 0.25rem; }

.dev-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.4rem;
}

.dev-card__rate {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.95rem;
}

.dev-card__rate small {
  font-weight: 500;
  color: var(--color-text-faint);
  font-size: 0.78rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--color-text-faint);
  margin-top: 0.35rem;
}

.field-optional-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border-radius: var(--radius-sm);
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.field-error {
  font-size: 0.8rem;
  color: var(--color-danger);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

input:hover, select:hover, textarea:hover { border-color: var(--color-text-faint); }

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

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--color-danger);
}
.field.has-error input:focus,
.field.has-error select:focus {
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.18);
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.field-checkbox input { width: auto; }

textarea { resize: vertical; min-height: 110px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b606b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.25rem;
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  border: 1px solid transparent;
  margin-bottom: 1.25rem;
}

.alert-success { background: var(--color-success-light); color: var(--color-primary-dark); border-color: #cfe6dc; }
.alert-danger { background: var(--color-danger-light); color: var(--color-danger); border-color: #f3d3d1; }
.alert-info { background: var(--color-bg-subtle); color: var(--color-text-muted); border-color: var(--color-border); }
.alert-warning { background: var(--color-accent-light); color: #8a5a00; border-color: #efd9ae; }

.alert ul { margin: 0; padding-left: 1.1rem; list-style: disc; }

/* ==========================================================================
   Site header / navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Solid, not semi-transparent, and no backdrop-filter — both were
     genuine risk factors for the mobile nav bugs reported across
     several rounds. Per the CSS spec, filter and backdrop-filter
     create a NEW CONTAINING BLOCK for any position:fixed descendant —
     .main-nav (the fullscreen mobile menu overlay) is exactly that,
     nested inside this header. With backdrop-filter present, the
     nav's inset positioning could resolve against THIS ELEMENT's own
     ~84px-tall box instead of the actual viewport, rather than
     spanning the full screen the way inset: var(--header-height) 0 0 0
     is meant to. A solid background also removes any residual
     transparency that could let page content behind the header show
     through, on top of removing the blur that caused the same class
     of bleed-through on the nav overlay specifically. The frosted-glass
     look is a nice-to-have; a reliably correct mobile menu is not
     optional. */
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-brand-navy);
}

.brand__mark {
  /* Deliberately TALLER than --header-height (108px logo inside a
     78px bar, unchanged) rather than growing the header to fit it —
     direct feedback was specifically that a bigger logo kept growing
     the header's own footprint along with it, which shouldn't happen.
     The bar itself stays compact; the logo overflows it symmetrically
     (about 15px above and below), which is fine since nothing on this
     header clips overflow and the sticky header's own stacking
     context keeps the overflowing part correctly on top of page
     content scrolling underneath. Scaled down on narrow screens below
     (still overflowing its own bar there too, just by a smaller,
     proportionate amount). */
  width: 108px;
  height: 108px;
  border-radius: 50%;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand span { color: var(--color-brand-orange); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-links a:hover { color: var(--color-text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: background var(--transition-fast);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-fast);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  /* Same overflow-not-grow technique as the base rule, scaled down for
     a narrower screen -- a full 108px mark next to the hamburger
     toggle would crowd a phone-width header more than it should. */
  .brand__mark {
    width: 72px;
    height: 72px;
  }

  .main-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-surface);
    /* Explicitly un-blurred and kept as defense-in-depth even though
       .site-header (this element's ancestor) no longer applies
       backdrop-filter at all -- see .site-header's own comment for the
       actual root-cause fix, which was removing backdrop-filter there
       entirely (it creates a new CSS containing block for any
       position:fixed descendant, meaning this overlay's inset
       positioning could resolve against the ~84px header's own small
       box instead of the full viewport, which is what caused it to
       render squeezed/broken rather than as a proper fullscreen
       overlay). This property stays here as a second line of defense
       against the same class of bug if backdrop-filter is ever
       reintroduced on an ancestor in the future. */
    backdrop-filter: none;
    z-index: 150;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0.5rem;
  }

  .nav-actions form { width: 100%; }
  .nav-actions .btn { width: 100%; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 3rem 0;
  background:
    radial-gradient(circle at 12% 15%, rgba(15, 107, 82, 0.10), transparent 42%),
    radial-gradient(circle at 88% -5%, rgba(199, 128, 26, 0.08), transparent 38%),
    radial-gradient(circle at 50% 110%, rgba(15, 107, 82, 0.05), transparent 45%),
    linear-gradient(180deg, #fbfdfc 0%, var(--color-bg-subtle) 100%);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.hero__content {
  text-align: left;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  box-shadow: 0 2px 8px rgba(15, 107, 82, 0.12);
  margin-bottom: 1.4rem;
}

.hero h1 {
  font-size: 2.85rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}

.hero p.lead {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 0 2rem;
}

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

.hero__content .hero-trust {
  justify-content: flex-start;
}

.hero__content .hero-trust__item {
  text-align: left;
}

.hero__content .hero-badges {
  justify-content: flex-start;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-trust {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-trust__item {
  text-align: center;
}

.hero-trust__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text);
}

.hero-trust__label {
  font-size: 0.8rem;
  color: var(--color-text-faint);
}

/* ---- Hero visual panel: floating "person" badges connected by a
   central checkmark, over a soft circular gradient — mirrors the
   reference screenshot's composition without needing illustration
   assets. ---- */

.hero__visual {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual__illustration {
  width: 100%;
  max-width: 460px;
  height: auto;
  display: block;
}

.hero-visual__tag {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.55rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.hero-visual__tag .icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__content { text-align: center; }
  .hero__content .hero-actions,
  .hero__content .hero-trust,
  .hero__content .hero-badges { justify-content: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero__visual { display: none; }
}

@media (max-width: 640px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* ==========================================================================
   How it works / steps
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.step {
  position: relative;
  padding-top: 0.5rem;
}

.step__number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  box-shadow: 0 4px 12px rgba(15, 107, 82, 0.25);
}

.step h3 { margin-bottom: 0.4rem; }
.step p { margin: 0; font-size: 0.92rem; }

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Feature list ("why JustJi")
   ========================================================================== */

.feature-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-weight: 700;
}

.feature-card__icon .icon {
  width: 22px;
  height: 22px;
}

.feature-card p { font-size: 0.92rem; margin: 0; }

/* ==========================================================================
   Popular skills
   ========================================================================== */

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.skill-cloud .skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem 0.55rem 0.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin: 0;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.skill-cloud .skill-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.skill-badge__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
  background: var(--color-bg-subtle);
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  max-width: 820px;
  margin: 0 auto;
}

.price-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.price-card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 12px 28px rgba(15, 107, 82, 0.14), var(--shadow-sm);
}

.price-card--featured:hover {
  box-shadow: 0 18px 36px rgba(15, 107, 82, 0.18), var(--shadow-md);
}

/* Client card: a distinct violet accent so it visually reads as its
   own audience rather than a lesser copy of the freelancer card. */
.price-card--client {
  border-color: #ddd6fe;
  box-shadow: 0 12px 28px rgba(109, 40, 217, 0.10), var(--shadow-sm);
}

.price-card--client:hover {
  box-shadow: 0 18px 36px rgba(109, 40, 217, 0.16), var(--shadow-md);
}

.price-card__visual {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.price-card--client .price-card__visual {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.price-card--featured .price-card__visual {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #c8e6da 100%);
}

.price-card__visual .icon {
  width: 44px;
  height: 44px;
}

.price-card__illustration {
  width: 100%;
  height: 100%;
  max-width: 150px;
  max-height: 110px;
  position: relative;
  z-index: 1;
}

.price-card--client .price-card__visual .icon { color: #6d28d9; }
.price-card--featured .price-card__visual .icon { color: var(--color-primary-dark); }

.price-card__visual-orb {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.price-card__visual-orb--1 { top: -30px; right: -20px; }
.price-card__visual-orb--2 { bottom: -35px; left: -15px; width: 70px; height: 70px; }

.price-card__tag {
  position: absolute;
  top: -13px;
  left: 2rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
}

.price-card--client .price-card__tag {
  background: #6d28d9;
}

.price-card__plan {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-faint);
  margin-bottom: 0.6rem;
}

.price-card--client .price-card__plan {
  color: #6d28d9;
}

.price-card--featured .price-card__plan {
  color: var(--color-primary-dark);
}

.price-card__amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.price-card__amount small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-faint);
}

.price-card__features {
  margin: 1.75rem 0;
  flex-grow: 1;
}

.price-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.5rem 0;
}

.price-card__features li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
}

.price-card--client .price-card__features li::before {
  color: #6d28d9;
}

.price-card--client .btn-outline {
  border-color: #6d28d9;
  color: #6d28d9;
}

.price-card--client .btn-outline:hover {
  background: #6d28d9;
  color: #fff;
  border-color: #6d28d9;
}

@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  background: linear-gradient(135deg, var(--color-text) 0%, #1f2937 55%, var(--color-primary-dark) 130%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3.75rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.72); max-width: 480px; margin: 0 auto 2rem; }

.cta-band .btn-outline {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.cta-band .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 3px solid var(--color-primary);
  padding: 3.5rem 0 2rem;
  background: var(--color-bg-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 260px;
  color: var(--color-text-muted);
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.65rem;
}
.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-bottom__copyright {
  font-weight: 700;
  color: var(--color-text);
}

.footer-legal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.footer-legal-row a {
  font-weight: 600;
  color: var(--color-text-muted);
}
.footer-legal-row a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-legal-row { gap: 0.85rem 1.1rem; }
}

/* ==========================================================================
   Freelancer directory (search/filter UI)
   ========================================================================== */

.directory-header {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 107, 82, 0.06), transparent 40%),
    var(--color-bg-subtle);
}

.directory-header h1 { margin-bottom: 0.4rem; }
.directory-header p { margin: 0; }

.filter-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.25rem;
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1fr auto;
  gap: 0.9rem;
  align-items: end;
}

.filter-bar .field { margin-bottom: 0; }

.filter-bar .field label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  margin-bottom: 0.3rem;
}

.filter-bar__search {
  position: relative;
}

.filter-bar__search input { padding-left: 2.5rem; }

.filter-bar__search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  pointer-events: none;
  display: flex;
}

.filter-bar__search-icon .icon {
  width: 18px;
  height: 18px;
}

.filter-toggle {
  display: none;
}

@media (max-width: 960px) {
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar__search { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .filter-toggle {
    display: inline-flex;
    margin-top: 1rem;
  }

  .filter-bar {
    grid-template-columns: 1fr;
    display: none;
  }

  .filter-bar.is-open { display: grid; }
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 1.5rem;
  color: var(--color-text-faint);
  font-size: 0.88rem;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
}

.empty-state__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--color-text-faint);
}

.empty-state h3 { margin-bottom: 0.4rem; }
.empty-state p { margin: 0 auto; max-width: 360px; }

/* ---- Skeleton / loading placeholders ---- */
.skeleton {
  background: linear-gradient(90deg, var(--color-bg-muted) 25%, var(--color-border) 37%, var(--color-bg-muted) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.pagination-nav a,
.pagination-nav span {
  min-width: 38px;
  height: 38px;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.pagination-nav a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.pagination-nav .is-current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.pagination-nav .is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ==========================================================================
   Freelancer profile (public)
   ========================================================================== */

.profile-hero {
  padding: 2.75rem 0;
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
}

.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.profile-back:hover { color: var(--color-primary); }

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 2.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.profile-identity { flex: 1; min-width: 240px; }

.profile-identity h1 { margin-bottom: 0.35rem; font-size: 1.9rem; }

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.profile-meta__item { display: flex; align-items: center; gap: 0.4rem; }

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  min-width: 220px;
}

.profile-rate-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: center;
}

.profile-rate-box .rate-value { font-size: 1.5rem; font-weight: 800; color: var(--color-text); }
.profile-rate-box .rate-label { font-size: 0.78rem; color: var(--color-text-faint); }

.profile-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.profile-section { margin-bottom: 2.25rem; }
.profile-section:last-child { margin-bottom: 0; }
.profile-section h2 { font-size: 1.15rem; margin-bottom: 0.85rem; }

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.profile-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.profile-links a:hover { border-color: var(--color-primary); color: var(--color-primary); }

.profile-meta__rating {
  color: #c8721a;
  font-weight: 700;
}

.portfolio-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.portfolio-link-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.portfolio-link-item:hover { border-color: var(--color-primary); color: var(--color-primary); }
.portfolio-link-item .icon { color: var(--color-primary); }

.review-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.review-item:last-child { border-bottom: none; }

.review-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.review-item__stars {
  color: #c8721a;
  letter-spacing: 0.05em;
}

.profile-sidebar .card { margin-bottom: 1.5rem; }

@media (max-width: 860px) {
  .profile-body { grid-template-columns: 1fr; }
  .profile-actions { min-width: 0; width: 100%; }
}

@media (max-width: 560px) {
  .profile-header { flex-direction: column; }
  .profile-avatar { width: 76px; height: 76px; font-size: 1.7rem; }
}

/* ==========================================================================
   Dashboard topbar — deliberately separate from the public site header
   (.site-header / <x-header>): shown only on authenticated dashboard
   pages (Admin, Freelancer, Client), never carries the public nav
   links (Home, Pricing, About Us, Blog, How it Works).
   ========================================================================== */

.dashboard-topbar {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 90;
}

.dashboard-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Deliberately its OWN fixed height, NOT var(--header-height) --
     that variable is sized for the public marketing site's large
     branding logo (currently 140px tall) and would make an admin/user
     dashboard topbar absurdly tall. A real SaaS product's application
     chrome (JustChecker-style reference) uses a compact ~64px header
     regardless of how big the public site's own logo is. */
  height: var(--dashboard-header-height);
  padding: 0 1.5rem;
}

.dashboard-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.dashboard-sidebar-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.dashboard-sidebar-toggle span,
.dashboard-sidebar-toggle span::before,
.dashboard-sidebar-toggle span::after {
  content: '';
  display: block;
  width: 16px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}
.dashboard-sidebar-toggle span::before { transform: translateY(-5px); }
.dashboard-sidebar-toggle span::after { transform: translateY(3px); }

.dashboard-topbar--admin .dashboard-sidebar-toggle {
  border-color: rgba(255, 255, 255, 0.25);
}
.dashboard-topbar--admin .dashboard-sidebar-toggle span,
.dashboard-topbar--admin .dashboard-sidebar-toggle span::before,
.dashboard-topbar--admin .dashboard-sidebar-toggle span::after {
  background: #fff;
}

.dashboard-topbar__brand {
  font-size: 1.1rem;
}
.dashboard-topbar__brand .brand__mark {
  /* Same overflow technique as the public header's own .brand__mark
     above: 76px logo inside a 60px --dashboard-header-height bar,
     rather than growing the bar's own height to match a bigger logo
     (which was specifically the thing asked NOT to happen). Applies to
     every role's topbar; the admin dark-topbar white backdrop chip
     below layers its own background on top of this same size. Scaled
     down on narrow screens (see the 860px media query further down). */
  width: 76px;
  height: 76px;
}

.dashboard-topbar__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dashboard-topbar__badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--color-brand-navy);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
}

.dashboard-topbar__badge--freelancer {
  background: var(--color-primary);
}

.dashboard-topbar__badge--client {
  background: #1a56c4;
}

.dashboard-topbar__link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.dashboard-topbar__link:hover {
  color: var(--color-primary);
}

.dashboard-topbar__user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.dashboard-topbar__name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Admin topbar: dark, matching the existing dark admin sidebar theme —
   a clearly distinct visual identity from the freelancer/client
   dashboards and from the public site entirely. */
.dashboard-topbar--admin {
  background: #16181d;
  border-bottom-color: #16181d;
}
.dashboard-topbar--admin .dashboard-topbar__brand,
.dashboard-topbar--admin .dashboard-topbar__name {
  color: #fff;
}
.dashboard-topbar--admin .dashboard-topbar__link {
  color: rgba(255, 255, 255, 0.7);
}
.dashboard-topbar--admin .dashboard-topbar__link:hover {
  color: #fff;
}
.dashboard-topbar--admin .dashboard-topbar__badge {
  background: var(--color-primary);
}
/* A white "chip" backdrop behind the logo, scoped to this dark context
   only — this is what makes ANY logo work here, not just the default
   asset's transparent variant. An admin-uploaded CUSTOM logo could be
   any color/opacity we have no control over; giving it a guaranteed
   light backdrop to sit on means it's always legible against the dark
   topbar regardless of what was actually uploaded, rather than only
   fixing the one specific built-in asset. */
.dashboard-topbar--admin .dashboard-topbar__brand .brand__mark {
  /* Matches the 76px mark set above (plus its own white backdrop chip,
     padded out to ~90px total, on a dark background) -- same overflow-
     rather-than-grow-the-bar approach applies here too. */
  width: 76px;
  height: 76px;
  padding: 7px;
  box-sizing: border-box;
  background: #fff;
  border-radius: 50%;
}
.dashboard-topbar--admin .dashboard-topbar__avatar {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
/* The one real bug this fixes: .btn-outline's default styling (dark
   text, light border) assumes a light page background — inside this
   specific dark topbar it rendered as dark-on-dark, invisible text
   with only a faint border outline visible, which is exactly the
   "empty box where Log out should be" symptom. */
.dashboard-topbar--admin .dashboard-topbar__actions .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.dashboard-topbar--admin .dashboard-topbar__actions .btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  color: #fff;
}

@media (max-width: 860px) {
  .dashboard-sidebar-toggle {
    display: flex;
  }

  /* Same overflow-not-grow technique as the base rule, scaled down for
     a narrower screen. */
  .dashboard-topbar__brand .brand__mark {
    width: 56px;
    height: 56px;
  }
  .dashboard-topbar--admin .dashboard-topbar__brand .brand__mark {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 720px) {
  .dashboard-topbar__link {
    display: none;
  }
  .dashboard-topbar__name {
    display: none;
  }
}

/* ==========================================================================
   Dashboard shell
   ========================================================================== */

.dashboard-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  /* Deliberately NOT wrapped in .container (which caps at
     --max-width, 1160px) — an admin/user dashboard is an application
     shell, not marketing-site content, and should use the full
     available viewport width the way a real SaaS product (sidebar +
     content filling the screen) does, rather than leaving large empty
     gutters on wide screens. Its own horizontal padding below replaces
     what .container used to provide. */
  width: 100%;
  padding: 1.75rem 2rem 4rem;
  align-items: start;
}

.dashboard-sidebar {
  background: #16181d;
  border: 1px solid #16181d;
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--dashboard-header-height) + 1.5rem);
  /* A soft, slightly deeper shadow than the flat 1px border alone
     gives this card genuine lift off the page background — the
     difference between "a box with a border" and "a card that feels
     like a distinct, premium surface." */
  box-shadow: 0 2px 10px rgba(15, 28, 72, 0.06);
}

.dashboard-sidebar__user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.5rem 1.1rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-sidebar__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  /* A gradient rather than the flat tint used elsewhere — this is the
     one element in the sidebar meant to draw the eye first (it's the
     user's own identity marker), so it gets slightly more visual
     weight than the flat backgrounds used for nav icons/badges. */
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 107, 82, 0.25);
}

.dashboard-sidebar__name { font-weight: 700; font-size: 0.9rem; color: #fff; }
.dashboard-sidebar__role { font-size: 0.76rem; color: rgba(255, 255, 255, 0.45); text-transform: capitalize; }

.dashboard-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.6rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
  border-left: 3px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), padding-left var(--transition-fast);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.dashboard-sidebar nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; padding-left: 0.75rem; }
.dashboard-sidebar nav a.is-active { background: var(--color-primary); color: #fff; font-weight: 600; border-left-color: #fff; }

/* CSS-only icon chip — no Blade markup change needed across the many
   nav link lines this would otherwise touch. Every nav icon gets a
   small, permanently-visible tinted circle behind it (not just on
   hover/active), the detail that reads as "premium dashboard" rather
   than plain unstyled icons sitting directly in text. A light chip
   would be invisible against the white-ish icon color (currentColor,
   set above) used on this dark sidebar, so this uses a dark,
   semi-transparent chip instead. */
.dashboard-sidebar nav a svg {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  padding: 5px;
  box-sizing: content-box;
  flex-shrink: 0;
}
.dashboard-sidebar nav a.is-active svg { background: rgba(255, 255, 255, 0.22); }

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 { margin-bottom: 0.2rem; }
.dashboard-header p { margin: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card--clickable {
  /* Reset the global `a { color }` rule -- otherwise the label/value
     text would turn primary-green just from being an anchor, looking
     inconsistent with the identical non-clickable cards elsewhere on
     the same dashboard. Cursor + a slightly stronger border on hover
     is what actually signals "this is clickable", not a link color. */
  display: block;
  color: inherit;
  cursor: pointer;
}
.stat-card--clickable:hover {
  color: inherit;
  border-color: var(--color-primary);
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.stat-card__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.stat-card__icon--blue { background: #e8f0fe; color: #1a56c4; }
.stat-card__icon--amber { background: var(--color-accent-light); color: var(--color-accent); }
.stat-card__icon--red { background: #fce8e6; color: #b3261e; }
.stat-card__icon--purple { background: #f2effd; color: #6d28d9; }

.stat-card__value { font-size: 1.7rem; font-weight: 800; color: var(--color-text); }
.stat-card__label { font-size: 0.82rem; color: var(--color-text-faint); }
.stat-card__delta { font-size: 0.76rem; font-weight: 700; color: var(--color-primary); }

.progress-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg-muted);
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
}
.list-row:last-child { border-bottom: none; }

@media (max-width: 860px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    padding: 1.25rem 1rem 3rem;
  }

  .dashboard-sidebar {
    position: fixed;
    inset: var(--dashboard-header-height) 0 0 0;
    z-index: 95;
    border-radius: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }

  .dashboard-sidebar.is-open {
    transform: translateX(0);
  }

  .dashboard-sidebar nav a { white-space: normal; }

  /* h1 at the base 2.75rem (44px) is disproportionately large next to
     the rest of this compact dashboard UI on a narrow phone screen —
     the homepage hero already has its own equivalent mobile
     reduction, this page-content heading never did. */
  .dashboard-header h1 { font-size: 1.65rem; }
}

/* ==========================================================================
   Auth screens
   ========================================================================== */

.auth-shell {
  min-height: calc(100vh - var(--header-height) - 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  /* The tiled SVG (a scattered network of connected nodes, evoking
     freelancers linking with clients through the platform) sits
     BEHIND the two radial accents and the base gradient — CSS layers
     multiple backgrounds in the order listed, first on top — kept
     deliberately faint (4-6% opacity baked into the SVG itself) so it
     reads as texture, not a distraction from the actual sign-in form. */
  background:
    radial-gradient(circle at 15% 15%, rgba(15, 107, 82, 0.10), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(15, 107, 82, 0.06), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%230f6b52' stroke-width='1' opacity='0.06'%3E%3Cline x1='20' y1='30' x2='90' y2='70'/%3E%3Cline x1='90' y1='70' x2='160' y2='40'/%3E%3Cline x1='90' y1='70' x2='60' y2='160'/%3E%3Cline x1='160' y1='40' x2='210' y2='120'/%3E%3Cline x1='60' y1='160' x2='140' y2='190'/%3E%3C/g%3E%3Cg fill='%230f6b52' opacity='0.10'%3E%3Ccircle cx='20' cy='30' r='3'/%3E%3Ccircle cx='90' cy='70' r='4'/%3E%3Ccircle cx='160' cy='40' r='3'/%3E%3Ccircle cx='210' cy='120' r='3'/%3E%3Ccircle cx='60' cy='160' r='3.5'/%3E%3Ccircle cx='140' cy='190' r='3'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--color-bg-subtle) 0%, #eef4f1 100%);
}

/* Client-context accent (used specifically for the "Individual or
   Company?" signup step — the one point in the auth flow where client
   context is definitively known ahead of time, since /login and the
   early parts of /register are shared by both roles). Same layout,
   brand, and card styling — just a distinct cool-blue accent instead of
   the default green, so the client path reads as visually distinct
   without diverging from the overall design system. */
.auth-shell--client {
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.09), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(37, 99, 235, 0.05), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%232563eb' stroke-width='1' opacity='0.06'%3E%3Cline x1='20' y1='30' x2='90' y2='70'/%3E%3Cline x1='90' y1='70' x2='160' y2='40'/%3E%3Cline x1='90' y1='70' x2='60' y2='160'/%3E%3Cline x1='160' y1='40' x2='210' y2='120'/%3E%3Cline x1='60' y1='160' x2='140' y2='190'/%3E%3C/g%3E%3Cg fill='%232563eb' opacity='0.10'%3E%3Ccircle cx='20' cy='30' r='3'/%3E%3Ccircle cx='90' cy='70' r='4'/%3E%3Ccircle cx='160' cy='40' r='3'/%3E%3Ccircle cx='210' cy='120' r='3'/%3E%3Ccircle cx='60' cy='160' r='3.5'/%3E%3Ccircle cx='140' cy='190' r='3'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--color-bg-subtle) 0%, #eef2fb 100%);
}

.auth-shell--client .auth-card__header a.brand span { color: #2563eb; }

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
}

.auth-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card__header h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }

/* Highlights just the role word ("Freelancer" / "Client") within the
   signup entry heading with a soft, rounded background chip — a small
   but deliberate touch of polish rather than plain black text on
   white, matching the same colors used for each role's auth-shell
   accent above. */
.role-highlight {
  padding: 0.05em 0.5em;
  border-radius: 999px;
  white-space: nowrap;
}
.role-highlight--freelancer {
  background: rgba(15, 107, 82, 0.12);
  color: var(--color-primary);
}
.role-highlight--client {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}
.auth-card__header p { margin: 0; font-size: 0.9rem; }

.auth-card__footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.role-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 380px) {
  .role-select { grid-template-columns: 1fr; }
}

.role-option {
  position: relative;
}

.role-option input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.role-option__card {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.75rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.role-option input:checked + .role-option__card {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.role-option input:focus-visible + .role-option__card {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

/* ==========================================================================
   Small utilities
   ========================================================================== */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }

.fade-in {
  animation: fade-in var(--transition-base) both;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   OTP verification (Phase 3)
   ========================================================================== */

.otp-input-group {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.otp-digit {
  width: 46px !important;
  height: 54px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  padding: 0 !important;
}

.field.has-error .otp-digit {
  border-color: var(--color-danger);
}

.otp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  gap: 0.5rem;
}

.otp-meta form { display: inline-flex; }

#resend-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 380px) {
  .otp-digit { width: 40px !important; height: 48px; font-size: 1.15rem; }
  .otp-input-group { gap: 0.4rem; }
}

/* ---- Role selection (stacked, full-width variant used at signup) ---- */

.role-select--stacked {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.role-select--stacked .role-option__card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding: 1rem 1.1rem;
}

.role-option__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Compact variant for a quick "which account" toggle on an already-busy
   form (login, forgot-password) -- a returning user just needs a fast
   switch, not the larger, icon-above-text cards used for a new user's
   more deliberate signup decision. Icon shrinks and sits inline with
   the label instead of stacked above it, and padding tightens so the
   whole toggle reads as one small control rather than a second,
   equally-prominent decision competing with the actual email/password
   fields below it. */
.role-select--compact .role-option__card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
}
.role-select--compact .role-option__icon {
  font-size: 1rem;
}

/* ==========================================================================
   Profile edit form (Phase 4)
   ========================================================================== */

.profile-photo-field {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-photo-field__preview {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.profile-photo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skill-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}

.skill-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.skill-checkbox:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.skill-checkbox input { width: auto; margin: 0; }

/* ---- Membership card (freelancer dashboard) ---- */

.membership-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
}
.membership-card__row:last-of-type { border-bottom: none; }

.membership-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.membership-status-pill--active { background: var(--color-success-light); color: var(--color-primary-dark); }
.membership-status-pill--inactive { background: var(--color-bg-muted); color: var(--color-text-faint); }
.membership-status-pill--expired { background: var(--color-danger-light); color: var(--color-danger); }

/* ---- Admin payment settings ---- */

.settings-form .field-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch__track {
  position: absolute;
  inset: 0;
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
  cursor: pointer;
}
.toggle-switch__track::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-xs);
}
.toggle-switch input:checked + .toggle-switch__track { background: var(--color-primary); }
.toggle-switch input:checked + .toggle-switch__track::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-switch__track { box-shadow: 0 0 0 3px var(--color-focus-ring); }

.masked-credential {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-faint);
  background: var(--color-bg-subtle);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 0.5rem;
}

#test-connection-result {
  margin-top: 1rem;
}

.profile-avatar--photo {
  object-fit: cover;
}

.preview-banner {
  background: var(--color-text);
  color: #fff;
  padding: 0.75rem 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.preview-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.preview-banner a {
  color: #fff;
  text-decoration: underline;
}

/* ==========================================================================
   Enquiries (Phase 5)
   ========================================================================== */

.enquiry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background var(--transition-fast);
}
.enquiry-row:last-child { border-bottom: none; }
.enquiry-row:hover { background: var(--color-bg-subtle); text-decoration: none; }

.enquiry-row__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.enquiry-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.enquiry-status--new { background: var(--color-primary-light); color: var(--color-primary-dark); }
.enquiry-status--viewed { background: var(--color-accent-light); color: var(--color-accent); }
.enquiry-status--replied { background: var(--color-bg-muted); color: var(--color-text-muted); }
.enquiry-status--closed { background: var(--color-bg-muted); color: var(--color-text-faint); }
.enquiry-status--spam { background: var(--color-danger-light); color: var(--color-danger); }

@media (max-width: 560px) {
  .enquiry-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ==========================================================================
   Ads (Phase 8)
   ========================================================================== */

.ad-slot {
  margin: 2rem auto;
  max-width: 100%;
  text-align: center;
}

.ad-slot__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-faint);
  margin-bottom: 0.4rem;
}

.ad-slot--sidebar-desktop {
  display: none;
}
@media (min-width: 960px) {
  .ad-slot--sidebar-desktop { display: block; }
}

.ad-slot--mobile-inline {
  display: block;
}
@media (min-width: 960px) {
  .ad-slot--mobile-inline { display: none; }
}

/* ==========================================================================
   Maintenance mode (Phase 8)
   ========================================================================== */

.maintenance-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--color-bg-subtle);
}

.maintenance-screen__inner {
  text-align: center;
  max-width: 480px;
}

/* ==========================================================================
   Blog (Phase 8)
   ========================================================================== */

.blog-hero {
  padding: 3rem 0 2rem;
  background: var(--color-bg-subtle);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.blog-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.blog-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
}

.blog-category-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.blog-category-pill.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.blog-category-pill.is-active .text-faint {
  color: rgba(255, 255, 255, 0.75);
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card__image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  background: var(--color-bg-muted);
}

.blog-card__meta {
  font-size: 0.78rem;
  color: var(--color-text-faint);
  margin-bottom: 0.5rem;
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  flex-grow: 1;
}

.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 0;
}

.blog-article__featured-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.blog-article__body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text);
}

.blog-article__body h2 { margin-top: 2rem; }
.blog-article__body p { color: var(--color-text); }
.blog-article__body img { max-width: 100%; border-radius: var(--radius-md); }
.blog-article__body a { text-decoration: underline; }
/* Admin-authored content can include a table (e.g. a pricing/feature
   comparison on a static page) wider than a phone screen — rather
   than letting it silently stretch the page, it scrolls WITHIN itself
   only, which is the standard, expected mobile pattern for wide
   tabular content. */
.blog-article__body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.blog-article__body pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.blog-article__body iframe { max-width: 100%; }

.blog-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin: 0 0.35rem 0.35rem 0;
}

/* ==========================================================================
   Split layout (Phase 10 fix) — a reusable two-column "main content +
   sidebar" pattern used across dashboard/detail pages. Previously each
   page set grid-template-columns via an inline style with no mobile
   breakpoint, which squeezed both columns unreadably narrow on phones
   instead of stacking. Centralizing it here fixes all of them at once.
   ========================================================================== */

.split-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.split-layout--wide {
  grid-template-columns: 1.6fr 1fr;
}

@media (max-width: 860px) {
  .split-layout,
  .split-layout--wide {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PWA install banner (Phase 10)
   ========================================================================== */

.pwa-install-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  max-width: 440px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: fade-in var(--transition-base) both;
}

.pwa-install-banner[hidden] { display: none; }

.pwa-install-banner__icon img {
  border-radius: 8px;
  display: block;
}

.pwa-install-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
}

.pwa-install-banner__text strong { font-size: 0.88rem; }
.pwa-install-banner__text span { color: var(--color-text-faint); font-size: 0.78rem; }

@media (max-width: 480px) {
  .pwa-install-banner { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; padding: 0.7rem 0.75rem; }
  .pwa-install-banner__text span { display: none; }
}

/* ==========================================================================
   Role-based dashboard visual differentiation (Rebuild task)
   ========================================================================== */

/* Client: a distinct blue accent — subtle blue-tinted sidebar
   background + top stripe, signaling "hiring mode". */
.dashboard-sidebar__role--client {
  color: #6ea8fe;
}

.dashboard-sidebar__group-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  /* The sidebar is now dark for every role — the semi-transparent
     white variant reads correctly against it (the old faint-gray value
     was only ever meant for a light sidebar background). */
  color: rgba(255, 255, 255, 0.38);
  padding: 1rem 0.85rem 0.35rem;
}
.dashboard-sidebar__group-label:first-of-type {
  padding-top: 0.5rem;
}
.dashboard-sidebar__role--admin {
  color: var(--color-accent);
}

/* ==========================================================================
   Admin login (distinct, professional entry point — Rebuild task)
   ========================================================================== */

.admin-login-shell {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: #16181d;
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: #1f2229;
  border: 1px solid #2a2d35;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.admin-login-card__header {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-login-card__mark {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: contain;
  margin: 0 auto 1rem;
  /* Same rationale as the dashboard topbar's white chip backdrop —
     guarantees any uploaded logo is legible against this dark card,
     regardless of the logo's own colors/transparency. */
  padding: 8px;
  box-sizing: border-box;
  background: #fff;
}

.admin-login-card__header h1 {
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.admin-login-card__header p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  margin: 0;
}

.admin-login-card label {
  color: rgba(255, 255, 255, 0.85);
}

.admin-login-card input {
  background: #16181d;
  border-color: #2a2d35;
  color: #fff;
}

.admin-login-card__footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.admin-login-card__footer a {
  color: var(--color-primary);
}

/* ==========================================================================
   Footer social links (database-driven — Admin -> Settings -> Footer)
   ========================================================================== */

.footer-social {
  display: flex;
  gap: 0.85rem;
  margin-top: 1rem;
}

.footer-social a {
  font-size: 0.82rem;
  color: var(--color-text-faint);
  text-decoration: underline;
}

.footer-social a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   Admin footer-links editor row (Admin -> Settings -> Footer)
   ========================================================================== */

.footer-link-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr auto;
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
  .footer-link-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ==========================================================================
   Inline SVG icon component (x-icon) — sized via width/height on the
   wrapping element's class; this default keeps unstyled usages sane.
   ========================================================================== */

.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Hero badges (shown when platform stats are hidden — Admin ->
   Settings -> General -> "Show platform stats"): icon + label pairs,
   e.g. "No Commission / Ever", replacing what was previously a single
   plain text line.
   ========================================================================== */

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 2.5rem;
}

.hero-badges--compact {
  gap: 0.6rem;
  margin-top: 2rem;
}

.hero-badges--compact .hero-badge {
  padding: 0.55rem 0.85rem;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 1.1rem;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-badge__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.hero-badge div {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.hero-badge strong {
  font-size: 0.85rem;
  color: var(--color-text);
}

.hero-badge span {
  font-size: 0.75rem;
  color: var(--color-text-faint);
}

/* ==========================================================================
   Conversation / chat (accepted connection between a client and freelancer)
   ========================================================================== */

.conversation-thread {
  max-height: 480px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.conversation-message {
  display: flex;
  justify-content: flex-start;
}
.conversation-message--mine {
  justify-content: flex-end;
}

.conversation-message__bubble {
  max-width: 70%;
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
}
.conversation-message--mine .conversation-message__bubble {
  background: var(--color-primary-light);
}

.conversation-message__sender {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.conversation-message__body {
  font-size: 0.92rem;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.conversation-message__meta {
  font-size: 0.72rem;
  color: var(--color-text-faint);
  margin-top: 0.3rem;
}

.conversation-composer {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.conversation-composer textarea {
  flex: 1;
  resize: none;
}
