:root {
  /* Paleta de Colores Corporativos */
  --primary-color: #011e41;
  /* Azul oscuro institucional */
  --primary-hover: #022c5e;
  --secondary-color: #495057;
  --color-red: #dc3545;
  /* Rojo Cruz Roja */
  --color-red-hover: #bb2d3b;
  --color-green: #198754;
  --color-dark: #212529;
  --bg-light: #f8f9fa;
  --bg-body: #eaedf1;
  /* Fondo general sutilmente grisáceo para dar contraste */
  --border-color: #dee2e6;
  --text-muted: #6c757d;

  /* Sombras y Radios */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.2s ease-in-out;
}
h1{
  font-family: 'Montserrat';
  font-weight: 900;
}
/* =========================================================
   CONTENEDOR PRINCIPAL Y LAYOUT FULL-SCREEN
   ========================================================= */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--bg-body);
  font-family: 'Montserrat';
}

.content-box {
  max-height: 99%;
  padding: 20px;
  height: calc(100vh - 70px);
  /* Ajusta a la altura exacta de tu header (top-bar) */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-container {
  background: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* =========================================================
   TOOLBAR Y FILTROS
   ========================================================= */
.toolbar {
  padding: 16px 24px;
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  z-index: 20;
}

.toolbar-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.filters-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Botones Generales */
button {
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  transition: var(--transition);
}

.btn-export {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-export:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-sort {
  background-color: #e9ecef;
  color: var(--color-dark);
  border: 1px solid transparent;
}

.btn-sort:hover {
  background-color: #dde2e6;
  border-color: #ced4da;
}

.btn-clear-filter {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-clear-filter:hover {
  background-color: var(--bg-light);
  color: var(--color-dark);
  border-color: var(--border-color);
}

/* Buscador y Date Input */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-box input,
.filter-item input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  transition: var(--transition);
  outline: none;
  background-color: var(--bg-light);
  color: var(--color-dark);
  font-family: inherit;
}

.search-box input {
  padding-left: 32px;
  width: 220px;
}

.search-box input:focus,
.filter-item input[type="date"]:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(1, 30, 65, 0.1);
}

.search-box input:focus {
  width: 280px;
}

/* Select Global */
.filter-item select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.85rem;
  background-color: var(--bg-light);
  color: var(--color-dark);
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-item select:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(1, 30, 65, 0.1);
}

/* =========================================================
   TABLA DE DATOS (ESCRITORIO)
   ========================================================= */
.table-container {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: auto;
  background-color: #ffffff;
  width: 100%;
}

/* Personalización del Scrollbar vertical */
.table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--bg-light);
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

#dataTable {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: auto;
}

/* Cabecera Fija (Sticky) */
#dataTable thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

#dataTable th {
  background-color: var(--bg-light);
  color: var(--secondary-color);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 10px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

#dataTable th i {
  margin-right: 6px;
  color: var(--primary-color);
  opacity: 0.8;
}

#dataTable td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  vertical-align: middle;
  color: var(--color-dark);
}

/* Evitar Scroll Horizontal innecesario */
#dataTable td:nth-child(1),
#dataTable td:nth-child(2),
#dataTable td:nth-child(3),
#dataTable td:nth-child(4),
#dataTable td:nth-child(7),
#dataTable td:nth-child(8),
#dataTable td:nth-child(9),
#dataTable td:nth-child(11) {
  white-space: nowrap;
}

#dataTable td:nth-child(5),
#dataTable td:nth-child(6),
#dataTable td:nth-child(10) {
  white-space: normal;
  line-height: 1.4;
  min-width: 140px;
  max-width: 250px;
}

#dataTable tbody tr {
  transition: background-color 0.15s ease;
  background-color: #ffffff;
}

#dataTable tbody tr:hover {
  background-color: #f1f5f9;
}

/* Fila Problemática */
.row-problematico td {
  background-color: #fef2f2;
}

.row-problematico:hover td {
  background-color: #fee2e2;
}

/* Filtros por Columna Fijos */
.filter-row th {
  background-color: #ffffff;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  top: 41px;
  /* Ajustar según altura de la fila cabecera principal */
  position: sticky;
  z-index: 9;
}

.col-filter {
  width: 100%;
  min-width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--secondary-color);
  background-color: var(--bg-light);
  transition: var(--transition);
  box-sizing: border-box;
}

.col-filter:focus {
  border-color: var(--primary-color);
  outline: none;
  background-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(1, 30, 65, 0.1);
}

