/* ============================================================
   One Life Italia — Admin brand theme (platform_role: admin)
   Loaded after cinema.css to override purple/neon defaults.
   ============================================================ */

body.theme-admin {
  --primary: #005b72;
  --primary-hover: #004a5d;
  --primary-soft: rgba(0, 91, 114, 0.22);
  --accent: #ffdc27;
  --accent-gradient: linear-gradient(135deg, #005b72 0%, #007a99 55%, #005b72 100%);

  --bg-base: #030e11;
  --surface: rgba(0, 91, 114, 0.38);
  --surface-elevated: rgba(0, 91, 114, 0.48);
  --surface-muted: rgba(255, 255, 255, 0.04);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --mesh-1: rgba(0, 91, 114, 0.32);
  --mesh-2: rgba(0, 122, 153, 0.20);
  --mesh-3: rgba(255, 220, 39, 0.07);
  --mesh-4: rgba(0, 91, 114, 0.14);

  --sidebar-bg: #005b72;
  --topbar-bg: rgba(0, 91, 114, 0.94);
  --input-bg: rgba(3, 14, 17, 0.65);
  --btn-secondary-bg: rgba(255, 255, 255, 0.10);
  --shadow-card: 0 25px 60px -12px rgba(0, 91, 114, 0.28);
}

body.theme-admin {
  background: #030e11;
  color: #ffffff;
}

/* Universal logo — all roles
   ITALIA is ~12px tall in a 290×107 PNG (pale cyan, thin strokes).
   Contrast/halo only: do not upscale far past native or the raster goes soft. */
.onelife-logo {
  max-width: 180px;
  width: 100%;
  height: auto;
  display: block;
  filter:
    contrast(1.22)
    brightness(1.1)
    drop-shadow(0 0 0.7px rgba(255, 255, 255, 0.95))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.onelife-logo--login {
  max-width: 240px;
  margin: 0 auto;
  filter:
    contrast(1.28)
    brightness(1.14)
    drop-shadow(0 0 0.85px rgba(255, 255, 255, 0.95))
    drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
}

.onelife-logo--sidebar {
  max-width: 180px;
}

.onelife-logo--footer {
  max-width: 148px;
  margin: 0 auto 0.45rem;
}

.login-brand-wordmark {
  margin-top: 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.onelife-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.onelife-footer-copy {
  font-size: 0.7rem;
  line-height: 1.3;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-height: 700px) {
  .onelife-footer-brand {
    display: none;
  }
}

/* Solid-color sidebars: pale-cyan ITALIA needs a stronger white halo */
body.theme-admin .onelife-logo,
body.theme-trainer .onelife-logo {
  filter:
    contrast(1.3)
    brightness(1.16)
    drop-shadow(0 0 0.9px #ffffff)
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

body.theme-admin .onelife-logo--login,
body.theme-trainer .onelife-logo--login,
body.theme-executive .onelife-logo--login,
body.theme-senior .onelife-logo--login,
body.theme-associate .onelife-logo--login {
  filter:
    contrast(1.28)
    brightness(1.14)
    drop-shadow(0 0 0.85px rgba(255, 255, 255, 0.95))
    drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
}

@media (max-width: 1023px) {
  .onelife-logo--sidebar {
    max-width: 168px;
  }
}

/* Sidebar & header */
body.theme-admin .sidebar {
  background: #005b72;
  border-right-color: rgba(255, 255, 255, 0.12);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.35);
}

body.theme-admin .glass-topbar {
  background: #005b72 !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

body.theme-admin .bottom-nav {
  background: #005b72;
}

/* Cards & surfaces */
body.theme-admin .stat-card,
body.theme-admin .section-card,
body.theme-admin .glass-card,
body.theme-admin .glass-surface,
body.theme-admin .glass-card-elevated,
body.theme-admin .mobile-card,
body.theme-admin .login-card {
  background: rgba(0, 91, 114, 0.42) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff;
}

body.theme-admin .glass-modal {
  background: rgba(0, 91, 114, 0.55);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

/* Accent buttons */
body.theme-admin .btn-primary {
  background: linear-gradient(135deg, #ffdc27 0%, #f0c800 100%);
  background-color: #ffdc27;
  color: #030e11;
  box-shadow: 0 4px 16px rgba(255, 220, 39, 0.35);
}

body.theme-admin .btn-primary:hover {
  box-shadow: 0 8px 28px rgba(255, 220, 39, 0.40), 0 0 0 1px rgba(255, 220, 39, 0.25);
  filter: brightness(1.05);
}

/* Badges & active nav */
body.theme-admin .badge-pill {
  background: rgba(255, 220, 39, 0.18);
  color: #ffdc27;
  border-color: rgba(255, 220, 39, 0.35);
}

body.theme-admin .nav-link.active {
  background: linear-gradient(90deg, rgba(255, 220, 39, 0.14) 0%, transparent 100%);
  border-left-color: #ffdc27;
  box-shadow: inset 0 0 0 1px rgba(255, 220, 39, 0.18);
}

body.theme-admin .nav-link.active .nav-icon {
  color: #ffdc27;
}

body.theme-admin .bottom-nav-link.active {
  color: #ffdc27;
  background: rgba(255, 220, 39, 0.14);
}

body.theme-admin .bottom-nav-link.active .bottom-nav-icon {
  color: #ffdc27;
}

/* Override cinema.css purple/neon glow */
body.theme-admin .btn-primary,
body.theme-admin #btn-refresh,
body.theme-admin .nav-link.active {
  box-shadow: 0 0 0 1px rgba(255, 220, 39, 0.22), 0 6px 24px rgba(0, 91, 114, 0.30);
}

body.theme-admin .stat-card:hover {
  box-shadow: var(--shadow-card), 0 0 40px rgba(255, 220, 39, 0.12);
  border-color: rgba(255, 220, 39, 0.35) !important;
}

body.theme-admin .stat-card::before {
  background: linear-gradient(90deg, transparent, #ffdc27, transparent);
}

body.theme-admin .sidebar-brand-icon {
  background: linear-gradient(135deg, #005b72 0%, #007a99 100%);
  box-shadow: 0 8px 24px rgba(0, 91, 114, 0.35);
}

/* FullCalendar — dark theme compatibility (theme-admin) */
#calendar .fc {
  --fc-border-color: rgba(255, 255, 255, 0.08);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(255, 255, 255, 0.04);
  --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.06);
  font-family: inherit;
}

#calendar .fc-toolbar-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main);
}

#calendar .fc-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: capitalize;
  box-shadow: none;
  transition: background 0.2s ease;
}

#calendar .fc-button:hover,
#calendar .fc-button:focus {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  box-shadow: none;
}

#calendar .fc-button-primary:not(:disabled).fc-button-active,
#calendar .fc-button-primary:not(:disabled):active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

#calendar .fc-col-header-cell-cushion,
#calendar .fc-daygrid-day-number,
#calendar .fc-list-day-text,
#calendar .fc-list-day-side-text {
  color: var(--text-muted);
  text-decoration: none;
}

#calendar .fc-daygrid-day.fc-day-today {
  background: rgba(255, 220, 39, 0.08);
}

body.theme-admin #calendar .fc-daygrid-day.fc-day-today {
  background: rgba(255, 220, 39, 0.12);
}

#calendar .fc-event {
  border-radius: 0.375rem;
  border: none;
  padding: 1px 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

#calendar .fc-event,
#calendar .fc-event .fc-event-main {
  background: var(--primary);
  color: #fff;
}

