/* ============================================================================
   AnyShift ENTERPRISE theme — the new, professional design system.
   Loaded on EVERY page (admin + business + auth), AFTER components.css and
   BEFORE any section-specific theme (e.g. admin-theme.css).

   tokens.css already carries the refreshed palette + type tokens. This file
   re-dresses the *legacy* classes that predate the token system (.site-btn,
   Bootstrap .table, .site-card, .status-tag, raw headings) so the whole app
   speaks one visual language. Nothing here is section-scoped — shared surfaces
   look identical in admin and business; structural differences (the admin dark
   rail) live in admin-theme.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Base type — Geist body, Bricolage display. (style.css hard-codes Outfit.)
--------------------------------------------------------------------------- */
body { font-family: var(--as-font);
  color: var(--as-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .h1, .h2, .h3,
.as-page-header__title, .as-panel__title, .as-stat__value,
.site-card h1, .site-card h2, .site-card h3 { font-family: var(--as-font-display);
  letter-spacing: -0.02em;
  color: var(--as-ink);
}

/* Mono eyebrow/label helper (uppercase, tracked) */
.as-eyebrow { text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--as-primary);
}

/* Small red text/links already resolve to --as-red-text via components.css */

/* ---------------------------------------------------------------------------
   Buttons — keep .site-btn solid on hover (legacy flips it to transparent),
   square the radius to the new scale, and tidy the secondary/outline variant.
--------------------------------------------------------------------------- */
.site-btn { background: var(--as-primary);
  border: 1px solid var(--as-primary);
  border-radius: var(--r-md);
  font-family: var(--as-font);
  font-weight: 600;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.site-btn:hover { background: var(--as-primary-hover);
  border-color: var(--as-primary-hover);
  color: #fff;
}
.site-btn.border-btn,
.site-btn.secondary-btn { background: var(--as-surface);
  border: 1px solid var(--as-border);
  color: var(--as-ink);
}
.site-btn.border-btn:hover,
.site-btn.secondary-btn:hover { background: var(--as-bg);
  border-color: var(--as-border-strong);
  color: var(--as-ink);
}

/* ---------------------------------------------------------------------------
   Cards & surfaces
--------------------------------------------------------------------------- */
.site-card,
.company-card,
.commission-card,
.location-card,
.location-card-inner,
.card,
.site-modal { background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.as-stat, .as-panel { border-radius: var(--r-lg); }
.as-stat__icon, .as-quick__icon { background: var(--as-primary-weak);
  color: var(--as-primary);
}

/* ---------------------------------------------------------------------------
   Tables — rounded container, mono uppercase headers, hover tint.
   Covers legacy Bootstrap `.table` + `.job-table` and the tokenized `.as-table`.
--------------------------------------------------------------------------- */
.table-responsive { border: 1px solid var(--as-border);
  border-radius: var(--r-lg);
  background: var(--as-surface);
  overflow: auto;
}
.table-responsive > .table,
.table-responsive > table { margin-bottom: 0; }

.table > thead th,
.table thead th,
.job-table thead th { text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: var(--as-text-muted);
  background: var(--as-surface);
  border-bottom: 1px solid var(--as-border);
  padding: 14px 18px;
  vertical-align: middle;
}
.table tbody td,
.job-table tbody td { padding: 15px 18px;
  border-color: var(--as-divider);
  color: var(--as-text);
  vertical-align: middle;
}
.table tbody tr:hover,
.as-table tbody tr:hover { background: var(--as-bg); }

.mono, .as-table .as-num, .as-table .as-amount, .as-table .as-date {

}

/* ---------------------------------------------------------------------------
   Status pills — dotted-pill treatment for legacy status tags + theme badges
--------------------------------------------------------------------------- */
.status-tag,
.badge.bg-theme { display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.status-tag::before { content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------------------
   Form controls — align Bootstrap inputs with the token system
--------------------------------------------------------------------------- */
.form-control, .form-select { border-radius: var(--r-md);
  border-color: var(--as-border-strong);
  font-family: var(--as-font);
  color: var(--as-ink);
}
.form-control:focus, .form-select:focus { border-color: var(--as-primary);
  box-shadow: 0 0 0 3px var(--as-primary-weak);
}

/* ---------------------------------------------------------------------------
   Business top navigation — clean white bar, brand-red active link
   (components.css already styles .navbar-nav .nav-link.active underline)
--------------------------------------------------------------------------- */
.header-loggedin { background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--as-border);
}
.header-loggedin .navbar-nav .nav-link { color: var(--as-text-muted);
  font-weight: 500;
}
.header-loggedin .navbar-nav .nav-link:hover { color: var(--as-ink); }
.header-loggedin .noti-span { background: var(--as-primary); }

/* Pagination active state already follows --as-primary via components.css */

/* ============================================================================
   Detail-page component kit — reusable across admin + business detail views
   (employer, shifter, company, locations, teams). Hero + pill tabs + entity
   cards + meta chips. `as-` prefixed, token-driven, theme-consistent.
   ========================================================================== */

/* --- Entity hero --------------------------------------------------------- */
.as-hero { position: relative;
  overflow: hidden;
  background: var(--as-surface);
  border: 1px solid var(--as-border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.as-hero::before {
  /* soft brand wash in the top-right corner */
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(560px 220px at 100% -60%, var(--as-primary-weak), transparent 70%);
}
.as-hero__back { position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--as-border); background: var(--as-surface);
  color: var(--as-ink); margin-bottom: 16px; text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.as-hero__back:hover { background: var(--as-bg); color: var(--as-primary); border-color: var(--as-border-strong); }
.as-hero__main { position: relative; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.as-hero__info { min-width: 0; flex: 1 1 260px; }
.as-hero__name { font-family: var(--as-font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: 26px; line-height: 1.15; margin: 4px 0 3px; color: var(--as-ink);
}
.as-hero__sub { color: var(--as-text-muted); margin: 0 0 12px; font-size: 14px; }
.as-hero__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; align-self: flex-start; }

/* hero avatar reuses .photo-circle but squares it into a soft tile */
.as-hero .photo-circle { width: 76px; height: 76px; border-radius: 20px;
  background: var(--as-primary-weak); color: var(--as-primary);
  font-family: var(--as-font-display); font-weight: 700; font-size: 30px;
  border: 1px solid var(--as-border); box-shadow: var(--sh-1);
}
.as-hero .upload-btn { background: var(--as-bg); border: 1px solid var(--as-border);
  color: var(--as-text-muted); border-radius: 999px; font-size: 11px;
  margin-top: 8px;
}
.as-hero .upload-btn:hover { color: var(--as-primary); border-color: var(--as-primary); }

/* --- Meta chip row ------------------------------------------------------- */
.as-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.as-meta__item { display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--as-text); background: var(--as-bg);
  border: 1px solid var(--as-border); border-radius: 999px; padding: 5px 12px;
}
.as-meta__item i { color: var(--as-primary); font-size: 12px; }
.as-meta__item.is-empty { display: none; }

/* --- Section head with count pill ---------------------------------------- */
.as-section-head { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.as-section-head__titles { display: flex; align-items: center; gap: 10px; }
.as-count-pill {
font-size: 12px; font-weight: 600;
  color: var(--as-primary); background: var(--as-primary-weak);
  border-radius: 999px; padding: 3px 10px;
}

/* --- Entity card (companies / locations / teams) ------------------------- */
.as-entity-card { position: relative; display: flex; align-items: center; gap: 14px;
  background: var(--as-surface); border: 1px solid var(--as-border);
  border-radius: var(--r-lg); padding: 16px; height: 100%; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.as-entity-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--as-primary); transform: scaleY(0); transform-origin: top;
  transition: transform .2s ease;
}
.as-entity-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--as-border-strong); color: inherit; }
.as-entity-card:hover::before { transform: scaleY(1); }
.as-entity-card__logo { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px;
  object-fit: cover; border: 1px solid var(--as-border); background: var(--as-bg);
}
.as-entity-card__body { min-width: 0; flex: 1; }
.as-entity-card__name { font-family: var(--as-font-display); font-weight: 600; font-size: 16px;
  color: var(--as-ink); margin: 0 0 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-entity-card__meta { font-size: 13px; color: var(--as-text-muted); margin: 0; display: flex; align-items: center; gap: 6px; }
.as-entity-card__meta i { color: var(--as-text-subtle); font-size: 11px; }
.as-entity-card__arrow { flex: 0 0 auto; color: var(--as-text-subtle); transition: transform .18s ease, color .18s ease; }
.as-entity-card:hover .as-entity-card__arrow { color: var(--as-primary); transform: translateX(3px); }

/* --- Segmented pill tabs (upgrades legacy .custom-tabs, no markup change) - */
.nav-tabs-container { margin: 2px 0 18px; }
.custom-tabs { display: inline-flex; gap: 4px; border: 1px solid var(--as-border);
  background: var(--as-bg); border-radius: 12px; padding: 4px;
}
.custom-tabs .nav-link { border: none; border-radius: 9px; color: var(--as-text-muted);
  font-weight: 600; font-size: 14px; padding: 8px 18px;
  transition: background .18s ease, color .18s ease;
}
.custom-tabs .nav-link:hover { color: var(--as-ink); }
.custom-tabs .nav-link.active { background: var(--as-surface); color: var(--as-ink); box-shadow: var(--sh-1); }
.custom-tabs .nav-link.active::after { display: none; }

/* ============================================================================
   Elevation pass — a calmer, more premium feel. Layered depth, refined
   controls, a signature accent, restrained motion. Applies app-wide.
   ========================================================================== */

/* Smooth, consistent easing on the things people touch */
.site-btn, .as-btn, .as-entity-card, .as-stat, .as-quick,
.company-card, .form-control, .form-select, .custom-tabs .nav-link,
.status-select, .sidebar-links, .as-hero__back { transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* Content canvas: a whisper of depth behind the cards (not flat grey) */
.admin-wrapper .main-body,
.header-loggedin ~ .dashboard,
section.dashboard { background:
    radial-gradient(1100px 440px at 100% -8%, rgba(232, 17, 29, 0.035), transparent 60%),
    radial-gradient(900px 500px at -5% 0%, rgba(20, 20, 31, 0.025), transparent 55%),
    var(--as-bg);
}

/* Buttons: subtle lift + crisp press, brand sheen on primary */
.site-btn, .as-btn--primary { box-shadow: 0 1px 2px rgba(20, 20, 31, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.site-btn:not(.border-btn):not(.secondary-btn) { background: var(--as-accent-grad); border-color: transparent; }
.site-btn:hover, .as-btn--primary:hover { box-shadow: 0 4px 12px rgba(232, 17, 29, 0.28); transform: translateY(-1px); }
.site-btn:active, .as-btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(20, 20, 31, 0.12); }

/* Cards: hairline ring + soft shadow, gentle hover elevation */
.site-card, .company-card, .commission-card, .location-card, .card,
.as-panel, .as-stat { box-shadow: var(--sh-1);
}
.as-stat:hover, .as-entity-card:hover { box-shadow: var(--sh-2); }

/* Inputs: larger hit area, softer focus halo */
.form-control, .form-select, .as-input, .as-select, .as-textarea { padding-top: 11px; padding-bottom: 11px;
}
.form-control:focus, .form-select:focus,
.as-input:focus, .as-select:focus, .as-textarea:focus { box-shadow: 0 0 0 4px var(--as-primary-weak);
}

/* Hero: signature accent bar + layered depth + soft tint floor */
.as-hero { box-shadow: var(--sh-1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(252,233,233,0.18) 100%),
    var(--as-surface);
}
.as-hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--as-accent-grad);
  opacity: 0.9;
}
.as-hero .photo-circle { box-shadow: 0 6px 16px rgba(232, 17, 29, 0.18); }

/* Count pill + eyebrow get a touch more presence */
.as-count-pill { box-shadow: inset 0 0 0 1px rgba(232, 17, 29, 0.12); }

/* Refined, unobtrusive scrollbars (webkit) */
.admin-wrapper .main-body::-webkit-scrollbar,
.ss-content::-webkit-scrollbar { width: 10px; height: 10px; }
.admin-wrapper .main-body::-webkit-scrollbar-thumb { background: rgba(20, 20, 31, 0.14); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
.admin-wrapper .main-body::-webkit-scrollbar-thumb:hover { background: rgba(20, 20, 31, 0.24); background-clip: content-box; }

/* Auth: refine the branded split panel (premium, not loud) */
.as-auth__brand { background:
    radial-gradient(1200px 520px at 12% -12%, rgba(255, 255, 255, 0.16), transparent 60%),
    linear-gradient(150deg, #F0313C 0%, var(--as-primary) 46%, var(--as-primary-hover) 100%);
}
.as-auth__headline { font-family: var(--as-font-display); letter-spacing: -0.02em; }

@media (prefers-reduced-motion: reduce) {
  .site-btn:hover, .as-btn--primary:hover, .as-stat:hover, .as-entity-card:hover { transform: none; }
}

/* ============================================================================
   Legacy conformance — bring every remaining legacy component onto the system
   so each page follows the design language. Loaded after style.css, so these
   single-class selectors win by source order.
   ========================================================================== */

/* Status tags → the artifact's tones. Dotted pill (dot via .status-tag::before
   in the global section). Red is reserved for active-attention states. */
.status-tag { border-radius: var(--r-pill); padding: 4px 12px; font-size: 12px; font-weight: 600; }

.status-open, .status-opened, .status-blue,
.status-email-professional, .direct-contract-banner { background: var(--as-info-weak); color: var(--as-info);
}
.direct-contract-banner i { color: var(--as-info); }

.status-pending, .status-upcoming, .status-approval-requested,
.status-waitlist, .status-approval-pending, .status-shifter-approval,
.status-admin-approval, .status-on-hold { background: var(--as-warning-weak); color: var(--as-warning);
}

.status-on-going, .status-ongoing, .status-unpaid, .status-checkout, .status-disputed { background: var(--as-tint); color: var(--as-tint-ink);
}

.status-active, .status-approved, .status-paid, .status-complete,
.status-resolved, .status-approval-approved { background: var(--as-success-weak); color: var(--as-success);
}

.status-completed, .status-cancelled, .status-ended, .status-rejected,
.status-incomplete, .status-approval-rejected, .status-expired,
.status-email-private { background: #f0f0f3; color: var(--as-muted);
}

/* Secondary segmented tabs (company-details sub-tabs, etc.) */
.custom-tabs-2 { background: var(--as-bg); border-color: var(--as-border); border-radius: 12px; }
.custom-tabs-2 .nav-link { color: var(--as-text-muted); border-radius: 9px; font-weight: 600; }
.custom-tabs-2 .nav-link.active { background: var(--as-surface); border-color: transparent; color: var(--as-ink); box-shadow: var(--sh-1); }

/* Info-styled cards/inputs (commission + hourly) → info tokens, rounder */
.commission-card { background: var(--as-info-weak); color: var(--as-info); border-radius: var(--r-md); }
.commission-card.disabled { background: #f0f0f3; color: var(--as-muted); }

/* Status select (active/inactive pills on detail pages) */
.status-select { border-radius: var(--r-pill); font-weight: 600; }
.active-select { background-color: var(--as-success-weak); color: var(--as-success); }
.inactive-select { background-color: var(--as-tint); color: var(--as-tint-ink); }

/* Photo upload chip */
.profile-photo-upload .upload-btn { background: var(--as-bg); border: 1px solid var(--as-border); border-radius: var(--r-pill); color: var(--as-text-muted); }
.profile-photo-upload .upload-btn:hover { color: var(--as-primary); border-color: var(--as-primary); }

/* Offcanvas filter panels */
.offcanvas.customfilters, .customfilters { background: var(--as-surface); }
.offcanvas .offcanvas-header { border-bottom: 1px solid var(--as-divider); }

/* Any stray Bootstrap colored buttons → system (never default blue/green) */
.btn.btn-primary { background: var(--as-accent-grad); border-color: transparent; color: #fff; border-radius: var(--r-md); font-weight: 600; }
.btn.btn-primary:hover { background: var(--as-primary-hover); color: #fff; }
.btn.btn-success { background: var(--as-success); border-color: var(--as-success); }
.btn.btn-danger { background: var(--as-primary); border-color: var(--as-primary); }
.btn.btn-outline-primary { color: var(--as-primary); border-color: var(--as-primary); }
.btn.btn-outline-primary:hover { background: var(--as-primary); color: #fff; }

/* Controls + accents → brand (Bootstrap defaults to blue) */
.form-check-input:checked { background-color: var(--as-primary); border-color: var(--as-primary); }
.form-check-input:focus { border-color: var(--as-primary); box-shadow: 0 0 0 4px var(--as-primary-weak); }
.site-switch .form-check-input:checked { background-color: var(--as-success); border-color: var(--as-success); }
.blue-text { color: var(--as-info) !important; }
