/* ============================================================
   SOLR SWEEP — Design System v1.0
   Theme: Sky Blue · White · Clean Gray
   ============================================================ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:         #0EA5E9;
  --primary-dark:    #0284C7;
  --primary-darker:  #0369A1;
  --primary-light:   #E0F2FE;
  --primary-lighter: #F0F9FF;

  /* Sidebar */
  --sidebar-bg:      #0F172A;
  --sidebar-hover:   #1E293B;
  --sidebar-active:  rgba(14, 165, 233, 0.12);
  --sidebar-w:       240px;
  --topbar-h:        60px;

  /* Grays */
  --bg:        #F8FAFC;
  --white:     #FFFFFF;
  --gray-50:   #F8FAFC;
  --gray-100:  #F1F5F9;
  --gray-200:  #E2E8F0;
  --gray-300:  #CBD5E1;
  --gray-400:  #94A3B8;
  --gray-500:  #64748B;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1E293B;
  --gray-900:  #0F172A;

  /* Semantic */
  --success:        #22C55E;
  --success-dark:   #16A34A;
  --success-light:  #DCFCE7;
  --warning:        #F59E0B;
  --warning-light:  #FEF9C3;
  --danger:         #EF4444;
  --danger-dark:    #DC2626;
  --danger-light:   #FEE2E2;
  --info:           #06B6D4;
  --info-light:     #CFFAFE;
  --whatsapp:       #25D366;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);

  /* Misc */
  --radius:    8px;
  --radius-lg: 12px;
  --transition: 0.15s ease;
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ── APP SHELL ──────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-content {
  padding: 24px;
  flex: 1;
}

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  transition: transform var(--transition);
}

.sidebar::-webkit-scrollbar { width: 0; }

/* Logo */
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.logo-text { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; }
.logo-sub  { color: var(--gray-400); font-size: 10px; margin-top: 1px; letter-spacing: 0.02em; }

/* Nav */
.sidebar-nav { flex: 1; padding: 8px 0 12px; }

.nav-section {
  padding: 12px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  color: var(--gray-300);
  font-size: 13px;
  font-weight: 400;
  transition: background var(--transition), color var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
}

.nav-item:hover { background: var(--sidebar-hover); color: #fff; }

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--primary);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.65;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