body.theme-admin #calendar .fc-event,
body.theme-admin #calendar .fc-event .fc-event-main {
  background: #005b72;
  color: #fff;
}

#calendar .fc-daygrid-event-dot {
  border-color: var(--accent);
}

#calendar .fc-scrollgrid,
#calendar .fc-theme-standard td,
#calendar .fc-theme-standard th {
  border-color: rgba(255, 255, 255, 0.08);
}

#calendar .fc-timegrid-slot-label-cushion,
#calendar .fc-timegrid-axis-cushion {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ============================================================
   Trainer theme (Responsabile Commerciale / Formatore)
   ============================================================ */

body.theme-trainer {
  --primary: #6d28d9;
  --primary-hover: #5b21b6;
  --primary-soft: rgba(109, 40, 217, 0.22);
  --accent: #f472b6;
  --accent-gradient: linear-gradient(135deg, #6d28d9 0%, #9333ea 55%, #6d28d9 100%);

  --bg-base: #0f0720;
  --surface: rgba(109, 40, 217, 0.28);
  --surface-elevated: rgba(109, 40, 217, 0.38);
  --surface-muted: rgba(255, 255, 255, 0.04);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --border: rgba(255, 255, 255, 0.14);
  --border-subtle: rgba(255, 255, 255, 0.08);

  --mesh-1: rgba(109, 40, 217, 0.28);
  --mesh-2: rgba(147, 51, 234, 0.18);
  --mesh-3: rgba(244, 114, 182, 0.08);
  --mesh-4: rgba(109, 40, 217, 0.12);

  --sidebar-bg: #4c1d95;
  --topbar-bg: rgba(76, 29, 149, 0.94);
  --input-bg: rgba(15, 7, 32, 0.65);
  --btn-secondary-bg: rgba(255, 255, 255, 0.10);
  --shadow-card: 0 25px 60px -12px rgba(109, 40, 217, 0.28);
}

body.theme-trainer {
  background: #0f0720;
  color: #ffffff;
}

body.theme-trainer .sidebar {
  background: #4c1d95;
  border-right-color: rgba(255, 255, 255, 0.12);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.35);
}

