body {
  overflow-x: hidden;
}

/* ========================================= */
/* MY ROUTE WRAPPER */
/* ========================================= */

.myroute-wrapper {
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;

  overflow: hidden;
}

.myroute-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.myroute-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.myroute-date {
  font-size: 14px;
  color: #6b7280;
}

/* ========================================= */
/* FILTER BUTTONS */
/* ========================================= */

.myroute-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* .myroute-filter-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.myroute-filter-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.myroute-filter-btn:hover {
  opacity: 0.85;
}*/

/* ========================================= */
/* VISIT LIST */
/* ========================================= */

.myroute-list {
  flex: 1;
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 12px;

  padding: 10px 12px;
  padding-bottom: 80px; /* espacio para footer módulo */
}

.myroute-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.myroute-card:hover {
  transform: translateY(-2px);
}

.myroute-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.myroute-time {
  font-weight: 600;
  font-size: 14px;
}

.myroute-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 500;
}

.myroute-status-scheduled {
  background: #f3f4f6;
  color: #374151;
}

.myroute-status-in_progress {
  background: #fef3c7;
  color: #92400e;
}

.myroute-status-completed {
  background: #dcfce7;
  color: #166534;
}

.myroute-status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.myroute-card-body {
  font-size: 13px;
  color: #374151;
}

/* ========================================= */
/* VISIT DETAIL VIEW */
/* ========================================= */

.myroute-visit-wrapper {
  padding: 16px;
  background: #ffffff;
  min-height: 100%;
}

.myroute-visit-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.myroute-back-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #2563eb;
}

.myroute-visit-title {
  font-weight: 600;
  font-size: 16px;
}

/* ========================================= */
/* VISIT INFO */
/* ========================================= */

.myroute-visit-info {
  background: #f3f4f6;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.myroute-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.myroute-info-label {
  color: #6b7280;
}

.myroute-info-value {
  font-weight: 500;
}

/* ========================================= */
/* START BUTTON */
/* ========================================= */

.myroute-start-container {
  margin-bottom: 16px;
}

.myroute-start-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #16a34a;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.myroute-start-btn:hover {
  opacity: 0.9;
}

/* ========================================= */
/* SECTIONS */
/* ========================================= */

.myroute-section {
  margin-bottom: 20px;
}

.myroute-section-title {
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 14px;
}

/* ========================================= */
/* CHECKLIST */
/* ========================================= */

.myroute-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.myroute-checklist-item input {
  transform: scale(1.1);
}

.myroute-checklist-label {
  font-size: 13px;
}

/* ========================================= */
/* DOSAGE */
/* ========================================= */

.myroute-dosage-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.myroute-dosage-input {
  width: 100px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 13px;
}

/* ========================================= */
/* NOTES */
/* ========================================= */

.myroute-notes-input {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-bottom: 8px;
  font-size: 13px;
}

.myroute-save-notes-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

/* ========================================= */
/* ACTION BUTTONS */
/* ========================================= */