/* =========================================================
   ETIQUETAS (BADGES) Y ESTADOS
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-protocolo {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-equipo {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.badge-sexo {
  background-color: #fdf4ff;
  color: #a21caf;
  border: 1px solid #fae8ff;
  margin-left: 6px;
}

.badge-resolucion {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-colab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0;
  color: white;
  margin-right: -4px;
  border: 2px solid #ffffff;
  transition: var(--transition);
  cursor: help;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-colab i {
  font-size: 0.75rem;
}

.badge-colab:hover {
  font-size: 0.7rem;
  width: auto;
  padding: 0 8px;
  border-radius: 12px;
  z-index: 2;
  position: relative;
}

.badge-colab:hover i {
  margin-right: 4px;
}

.badge-pc { background-color: #f59e0b; }
.badge-pl { background-color: #3b82f6; }
.badge-pn { background-color: #10b981; }
.badge-bo { background-color: #ef4444; }

/* =========================================================
   BOTONES DE ACCIÓN EN TABLA
   ========================================================= */
.acciones-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-obs {
  background-color: var(--bg-light);
  color: var(--secondary-color);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 4px;
}

.btn-obs.has-obs {
  background-color: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.btn-obs:hover {
  background-color: #e2e6ea;
  color: var(--color-dark);
}

.btn-obs.has-obs:hover {
  background-color: #bae6fd;
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: #ffffff;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: var(--transition);
}

.btn-edit:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.empty-state {
  text-align: center;
  padding: 120px 20px !important;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--primary-color);
  font-weight: 700;
  margin-top: 15px;
}

/* =========================================================
   MODALES UNIFICADOS (DISEÑO PREMIUM ENTERPRISE)
   ========================================================= */

/* Overlay con Blur */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Contenedor Principal Unificado */
.modal-content {
  background-color: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 550px; /* Ancho cómodo por defecto */
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Animación de entrada */
.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

/* Header Premium Global */
.modal-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #034b9e 100%);
  color: white;
  border-bottom: none;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Efecto de brillo/luz sobre la cabecera */
.modal-header::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.modal-header h3 {
  color: white;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 1;
}

.modal-header h3 i {
  color: #38bdf8;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Botón Cerrar Global */
.modal-close {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  margin: 0;
  padding: 0;
  z-index: 1;
  border: none;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: rotate(90deg);
}

/* Body Global */
.modal-body {
  padding: 32px;
  background-color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #334155;
}

/* Footer Global */
.modal-footer {
  padding: 20px 32px;
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* =========================================================
   ESTILOS ESPECÍFICOS: MODAL + INFO
   ========================================================= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-item {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

/* Línea de acento lateral dinámica */
.info-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background-color: var(--primary-color);
  border-radius: 4px 0 0 4px;
  transition: width 0.3s ease;
}

.info-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.info-item:hover::before {
  width: 6px;
}

/* Colores de acento específicos por posición */
.info-item:nth-child(1)::before { background-color: #0ea5e9; } /* ID */
.info-item:nth-child(2)::before { background-color: #8b5cf6; } /* Equipo */
.info-item:nth-child(3)::before { background-color: #10b981; } /* Colab */
.info-item:nth-child(4)::before { background-color: #f43f5e; } /* Hospital */

.info-item.col-full {
  grid-column: span 2;
}

.info-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.8px;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 20px;
  width: fit-content;
}

.info-label i {
  color: var(--secondary-color);
  font-size: 0.95rem;
}

.info-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  word-break: break-word;
  display: flex;
  align-items: center;
  padding-left: 4px;
}

.hospital-text {
  color: #0f172a;
  font-style: normal;
}

.colab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-left: 4px;
}

/* =========================================================
   ESTILOS ESPECÍFICOS: MODAL TURNO
   ========================================================= */
.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-label {
  font-weight: 700;
  color: #334155;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.modal-label i {
  margin-right: 8px;
  color: #64748b;
  font-size: 1.1rem;
}

.modal-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334155;
  background-color: #ffffff;
  transition: var(--transition);
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  font-weight: 500;
}

.modal-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.switch-section {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.btn-guardar {
  background: linear-gradient(135deg, var(--primary-color) 0%, #034b9e 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(1, 30, 65, 0.2);
  font-size: 0.95rem;
}

.btn-guardar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(1, 30, 65, 0.3);
  background: linear-gradient(135deg, #034b9e 0%, var(--primary-color) 100%);
}

/* =========================================================
   DISEÑO RESPONSIVE AVANZADO (TABLETS Y MÓVILES)
   ========================================================= */

@media (max-width: 1600px) {
  .hide-on-mobile {
    display: none !important;
  }

  .btn-info {
    display: inline-flex !important;
  }
}

@media (max-width: 1400px) {
  .search-box input:focus {
    width: 240px;
  }
}

@media (max-width: 1200px) {
  .toolbar {
    padding: 12px 16px;
  }

  .search-box input,
  .search-box input:focus {
    width: 200px;
  }
}

/* ACTIVACIÓN DE VISTA TARJETA PARA TABLETS Y PANTALLAS PEQUEÑAS (< 992px) */
@media (max-width: 992px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .filters-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
  }

  .search-box {
    grid-column: 1 / -1;
  }

  .search-box input,
  .search-box input:focus {
    width: 100%;
  }

  .filter-item input,
  .filter-item select,
  .btn-sort,
  .btn-clear-filter,
  .btn-export {
    width: 100%;
    justify-content: center;
  }

  /* Transformación Table -> Cards */
  #dataTable,
  #dataTable tbody,
  #dataTable tr,
  #dataTable td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  #dataTable thead {
    display: none;
  }

  #dataTable tbody {
    padding: 10px;
    background: var(--bg-body);
  }

  #dataTable tbody tr {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  #dataTable td {
    display: grid;
    grid-template-columns: 35% 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--bg-light);
    white-space: normal !important;
  }

  #dataTable td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    text-align: left;
    margin-top: 2px;
  }

  #dataTable td:last-child {
    border-bottom: none;
    background-color: var(--bg-light);
    align-items: center;
  }

  .acciones-container {
    width: 100%;
    justify-content: flex-end;
  }
}

