:root {
  --lf-bg: #0b111c;
  --lf-card: #111827;
  --lf-card-job: #243552;
  --lf-card-ticket: #2a3d5c;
  --lf-card-2: #172033;
  --lf-orange: #f59e0b;
  --lf-green: #22c55e;
  --lf-border: rgba(212, 175, 55, 0.45);
  --lf-gold: #d4af37;
  --lf-gold-dark: #b8872d;
  --lf-text: #f8fafc;
  --lf-muted: #cbd5e1;
  --lf-success: #22c55e;
  --lf-danger: #ef4444;
  --lf-warning: #f59e0b;
  --lf-info: #3b82f6;
  --lf-nav-h: 4.25rem;
  --lf-topbar-h: 3.25rem;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--lf-bg);
  color: var(--lf-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: var(--lf-gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.lf-app.has-bottom-nav .lf-main {
  padding-bottom: calc(var(--lf-nav-h) + 1.25rem);
}

.lf-app:not(.login-page) .lf-main {
  padding-top: 0.75rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  max-width: 960px;
  margin: 0 auto;
}

.lf-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 17, 28, 0.95);
  border-bottom: 1px solid var(--lf-border);
  backdrop-filter: blur(8px);
}

.lf-topbar-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--lf-topbar-h);
  padding: 0.35rem 0.85rem;
  max-width: 960px;
  margin: 0 auto;
}

.lf-topbar-inner--center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
}

.lf-topbar-start {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-self: start;
  min-width: 0;
}

.lf-topbar-center {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.lf-topbar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  justify-self: end;
  min-width: 0;
}

.lf-topbar-spacer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.lf-topbar-home,
.lf-topbar-back {
  flex-shrink: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--lf-border);
  color: var(--lf-gold);
  font-size: 0.85rem;
  text-decoration: none;
}

.lf-topbar-title {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(72vw, 14rem);
}

.lf-topbar-inner:not(.lf-topbar-inner--center) .lf-topbar-title {
  flex: 1;
}

.lf-topbar-welcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: min(72vw, 16rem);
}

