/* ============================================================
   APP CHECK MEZZI - Stylesheet Unificato
   Design: Dark Modern Theme
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-card-hover: #253449;
  --bg-input: #0f172a;
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-success: #10b981;
  --accent-success-hover: #059669;
  --accent-warning: #f59e0b;
  --accent-warning-hover: #d97706;
  --accent-danger: #ef4444;
  --accent-danger-hover: #dc2626;
  --accent-info: #06b6d4;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  --bs-body-color: var(--text-primary);
  --bs-body-bg: var(--bg-primary);
  --bs-card-color: var(--text-primary);
  --bs-card-bg: var(--bg-card);
  --bs-table-color: var(--text-primary);
  --bs-modal-color: var(--text-primary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary-hover);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-muted { color: var(--text-secondary) !important; }
.text-success { color: var(--accent-success) !important; }
.text-danger { color: var(--accent-danger) !important; }
.text-warning { color: var(--accent-warning) !important; }

/* ---- Layout: Sidebar + Main ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: width var(--transition-slow);
  overflow: hidden;
}

.sidebar-header {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 70px;
}

.sidebar-logo {
  height: 32px;
  width: auto;
}

.sidebar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.sidebar-brand span {
  color: var(--accent-success);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  overflow-y: auto;
}

.sidebar-nav .nav-item {
  margin-bottom: 2px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.sidebar-nav .nav-link.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
}

.sidebar-nav .nav-link i {
  width: 22px;
  text-align: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left var(--transition-slow);
}

/* ---- Top Bar ---- */
.topbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 60px;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ---- Page Content ---- */
.page-content {
  padding: 1.5rem;
  max-width: 1400px;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  overflow: hidden;
  color: var(--text-primary);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 1.25rem;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
}

/* ---- Dashboard Cards ---- */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card .stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-primary); }
.stat-card .stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.stat-card .stat-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.stat-card .stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* ---- Plant Cards (Dashboard) ---- */
.plant-card {
  position: relative;
  padding: 1.5rem;
}

.plant-card .plant-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.plant-card .plant-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.plant-card .plant-stat {
  text-align: center;
}

.plant-card .plant-stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
}

.plant-card .plant-stat .label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ---- Progress Circle ---- */
.progress-circle {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: var(--bg-card);
  border-radius: 50%;
}

.progress-circle .progress-value {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  font-weight: 700;
}

/* ---- Home Menu Cards ---- */
.menu-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: 180px;
  gap: 1rem;
}

.menu-card .menu-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform var(--transition-normal);
}

.menu-card:hover .menu-icon {
  transform: scale(1.1);
}

.menu-card .menu-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-primary); }
.menu-card .menu-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.menu-card .menu-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.menu-card .menu-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.menu-card .menu-icon.purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.menu-card .menu-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-info); }

.menu-card .menu-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.menu-card .menu-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- Tables ---- */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table {
  color: var(--text-primary);
  margin: 0;
}

.table thead th {
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- Badges ---- */
.badge-status {
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.badge-success::before { background: var(--accent-success); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.badge-danger::before { background: var(--accent-danger); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.badge-warning::before { background: var(--accent-warning); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-primary); }
.badge-info::before { background: var(--accent-primary); }
.badge-muted { background: rgba(100, 116, 139, 0.15); color: var(--text-muted); }
.badge-muted::before { background: var(--text-muted); }

/* ---- Buttons ---- */
.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  color: white;
}

.btn-success {
  background: var(--accent-success);
  color: white;
}

.btn-success:hover {
  background: var(--accent-success-hover);
  color: white;
}

.btn-danger {
  background: var(--accent-danger);
  color: white;
}

.btn-danger:hover {
  background: var(--accent-danger-hover);
  color: white;
}

.btn-warning {
  background: var(--accent-warning);
  color: #0f172a;
}

.btn-warning:hover {
  background: var(--accent-warning-hover);
  color: #0f172a;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ---- Forms ---- */
.form-control, .form-select {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  background: var(--bg-input);
  border-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.form-check-input {
  background-color: var(--bg-input);
  border-color: var(--border-light);
}

.form-check-input:checked {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* ---- Check Form Toggle (Regolare/Anomalia) ---- */
.check-toggle {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.check-toggle input[type="radio"] {
  display: none;
}

.check-toggle label {
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-input);
  transition: all var(--transition-fast);
  text-align: center;
  flex: 1;
}

.check-toggle input[type="radio"]:checked + label.label-ok {
  background: var(--accent-success);
  color: white;
}

.check-toggle input[type="radio"]:checked + label.label-anomalia {
  background: var(--accent-danger);
  color: white;
}

/* ---- Modals ---- */
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
}

.modal-title {
  font-weight: 600;
}

.btn-close {
  filter: invert(1);
}

/* ---- Alerts ---- */
.alert {
  border-radius: var(--radius-md);
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.alert-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-success); }
.alert-danger { background: rgba(239, 68, 68, 0.15); color: var(--accent-danger); }
.alert-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-warning); }
.alert-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-primary); }