/* Sidebar footer */
.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name { color: #fff; font-size: 13px; font-weight: 500; line-height: 1.3; }
.user-role { color: var(--gray-400); font-size: 11px; text-transform: capitalize; }

.logout-link {
  margin-left: auto;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.logout-link:hover { color: var(--danger); }

/* ── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}

.topbar-title   { font-size: 16px; font-weight: 700; color: var(--gray-900); flex: 1; }
.topbar-date    { font-size: 12px; color: var(--gray-400); }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  padding: 4px;
}

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header-left h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

.page-header-left p {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.stat-icon.blue   { background: var(--primary-light); }
.stat-icon.green  { background: var(--success-light); }
.stat-icon.amber  { background: var(--warning-light); }
.stat-icon.red    { background: var(--danger-light); }
.stat-icon.cyan   { background: var(--info-light); }

.stat-value { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 3px; }

/* ── TABLES ──────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; }

thead th {
  background: var(--gray-50);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-700);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

.td-strong { font-weight: 600; color: var(--gray-900); }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue    { background: var(--primary-light);  color: var(--primary-darker); }
.badge-green   { background: var(--success-light);  color: #15803D; }
.badge-amber   { background: var(--warning-light);  color: #92400E; }
.badge-red     { background: var(--danger-light);   color: #B91C1C; }
.badge-gray    { background: var(--gray-100);       color: var(--gray-600); }
.badge-cyan    { background: var(--info-light);     color: #0E7490; }
.badge-purple  { background: #EDE9FE;               color: #5B21B6; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group   { margin-bottom: 16px; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-label span { color: var(--danger); margin-left: 2px; }

.form-control, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.15);
}

.form-control::placeholder { color: var(--gray-400); }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary   { background: var(--primary);  color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }

.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }

.btn-success   { background: var(--success);  color: #fff; }
.btn-success:hover { background: var(--success-dark); color: #fff; }

.btn-danger    { background: var(--danger);   color: #fff; }
.btn-danger:hover { background: var(--danger-dark); color: #fff; }

.btn-whatsapp  { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1EBE5D; color: #fff; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-sm  { padding: 5px 11px; font-size: 12px; gap: 4px; }
.btn-lg  { padding: 12px 22px; font-size: 14px; }
.btn-icon { padding: 7px; border-radius: var(--radius); }

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.alert-success { background: var(--success-light); color: #15803D; border: 1px solid #86EFAC; }
.alert-danger  { background: var(--danger-light);  color: #B91C1C; border: 1px solid #FCA5A5; }
.alert-warning { background: var(--warning-light); color: #92400E; border: 1px solid #FCD34D; }
.alert-info    { background: var(--info-light);    color: #0E7490; border: 1px solid #67E8F9; }

/* ── LAYOUT GRID ─────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }

/* ── UTILITY ─────────────────────────────────────────────────── */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-wrap   { flex-wrap: wrap; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-sm     { font-size: 12px; }
.text-muted  { color: var(--gray-500); }
.text-primary{ color: var(--primary); }
.text-success{ color: var(--success-dark); }
.text-danger { color: #B91C1C; }
.text-bold   { font-weight: 700; }
.text-medium { font-weight: 600; }
.w-100       { width: 100%; }

/* ── DIVIDER ─────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 16px 0;
}

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 16px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  background: var(--white);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── SEARCH BAR ──────────────────────────────────────────────── */
.search-bar {
  position: relative;
  display: inline-block;
}

.search-bar input {
  padding-left: 34px;
  width: 240px;
}

.search-bar svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  width: 16px;
  height: 16px;
}

/* ── STATUS DOT ──────────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.dot-green  { background: var(--success); }
.dot-amber  { background: var(--warning); }
.dot-red    { background: var(--danger); }
.dot-gray   { background: var(--gray-400); }
.dot-blue   { background: var(--primary); }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}

.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── LOGIN PAGE ──────────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  background: linear-gradient(150deg, #F0F9FF 0%, #E0F2FE 40%, #F8FAFC 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(14,165,233,0.1), 0 4px 16px rgba(0,0,0,0.06);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-icon {
  width: 68px;
  height: 68px;
  background: var(--primary-light);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 34px;
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.login-logo p { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* ── MOBILE CLEANER CARDS ────────────────────────────────────── */
.job-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
  transition: box-shadow var(--transition);
}

.job-card.completed { border-left: 4px solid var(--success); }
.job-card.in_progress { border-left: 4px solid var(--primary); }

.job-seq {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
}

.job-client { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.job-address { font-size: 12px; color: var(--gray-500); margin-bottom: 10px; }
.job-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

.job-actions { display: flex; gap: 8px; }
.job-actions .btn { flex: 1; }

/* Photo upload zone */
.photo-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--gray-50);
}

.photo-zone:hover { border-color: var(--primary); background: var(--primary-lighter); }
.photo-zone img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 6px; }

/* ── MOBILE OVERLAY ──────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 199;
}

/* ── SCROLLBAR ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-300); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; }
  .search-bar input { width: 180px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
}

/* ── PRINT ───────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .btn, .page-header .btn { display: none !important; }
  .main-content { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}



/* ============================================================
   SOLAR SWEEP — LOGO STYLES
   Append this to the BOTTOM of your existing assets/css/style.css
   ============================================================ */

/* Sidebar logo area — now holds an image instead of the emoji block */
.sidebar-logo {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
}
.sidebar-logo img {
  height: 38px;
  width: auto;
  display: block;
}
.sidebar-logo a { display: block; line-height: 0; }

/* Login page logo */
.login-logo img {
  max-width: 190px;
  height: auto;
  margin: 0 auto 18px;
  display: block;
}

/* Mobile portal header logo (washer app) */
.mobile-topbar .brand-logo,
.mobile-header .brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

/* Invoice / print header logo */
.invoice-logo {
  height: 52px;
  width: auto;
  display: block;
  margin-bottom: 8px;
}

/* Client rating page logo */
.rate-logo {
  max-width: 150px;
  height: auto;
  margin: 0 auto 14px;
  display: block;
}