body.theme-trainer .glass-topbar {
  background: #4c1d95 !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

body.theme-trainer .bottom-nav {
  background: #4c1d95;
}

body.theme-trainer .stat-card,
body.theme-trainer .section-card,
body.theme-trainer .glass-card,
body.theme-trainer .glass-surface,
body.theme-trainer .glass-card-elevated,
body.theme-trainer .mobile-card {
  background: rgba(109, 40, 217, 0.32) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff;
}

body.theme-trainer .nav-link.active {
  background: rgba(244, 114, 182, 0.18);
  color: #ffffff;
}

body.theme-trainer #trainer-calendar .fc,
body.theme-trainer #calendar .fc {
  --fc-border-color: rgba(255, 255, 255, 0.08);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: rgba(255, 255, 255, 0.04);
  --fc-list-event-hover-bg-color: rgba(244, 114, 182, 0.12);
}

body.theme-trainer #trainer-calendar .fc-toolbar-title,
body.theme-trainer #trainer-calendar .fc-col-header-cell-cushion,
body.theme-trainer #trainer-calendar .fc-daygrid-day-number {
  color: #ffffff;
}

body.theme-trainer #trainer-calendar .fc-event,
body.theme-trainer #trainer-calendar .fc-event .fc-event-main {
  background: #f472b6;
  border-color: #f472b6;
  color: #1f102f;
}

/* Control Tower — admin-only dashboard extension */
body.theme-admin .control-tower-stat::before {
  background: linear-gradient(135deg, rgba(255, 220, 39, 0.35), rgba(0, 91, 114, 0.15));
}

body.theme-admin .control-tower-progress-bar {
  background: var(--accent-gradient);
}

#section-control-tower .stat-card-value {
  letter-spacing: -0.02em;
}

#production-quota-section .stat-card {
  background: rgba(255, 255, 255, 0.03);
}

/* Impostazioni — Google Calendar integration */
.integrations-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.integrations-google-icon {
  font-size: 1.25rem;
  color: #ea4335;
}

.integrations-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.integrations-badge--connected {
  color: #166534;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

body.theme-admin .integrations-badge--connected,
body.theme-trainer .integrations-badge--connected {
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
}

#gcal-feedback.is-success {
  color: #16a34a;
}

#gcal-feedback.is-error {
  color: #dc2626;
}

body.theme-admin #gcal-feedback.is-success,
body.theme-trainer #gcal-feedback.is-success {
  color: #86efac;
}

body.theme-admin #gcal-feedback.is-error,
body.theme-trainer #gcal-feedback.is-error {
  color: #fca5a5;
}