/* ---- Config Login ---- */
.config-login-container {
  max-width: 400px;
  margin: 10vh auto;
}

.config-login-card {
  padding: 2.5rem;
  text-align: center;
}

.config-login-card .lock-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.5rem;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ---- Config Builder (Tipo Scheda) ---- */
.field-list {
  list-style: none;
  padding: 0;
}

.field-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  cursor: grab;
  transition: border-color var(--transition-fast);
}

.field-item:hover {
  border-color: var(--accent-primary);
}

.field-item .drag-handle {
  color: var(--text-muted);
  cursor: grab;
}

.field-item .field-name {
  flex: 1;
  font-weight: 500;
}

.field-item .field-order {
  color: var(--text-muted);
  font-size: 0.8rem;
  min-width: 24px;
  text-align: center;
}

.field-item .btn-remove {
  color: var(--accent-danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.field-item .btn-remove:hover {
  opacity: 1;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .page-content {
    padding: 1rem;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .sidebar-overlay.active {
    display: block;
  }
}

@media (max-width: 576px) {
  .page-content {
    padding: 0.75rem;
  }

  h1 { font-size: 1.5rem; }

  .stat-value { font-size: 1.5rem; }

  .menu-card {
    min-height: 140px;
    padding: 1.25rem;
  }

  .menu-card .menu-icon {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }
}

/* ---- Utilities ---- */
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
  max-width: 220px;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.05s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.15s; opacity: 0; }
.fade-in-delay-4 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-5 { animation-delay: 0.25s; opacity: 0; }
.fade-in-delay-6 { animation-delay: 0.3s; opacity: 0; }
.fade-in-delay-7 { animation-delay: 0.35s; opacity: 0; }

/* ---- Menu Icon: Orange ---- */
.menu-card .menu-icon.orange { background: rgba(249, 115, 22, 0.15); color: #f97316; }

/* ============================================================
   TURNI MODULE STYLES
   ============================================================ */

/* ---- Shift Blocks ---- */
.turni-shift-block {
  border-bottom: 1px solid var(--border-color);
}

.turni-shift-block:last-child {
  border-bottom: none;
}

.turni-shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.turni-shift-header .turni-shift-name {
  font-weight: 700;
}

.turni-shift-header .turni-shift-orario {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Shift colors */
.turni-shift-m { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.turni-shift-p { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.turni-shift-n { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.turni-shift-g1 { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.turni-shift-g2 { background: rgba(20, 184, 166, 0.12); color: #14b8a6; }
.turni-shift-g3 { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.turni-shift-n2 { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

/* ---- Rotta Badge ---- */
.rotta-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--rotta-color, #3b82f6) 18%, transparent);
  color: var(--rotta-color, #3b82f6);
  letter-spacing: 0.5px;
}

.rotta-badge-sm {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--rotta-color, #3b82f6) 18%, transparent);
  color: var(--rotta-color, #3b82f6);
  letter-spacing: 0.3px;
}

/* ---- Matrice Competenze Table ---- */
.table-turni-matrice th,
.table-turni-matrice td {
  padding: 0.5rem 0.6rem;
}

.table-turni-matrice .matrice-col-header {
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

/* ---- Pianifica Turni ---- */
.turni-week-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.turni-week-nav .week-label {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 220px;
  text-align: center;
}

/* ---- Turni Operatore Row (pianifica) ---- */
.turni-op-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.turni-op-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.turni-op-row .op-name {
  min-width: 180px;
  font-weight: 500;
}

.turni-op-row .op-turno {
  min-width: 80px;
}

.turni-op-row .op-rotta {
  min-width: 100px;
}

.turni-op-row .op-actions {
  margin-left: auto;
}

/* ---- Suggerisci Sostituti ---- */
.sostituto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.sostituto-item:last-child {
  border-bottom: none;
}

.sostituto-item .sostituto-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
}

/* ---- Color circle for rotte in config ---- */
.rotta-color-circle {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: middle;
  border: 2px solid rgba(255, 255, 255, 0.15);
}
