/* ═══════════════════════════════════════════════════════════════
   Ventshop — Temă caldă, plăcută pentru ochi
   ═══════════════════════════════════════════════════════════════ */
:root {
  --primary: #ea580c;
  --primary-light: #f97316;
  --primary-dark: #c2410c;
  --primary-soft: #fff7ed;
  --primary-muted: #ffedd5;
  --primary-ring: rgba(249, 115, 22, 0.18);

  --sidebar-bg: #1c1917;
  --sidebar-surface: #292524;
  --sidebar-text: #d6d3d1;
  --sidebar-muted: #a8a29e;
  --sidebar-width: 268px;

  --surface: #ffffff;
  --surface-warm: #fffbf7;
  --bg: #f5f0eb;
  --bg-accent: #faf6f1;
  --border: #e7e0d8;
  --border-light: #f0ebe3;

  --text: #292524;
  --text-soft: #44403c;
  --text-muted: #78716c;

  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0891b2;
  --info-soft: #cffafe;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 4px 16px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 16px 40px rgba(28, 25, 23, 0.12);

  --transition: 0.18s ease;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* —— Bootstrap overrides —— */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  font-weight: 600;
  border-radius: var(--radius-xs);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}
.btn-outline-primary {
  color: var(--primary-dark);
  border-color: #fdba74;
  border-radius: var(--radius-xs);
  font-weight: 600;
}
.btn-outline-primary:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.btn-outline-secondary {
  border-color: var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  background: var(--surface);
}
.btn-outline-secondary:hover {
  background: var(--bg-accent);
  border-color: #d6d3d1;
  color: var(--text);
}
.form-control, .form-select {
  border-radius: var(--radius-xs);
  border-color: var(--border);
  padding: 0.5rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
.modal-content {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.badge.bg-primary { background: var(--primary) !important; }

/* —— Login —— */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(251, 146, 60, 0.12) 0%, transparent 50%),
    linear-gradient(145deg, #1c1917 0%, #292524 40%, #44403c 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background: var(--surface);
}

.login-card .login-header {
  background: var(--surface-warm);
  padding: 2.25rem 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.login-card .login-header .logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.35);
}

.login-card .login-header h2 { color: var(--text); font-weight: 700; }
.login-card form { padding: 0 2rem 2rem; background: var(--surface); }
.btn-login { padding: 0.65rem !important; font-size: 0.95rem; }

/* —— App shell —— */
#app { display: flex; min-height: 100vh; }

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-brand {
  padding: 1.35rem 1.5rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
}

.sidebar-brand i {
  font-size: 1.45rem;
  color: var(--primary-light);
  background: rgba(249, 115, 22, 0.15);
  padding: 0.4rem;
  border-radius: 10px;
}

.sidebar-nav { padding: 1rem 0.85rem; flex: 1; }

.sidebar-nav .nav-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sidebar-muted);
  padding: 0.85rem 0.75rem 0.35rem;
  font-weight: 700;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: var(--sidebar-text);
  border-radius: var(--radius-xs);
  margin-bottom: 3px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-link.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}

.sidebar-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; opacity: 0.9; }

.sidebar-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-user { font-size: 0.8rem; color: var(--sidebar-muted); margin-bottom: 0.65rem; }
.sidebar-user strong { color: #fafaf9; display: block; font-size: 0.9rem; margin-top: 0.15rem; }

.sidebar-footer .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.15);
  color: #d6d3d1;
  border-radius: var(--radius-xs);
  font-weight: 500;
}
.sidebar-footer .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.app-topbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.app-content { padding: 1.5rem 1.75rem 2.5rem; flex: 1; }

/* —— Page structure —— */
.page-header { margin-bottom: 1.5rem; }

.page-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-header .page-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.tab-section { display: none; animation: fadeIn 0.25s ease; }
.tab-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Cards & panels —— */
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-card .panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface-warm);
}

.panel-card .panel-header h5,
.panel-card .panel-header h6 {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.panel-card .panel-body { padding: 1.25rem; }

.form-section { margin-bottom: 1.5rem; }

.form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-muted);
}

