:root {
  /* Colores principales */
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #3f37c9;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;

  /* Anchos de columnas */
  --col-dia: 160px;
  --col-name: 180px;
  --col-mri: 280px;
  --col-notes: 1fr;
  --col-switch: 90px;
  --col-delete: 50px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image: url('stacked-waves-haikei (2).png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  font-family: 'Century Gothic', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  padding: 20px;
  font-size: 16px;
  font-weight: bold;
  zoom: 0.8;
  transform-origin: top center;
}

.dashboard-container {
  max-width: 95%;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.dashboard-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-card,
.table-container {
  background: #d6d6d6;
  border-radius: 12px;
  box-shadow:
    -6px -6px 12px #ffffff,
    6px 6px 12px #b0b0b0;
  margin-bottom: 20px;
}

.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 20px;
}

.summary-item {
  background: #d6d6d6;
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    -6px -6px 12px #ffffff,
    6px 6px 12px #b0b0b0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  height: 100px;
  transition: transform 0.2s ease;
}

.summary-item:hover {
  transform: translateY(-3px);
}

.manager-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.pending-count {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
}

.pending-count.has-pending {
  color: var(--warning);
}

/* TABLA */
#tabla {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#tabla th {
  background: #d6d6d6;
  color: #3d88c5;
  font-weight: 600;
  text-align: left;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#tabla td {
  padding: 12px 8px;
  vertical-align: top;
  border-bottom: 1px solid #ddd;
}

/* ANCHOS FIJOS */
#tabla td:nth-child(1), #tabla th:nth-child(1) { width: var(--col-dia); }
#tabla td:nth-child(2), #tabla th:nth-child(2) { width: var(--col-name); }
#tabla td:nth-child(3), #tabla th:nth-child(3) { width: 20px; }
#tabla td:nth-child(4), #tabla th:nth-child(4) { width: var(--col-mri); }
#tabla td:nth-child(5), #tabla th:nth-child(5) { width: var(--col-notes); }
#tabla td:nth-child(6), #tabla th:nth-child(6) { width: var(--col-switch); }
#tabla td:nth-child(7), #tabla th:nth-child(7) { width: var(--col-delete); }

/* FILAS */
.pendiente-row {
  background-color: rgba(248, 150, 30, 0.08) !important;
  border-left: 4px solid var(--warning);
}

.completo-row {
  background-color: rgba(76, 201, 240, 0.08) !important;
  border-left: 4px solid var(--success);
}

tr:hover {
  background-color: rgba(67, 97, 238, 0.05) !important;
}

/* COLUMNA DÍA (CALENDARIO) */
#tabla td:nth-child(1) {
  text-align: center;
  font-size: 14px;
}

#tabla td:nth-child(1) input[type="date"] {
  width: 100%;
  padding: 10px 8px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: white;
  font-size: 14px;
  margin-bottom: 8px;
  box-shadow: inset -2px -2px 6px #ffffff, inset 2px 2px 6px #c0c0c0;
}

#tabla td:nth-child(1) input[type="date"]:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}

#tabla td:nth-child(1) > div:first-of-type {
  font-weight: 900;
  font-size: 20px;
  color: var(--primary);
  margin: 8px 0 4px;
  text-transform: capitalize;
}

#tabla td:nth-child(1) > div:last-of-type {
  color: #666;
  font-size: 13px;
}

/* SELECT MRI */
#tabla select {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: #d6d6d6;
  color: #333;
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #b0b0b0;
  margin-top: 8px;
}

#tabla select:focus {
  outline: 2px solid var(--primary);
}

/* NOTAS */
.nota-textarea {
  width: 100%;
  min-height: 70px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: #d6d6d6;
  color: #333;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #b0b0b0;
  margin-top: 8px;
}

.nota-textarea:focus {
  outline: 2px solid var(--primary);
}

.expand-btn {
  margin-top: 8px;
  margin-left: 4px;
  padding: 6px 10px;
  background: #d6d6d6;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: -2px -2px 4px #fff, 2px 2px 4px #b0b0b0;
}

.expand-btn:hover {
  background: #c8c8c8;
  box-shadow: -1px -1px 3px #fff, 1px 1px 3px #999;
}

/* SWITCH */
.pendiente-checkbox.switch-container {
  width: 80px;
  height: 36px;
  background: #d6d6d6;
  border-radius: 36px;
  box-shadow: inset -4px -4px 8px #ffffff, inset 4px 4px 8px #b0b0b0;
  position: relative;
  margin: 12px auto;
}

.pendiente-checkbox .toggle-checkbox { display: none; }

.pendiente-checkbox .switch {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 36px;
  cursor: pointer;
}

.pendiente-checkbox .toggle {
  position: absolute;
  width: 44px;
  height: 30px;
  background: linear-gradient(145deg, #e0e0e0, #c0c0c0);
  border-radius: 36px;
  top: 3px;
  left: 3px;
  transition: all 0.3s ease;
  box-shadow: -3px -3px 6px #ffffff, 3px 3px 6px #b0b0b0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pendiente-checkbox .led {
  width: 10px;
  height: 10px;
  background: #777;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  transition: all 0.3s;
}

.pendiente-checkbox .toggle-checkbox:checked + .switch .toggle {
  left: 33px;
  background: linear-gradient(145deg, #4cc9f0, #3a9fb8);
}

.pendiente-checkbox .toggle-checkbox:checked + .switch .led {
  background: yellow;
  box-shadow: 0 0 15px 4px yellow;
}

/* BOTÓN ELIMINAR */
.btn-delete {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
  margin-top: 12px;
}

.btn-delete:hover {
  background: rgba(255,0,0,0.1);
  color: red;
}

/* MRI COUNTER */
#mri-counter {
  background: #d6d6d6;
  color: var(--primary-dark);
  padding: 12px 20px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px #b0b0b0;
  display: inline-block;
  margin: 20px;
}

/* BOTONES */
.btn-primary, .btn-secondary {
  background: #d6d6d6;
  color: #333;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: -4px -4px 8px #ffffff, 4px 4px 8px #b0b0b0;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover, .btn-secondary:hover {
  box-shadow: -2px -2px 6px #ffffff, 2px 2px 6px #a0a0a0;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #28a745;
  color: white;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  :root {
    --col-dia: 140px;
    --col-name: 150px;
    --col-mri: 240px;
  }
  body { zoom: 0.7; }
}