/* quond.am — Tailus-inspired marketing + TailAdmin-inspired app shell */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary: #f97316;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --surface-page: #f1f5f9;
  --surface-sidebar: #1e293b;
  --surface-sidebar-hover: #334155;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-sidebar: #cbd5e1;
  --text-sidebar-active: #ffffff;
  --radius: 0.75rem;
  --shadow: 0 1px 3px 0 rgb(15 23 42 / 0.08), 0 1px 2px -1px rgb(15 23 42 / 0.08);
  --shadow-sm: 0 1px 2px 0 rgb(15 23 42 / 0.05);
  --shadow-lg: 0 10px 40px -10px rgb(15 23 42 / 0.15);
  --badge-green-bg: #dcfce7;
  --badge-green-fg: #166534;
  --badge-blue-bg: #dbeafe;
  --badge-blue-fg: #1e40af;
  --badge-gray-bg: #f1f5f9;
  --badge-gray-fg: #475569;
  --badge-red-bg: #fee2e2;
  --badge-red-fg: #991b1b;
  --badge-purple-bg: #f3e8ff;
  --badge-purple-fg: #6b21a8;
  --badge-yellow-bg: #fef9c3;
  --badge-yellow-fg: #854d0e;
  --badge-teal-bg: #ccfbf1;
  --badge-teal-fg: #115e59;
  --alert-warning-bg: #fffbeb;
  --alert-warning-fg: #92400e;
  --alert-warning-border: #fde68a;
  --chart-text: #64748b;
  --chart-grid: rgba(100, 116, 139, 0.2);
}

[data-theme="dark"] {
  --surface: #111827;
  --surface-muted: #0b1220;
  --surface-page: #0b1220;
  --surface-sidebar: #0f172a;
  --surface-sidebar-hover: #1e293b;
  --border: #1f2937;
  --border-subtle: #1f2937;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.35);
  --shadow-lg: 0 10px 40px -10px rgb(0 0 0 / 0.55);
  --badge-green-bg: #14532d;
  --badge-green-fg: #bbf7d0;
  --badge-blue-bg: #1e3a8a;
  --badge-blue-fg: #bfdbfe;
  --badge-gray-bg: #1f2937;
  --badge-gray-fg: #cbd5e1;
  --badge-red-bg: #7f1d1d;
  --badge-red-fg: #fecaca;
  --badge-purple-bg: #581c87;
  --badge-purple-fg: #e9d5ff;
  --badge-yellow-bg: #713f12;
  --badge-yellow-fg: #fef08a;
  --badge-teal-bg: #134e4a;
  --badge-teal-fg: #99f6e4;
  --alert-warning-bg: #422006;
  --alert-warning-fg: #fde68a;
  --alert-warning-border: #a16207;
  --chart-text: #cbd5e1;
  --chart-grid: rgba(148, 163, 184, 0.25);
}

/* Map the fixed utility colors used by app content onto dark-readable tokens. */
[data-theme="dark"] .text-slate-300,
[data-theme="dark"] .text-slate-400,
[data-theme="dark"] .text-slate-500,
[data-theme="dark"] .text-gray-400,
[data-theme="dark"] .text-gray-500 {
  color: var(--text-muted);
}
[data-theme="dark"] .text-slate-600,
[data-theme="dark"] .text-slate-700,
[data-theme="dark"] .text-slate-800,
[data-theme="dark"] .text-slate-900,
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-gray-900 {
  color: var(--text);
}
[data-theme="dark"] .bg-white {
  background-color: var(--surface);
}
[data-theme="dark"] .bg-slate-50,
[data-theme="dark"] .bg-gray-50,
[data-theme="dark"] .bg-gray-100,
[data-theme="dark"] .bg-gray-200 {
  background-color: var(--surface-muted);
}
[data-theme="dark"] .border-slate-100,
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-slate-300 {
  border-color: var(--border);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  color-scheme: light;
}
[data-theme="dark"] {
  color-scheme: dark;
}
body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-muted);
  -webkit-font-smoothing: antialiased;
}