/* ============================================================
   Oly — Assistente AI floating chat widget
   ============================================================ */

.ai-chat-root {
  display: none;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 55;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.ai-chat-root.is-visible {
  display: flex;
}

.ai-chat-root > * {
  pointer-events: auto;
}

.ai-chat-toggle {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ai-chat-toggle:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}

.ai-chat-toggle:active {
  transform: translateY(0) scale(0.98);
}

.ai-chat-panel {
  width: min(22.5rem, calc(100vw - 2rem));
  height: min(28rem, calc(100vh - 8rem));
  display: flex;
  flex-direction: column;
  border-radius: 1.1rem;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-base) 88%, var(--primary) 12%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: ai-chat-panel-in 0.22s ease;
}

.ai-chat-panel.hidden {
  display: none;
}

@keyframes ai-chat-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-elevated);
}

.ai-chat-header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ai-chat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.ai-chat-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.ai-chat-icon-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border-subtle);
  background: var(--btn-secondary-bg);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.ai-chat-icon-btn:hover {
  color: var(--text-main);
  background: var(--primary-soft);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: transparent;
}

.ai-chat-empty {
  margin: auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 1rem;
  line-height: 1.45;
}

.ai-chat-empty-hint {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  opacity: 0.85;
}

.ai-chat-bubble {
  max-width: 88%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-chat-bubble.is-user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
}

.ai-chat-bubble.is-assistant {
  align-self: flex-start;
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-bottom-left-radius: 0.35rem;
}

.ai-chat-bubble.is-loading {
  padding: 0.85rem 1rem;
}

.ai-chat-dots {
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}

.ai-chat-dots i {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 9999px;
  background: var(--text-muted);
  display: block;
  animation: ai-chat-dot 1s ease-in-out infinite;
}

.ai-chat-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-chat-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-chat-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.ai-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}

.ai-chat-input {
  flex: 1;
  min-width: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-main);
  padding: 0.65rem 0.8rem;
  font-size: 0.875rem;
  outline: none;
}

.ai-chat-input::placeholder {
  color: var(--text-muted);
}

.ai-chat-input:focus {
  border-color: color-mix(in srgb, var(--primary) 65%, white 10%);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.ai-chat-send {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  border: none;
  background: var(--accent-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.ai-chat-send:hover:not(:disabled) {
  filter: brightness(1.08);
}

.ai-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Sales Pipeline Kanban ── */
.pipeline-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.pipeline-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #a1a1aa);
}

.pipeline-summary-chip strong {
  color: var(--text-main, #f4f4f5);
  font-weight: 700;
}

.pipeline-board {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  min-height: 28rem;
  scroll-snap-type: x proximity;
}

.pipeline-column {
  flex: 0 0 min(16.5rem, 82vw);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 26rem;
  max-height: calc(100vh - 14rem);
}

.pipeline-column.is-drag-over {
  border-color: color-mix(in srgb, var(--primary) 70%, white 10%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 45%, transparent);
}

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

.pipeline-column-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-main, #fafafa);
}

.pipeline-column-count {
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted, #a1a1aa);
}

.pipeline-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pipeline-card {
  border-radius: 0.85rem;
  padding: 0.75rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.pipeline-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.pipeline-card:active {
  cursor: grabbing;
}

.pipeline-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.pipeline-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main, #fafafa);
  margin: 0;
}

.pipeline-card-meta {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.35;
}

.pipeline-card-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.35rem;
}

.pipeline-card-actions select {
  flex: 1;
  font-size: 0.7rem;
  border-radius: 0.55rem;
  padding: 0.3rem 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main, #fafafa);
}

.lead-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.lead-status-nuovo-lead { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.lead-status-contattato { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; }
.lead-status-appuntamento { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.lead-status-trattativa { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.lead-status-chiuso-vinto { background: rgba(34, 197, 94, 0.18); color: #86efac; }

@media (max-width: 767px) {
  .ai-chat-root {
    right: 0.85rem;
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .ai-chat-panel {
    height: min(24rem, calc(100vh - 10.5rem));
  }

  .pipeline-column {
    max-height: none;
    min-height: 18rem;
  }
}