.lf-topbar-logo {
  display: block;
  height: 1.65rem;
  width: auto;
  max-width: 4.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.lf-topbar-inner--home {
  min-height: 4.25rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.lf-topbar-inner--home .lf-topbar-welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(72vw, 20rem);
}

.lf-topbar-logo--home {
  height: calc(var(--lf-topbar-h) + 0.65rem);
  max-height: 3.65rem;
  width: auto;
  max-width: min(68vw, 18rem);
  object-fit: contain;
}

.lf-topbar-welcome-brand {
  font-weight: 600;
  font-size: 1rem;
  color: var(--lf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-topbar-user {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--lf-muted);
  max-width: 35%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lf-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  min-height: var(--lf-nav-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: #0d1524;
  border-top: 1px solid var(--lf-border);
}

.lf-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.4rem 0.2rem;
  color: var(--lf-muted);
  font-size: 0.68rem;
  text-align: center;
  text-decoration: none;
  min-height: 44px;
}

.lf-nav-item.is-active,
.lf-nav-item:hover {
  color: var(--lf-gold);
  text-decoration: none;
}

.lf-nav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.lf-nav-add .lf-nav-icon {
  color: var(--lf-gold);
  font-weight: 700;
}

.lf-card {
  background: var(--lf-card);
  border: 1px solid var(--lf-border);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lf-card-clickable {
  display: block;
  color: inherit;
  text-decoration: none;
}

.lf-card-clickable:hover {
  border-color: var(--lf-gold);
  text-decoration: none;
}

.lf-card-flagged {
  border-color: var(--lf-danger);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.lf-card-ticket {
  background: var(--lf-card-ticket);
}

.lf-job-card {
  position: relative;
  background: var(--lf-card-job);
}

.lf-job-status-card {
  text-align: center;
  margin-bottom: 0.75rem;
}

.lf-card-clickable-status {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lf-card-clickable-status:hover,
.lf-card-clickable-status:focus-within {
  border-color: var(--lf-gold);
  background: rgba(212, 175, 55, 0.06);
}

.lf-job-status-hint {
  margin: 0.35rem 0 0;
}

.lf-job-status-line--prominent {
  margin: 0;
  font-size: 1.05rem;
}

.lf-job-status-line--prominent .lf-job-status-text {
  font-weight: 700;
}

.lf-job-status-warning {
  margin: 0;
  font-size: 0.82rem;
  color: var(--lf-warning, #fbbf24);
}

.lf-job-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.75rem;
}

.lf-job-files-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lf-job-files-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-job-files-item:last-child {
  border-bottom: none;
}

.lf-job-file-link {
  color: var(--lf-gold);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.lf-job-file-link:hover {
  text-decoration: underline;
}

.lf-job-files-inline {
  margin: 0.85rem 0 0.5rem;
}

.lf-job-files-list--inline .lf-job-files-item {
  border-bottom: none;
  padding: 0.2rem 0;
}

.lf-job-created-meta {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-edit-job-files-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.lf-edit-job-files-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-edit-job-files-item:last-child {
  border-bottom: none;
}

.lf-hidden-form {
  display: none;
}

.lf-contractor-switch-note {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--lf-muted);
}

.lf-job-ticket-card {
  display: block;
  margin-top: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.lf-assign-contractor-wrap {
  text-align: center;
  margin: 0.25rem 0 1rem;
}

.lf-btn-assign-contractor {
  min-width: 12rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.lf-btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  min-height: auto;
}

.lf-card-ticket.lf-card-clickable {
  position: relative;
}

.lf-card-badges {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  max-width: 70%;
  pointer-events: none;
}

.lf-card-title-with-badges {
  margin: 0 0 0.4rem;
  padding-right: 8.5rem;
  line-height: 1.25;
}

.lf-title-sep {
  color: var(--lf-muted);
  font-weight: 400;
}

.lf-job-status-inline {
  font-weight: 600;
  font-size: 0.92em;
}

.lf-priority-pill {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.65);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.lf-job-flag {
  color: #f87171;
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.lf-job-status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0 0.35rem;
  font-size: 0.9rem;
}

/* Status dots: orange ring = open/incomplete, green filled = complete */
.lf-status-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  box-sizing: border-box;
  vertical-align: middle;
}

.lf-dot-open {
  background: transparent;
  border: 3px solid var(--lf-orange);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.lf-dot-complete {
  background: var(--lf-green);
  border: 3px solid var(--lf-green);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.lf-dot-muted {
  background: transparent;
  border: 3px solid var(--lf-muted);
}

.lf-job-status-text--incomplete {
  color: var(--lf-orange);
  font-weight: 600;
}

.lf-job-status-text--complete {
  color: var(--lf-green);
  font-weight: 600;
}

.lf-contractor-list {
  list-style: none !important;
  margin: 0.75rem 0 0;
  padding: 0 !important;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.lf-contractor-list-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  list-style: none !important;
  padding: 0.2rem 0.45rem 0.2rem 0.25rem;
  margin: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 100%;
}

.lf-contractor-list-item::before {
  content: none !important;
  display: none !important;
}

.lf-contractor-name {
  color: var(--lf-text);
  white-space: nowrap;
}

.lf-contractor-flag {
  color: var(--lf-danger);
  font-size: 0.85rem;
  line-height: 1;
  margin-left: 0.05rem;
  flex-shrink: 0;
}

.lf-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.lf-card-meta {
  color: var(--lf-muted);
  font-size: 0.88rem;
  margin: 0.15rem 0;
}

.lf-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .lf-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.lf-stat {
  background: var(--lf-card-2);
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
}

a.lf-stat-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

a.lf-stat-link:hover,
a.lf-stat-link:focus-visible {
  border-color: var(--lf-gold);
  background: rgba(212, 175, 55, 0.08);
  outline: none;
}

a.lf-stat-link:active {
  transform: scale(0.98);
}

.lf-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--lf-gold);
}

.lf-stat-label {
  font-size: 0.75rem;
  color: var(--lf-muted);
}

.badge,
.lf-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-primary,
.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.badge-muted {
  background: rgba(148, 163, 184, 0.15);
  color: var(--lf-muted);
}

.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.lf-btn-gold {
  background: linear-gradient(135deg, #d9bf72, var(--lf-gold-dark));
  color: #1a1200;
  border-color: var(--lf-gold);
}

.lf-btn-outline {
  background: transparent;
  color: var(--lf-gold);
  border-color: var(--lf-border);
}

.lf-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.5);
}

.lf-btn-block {
  width: 100%;
}

.lf-form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: var(--lf-muted);
}

.lf-input,
.lf-textarea,
.lf-select {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--lf-border);
  background: var(--lf-card-2);
  color: var(--lf-text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.lf-textarea {
  min-height: 100px;
  resize: vertical;
}

.lf-input:focus,
.lf-textarea:focus,
.lf-select:focus {
  outline: 2px solid var(--lf-gold);
  outline-offset: 1px;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.lf-page-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.lf-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lf-filters-centered {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
}

.lf-filter-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--lf-border);
  color: var(--lf-muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.lf-filter-chip.is-active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--lf-gold);
  border-color: var(--lf-gold);
}

.lf-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
}

.lf-photo-grid a {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--lf-border);
  aspect-ratio: 1;
}

.lf-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lf-note {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-note:last-child {
  border-bottom: none;
}

.lf-note-meta {
  font-size: 0.78rem;
  color: var(--lf-muted);
  margin-bottom: 0.25rem;
}

.lf-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.lf-sticky-actions {
  position: sticky;
  bottom: calc(var(--lf-nav-h) + 0.5rem);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--lf-border);
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* Login */
.login-page .lf-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  max-width: none;
}

.lf-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--lf-card);
  border: 1px solid var(--lf-border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.lf-login-logo {
  width: auto;
  max-width: min(100%, 280px);
  max-height: 120px;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  object-fit: contain;
}

.lf-login-title,
.lf-login-brand-name {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
}

.lf-login-install-link {
  margin: 1.15rem 0 0;
  font-size: 0.88rem;
}

.lf-login-install-link a {
  color: var(--lf-gold);
  text-decoration: none;
  font-weight: 600;
}

.lf-login-install-link a:hover {
  text-decoration: underline;
}

/* App installer */
.installer-page .lf-main {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.lf-installer-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--lf-card);
  border: 1px solid var(--lf-border);
  border-radius: 16px;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.lf-installer-logo {
  width: auto;
  max-width: min(100%, 260px);
  max-height: 110px;
  height: auto;
  margin: 0 auto 1.25rem;
  display: block;
  object-fit: contain;
}

.lf-installer-brand {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--lf-gold);
}

.lf-installer-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.lf-installer-lead {
  margin: 0 0 1.25rem;
  color: var(--lf-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.lf-installer-alert {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.lf-installer-alert--success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.lf-installer-alert--warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.lf-installer-install-btn {
  margin-bottom: 1rem;
}

.lf-installer-ios {
  text-align: left;
  margin: 0 0 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--lf-card-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-installer-ios-title {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lf-muted);
}

.lf-installer-ios-steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--lf-text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.lf-installer-ios-steps li + li {
  margin-top: 0.35rem;
}

.lf-installer-open-link {
  margin-top: 0.25rem;
}

.lf-tickets-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lf-tickets-filter-field {
  margin: 0;
}

.lf-tickets-filters .lf-select {
  margin-bottom: 0;
}

.lf-select-centered {
  text-align: center;
  text-align-last: center;
}

.lf-select-centered option {
  text-align: center;
}

.lf-jobs-filter {
  margin-bottom: 1rem;
}

.lf-jobs-search-input {
  margin-bottom: 0.65rem;
}

.lf-jobs-incomplete-check {
  margin: 0.15rem 0 0;
}

.lf-contractor-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 0.35rem;
}

.lf-contractor-check input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
}

.lf-location-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.lf-location-toggle label {
  flex: 1;
  text-align: center;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--lf-border);
  cursor: pointer;
  color: var(--lf-muted);
}

.lf-location-toggle input {
  display: none;
}

.lf-location-toggle input:checked + span,
.lf-location-toggle label:has(input:checked) {
  background: rgba(212, 175, 55, 0.15);
  color: var(--lf-gold);
  border-color: var(--lf-gold);
}

.lf-table-wrap {
  overflow-x: auto;
}

@media (min-width: 768px) {
  .lf-hide-desktop {
    display: none;
  }
}

@media (max-width: 767px) {
  .lf-hide-mobile {
    display: none;
  }
}

.lf-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.lf-icon-btn {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--lf-border);
  background: var(--lf-card-2);
  color: var(--lf-gold);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.lf-icon-btn:hover {
  border-color: var(--lf-gold);
}

.lf-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lf-tab {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--lf-border);
  color: var(--lf-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.lf-tab.is-active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--lf-gold);
  border-color: var(--lf-gold);
}

