/* ═══════════════════════════════════════════════════════════════
   AllInOne CRM — black & white edition overrides.
   Loaded AFTER all other CSS so these win.
   ═══════════════════════════════════════════════════════════════ */

:root,
[data-theme="dark"],
[data-theme="light"] {
  --color-primary:        #000;
  --color-primary-dark:   #000;
  --color-primary-light:  #333;
  --color-primary-glow:   rgba(0,0,0,0.15);
  --color-accent:         #000;
}

/* Light theme = white surface, black accents */
:root,
[data-theme="light"] {
  --color-bg:             #fff;
  --color-surface:        #fff;
  --color-surface-2:      #f5f5f5;
  --color-surface-3:      #ebebeb;
  --color-surface-raised: #fafafa;
  --color-text:           #000;
  --color-text-muted:     #666;
  --color-border:         #e5e5e5;
  --color-border-2:       #d4d4d4;
}

/* Dark theme = pure black surface, white text */
[data-theme="dark"] {
  --color-bg:             #000;
  --color-surface:        #0a0a0a;
  --color-surface-2:      #141414;
  --color-surface-3:      #1f1f1f;
  --color-surface-raised: #1a1a1a;
  --color-text:           #fff;
  --color-text-muted:     #999;
  --color-border:         #262626;
  --color-border-2:       #333;
  --color-primary:        #fff;
  --color-primary-dark:   #e5e5e5;
}

/* Login + auth: keep mono */
.auth-container,
.login-container,
.app-shell { background: #000 !important; }

/* App shell spinner: white on black */
#app-shell { background: #000 !important; }
#app-shell > div { border-top-color: #fff !important; border-color: #333 !important; }

/* PDF/CTA buttons: keep mono */
.btn-primary {
  background: #000 !important;
  color: #fff !important;
}
.btn-primary:hover {
  background: #1a1a1a !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}
.btn-pdf {
  background: linear-gradient(135deg, #000 0%, #333 100%) !important;
  color: #fff !important;
}

/* Big-number cards: B&W gradient bars */
.bal-big-sales::before,
.bal-big-tech::before,
.bal-big-parts::before,
.bal-big-company::before { background: linear-gradient(90deg, #000, #555) !important; }
.bal-big-company .bal-big-value { color: #000 !important; }
.bal-big-tech    .bal-big-value { color: #000 !important; }
.bal-big-parts   .bal-big-value { color: #000 !important; }
[data-theme="dark"] .bal-big-company .bal-big-value,
[data-theme="dark"] .bal-big-tech    .bal-big-value,
[data-theme="dark"] .bal-big-parts   .bal-big-value { color: #fff !important; }

/* Hide dispatcher-only UI in AllInOne (admin + tech only) */
#dispatcher-permissions-modal,
.allinone-hide { display: none !important; }

/* Jobs by Company list on home dashboard */
.jbc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.jbc-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s ease;
}
.jbc-row:active { transform: scale(0.99); background: var(--color-surface-2); }
.jbc-name { font-size: 15px; font-weight: 700; color: var(--color-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.jbc-stats { display: flex; gap: 8px; font-size: 11px; font-weight: 600; }
.jbc-count { color: var(--color-text-muted); }
.jbc-paid  { color: #16a34a; }
.jbc-lost  { color: #dc2626; }
.jbc-rev   { font-size: 14px; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; }

/* Hide "Create User" / invite admin-users-section. AllInOne admins sign up via Supabase Auth directly. Techs are data-only entries in Settings → Technicians (no login). */
#admin-users-section,
#invite-modal,
#sign-up-link { display: none !important; }

/* Push notifications: VAPID + edge function not deployed for AllInOne edition.
   Hide all notification UI so users don't see broken "Enable Notifications" buttons. */
#settings-notifications-card,
#push-permission-banner,
#iphone-pwa-banner,
#push-enforce-modal,
[data-push-enforce] { display: none !important; }

/* Hide "My Info" / Tax Rates / Data Management / Sync from Settings — AllInOne edition keeps it minimal. */
#settings-myinfo-card,
#settings-tax-card,
#settings-data-card,
#settings-sync-card { display: none !important; }