.myroute-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.myroute-complete-btn {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #16a34a;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.myroute-cancel-btn {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #dc2626;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

/* ========================================= */
/* CALENDAR BAR (COMPACT VERSION) */
/* ========================================= */

.myroute-calendar-bar {
  overflow-x: auto;
  margin: 10px 0 8px 0;
  padding-top: 4px;
}

.myroute-calendar-scroll {
  display: flex;
  gap: 6px;
  min-width: max-content;
  padding-bottom: 4px;
}

/* ========================================= */
/* CALENDAR STATES IMPROVED */
/* ========================================= */

.myroute-calendar-day {
  min-width: 40px;
  padding: 4px 2px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.myroute-calendar-day.today {
  background: #e0edff;
  color: #2563eb;
  font-weight: 600;
}

.myroute-calendar-day.selected {
  background: #2563eb;
  color: #ffffff;
}

.myroute-calendar-day.selected .myroute-calendar-month,
.myroute-calendar-day.selected .myroute-calendar-dow {
  color: #ffffff;
}

.myroute-calendar-day:hover {
  transform: scale(1.05);
}

.myroute-calendar-bar.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.myroute-calendar-dow {
  font-size: 11px;
}

.myroute-calendar-date {
  font-size: 10px;
  font-weight: 600;
}

.myroute-calendar-month {
  font-size: 10px;
}

/* ========================================= */
/* DONUT PROGRESS */
/* ========================================= */

.myroute-donut-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.myroute-donut {
  width: 70px;
  height: 70px;
}

.myroute-donut svg {
  transform: rotate(-90deg);
}

.myroute-donut circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.myroute-donut-bg {
  stroke: #e5e7eb;
}

.myroute-donut-progress {
  stroke: #2563eb;
  transition: stroke-dashoffset 0.4s ease;
}

.myroute-donut-text {
  position: absolute;
  text-align: center;
  font-weight: 600;
}

.myroute-donut-number {
  font-size: 14px;
}

.myroute-donut-label {
  font-size: 10px;
  color: #6b7280;
}

.myroute-tech-name {
  font-weight: 600;
  font-size: 15px;
}

/* ========================================= */
/* WEEK MODE */
/* ========================================= */

.myroute-week-card {
  padding: 14px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.myroute-week-name {
  font-weight: 600;
  margin-bottom: 10px;
}

.myroute-week-row {
  display: flex;
  justify-content: space-between;
}

.myroute-week-day {
  text-align: center;
  flex: 1;
}

.myroute-week-mini-donut {
  width: 40px;
  height: 40px;
  margin: 0 auto 4px auto;
}

.myroute-week-mini-donut svg {
  transform: rotate(-90deg);
}

.myroute-week-label {
  font-size: 10px;
}

.myroute-week-mini-donut {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 auto 4px auto;
}

.myroute-week-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 600;
}

.myroute-donut-container {
  position: relative;
  width: 70px;
  height: 70px;
}

.myroute-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.myroute-donut-number {
  font-size: 13px;
  font-weight: 600;
}

.myroute-donut-label {
  font-size: 10px;
  color: #6b7280;
}

/* ======================================================
   MY ROUTE - VISIT DETAIL STYLES
   Todas las clases inician con myroute-
====================================================== */

.myroute-loading {
  padding: 20px;
  text-align: center;
  font-weight: 600;
}

/* ===============================
   HEADER
=============================== */

.myroute-visit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0062ff;
  color: #fff;
  padding: 14px 16px;
  font-size: 14px;
}

.myroute-visit-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* ===============================
   VISIT INFO CARD
=============================== */

.myroute-visit-info {
  background: #ffffff;
  margin: 12px;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 1.6;
}

/* ===============================
   SECTION BLOCK
=============================== */

.myroute-section {
  background: #ffffff;
  margin: 12px;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.myroute-section h3 {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

/* ===============================
   CHECKLIST
=============================== */

.myroute-check-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.myroute-check-item input[type='checkbox'] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

/* ===============================
   DOSAGES
=============================== */

.myroute-dosage-item {
  margin-bottom: 14px;
}

.myroute-dosage-item input {
  margin-top: 6px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  width: 100%;
}

/* ===============================
   NOTES
=============================== */

.myroute-section textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  resize: vertical;
}

/* ===============================
   ACTIONS
=============================== */

.myroute-actions {
  margin: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.myroute-complete-btn {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.myroute-complete-btn:hover {
  opacity: 0.9;
}

/* ===============================
   ADMIN HEADER
=============================== */

.myroute-admin-header {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 14px 16px;

  background: #2563eb;
  color: #ffffff;
  font-weight: 600;

  margin: 0;
  border-radius: 0;
}

.myroute-admin-back-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  margin-right: 10px;
}

.myroute-admin-left {
  display: flex;
  align-items: center;
}

.myroute-admin-center {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.myroute-admin-right {
  font-size: 14px;
  opacity: 0.95;
}

/* ===============================
   LIST CARDS
=============================== */

.myroute-list-card {
  background: #fff;
  margin: 8px 12px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#myRouteAdminList {
  margin-top: 0;
  padding-top: 0;
}

.myroute-list-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.myroute-client-name {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
}

.myroute-list-row2 {
  margin-top: 6px;
  font-size: 14px;
  color: #374151;
}

.myroute-list-row3 {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
}

/* ===============================
   STATUS BADGES
=============================== */

.myroute-status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.myroute-status-scheduled {
  background: #e5e7eb;
  color: #374151;
}

.myroute-status-in_progress {
  background: #2563eb;
  color: #fff;
}

.myroute-status-completed {
  background: #16a34a;
  color: #fff;
}

.myroute-status-cancelled {
  background: #dc2626;
  color: #fff;
}

.myroute-status-needs_review {
  background: #f59e0b;
  color: #fff;
}

#myRouteAdminList {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ======================================================
   MY ROUTE - DETAIL VIEW STYLES
====================================================== */

/* ===============================
   HEADER DETAIL
=============================== */

.myroute-detail-header {
  background: #2563eb;
  color: #ffffff;
  padding: 14px 16px 10px 16px;
  margin: 0;
}

.myroute-detail-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.myroute-detail-back {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  margin-right: 12px;
  cursor: pointer;
}

.myroute-detail-client {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.myroute-detail-row2 {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.95;
}

/* ===============================
   SECTIONS
=============================== */

.myroute-section {
  background: #ffffff;
  margin: 12px;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.myroute-section-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  cursor: pointer;
}

/* ===============================
   COLLAPSABLE
=============================== */

.myroute-section-body.collapsed {
  display: none;
}

.myroute-pool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 14px;
}

.myroute-sub-section {
  margin-top: 12px;
}

.myroute-sub-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.myroute-add-btn {
  background: #e5e7eb;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

/* ===============================
   READINGS GRID
=============================== */

.myroute-reading-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.myroute-reading-box {
  display: flex;
  flex-direction: column;
}

.myroute-reading-label {
  font-size: 12px;
  margin-bottom: 4px;
  color: #374151;
}

/* ===============================
   DOSAGES
=============================== */

.myroute-dosage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.myroute-dosage-left {
  flex: 1;
}

.myroute-dosage-name {
  font-weight: 600;
  font-size: 14px;
}

.myroute-dosage-suggested {
  font-size: 12px;
  color: #6b7280;
}

.myroute-dosage-input {
  width: 90px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  text-align: center;
}

/* ===============================
   CHECKLIST
=============================== */

.myroute-check-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 10px;
  cursor: pointer;
  transition: 0.2s ease;
}

.myroute-check-item.completed {
  background: #dcfce7;
}

.myroute-check-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-weight: bold;
  color: #16a34a;
}

.myroute-check-item.completed .myroute-check-icon {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.myroute-check-text {
  font-size: 14px;
}

/* ===============================
   NOTES
=============================== */

.myroute-notes-area {
  width: 100%;
  min-height: 80px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 10px;
  resize: vertical;
}

/* ===============================
   ACTION BUTTON
=============================== */

.myroute-actions {
  margin: 16px;
}

.myroute-primary-btn {
  width: 100%;
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.myroute-primary-btn:hover {
  opacity: 0.9;
}

/* ===============================
   POOL INFO ADVANCED
=============================== */

.myroute-pool-grid-advanced {
  font-size: 15px;
  display: grid;
  gap: 8px;
}

.myroute-pool-grid-advanced div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.myroute-pool-grid-advanced strong {
  font-weight: 600;
}

.myroute-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 14px 0;
}

.myroute-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.myroute-sub-title {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.myroute-sub-body {
  margin-top: 10px;
}

.myroute-sub-body.collapsed {
  display: none;
}

.myroute-sub-empty {
  font-size: 14px;
  color: #6b7280;
}

.myroute-equipment-item,
.myroute-item-needed {
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.myroute-equipment-item:last-child,
.myroute-item-needed:last-child {
  border-bottom: none;
}

.myroute-reading-card {
  margin-bottom: 20px;
}

.myroute-reading-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.myroute-reading-name {
  font-weight: 600;
  margin-left: 4px;
}

.myroute-reading-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
}

.myroute-reading-input {
  width: 95px;
  padding: 8px 10px;
  font-size: 15px;
  text-align: right;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-weight: 600;
  transition: 0.2s ease;
}

.myroute-reading-input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
}

.myroute-reading-badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.myroute-badge-low {
  background-color: #dc2626;
}

.myroute-badge-ok {
  background-color: #16a34a;
}

.myroute-badge-high {
  background-color: #f59e0b;
}

.myroute-reading-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.myroute-reading-value {
  flex: 0 0 auto;
  min-width: 55px;
  text-align: center;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
}

.myroute-reading-input::-webkit-outer-spin-button,
.myroute-reading-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.myroute-reading-input {
  -moz-appearance: textfield;
}

/* =========================
MY ROUTE FILTER FOOTER
========================= */

.myroute-filter-footer {
  position: sticky;
  bottom: 0;

  display: flex;
  gap: 8px;

  padding: 8px 10px;

  background: #2563eb;
  border-top: none;

  overflow-x: auto;

  z-index: 10;
}

.myroute-filter-btn {
  padding: 8px 14px;
  border-radius: 8px;

  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;

  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.myroute-filter-btn.active {
  background: #ffffff;
  color: #2563eb;
}