.lf-user-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lf-user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-user-row:last-child {
  border-bottom: none;
}

.lf-hidden {
  display: none !important;
}

.lf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  padding-bottom: calc(var(--lf-nav-h) + 1rem);
}

.lf-modal-backdrop.is-open {
  display: flex;
}

@media (min-width: 640px) {
  .lf-modal-backdrop {
    align-items: center;
    padding-bottom: 1rem;
  }
}

.lf-modal {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow: auto;
  background: var(--lf-card);
  border: 1px solid var(--lf-border);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.lf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lf-modal-title {
  margin: 0;
  font-size: 1.1rem;
}

.lf-modal-close {
  background: transparent;
  border: none;
  color: var(--lf-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.lf-modal-body {
  padding: 1rem;
}

.lf-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0 1rem 1rem;
}

/* Add job form */
.lf-form-card .lf-input,
.lf-form-card .lf-textarea {
  margin-bottom: 0.75rem;
}

.lf-ref-priority-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.lf-ref-field {
  flex: 0 1 55%;
  max-width: 14rem;
  min-width: 0;
}

.lf-input-compact {
  min-height: 40px;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.lf-priority-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.35rem auto;
  padding: 0.45rem 0;
  color: var(--lf-muted);
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.lf-priority-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--lf-gold);
}

.lf-form-label-section {
  margin-top: 0.5rem;
}

.lf-file-upload-wrap {
  text-align: center;
  margin: 0.5rem 0 1rem;
}

.lf-file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.lf-file-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
  border-radius: 12px;
  border: 1px dashed var(--lf-border);
  background: var(--lf-card-2);
  color: var(--lf-gold);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.lf-file-upload-btn:hover {
  border-color: var(--lf-gold);
  background: rgba(212, 175, 55, 0.08);
}

.lf-file-upload-btn.has-files {
  border-style: solid;
  color: var(--lf-text);
}

.lf-file-upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.15);
  font-size: 1rem;
  line-height: 1;
}

.lf-contractor-switch-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lf-contractor-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--lf-card-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  min-height: 3.25rem;
}

.lf-contractor-switch-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--lf-text);
  cursor: pointer;
  margin: 0;
}

.lf-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 3.25rem;
  height: 1.85rem;
  cursor: pointer;
}

.lf-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.lf-switch-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}

.lf-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
}

.lf-switch-input:checked + .lf-switch-track {
  background: var(--lf-gold);
  border-color: rgba(212, 175, 55, 0.65);
}

.lf-switch-input:checked + .lf-switch-track::after {
  transform: translateX(1.4rem);
}

.lf-switch-input:focus-visible + .lf-switch-track {
  outline: 2px solid var(--lf-gold);
  outline-offset: 2px;
}