/* Theme-aware native form controls (covers bare border/rounded fields too). */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
textarea,
select {
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  caret-color: var(--text);
}
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.15);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary);
}
option {
  color: var(--text);
  background-color: var(--surface);
}
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
img { max-width: 100%; }

/* Utilities */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.hidden { display: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.w-full { width: 100%; }
.w-64 { width: 16rem; }
.w-72 { width: 18rem; }
.w-32 { width: 8rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-24 { padding-top: 6rem; }
.pb-16 { padding-bottom: 4rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: ui-monospace, monospace; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.text-white { color: #fff; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: #0f172a; }
.text-indigo-500 { color: #6366f1; }
.text-indigo-600 { color: #4f46e5; }
.text-red-600 { color: #dc2626; }
.text-amber-600 { color: #d97706; }
.text-green-800 { color: #166534; }
.text-blue-800 { color: #1e40af; }
.text-red-800 { color: #991b1b; }
.text-purple-800 { color: #6b21a8; }
.text-yellow-800 { color: #854d0e; }
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-green-100 { background-color: #dcfce7; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-red-100 { background-color: #fee2e2; }
.bg-purple-100 { background-color: #f3e8ff; }
.bg-yellow-100 { background-color: #fef9c3; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-indigo-600 { border-color: #4f46e5; }
.shadow { box-shadow: var(--shadow); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.05); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.overflow-hidden { overflow: hidden; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.break-all { word-break: break-all; }
.inline-block { display: inline-block; }
.block { display: block; }
.h-2 { height: 0.5rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.underline { text-decoration: underline; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-indigo-700:hover { background-color: #4338ca; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.-z-10 { z-index: -10; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.shrink-0 { flex-shrink: 0; }

@media (min-width: 640px) {
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:text-5xl { font-size: 3rem; line-height: 1.1; }
  .sm\:text-xl { font-size: 1.25rem; }
}
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* --- Marketing (Tailus-inspired) --- */
.landing-page { background: var(--surface); color: var(--text); }
.landing-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid rgb(15 23 42 / 0.06);
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.landing-nav { max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.landing-logo { display: inline-flex; align-items: center; }
.landing-logo .brand-banner { height: 1.75rem; width: auto; }

.brand-link { display: inline-flex; align-items: center; line-height: 0; }
.brand-banner,
.brand-mark {
  display: block;
  width: auto;
  height: auto;
}
.brand-banner--dark,
.brand-mark--dark { display: none; }
[data-theme="dark"] .brand-banner--light,
[data-theme="dark"] .brand-mark--light { display: none; }
[data-theme="dark"] .brand-banner--dark,
[data-theme="dark"] .brand-mark--dark { display: block; }
.landing-hero-wrap {
  position: relative; overflow: hidden;
  padding: 5rem 1.5rem 4rem;
}
.landing-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgb(99 102 241 / 0.18), transparent),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgb(249 115 22 / 0.1), transparent),
    linear-gradient(180deg, var(--surface-muted) 0%, var(--surface) 60%);
}
.landing-hero-inner { position: relative; z-index: 1; max-width: 48rem; margin: 0 auto; text-align: center; }
.landing-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.85rem; margin-bottom: 1.5rem;
  font-size: 0.8125rem; font-weight: 500; color: var(--primary);
  background: rgb(99 102 241 / 0.1); border: 1px solid rgb(99 102 241 / 0.2);
  border-radius: 9999px;
}
.landing-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; line-height: 1.08;
  letter-spacing: -0.03em; color: var(--text); margin: 0 0 1.25rem;
}
.landing-title-accent {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #f97316 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-subtitle { font-size: 1.125rem; color: var(--text-muted); max-width: 36rem; margin: 0 auto 2rem; line-height: 1.65; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.landing-features { padding: 4rem 1.5rem; background: var(--surface-muted); }
.landing-features-grid { max-width: 72rem; margin: 0 auto; display: grid; gap: 1.5rem; }
.landing-feature-card {
  padding: 1.75rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 1rem; box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.landing-feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.landing-feature-icon {
  width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem; background: rgb(99 102 241 / 0.1); color: var(--primary);
  font-size: 1.25rem; margin-bottom: 1rem;
}
.landing-cta {
  padding: 4rem 1.5rem; text-align: center;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #6366f1 100%);
  color: #fff;
}
.landing-footer {
  padding: 2rem 1.5rem; text-align: center; font-size: 0.875rem; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 600;
  border-radius: 0.5rem; border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-muted); }
.btn-danger {
  background: var(--surface); color: #b91c1c; border-color: #fca5a5;
}
.btn-danger:hover { background: #fef2f2; }
[data-theme="dark"] .btn-danger {
  color: #fca5a5; border-color: rgb(248 113 113 / 0.45);
}
[data-theme="dark"] .btn-danger:hover {
  background: rgb(127 29 29 / 0.35); color: #fecaca;
}
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: rgb(15 23 42 / 0.04); }
[data-theme="dark"] .btn-ghost:hover { background: rgb(255 255 255 / 0.06); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f1f5f9; }
[data-theme="dark"] .btn-white {
  background: var(--surface); color: var(--primary-light); border-color: var(--border);
}
[data-theme="dark"] .btn-white:hover { background: var(--surface-muted); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; font-weight: 500; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

.search-action-link {
  font-size: 0.75rem; color: var(--text-muted); background: transparent;
  border: 0; padding: 0; cursor: pointer;
}
.search-action-link:hover { color: var(--primary); text-decoration: underline; }
.search-action-link-danger { color: #dc2626; }
.search-action-link-danger:hover { color: #b91c1c; }
[data-theme="dark"] .search-action-link-danger { color: #fca5a5; }
[data-theme="dark"] .search-action-link-danger:hover { color: #fecaca; }

.jobs-selection-banner {
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 0.75rem 1rem;
}
[data-theme="dark"] .jobs-selection-banner {
  background: rgb(79 70 229 / 0.15);
  border-color: rgb(129 140 248 / 0.35);
}
.jobs-selection-banner-text {
  font-size: 0.875rem;
  color: #312e81;
}
[data-theme="dark"] .jobs-selection-banner-text {
  color: #c7d2fe;
}
.jobs-selection-banner-action {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4338ca;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.jobs-selection-banner-action:hover { text-decoration: underline; }
.jobs-selection-banner-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: none;
}
[data-theme="dark"] .jobs-selection-banner-action {
  color: #a5b4fc;
}
[data-theme="dark"] .jobs-selection-banner-action:hover {
  color: #c7d2fe;
}

/* Forms */
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text); margin-bottom: 0.375rem; }
.form-input {
  display: block; width: 100%; height: 2.75rem; padding: 0 0.875rem;
  font-size: 0.875rem; color: var(--text); background-color: var(--surface);
  border: 1px solid var(--border); border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgb(99 102 241 / 0.15); }
.form-textarea { min-height: 8rem; padding: 0.75rem 0.875rem; height: auto; resize: vertical; }
.form-error { font-size: 0.875rem; color: #dc2626; margin-bottom: 1rem; }
[data-theme="dark"] .form-error { color: #fca5a5; }

/* Auth (TailAdmin-inspired) */
.auth-page {
  position: relative;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--surface-page);
}
.auth-card {
  width: 100%; max-width: 26rem; padding: 2rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}
.auth-brand { text-align: center; margin-bottom: 1.75rem; }
.auth-brand-logo { display: flex; justify-content: center; width: 100%; }
.auth-brand-logo .brand-banner {
  width: 100%;
  height: auto;
  max-width: none;
}
.auth-brand-tag { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.5rem; }
.auth-title { font-size: 1.25rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.auth-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.auth-theme-wrap {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: auto;
  max-width: none;
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

/* App shell (TailAdmin-inspired) */
.app-layout { display: flex; min-height: 100vh; background: var(--surface-page); }
.app-sidebar {
  width: 18rem; flex-shrink: 0; display: none;
  flex-direction: column; background: var(--surface-sidebar);
  border-right: 1px solid rgb(255 255 255 / 0.06);
  transition: width 0.2s ease;
}
.app-sidebar-brand {
  padding: 1.25rem 1rem; border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.app-sidebar-logo {
  display: flex; align-items: center; justify-content: center; width: 100%;
}
.app-sidebar-logo-full .brand-banner {
  width: 100%;
  height: auto;
  max-width: none;
}
.app-sidebar-logo-mark .brand-mark {
  height: 1.75rem; width: auto;
}
.app-sidebar-tag { font-size: 0.6875rem; color: #94a3b8; margin-top: 0.5rem; line-height: 1.4; }
.app-sidebar-nav { flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }
.app-nav-section { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; padding: 0.5rem 0.75rem; margin-top: 0.5rem; }
.app-nav-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem; margin-bottom: 0.125rem;
  font-size: 0.875rem; font-weight: 500; color: var(--text-sidebar);
  border-radius: 0.5rem; transition: background 0.15s, color 0.15s;
}
.app-nav-link:hover { background: var(--surface-sidebar-hover); color: #fff; }
.app-nav-link.active {
  background: rgb(79 70 229 / 0.9); color: var(--text-sidebar-active);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}
.app-nav-icon { width: 1.25rem; text-align: center; font-size: 1rem; opacity: 0.9; }
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40;
}
.app-header-title { font-size: 1.25rem; font-weight: 600; color: var(--text); margin: 0; }
.app-header-start { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.app-sidebar-toggle,
.app-mobile-toggle {
  align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0;
  border: 1px solid var(--border); border-radius: 0.5rem;
  background: var(--surface); color: var(--text);
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.app-sidebar-toggle { display: none; }
.app-sidebar-toggle:hover,
.app-mobile-toggle:hover { background: var(--surface-muted); }
.app-mobile-toggle { display: inline-flex; position: relative; z-index: 60; }
.app-header-actions {
  display: flex; align-items: center; gap: 0.75rem; position: relative;
}
.app-mobile-menu {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  width: min(16rem, calc(100vw - 1.5rem)); padding: 0.5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0.75rem; box-shadow: var(--shadow-lg); z-index: 50;
}
.app-mobile-menu .app-nav-link { color: var(--text); }
.app-mobile-menu .app-nav-link:hover { background: var(--surface-muted); color: var(--text); }
.app-mobile-menu .app-nav-link.active {
  background: rgb(79 70 229 / 0.15); color: var(--primary-dark);
}
.app-mobile-user {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0.5rem 0; padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--border); color: var(--text);
  font-size: 0.8125rem; font-weight: 500;
}
.app-sidebar-logo-mark { display: none; }
.app-layout--collapsed .app-sidebar { width: 4rem; }
.app-layout--collapsed .app-sidebar-logo-full,
.app-layout--collapsed .app-sidebar-tag,
.app-layout--collapsed .app-nav-label,
.app-layout--collapsed .app-nav-section { display: none; }
.app-layout--collapsed .app-sidebar-logo-mark {
  display: inline-flex; justify-content: center; width: 100%;
}
.app-layout--collapsed .app-sidebar-brand { padding-left: 0.5rem; padding-right: 0.5rem; }
.app-layout--collapsed .app-nav-link {
  justify-content: center; padding-left: 0.5rem; padding-right: 0.5rem;
}
.app-user-pill {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem; background: var(--surface-muted); border: 1px solid var(--border);
  border-radius: 9999px; font-size: 0.8125rem; font-weight: 500; color: var(--text);
}
.app-user-avatar {
  width: 1.75rem; height: 1.75rem; border-radius: 9999px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.app-content { flex: 1; padding: 1.5rem; }
.app-logout { font-size: 0.8125rem; font-weight: 500; color: var(--primary); }
.app-logout:hover { text-decoration: underline; }

@media (min-width: 768px) {
  .app-sidebar { display: flex; }
  .app-sidebar-toggle { display: inline-flex; }
  .app-mobile-toggle,
  .app-mobile-menu { display: none !important; }
}

@media (max-width: 767px) {
  .app-sidebar-toggle { display: none !important; }
  .app-header-user-desktop { display: none; }
}

/* Dashboard cards */
.stat-card {
  padding: 1.25rem 1.5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 0.75rem; box-shadow: var(--shadow-sm);
}
.stat-card-label { font-size: 0.8125rem; font-weight: 500; color: var(--text-muted); margin: 0 0 0.5rem; }
.stat-card-value { font-size: 1.75rem; font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.02em; }
.stat-card-sub { font-size: 0.75rem; color: var(--text-muted); margin: 0.25rem 0 0; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.75rem;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  font-size: 0.9375rem; font-weight: 600; color: var(--text);
}
.panel-body { padding: 1.25rem; }

.data-table thead th {
  padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted);
  background: var(--surface-muted); border-bottom: 1px solid var(--border);
}
.data-table tbody td { padding: 0.875rem 1rem; font-size: 0.875rem; border-bottom: 1px solid var(--border-subtle); }
.data-table tbody tr:hover { background: var(--surface-muted); }
.data-table tbody tr:last-child td { border-bottom: none; }

.badge {
  display: inline-flex; padding: 0.2rem 0.65rem; font-size: 0.75rem; font-weight: 500;
  border-radius: 9999px;
}
.badge-green { background: var(--badge-green-bg); color: var(--badge-green-fg); }
.badge-blue { background: var(--badge-blue-bg); color: var(--badge-blue-fg); }
.badge-gray { background: var(--badge-gray-bg); color: var(--badge-gray-fg); }
.badge-red { background: var(--badge-red-bg); color: var(--badge-red-fg); }
.badge-purple { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }
.badge-yellow { background: var(--badge-yellow-bg); color: var(--badge-yellow-fg); }
.badge-teal { background: var(--badge-teal-bg); color: var(--badge-teal-fg); }

.filter-pill {
  display: inline-block; padding: 0.375rem 0.875rem; font-size: 0.8125rem; font-weight: 500;
  border-radius: 9999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
}
.filter-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-pill:hover:not(.active) { background: var(--surface-muted); }

.jobs-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}
.jobs-filter-status,
.jobs-filter-slider {
  min-width: 0;
}
.jobs-filter-status {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.filter-select {
  display: block;
  width: 100%;
  height: 1.75rem;
  padding: 0 1.75rem 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: var(--text);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.35rem center;
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  appearance: none;
  -webkit-appearance: none;
}
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.12);
}
.filter-select-multi {
  height: auto;
  min-height: 4.5rem;
  max-height: 6.5rem;
  padding: 0.25rem 0.375rem;
  background-image: none;
  overflow-y: auto;
}
.status-tag-select {
  position: relative;
  width: 100%;
}
.status-tag-select-trigger {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.375rem 2rem 0.375rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  color: var(--text);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  cursor: pointer;
}
.status-tag-select-trigger:hover {
  border-color: var(--text-muted);
}
.status-tag-select-trigger:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.12);
}
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 9999px;
}
[data-theme="dark"] .status-tag {
  color: #c7d2fe;
  background: rgb(79 70 229 / 0.22);
  border-color: rgb(129 140 248 / 0.45);
}
.status-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  color: #6366f1;
  background: transparent;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  line-height: 1;
}
.status-tag-remove:hover {
  color: #312e81;
  background: #c7d2fe;
}
[data-theme="dark"] .status-tag-remove {
  color: #a5b4fc;
}
[data-theme="dark"] .status-tag-remove:hover {
  color: #e0e7ff;
  background: rgb(99 102 241 / 0.35);
}
.status-tag-placeholder {
  color: var(--text-muted);
}
.status-tag-select-chevron {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.status-tag-select-dropdown {
  position: absolute;
  z-index: 20;
  width: 100%;
  max-height: 15rem;
  margin-top: 0.25rem;
  padding: 0.25rem;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
}
.status-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0.375rem;
  cursor: pointer;
}
.status-option:hover {
  background: var(--surface-muted);
}
.status-option[aria-selected="true"] {
  background: #eef2ff;
}
[data-theme="dark"] .status-option[aria-selected="true"] {
  background: rgb(79 70 229 / 0.22);
}
.status-option-check {
  width: 0.75rem;
  flex-shrink: 0;
  color: var(--primary);
}
[data-theme="dark"] .filter-select,
[data-theme="dark"] .bulk-status-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
}
.bulk-status-select {
  display: inline-block;
  width: auto;
  min-width: 10rem;
  max-width: 14rem;
  height: 2.25rem;
  padding: 0 1.75rem 0 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--text);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.4rem center;
  background-repeat: no-repeat;
  background-size: 1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
}
.bulk-status-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.12);
}
.filter-slider {
  display: block;
  width: 100%;
  height: 0.375rem;
  margin-top: 0.375rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: var(--border);
  border-radius: 9999px;
  accent-color: var(--primary);
}
.filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 9999px;
  background: var(--primary);
  border: 0;
  box-shadow: 0 0 0 2px #fff, 0 1px 2px rgb(15 23 42 / 0.2);
}
.filter-slider::-moz-range-thumb {
  width: 0.875rem;
  height: 0.875rem;
  border: 0;
  border-radius: 9999px;
  background: var(--primary);
}
.filter-slider::-webkit-slider-runnable-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--border);
}
.filter-slider::-moz-range-track {
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--border);
}

@media (max-width: 768px) {
  .jobs-filter-bar {
    grid-template-columns: 1fr;
  }
}

/* Location pill input (Tailwind-style tokens) */
.location-pills-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.location-pills-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.12);
}
.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: 9999px;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
[data-theme="dark"] .location-pill {
  color: #c7d2fe;
  background: rgb(79 70 229 / 0.22);
  border-color: rgb(129 140 248 / 0.45);
}
.location-pill-readonly {
  background: var(--surface-muted);
  color: var(--text-muted);
  border-color: var(--border);
}
.location-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #6366f1;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.location-pill-remove:hover {
  background: #c7d2fe;
  color: #312e81;
}
[data-theme="dark"] .location-pill-remove {
  color: #a5b4fc;
}
[data-theme="dark"] .location-pill-remove:hover {
  color: #e0e7ff;
  background: rgb(99 102 241 / 0.35);
}
.location-pills-field {
  flex: 1 1 10rem;
  min-width: 10rem;
  border: none !important;
  outline: none;
  box-shadow: none !important;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  background: transparent !important;
  color: var(--text);
}
.location-pills-field::placeholder {
  color: var(--text-muted);
}

.progress-track { width: 100%; height: 0.5rem; background: var(--border); border-radius: 9999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 9999px; transition: width 0.3s; }

.alert-warning {
  padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.875rem;
  color: var(--alert-warning-fg); background: var(--alert-warning-bg); border: 1px solid var(--alert-warning-border); border-radius: 0.5rem;
}

.theme-cycle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0;
  border: 1px solid var(--border); border-radius: 0.5rem;
  background: var(--surface); color: var(--text);
  cursor: pointer; font-size: 0.875rem; line-height: 1;
}
.theme-cycle-btn:hover { background: var(--surface-muted); }

@media (min-width: 768px) {
  .app-sidebar { display: flex; }
  .landing-features-grid { grid-template-columns: repeat(3, 1fr); }
}

[x-cloak] { display: none !important; }

.toast-stack {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  top: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1rem;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.toast span {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.toast-done { border-left-color: #16a34a; }
.toast-failed { border-left-color: #dc2626; }
.toast-progress { border-left-color: var(--primary); }

.toast-progress-track {
  width: 100%;
  height: 0.375rem;
  background: var(--border);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.375rem 0 0.5rem;
}

.toast-progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 9999px;
  transition: width 0.3s ease;
  width: 0%;
}

.toast-stage {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.toast-message {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --- Dashboard analytics --- */
.analytics-top-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 1024px) {
  .analytics-top-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
}
.analytics-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.panel-header-title { font-weight: 600; }
.analytics-range-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.analytics-range-btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.analytics-range-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.analytics-custom-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.analytics-date-input { max-width: 10rem; }
.analytics-top-grid .analytics-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.analytics-chart-body { position: relative; min-height: 220px; }
.analytics-chart-body--tall { min-height: 260px; }
.analytics-chart-body--fill {
  flex: 1 1 auto;
  min-height: 240px;
}
.analytics-chart-body canvas { max-height: 280px; }
.analytics-chart-body--fill canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-height: none;
}
.analytics-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
  pointer-events: none;
  z-index: 1;
}
.analytics-error { color: var(--danger, #ef4444); margin-bottom: 0.5rem; }