/* —— Stats —— */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-card .stat-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.25rem; font-weight: 500; }
.stat-card .stat-value { font-size: 1.55rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

.stat-icon.primary { background: var(--primary-muted); color: var(--primary-dark); }
.stat-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-icon.success { background: var(--success-soft); color: var(--success); }
.stat-icon.info { background: var(--info-soft); color: var(--info); }

/* —— Calendar —— */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-accent);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.calendar-day:hover { background: var(--primary-muted); border-color: #fed7aa; }
.calendar-day.today { border-color: var(--primary-light); font-weight: 700; background: var(--primary-soft); color: var(--primary-dark); }
.calendar-day.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}
.calendar-day.other-month { opacity: 0.35; }
.calendar-day .dots { display: flex; gap: 3px; margin-top: 3px; }

.dot { width: 5px; height: 5px; border-radius: 50%; }
.dot.pending { background: var(--warning); }
.dot.in_progress { background: var(--primary-light); }
.dot.completed { background: var(--success); }

.calendar-day.selected .dot.pending { background: #fde68a; }
.calendar-day.selected .dot.in_progress { background: #fff; opacity: 0.9; }
.calendar-day.selected .dot.completed { background: #bbf7d0; }

/* —— Schedule —— */
.schedule-item {
  padding: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  background: var(--surface-warm);
  transition: box-shadow var(--transition);
}

.schedule-item:hover { box-shadow: var(--shadow); }
.schedule-item:last-child { margin-bottom: 0; }

.schedule-item .schedule-time {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.85rem;
  background: var(--primary-muted);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

/* —— Tables —— */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-card .table { margin: 0; }

.table-card thead th {
  background: var(--surface-warm);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-light);
  padding: 0.9rem 1rem;
}

.table-card tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
}

.table-card tbody tr:last-child td { border-bottom: none; }
.table-card tbody tr:hover { background: var(--primary-soft); }

/* —— Filters —— */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  box-shadow: var(--shadow);
}

.filter-bar .filter-group label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: block;
}

.filter-bar .filter-group { min-width: 140px; flex: 1; }