/* Make sure logos never get inverted or dimmed when printing */
@media print {
  .invoice-logo { filter: none !important; opacity: 1 !important; }
}



/* ============================================================
   SOLAR SWEEP — SCHEDULING CARD STYLES  (v3, expandable)
   Append to the BOTTOM of assets/css/style.css
   ============================================================ */

.wash-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow .15s;
}
.wash-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* Header — always visible, clickable */
.wash-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 13px 15px; cursor: pointer; user-select: none;
}
.wash-head:hover { background: var(--gray-50); }
.wash-head-main { min-width: 0; flex: 1; }

.wash-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wash-client { font-weight: 700; font-size: 15px; color: var(--gray-900); }

.wash-sub {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--gray-500); margin-top: 4px;
}

.wash-head-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.wash-chevron { color: var(--gray-400); font-size: 15px; transition: transform .2s; }
.wash-card.open .wash-chevron { transform: rotate(180deg); }

/* Quick-assign bar — one tap per washer */
.wash-assign-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 9px 15px; background: var(--warning-light);
  border-top: 1px solid rgba(0,0,0,.04);
}
.assign-label { font-size: 12px; font-weight: 700; color: #92400E; margin-right: 2px; }
.assign-chip {
  background: var(--white); border: 1px solid var(--warning);
  color: #92400E; border-radius: 20px; padding: 4px 12px;
  font-size: 12px; font-weight: 600; cursor: pointer; transition: all .12s;
}
.assign-chip:hover { background: var(--warning); color: var(--white); }

/* Expandable body — hidden by default */
.wash-body { display: none; padding: 14px 15px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.wash-card.open .wash-body { display: block; }

.wash-info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.info-label {
  font-size: 10px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px;
}
.info-value { font-size: 13px; color: var(--gray-800); }

.wash-photos { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wash-photos img {
  width: 130px; height: 96px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--gray-200); cursor: pointer;
}

.wash-rating { margin-bottom: 14px; }
.wash-rating .stars { font-size: 17px; color: var(--warning); }
.wash-rating .stars .dim { color: var(--gray-300); }
.rating-comment {
  background: var(--white); border-radius: 8px; padding: 9px 11px;
  margin-top: 7px; font-size: 13px; font-style: italic; color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.wash-alert {
  padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px;
}
.wash-alert.danger { background: var(--danger-light); color: #B91C1C; }

.wash-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wash-actions .inline-form { display: inline; }
.danger-outline { color: var(--danger) !important; border-color: var(--danger) !important; }

.mini-select {
  padding: 5px 9px; font-size: 12px; border: 1px solid var(--gray-300);
  border-radius: 7px; background: var(--white); color: var(--gray-700); cursor: pointer;
}

/* Simple modal */
.ss-modal {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.5); align-items: center; justify-content: center; padding: 20px;
}
.ss-modal-box { background: var(--white); border-radius: 12px; padding: 20px; max-width: 400px; width: 100%; }
.ss-modal-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; color: var(--gray-900); }

/* Day grouping header on the board */
.day-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 10px 0 8px; border-bottom: 2px solid var(--gray-100); margin-bottom: 12px;
}

@media (max-width: 640px) {
  .wash-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .wash-head-right { justify-content: flex-start; }
  .wash-photos img { width: 100px; height: 76px; }
}

/* ============================================================
   COMMAND BOARD ADDITIONS (v4)
   ============================================================ */

/* ── Washer load rail ─────────────────────────────────────── */
.load-rail { margin-bottom: 16px; }
.load-rail-title {
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.load-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.load-card {
  flex: 0 0 auto; min-width: 132px; background: var(--white);
  border: 1px solid var(--gray-200); border-radius: 10px;
  padding: 11px 13px; text-decoration: none; transition: all .15s;
}
.load-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(14,165,233,.12); }
.load-card.active { border-color: var(--primary); background: var(--primary-lighter); }
.load-card.idle  { opacity: .72; }
.load-card.heavy { border-color: var(--warning); }
.load-name  { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.load-count { font-size: 21px; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.load-count span { font-size: 11px; font-weight: 600; color: var(--gray-400); margin-left: 4px; }
.load-bar { height: 4px; background: var(--gray-100); border-radius: 3px; margin: 7px 0 5px; overflow: hidden; }
.load-bar span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.load-card.heavy .load-bar span { background: var(--warning); }
.load-meta { font-size: 10px; color: var(--gray-400); }

/* ── Unassigned zone ──────────────────────────────────────── */
.unassigned-zone {
  background: #FFFBEB; border: 1px solid #FDE68A;
  border-radius: 12px; padding: 14px; margin-bottom: 20px;
}
.zone-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.zone-title { font-size: 14px; font-weight: 800; color: #92400E; display: block; }
.zone-sub   { font-size: 12px; color: #B45309; }

.area-block { margin-bottom: 14px; }
.area-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0 9px;
}
.area-name { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.area-bulk { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-left: auto; }
.bulk-label { font-size: 11px; color: #92400E; font-weight: 600; }
.bulk-chip {
  background: #92400E; border: none; color: #fff; border-radius: 20px;
  padding: 5px 13px; font-size: 12px; font-weight: 600; cursor: pointer; transition: opacity .12s;
}
.bulk-chip:hover { opacity: .85; }
.bulk-chip.light { background: var(--white); color: var(--gray-800); border: 1px solid var(--gray-300); }
.bulk-chip.light:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Suggested washer chip ────────────────────────────────── */
.assign-chip.suggested {
  background: var(--success); border-color: var(--success); color: #fff;
}
.assign-chip.suggested:hover { background: var(--success-dark); }

/* ── Select mode ──────────────────────────────────────────── */
.wash-check-wrap { display: none; padding-right: 4px; }
body.select-mode .wash-check-wrap { display: block; }
body.select-mode .wash-head { cursor: default; }
.wash-check { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ── Floating bulk bar ────────────────────────────────────── */
.bulk-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%);
  background: var(--gray-900); color: #fff; border-radius: 40px;
  padding: 10px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.3); z-index: 300;
  transition: transform .22s cubic-bezier(.2,.8,.3,1); flex-wrap: wrap;
  max-width: calc(100vw - 32px);
}
.bulk-bar.show { transform: translate(-50%, 0); }
.bulk-count { font-size: 13px; font-weight: 700; white-space: nowrap; }
.bulk-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .area-bulk { margin-left: 0; width: 100%; }
  .bulk-bar { border-radius: 14px; left: 12px; right: 12px; transform: translateY(140%); max-width: none; }
  .bulk-bar.show { transform: translateY(0); }
  .load-card { min-width: 116px; }
}


/* ============================================================
   SOLAR SWEEP — CLIENT HEALTH (RAG) STYLES  — Step 1
   Append to the BOTTOM of assets/css/style.css
   ============================================================ */

/* Red / Yellow / Green dot in the clients table */
.rag-dot {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}
.rag-dot.green  { background: #22C55E; }
.rag-dot.yellow { background: #F59E0B; }
.rag-dot.red    { background: #EF4444; animation: ragPulse 2s ease-in-out infinite; }

@keyframes ragPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(239,68,68,.18); }
  50%     { box-shadow: 0 0 0 6px rgba(239,68,68,.06); }
}

/* Filter chips above the table */
.rag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 20px;
  border: 1px solid var(--gray-300); background: var(--white);
  font-size: 12px; font-weight: 600; color: var(--gray-700);
  text-decoration: none; transition: all .12s;
}
.rag-chip:hover  { border-color: var(--primary); color: var(--primary-dark); }
.rag-chip.active { background: var(--gray-900); color: #fff; border-color: var(--gray-900); }
.rag-chip b { font-weight: 800; }
.rag-chip.green.active  { background: #15803D; border-color: #15803D; }
.rag-chip.yellow.active { background: #B45309; border-color: #B45309; }
.rag-chip.red.active    { background: #B91C1C; border-color: #B91C1C; }

/* Client ID pill */
.client-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; font-weight: 700;
  background: var(--gray-100); color: var(--gray-700);
  padding: 3px 8px; border-radius: 5px; white-space: nowrap;
}

/* Whole row is clickable */
tr.row-link { cursor: pointer; }
tr.row-link:hover { background: var(--primary-lighter); }

/* Search bar wrapper used on the clients page */
.search-bar { position: relative; }
.search-bar svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--gray-400); pointer-events: none;
}
.search-bar .form-control { padding-left: 32px; width: 240px; }



/* ============================================================
   SOLAR SWEEP — DASHBOARD OPS STRIP + CALENDAR  (Step 2)
   Append to the BOTTOM of assets/css/style.css
   ============================================================ */

/* ── Month operations strip ───────────────────────────────── */
.ops-strip { margin-bottom: 20px; }
.ops-strip-title {
  font-size: 11px; font-weight: 700; color: var(--gray-500);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 9px;
}
.ops-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px;
}
.ops-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: 11px; padding: 14px; display: flex; gap: 12px; align-items: center;
}
.ops-card.highlight { border-color: var(--info); background: linear-gradient(135deg,#F0FDFF,#fff); }
.ops-card.danger    { border-left: 3px solid var(--danger); }
.ops-card.warn      { border-left: 3px solid #7C3AED; }
.ops-icon {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.ops-value { font-size: 24px; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.ops-value .unit { font-size: 12px; font-weight: 700; color: var(--gray-400); margin-left: 4px; }
.ops-label { font-size: 12px; color: var(--gray-600); margin-top: 2px; }
.ops-meta  { font-size: 11px; color: var(--gray-400); margin-top: 3px; }

/* ── Calendar ─────────────────────────────────────────────── */
.cal-legend {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  font-size: 11px; color: var(--gray-500); margin-bottom: 10px;
}
.cal-legend .dot, .cal-dots .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px;
}
.dot.done   { background: #22C55E; }
.dot.sched  { background: #94A3B8; }
.dot.cancel { background: #EF4444; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
}
.cal-dayname {
  text-align: center; font-size: 10px; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .05em; padding-bottom: 4px;
}
.cal-cell {
  aspect-ratio: 1 / 1; min-height: 58px;
  border: 1px solid var(--gray-200); border-radius: 9px;
  padding: 6px; position: relative; background: var(--white);
  display: flex; flex-direction: column; transition: all .12s;
}
.cal-cell.empty { border: none; background: transparent; }
.cal-cell.has-jobs { cursor: pointer; }
.cal-cell.has-jobs:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(14,165,233,.14); }
.cal-cell.today { border-color: var(--primary); background: var(--primary-lighter); }
.cal-cell.selected { border-color: var(--primary); border-width: 2px; background: var(--primary-light); }
.cal-num { font-size: 12px; font-weight: 700; color: var(--gray-700); }
.cal-cell.today .cal-num { color: var(--primary-dark); }
.cal-count {
  font-size: 19px; font-weight: 800; color: var(--primary-dark);
  line-height: 1; margin-top: auto;
}
.cal-dots { display: flex; gap: 3px; margin-top: 4px; }

/* ── Day detail panel ─────────────────────────────────────── */
.day-panel {
  display: none; margin-top: 16px; padding-top: 16px;
  border-top: 2px solid var(--gray-100);
}
.day-panel.open { display: block; }
.day-panel-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
}
.day-panel-date { font-size: 15px; font-weight: 800; color: var(--gray-900); }
.day-panel-sub  { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.dp-row {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 12px; border: 1px solid var(--gray-200); border-radius: 9px;
  margin-bottom: 8px; text-decoration: none; transition: all .12s;
  border-left-width: 4px;
}
.dp-row:hover { background: var(--gray-50); border-color: var(--primary); }
.dp-row.completed { border-left-color: #22C55E; }
.dp-row.scheduled { border-left-color: #CBD5E1; }
.dp-row.cancelled { border-left-color: #EF4444; opacity: .72; }
.dp-row.in_progress { border-left-color: #0EA5E9; }

.dp-time {
  flex: 0 0 76px; font-size: 12px; font-weight: 700; color: var(--gray-700);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.dp-main { flex: 1; min-width: 0; }
.dp-client { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.dp-meta   { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.dp-reason { font-size: 11px; color: #B91C1C; margin-top: 3px; }
.dp-right  { text-align: right; flex: 0 0 auto; }
.dp-cleaner{ font-size: 11px; color: var(--gray-500); margin-top: 4px; }
.dp-empty  { padding: 22px; text-align: center; color: var(--gray-400); font-size: 13px; }

@media (max-width: 640px) {
  .cal-cell { min-height: 46px; padding: 4px; }
  .cal-count { font-size: 15px; }
  .cal-num { font-size: 10px; }
  .dp-row { flex-wrap: wrap; }
  .dp-time { flex-basis: 100%; }
  .dp-right { text-align: left; }
}


/* ============================================================
   SOLAR SWEEP — STEP 3 STYLES
   Time slabs · Invoice modes · Wash picker
   Append to the BOTTOM of assets/css/style.css
   ============================================================ */

/* ── Time slab picker ─────────────────────────────────────── */
.slab-picker {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px;
}
.slab-option {
  border: 2px solid var(--gray-200); border-radius: 10px;
  padding: 12px 10px; cursor: pointer; text-align: center; transition: all .13s;
  display: block; background: var(--white);
}
.slab-option input { display: none; }
.slab-option:hover { border-color: var(--primary); }
.slab-option.selected { border-color: var(--primary); background: var(--primary-lighter); }
.slab-key {
  display: block; font-size: 15px; font-weight: 800; color: var(--gray-900);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.slab-option.selected .slab-key { color: var(--primary-dark); }
.slab-label { display: block; font-size: 10.5px; color: var(--gray-500); margin-top: 3px; }

/* ── Invoice mode picker ──────────────────────────────────── */
.mode-picker {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px; margin-bottom: 20px;
}
.mode-card {
  border: 2px solid var(--gray-200); border-radius: 11px; padding: 14px;
  text-decoration: none; background: var(--white); transition: all .13s; display: block;
}
.mode-card:hover { border-color: var(--primary); }
.mode-card.active { border-color: var(--primary); background: var(--primary-lighter); }
.mode-card i { font-size: 20px; color: var(--primary); }
.mode-name { font-size: 13.5px; font-weight: 700; color: var(--gray-900); margin-top: 6px; }
.mode-hint { font-size: 11px; color: var(--gray-500); margin-top: 2px; line-height: 1.35; }

/* ── Wash picker ──────────────────────────────────────────── */
.wash-picker { max-height: 460px; overflow-y: auto; padding-right: 4px; }
.wp-group { margin-bottom: 14px; }
.wp-group-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0; border-bottom: 1px solid var(--gray-100); margin-bottom: 6px;
}
.wp-client { font-size: 13px; font-weight: 700; color: var(--gray-900); }
.wp-all { margin-left: auto; }

.wp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--gray-200); border-radius: 8px;
  margin-bottom: 5px; cursor: pointer; font-size: 12.5px; transition: all .1s;
}
.wp-row:hover  { background: var(--gray-50); }
.wp-row.picked { border-color: var(--primary); background: var(--primary-lighter); }
.wp-check { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex: 0 0 auto; }
.wp-date  { font-weight: 700; color: var(--gray-800); flex: 0 0 88px; }
.wp-job   { font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--gray-400); flex: 0 0 96px; }
.wp-area  { color: var(--gray-500); flex: 1; min-width: 0; }
.wp-price { flex: 0 0 96px; }
.wp-price-input {
  width: 100%; padding: 4px 7px; font-size: 12px; text-align: right;
  border: 1px solid var(--gray-300); border-radius: 6px;
}

/* ── Invoice totals box ───────────────────────────────────── */
.inv-total-box {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 14px;
}
.inv-total-box > div { padding: 5px 0; font-size: 13px; color: var(--gray-600); }
.inv-total-box b { color: var(--gray-900); }
.inv-grand {
  border-top: 2px solid var(--primary-light); margin-top: 6px; padding-top: 10px !important;
  font-size: 15px !important; font-weight: 700; color: var(--gray-900) !important;
}
.inv-grand b { color: var(--primary-dark); font-size: 18px; }

@media (max-width: 640px) {
  .wp-row { flex-wrap: wrap; }
  .wp-job, .wp-area { flex-basis: auto; }
  .wp-price { flex-basis: 100%; }
}