/* DISPOSITIVOS MÓVILES PEQUEÑOS (< 600px) */
@media (max-width: 600px) {
  .content-box {
    padding: 10px 5px;
    height: calc(100vh - 60px);
  }

  .filters-group {
    grid-template-columns: 1fr 1fr;
  }

  .search-box,
  .btn-export {
    grid-column: 1 / -1;
  }

  #dataTable td {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 4px;
    padding: 10px 15px;
  }

  #dataTable td::before {
    color: var(--primary-color);
    margin-top: 0;
  }

  /* Responsive Modal + Info Mobile */
  .info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .info-item.col-full {
    grid-column: span 1;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header h3 {
    font-size: 1.2rem;
  }
  
  .modal-body {
    padding: 20px;
  }
}

/* =========================================================
   ESTILOS COMPONENTES (SWITCH Y BOTÓN RESPONSIVE)
   ========================================================= */
.btn-info {
  display: none;
  background-color: #17a2b8;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
}

.btn-info:hover {
  background-color: #138496;
}

/* From Uiverse.io by Galahhad */
.switch {
  /* switch */
  --switch-width: 46px;
  --switch-height: 24px;
  --switch-bg: rgb(131, 131, 131);
  --switch-checked-bg: rgb(0, 218, 80);
  --switch-offset: calc((var(--switch-height) - var(--circle-diameter)) / 2);
  --switch-transition: all .2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
  /* circle */
  --circle-diameter: 18px;
  --circle-bg: #fff;
  --circle-shadow: 1px 1px 2px rgba(146, 146, 146, 0.45);
  --circle-checked-shadow: -1px 1px 2px rgba(163, 163, 163, 0.45);
  --circle-transition: var(--switch-transition);
  /* icon */
  --icon-transition: all .2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
  --icon-cross-color: var(--switch-bg);
  --icon-cross-size: 6px;
  --icon-checkmark-color: var(--switch-checked-bg);
  --icon-checkmark-size: 10px;
  /* effect line */
  --effect-width: calc(var(--circle-diameter) / 2);
  --effect-height: calc(var(--effect-width) / 2 - 1px);
  --effect-bg: var(--circle-bg);
  --effect-border-radius: 1px;
  --effect-transition: all .2s ease-in-out;
}

.switch input { display: none; }
.switch { display: inline-block; }

.switch svg {
  -webkit-transition: var(--icon-transition);
  -o-transition: var(--icon-transition);
  transition: var(--icon-transition);
  position: absolute;
  height: auto;
}

.switch .checkmark {
  width: var(--icon-checkmark-size);
  color: var(--icon-checkmark-color);
  -webkit-transform: scale(0);
  -ms-transform: scale(0);
  transform: scale(0);
}

.switch .cross {
  width: var(--icon-cross-size);
  color: var(--icon-cross-color);
}

.slider {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: var(--switch-width);
  height: var(--switch-height);
  background: var(--switch-bg);
  border-radius: 999px;
  display: flex;
  align-items: center;
  position: relative;
  transition: var(--switch-transition);
  cursor: pointer;
}

.circle {
  width: var(--circle-diameter);
  height: var(--circle-diameter);
  background: var(--circle-bg);
  border-radius: inherit;
  box-shadow: var(--circle-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--circle-transition);
  z-index: 1;
  position: absolute;
  left: var(--switch-offset);
}

.slider::before {
  content: "";
  position: absolute;
  width: var(--effect-width);
  height: var(--effect-height);
  left: calc(var(--switch-offset) + (var(--effect-width) / 2));
  background: var(--effect-bg);
  border-radius: var(--effect-border-radius);
  transition: var(--effect-transition);
}

/* actions */
.switch input:checked+.slider {
  background: var(--switch-checked-bg);
}

.switch input:checked+.slider .checkmark {
  transform: scale(1);
}

.switch input:checked+.slider .cross {
  transform: scale(0);
}

.switch input:checked+.slider::before {
  left: calc(100% - var(--effect-width) - (var(--effect-width) / 2) - var(--switch-offset));
}

.switch input:checked+.slider .circle {
  left: calc(100% - var(--circle-diameter) - var(--switch-offset));
  box-shadow: var(--circle-checked-shadow);
}