/* —— Status badges —— */
.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.status-badge.pending { background: var(--warning-soft); color: #92400e; }
.status-badge.in_progress { background: var(--primary-muted); color: var(--primary-dark); }
.status-badge.completed { background: var(--success-soft); color: #166534; }
.status-badge.efectuat { background: var(--success-soft); color: #166534; }
.status-badge.amanat { background: var(--warning-soft); color: #92400e; }
.status-badge.refuz { background: var(--danger-soft); color: #991b1b; }

/* —— Todo tasks —— */
.todo-list { display: flex; flex-direction: column; gap: 0.5rem; }

.todo-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.todo-item.task-leaving { opacity: 0; transform: translateX(8px) scale(0.98); }
.todo-item.is-done { background: var(--bg-accent); }
.todo-item.efectuat { border-left: 3px solid var(--success); }
.todo-item.amanat { border-left: 3px solid var(--warning); }
.todo-item.refuz { border-left: 3px solid var(--danger); }

.todo-main { display: flex; gap: 0.75rem; flex: 1; min-width: 0; }

.todo-circle-btn { border: none; background: transparent; padding: 0; flex-shrink: 0; cursor: pointer; line-height: 0; }
.todo-circle { display: inline-flex; width: 28px; height: 28px; position: relative; }
.todo-circle-svg { width: 28px; height: 28px; }
.todo-circle-ring { fill: none; stroke: #d6d3d1; stroke-width: 2; transition: stroke 0.2s ease, stroke-dashoffset 0.4s ease; }
.todo-circle-check { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset 0.35s ease 0.1s; }

.todo-circle-btn:hover .todo-circle-ring,
.todo-circle.is-active .todo-circle-ring { stroke: var(--primary); stroke-width: 2.5; }
.todo-circle-btn:hover .todo-circle { transform: scale(1.08); transition: transform 0.2s ease; }
.todo-circle.is-active { filter: drop-shadow(0 0 6px var(--primary-ring)); }

.todo-circle.animating.status-efectuat .todo-circle-ring,
.todo-circle.done.status-efectuat .todo-circle-ring { fill: var(--success); stroke: var(--success); stroke-dasharray: none; }
.todo-circle.animating.status-efectuat .todo-circle-check,
.todo-circle.done.status-efectuat .todo-circle-check { stroke-dashoffset: 0; }
.todo-circle.pop-success { animation: circlePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.todo-circle.animating.status-amanat .todo-circle-ring,
.todo-circle.done.status-amanat .todo-circle-ring { fill: var(--warning); stroke: var(--warning); }
.todo-circle.animating.status-refuz .todo-circle-ring,
.todo-circle.done.status-refuz .todo-circle-ring { fill: var(--danger); stroke: var(--danger); }
.todo-circle-x, .todo-circle-pause { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }

@keyframes circlePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.todo-picker-float {
  position: absolute;
  z-index: 9000;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  min-width: 220px;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.todo-picker-float.show { opacity: 1; transform: translateY(0) scale(1); }
.todo-picker-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem; }
.todo-picker-btns { display: flex; flex-direction: column; gap: 0.35rem; }
.todo-picker-btn {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border-light); border-radius: var(--radius-xs);
  padding: 0.5rem 0.75rem; background: var(--surface);
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.todo-picker-btn:hover { transform: translateX(2px); }
.todo-picker-btn.efectuat { color: #166534; }
.todo-picker-btn.efectuat:hover { background: var(--success-soft); border-color: #86efac; }
.todo-picker-btn.amanat { color: #92400e; }
.todo-picker-btn.amanat:hover { background: var(--warning-soft); border-color: #fcd34d; }
.todo-picker-btn.refuz { color: #991b1b; }
.todo-picker-btn.refuz:hover { background: var(--danger-soft); border-color: #fca5a5; }

.todo-content { flex: 1; min-width: 0; }
.todo-text { font-weight: 600; margin-bottom: 0.25rem; word-break: break-word; color: var(--text); }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); }
.todo-time { background: var(--primary-muted); color: var(--primary-dark); padding: 0.1rem 0.45rem; border-radius: 6px; font-weight: 700; }
.todo-archived { font-size: 0.75rem; color: var(--text-muted); }
.todo-admin-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

.tasks-group-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--text); }

.task-stats-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.task-stat-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700;
  background: var(--bg-accent); color: var(--text-muted);
}
.task-stat-chip span { font-weight: 800; min-width: 1.2em; text-align: center; }
.task-stat-chip.pending { background: var(--warning-soft); color: #92400e; }
.task-stat-chip.efectuat { background: var(--success-soft); color: #166534; }
.task-stat-chip.amanat { background: var(--primary-muted); color: var(--primary-dark); }
.task-stat-chip.refuz { background: var(--danger-soft); color: #991b1b; }

.tasks-subnav { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tasks-subnav-btn {
  border: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: var(--radius-xs);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.tasks-subnav-btn:hover { border-color: #fdba74; color: var(--primary-dark); background: var(--primary-soft); }
.tasks-subnav-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

.history-filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.history-day-group { margin-bottom: 1.25rem; }
.history-day-group:last-child { margin-bottom: 0; }
.history-day-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem;
  padding-bottom: 0.35rem; border-bottom: 1px solid var(--border-light);
}
.history-day-count {
  margin-left: auto; font-size: 0.75rem; font-weight: 600;
  color: var(--primary-dark); background: var(--primary-muted);
  padding: 0.15rem 0.55rem; border-radius: 999px;
}

/* —— Live sync —— */
.live-indicator {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; font-weight: 700;
  color: var(--success); padding: 0.3rem 0.6rem;
  border-radius: 999px; background: var(--success-soft);
  border: 1px solid #a7f3d0;
}
.live-indicator.offline { color: var(--text-muted); background: var(--bg-accent); border-color: var(--border); }
.live-indicator.offline .live-dot { background: #a8a29e; animation: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: livePulse 2s ease-in-out infinite; }
.live-indicator.pulse .live-dot { animation: liveFlash 0.5s ease; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.85); } }
@keyframes liveFlash { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); } 50% { transform: scale(1.4); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); } 100% { transform: scale(1); } }

/* —— Status switcher —— */
.status-switcher { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.status-pill {
  border: 1px solid var(--border-light);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.status-pill.pending.active { background: var(--warning-soft); border-color: #fcd34d; color: #92400e; }
.status-pill.in_progress.active { background: var(--primary-muted); border-color: #fdba74; color: var(--primary-dark); }
.status-pill.completed.active { background: var(--success-soft); border-color: #86efac; color: #166534; }
.status-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow); }

.schedule-item { padding-bottom: 0.85rem; margin-bottom: 0.85rem; border-bottom: 1px solid var(--border-light); background: var(--surface); }
.schedule-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* —— Teams —— */
.teams-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.team-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.team-tag .btn-close { font-size: 0.55rem; }

/* —— Dashboard tabs —— */
.dashboard-tabs-wrap {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 1.5rem;
}
.dashboard-tabs-wrap .nav-tabs {
  border-bottom: 1px solid var(--border-light);
  padding: 0 1rem;
  background: var(--surface-warm);
}
.dashboard-tabs-wrap .nav-link {
  border: none; color: var(--text-muted);
  font-weight: 600; font-size: 0.875rem;
  padding: 0.9rem 1rem;
  transition: color var(--transition);
}
.dashboard-tabs-wrap .nav-link.active {
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary);
  background: transparent;
}
.dashboard-tabs-wrap .tab-content { padding: 1.25rem; }

/* —— Lucrări recente (dashboard) —— */
.recent-jobs-intro {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap;
}
.recent-jobs-eyebrow {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--primary-dark);
  background: var(--primary-muted); padding: 0.25rem 0.65rem; border-radius: 999px;
}
.recent-jobs-desc { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0 0; }
.btn-recent-all {
  border-radius: 10px; font-weight: 700; border-color: #fdba74; color: var(--primary-dark);
  background: var(--primary-soft);
}
.btn-recent-all:hover { background: var(--primary-muted); border-color: var(--primary); color: var(--primary-dark); }

.recent-jobs-summary {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.85rem;
  padding: 0.5rem 0.75rem; background: var(--surface-warm);
  border-radius: 10px; border: 1px solid var(--border-light);
}
.recent-jobs-summary strong { color: var(--text); }
.recent-jobs-summary-dot { opacity: 0.5; }

.recent-jobs-list { display: flex; flex-direction: column; gap: 0.65rem; }

.recent-job-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.85rem 0.85rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.recent-job-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--text-muted);
}
.recent-job-card.status-pending::before { background: #94a3b8; }
.recent-job-card.status-in_progress::before { background: #f59e0b; }
.recent-job-card.status-completed::before { background: #22c55e; }
.recent-job-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: #fdba74;
}

.recent-job-date {
  width: 52px; text-align: center; flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary-soft), var(--surface-warm));
  border: 1px solid #fed7aa; border-radius: 12px; padding: 0.4rem 0.25rem;
}
.recent-job-day { display: block; font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.recent-job-month { display: block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-top: 0.15rem; }

.recent-job-body { min-width: 0; }
.recent-job-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.recent-job-title { font-size: 0.92rem; font-weight: 700; margin: 0; line-height: 1.3; color: var(--text); }
.recent-job-meta {
  display: flex; flex-wrap: wrap; gap: 0.65rem;
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.35rem;
}
.recent-job-meta i { color: var(--primary); margin-right: 0.2rem; }
.recent-job-footer { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.recent-job-price { font-size: 0.82rem; font-weight: 800; color: var(--primary-dark); }
.recent-job-price i { margin-right: 0.2rem; color: var(--primary); }
.recent-job-time { font-size: 0.78rem; color: var(--text-muted); }
.recent-job-time i { margin-right: 0.15rem; }

.recent-job-status-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.recent-job-card.status-pending .recent-job-status-icon { background: #f1f5f9; color: #64748b; }
.recent-job-card.status-in_progress .recent-job-status-icon { background: #fef3c7; color: #d97706; }
.recent-job-card.status-completed .recent-job-status-icon { background: #dcfce7; color: #16a34a; }

.recent-job-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.btn-recent-view, .btn-recent-edit {
  width: 34px; height: 34px; padding: 0; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-recent-view { border: 1px solid var(--border-light); background: var(--surface-warm); color: var(--text-soft); }
.btn-recent-view:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.btn-recent-edit { border: 1px solid #fdba74; background: var(--primary-soft); color: var(--primary-dark); }
.btn-recent-edit:hover { background: var(--primary-muted); border-color: var(--primary); }

.recent-jobs-empty {
  text-align: center; padding: 2.5rem 1rem;
  background: linear-gradient(180deg, var(--primary-soft), var(--surface));
  border-radius: 14px; border: 1px dashed #fdba74;
}
.recent-jobs-empty-icon {
  width: 56px; height: 56px; margin: 0 auto 0.75rem;
  background: var(--primary-muted); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--primary);
}
.recent-jobs-empty p { font-weight: 700; color: var(--text); margin: 0; }

@media (max-width: 767px) {
  .recent-job-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .recent-job-status-icon { display: none; }
  .recent-job-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* —— Lists & empty —— */
.list-item-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 0; border-bottom: 1px solid var(--border-light);
}
.list-item-row:last-child { border-bottom: none; }

.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; opacity: 0.35; display: block; margin-bottom: 0.5rem; color: var(--primary-light); }

.btn-action {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs);
}

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.detail-item label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  font-weight: 700; display: block; margin-bottom: 0.2rem;
}
.detail-item span { font-weight: 600; color: var(--text); }

#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
}
#toast-container .alert { border-radius: var(--radius-sm); border: none; box-shadow: var(--shadow-md); font-weight: 500; }

/* ═══ CLIENȚI — design premium ═══ */
.clients-page { --clients-orange: var(--primary); --clients-orange-dark: var(--primary-dark); }

.clients-hero {
  background: linear-gradient(135deg, #9a3412 0%, var(--primary) 42%, #fb923c 100%);
  border-radius: 18px;
  padding: 1.65rem 1.85rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 12px 36px rgba(234, 88, 12, 0.28);
  position: relative;
  overflow: hidden;
}
.clients-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.clients-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; position: relative; z-index: 1; }
.clients-hero h1 { color: #fff; font-size: 1.55rem; margin: 0 0 0.3rem; font-weight: 700; letter-spacing: -0.02em; }
.clients-hero-sub { color: rgba(255, 255, 255, 0.92); margin: 0; font-size: 0.9rem; }

.btn-clients-add {
  background: #fff; color: var(--primary-dark); border: none;
  font-weight: 700; padding: 0.6rem 1.25rem; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12); transition: transform var(--transition), box-shadow var(--transition);
}
.btn-clients-add:hover { background: #fff; color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }

.clients-toolbar {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.35rem; flex-wrap: wrap;
  background: var(--surface); padding: 0.85rem 1rem; border-radius: 14px;
  border: 1px solid var(--border-light); box-shadow: var(--shadow);
}
.clients-search-wrap { flex: 1; min-width: 220px; position: relative; }
.clients-search-wrap i {
  position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%);
  color: var(--primary); pointer-events: none;
}
.clients-search-wrap input {
  padding-left: 2.5rem; border-radius: 12px;
  border: 1px solid #fed7aa; background: var(--surface-warm);
  height: 42px;
}
.clients-search-wrap input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: #fff; }

.clients-count-badge {
  background: linear-gradient(135deg, var(--primary-muted), #ffedd5);
  color: var(--primary-dark);
  font-size: 0.8rem; font-weight: 700;
  padding: 0.45rem 0.95rem; border-radius: 999px;
  border: 1px solid #fdba74;
}

.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.1rem; }

.clients-empty {
  grid-column: 1 / -1; text-align: center; padding: 3.5rem 1.5rem;
  color: var(--text-muted); background: linear-gradient(180deg, var(--primary-soft), var(--surface));
  border-radius: 18px; border: 1px dashed #fdba74;
}
.clients-empty-icon {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  background: var(--primary-muted); border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: var(--primary);
}
.clients-empty p { font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }

.client-card {
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--border-light); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden; position: relative;
}
.client-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(28, 25, 23, 0.1); border-color: #fdba74; }
.client-card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--info), #22d3ee);
}
.client-card.is-pj .client-card-accent { background: linear-gradient(90deg, var(--primary-dark), var(--primary-light)); }

.client-card-top { display: flex; gap: 0.9rem; padding: 1.1rem 1.1rem 0.65rem; align-items: flex-start; }
.client-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.06);
}
.client-card.is-pf .client-avatar { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0e7490; }
.client-card.is-pj .client-avatar { background: linear-gradient(135deg, #ffedd5, #fed7aa); color: var(--primary-dark); }

.client-card-head { min-width: 0; flex: 1; }
.client-type-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem; border-radius: 999px; margin-bottom: 0.3rem;
}
.client-card.is-pf .client-type-badge { background: var(--info-soft); color: #0e7490; }
.client-card.is-pj .client-type-badge { background: var(--primary-muted); color: var(--primary-dark); }

.client-name { font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.35; word-break: break-word; color: var(--text); }
.client-forma { font-size: 0.75rem; color: var(--primary); font-weight: 700; margin-top: 0.15rem; }
.client-director {
  font-size: 0.78rem; color: var(--text-soft); margin-top: 0.35rem;
  display: flex; align-items: center; gap: 0.35rem;
}
.client-director i { color: var(--primary); }

.client-card-stats {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0 1.1rem 0.65rem;
}
.client-card-stats-empty {
  padding: 0 1.1rem 0.65rem;
  font-size: 0.78rem; color: var(--text-muted);
}
.client-card-stats-empty i { color: var(--primary); margin-right: 0.25rem; }
.client-stat-pill {
  font-size: 0.72rem; font-weight: 700; padding: 0.22rem 0.55rem;
  border-radius: 999px; background: var(--surface-warm); color: var(--text-soft);
  border: 1px solid var(--border-light);
}
.client-stat-pill i { margin-right: 0.2rem; color: var(--primary); }
.client-stat-pill.success { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.client-stat-pill.success i { color: #16a34a; }
.client-stat-pill.money { background: var(--primary-soft); color: var(--primary-dark); border-color: #fed7aa; }

.client-card-body { padding: 0.35rem 1.1rem 0.85rem; flex: 1; }
.client-info-row {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-size: 0.84rem; color: var(--text-soft); margin-bottom: 0.45rem;
}
.client-info-icon {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}
.client-info-text { word-break: break-word; }
.client-info-row.note { color: var(--text-muted); font-style: italic; }

.client-card-actions {
  display: flex; gap: 0.45rem; padding: 0.85rem 1.1rem 1.1rem;
  border-top: 1px solid var(--border-light);
  background: linear-gradient(180deg, var(--surface-warm), var(--surface));
}
.btn-client-view, .btn-client-edit {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  font-weight: 700; border-radius: 10px; padding: 0.45rem 0.65rem; font-size: 0.82rem;
  transition: all 0.18s ease;
}
.btn-client-view {
  background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(249,115,22,0.06));
  border: 1px solid rgba(249,115,22,0.25); color: var(--primary-dark);
}
.btn-client-view:hover { background: var(--primary-muted); border-color: var(--primary); color: var(--primary-dark); transform: translateY(-1px); }
.btn-client-edit {
  background: #fff; border: 1px solid #fdba74; color: var(--primary-dark);
}
.btn-client-edit:hover { background: var(--primary-muted); border-color: var(--primary); transform: translateY(-1px); }
.btn-client-delete {
  background: #fff; border: 1px solid #fecaca; color: var(--danger);
  border-radius: 10px; padding: 0.45rem 0.7rem;
}
.btn-client-delete:hover { background: #fef2f2; border-color: #f87171; }

/* —— Modal editare client —— */
.client-modal { border: none; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 64px rgba(28,25,23,0.18); }
.client-modal-header-wrap { padding: 0; }
.client-modal-header {
  background: linear-gradient(135deg, #9a3412, var(--primary) 55%, #fb923c);
  color: #fff; border: none; padding: 1.35rem 1.5rem;
  display: flex; align-items: center; gap: 0.85rem;
}
.client-modal-header-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0;
}
.client-modal-subtitle { color: rgba(255,255,255,0.88) !important; margin-top: 0.15rem; }
.client-modal-body { padding: 1.35rem 1.5rem 1rem; background: var(--surface-warm); }
.client-modal-footer {
  background: var(--surface); padding: 1rem 1.5rem 1.35rem;
  display: flex; gap: 0.65rem; justify-content: flex-end;
  border-top: 1px solid var(--border-light);
}

.client-form-section {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 0.85rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}
.client-form-section-label {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--primary-dark);
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem;
}
.client-form-section-label i { font-size: 0.9rem; }

.client-input-wrap { position: relative; }
.client-input-wrap i {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  color: var(--primary); pointer-events: none; font-size: 0.95rem;
}
.client-input-wrap .form-control {
  padding-left: 2.35rem; border-radius: 11px; border-color: var(--border-light);
  background: var(--surface-warm);
}
.client-input-wrap .form-control:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: #fff;
}
.client-textarea {
  border-radius: 11px; border-color: var(--border-light);
  background: var(--surface-warm); min-height: 88px;
}
.client-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: #fff; }

.client-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.client-type-option { margin: 0; cursor: pointer; }
.client-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.client-type-option span {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 0.5rem; border: 2px solid var(--border-light);
  border-radius: 12px; background: var(--surface-warm);
  font-size: 0.84rem; font-weight: 700; color: var(--text-muted);
  transition: all 0.18s ease;
}
.client-type-option input:checked + span {
  border-color: var(--primary); background: var(--primary-muted);
  color: var(--primary-dark); box-shadow: 0 0 0 3px var(--primary-ring);
}

.btn-clients-save {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border: none; color: #fff; font-weight: 700;
  padding: 0.55rem 1.35rem; border-radius: 11px;
  box-shadow: 0 4px 14px rgba(234,88,12,0.35);
}
.btn-clients-save:hover { background: linear-gradient(135deg, #9a3412, var(--primary)); color: #fff; transform: translateY(-1px); }
.btn-client-cancel {
  background: var(--surface-warm); border: 1px solid var(--border-light);
  color: var(--text-soft); font-weight: 600; border-radius: 11px; padding: 0.55rem 1.1rem;
}
.btn-client-cancel:hover { background: var(--border-light); color: var(--text); }

/* —— Modal istoric client —— */
.client-detail-modal { border: none; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 64px rgba(28,25,23,0.2); }

.client-detail-hero {
  position: relative;
  background: linear-gradient(135deg, #9a3412, var(--primary) 50%, #fb923c);
  padding: 1.5rem 1.5rem 1.25rem; color: #fff;
}
.client-detail-hero.is-pf { background: linear-gradient(135deg, #0e7490, #0891b2 50%, #22d3ee); }
.client-detail-close { position: absolute; top: 1rem; right: 1rem; z-index: 2; opacity: 0.9; }
.client-detail-hero-inner { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.15rem; }
.client-detail-avatar {
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem; flex-shrink: 0;
}
.client-detail-name { font-size: 1.35rem; font-weight: 700; margin: 0.35rem 0 0; line-height: 1.25; }
.client-detail-forma { font-size: 0.85rem; opacity: 0.9; margin-top: 0.15rem; }
.client-detail-director {
  font-size: 0.88rem; opacity: 0.95; margin-top: 0.35rem;
  display: flex; align-items: center;
}
.client-detail-hero .client-type-badge { background: rgba(255,255,255,0.22); color: #fff; }

.client-detail-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem;
}
.client-detail-stat {
  background: rgba(255,255,255,0.16); backdrop-filter: blur(4px);
  border-radius: 12px; padding: 0.65rem 0.5rem; text-align: center;
  border: 1px solid rgba(255,255,255,0.15);
}
.client-detail-stat .val { display: block; font-size: 1rem; font-weight: 800; line-height: 1.2; }
.client-detail-stat .lbl { display: block; font-size: 0.68rem; opacity: 0.88; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.15rem; }

.client-detail-body { padding: 1.25rem 1.5rem 1rem; background: var(--surface-warm); }

.client-contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem;
}
.client-contact-card {
  display: flex; gap: 0.75rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 0.9rem 1rem;
}
.client-contact-card-wide { grid-column: 1 / -1; }
.client-contact-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.client-contact-label { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.2rem; }
.client-contact-value, .client-contact-value-wrap a { color: var(--text); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.client-contact-note { font-size: 0.88rem; color: var(--text-soft); font-style: italic; }

.client-history-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.85rem; gap: 0.5rem;
}
.client-history-section-head h3 {
  font-size: 1rem; font-weight: 700; margin: 0;
  display: flex; align-items: center; gap: 0.4rem; color: var(--text);
}
.client-history-section-head h3 i { color: var(--primary); }
.client-history-count {
  font-size: 0.75rem; font-weight: 700; color: var(--primary-dark);
  background: var(--primary-muted); padding: 0.25rem 0.65rem; border-radius: 999px;
}

.client-history-loading { text-align: center; padding: 2rem; color: var(--text-muted); }
.client-history-empty {
  text-align: center; padding: 2.5rem 1rem;
  background: var(--surface); border-radius: 14px; border: 1px dashed #fdba74;
}
.client-history-empty-icon {
  width: 56px; height: 56px; margin: 0 auto 0.75rem;
  background: var(--primary-soft); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--primary);
}
.client-history-empty p { font-weight: 700; margin-bottom: 0.2rem; }

.client-history-list { display: flex; flex-direction: column; gap: 0.65rem; }
.client-history-item {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 0.85rem 0.85rem 0.85rem 0.65rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.client-history-item:hover { border-color: #fdba74; box-shadow: var(--shadow); }
.client-history-date {
  width: 52px; flex-shrink: 0; text-align: center;
  background: var(--surface-warm); border-radius: 12px; padding: 0.45rem 0.25rem;
  border: 1px solid var(--border-light);
}
.client-history-day { display: block; font-size: 1.15rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.client-history-month { display: block; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-top: 0.15rem; }
.client-history-content { flex: 1; min-width: 0; }
.client-history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.client-history-title { font-size: 0.92rem; font-weight: 700; margin: 0; line-height: 1.3; }
.client-history-meta {
  display: flex; flex-wrap: wrap; gap: 0.65rem; font-size: 0.78rem; color: var(--text-muted);
}
.client-history-meta i { color: var(--primary); margin-right: 0.15rem; }
.client-history-price { font-weight: 700; color: var(--primary-dark); }
.btn-client-history-view {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid #fdba74; background: var(--primary-soft); color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.btn-client-history-view:hover { background: var(--primary-muted); border-color: var(--primary); color: var(--primary-dark); }

.client-detail-footer {
  display: flex; justify-content: flex-end; gap: 0.65rem;
  padding: 1rem 1.5rem 1.35rem; background: var(--surface);
  border-top: 1px solid var(--border-light);
}

.client-history-error { border-radius: 12px; margin: 0; }

@media (max-width: 767px) {
  .client-contact-grid { grid-template-columns: 1fr; }
  .client-detail-stats { grid-template-columns: 1fr; }
  .client-card-actions .btn-client-view span,
  .client-card-actions .btn-client-edit span { display: none; }
}

/* —— Responsive —— */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  z-index: 1040;
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

.sidebar-toggle {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--surface); }

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

body.sidebar-open { overflow: hidden; }

.maps-links, .maps-links.maps-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.maps-address { margin-right: 0.25rem; }
.maps-btn { padding: 0.15rem 0.45rem; font-size: 0.75rem; }

.filter-bar-jobs { flex-wrap: wrap; }
.filter-group-wide { flex: 1 1 220px; min-width: 200px; }

.job-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}
.job-photo-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.job-photo-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.job-photo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
}
.photo-upload-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.todo-job-link a { color: var(--primary); text-decoration: none; font-size: 0.8rem; }
.todo-job-link a:hover { text-decoration: underline; }

.job-picker { position: relative; }
.job-picker-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }
.job-picker-search-wrap {
  position: relative;
}
.job-picker-search-wrap i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.job-picker-search {
  padding-left: 2.25rem;
  border-radius: 12px;
  border-color: var(--border);
}
.job-picker-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
.job-picker-results {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28, 25, 23, 0.12);
  z-index: 20;
  padding: 0.35rem;
}
.job-picker-results.show { display: block; }
.job-picker-result {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  transition: background 0.15s;
}
.job-picker-result:hover { background: rgba(249, 115, 22, 0.08); }
.job-picker-result-title {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}
.job-picker-result-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.job-picker-empty {
  padding: 0.75rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.job-picker-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.04));
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 12px;
}
.job-picker-chip-title { display: block; font-weight: 600; font-size: 0.875rem; }
.job-picker-chip-meta { display: block; font-size: 0.75rem; color: var(--text-muted); }
.job-picker-chip-clear {
  border: none;
  background: rgba(0,0,0,0.06);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.job-picker-chip-clear:hover { background: rgba(220, 38, 38, 0.12); color: #dc2626; }

@media (max-width: 991px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 1050;
  }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: 1fr; }
  .clients-hero-inner { flex-direction: column; align-items: stretch !important; }
  .app-content { padding: 1rem; }
  .app-topbar { padding: 0.65rem 1rem; }
}
