body {
  overflow-x: hidden;
}

/* ========================================= */
/* MY ROUTE WRAPPER */
/* ========================================= */

.myroute-wrapper {
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;

  overflow: hidden;
}

/* 🔥 CLAVE: permitir que el contenido crezca */
#myRouteAdminList {
  flex: 1;
  overflow-y: auto;
  display: block;
}

.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 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.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;
  touch-action: pan-y;
}

.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: 4px;
  background: #e5e7eb;
  margin: 16px 0;
  border-radius: 1px;
}

.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;
}

/* =========================================
   SWIPE REAL (LEFT + RIGHT)
========================================= */

.myroute-reschedule-wrapper {
  position: relative;
  margin: 8px 12px;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
}

/* =========================
   LEFT (Billing)
========================= */
.myroute-swipe-left {
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  border-radius: 12px 0 0 12px;
  z-index: 1;
}

/* =========================
   RIGHT (Reschedule)
========================= */
.myroute-swipe-right {
  position: absolute;
  right: 0;
  top: 5px;
  bottom: 5px;
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  border-radius: 0 12px 12px 0;
  z-index: 1;
}

/* =========================
   BUTTONS
========================= */
.myroute-billing-btn,
.myroute-reschedule-btn {
  color: #fff;
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

/* =========================
   CARD (FRONT LAYER)
========================= */
.myroute-card {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

/* 🔥 CLAVE */
.myroute-reschedule-wrapper .myroute-card {
  width: 100%;
}

.myroute-billing-btn,
.myroute-reschedule-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  color: #fff;
  background: transparent;
  border: none;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.myroute-billing-btn i,
.myroute-reschedule-btn i {
  font-size: 18px;
}

/* =========================================
   RESCHEDULE HEADER
========================================= */

.myroute-reschedule-header {
  background: #2563eb;
  color: #ffffff;
  padding: 14px;
}

.myroute-reschedule-row1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.myroute-reschedule-back {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
}

.myroute-reschedule-client {
  font-weight: 600;
  font-size: 15px;
}

.myroute-reschedule-row2 {
  font-size: 18px;
  opacity: 0.9;
  margin-top: 4px;
}

/* =========================================
   RESCHEDULE BODY
========================================= */

.myroute-reschedule-body {
  padding: 12px;
}

.myroute-reschedule-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.myroute-reschedule-title-row .title {
  font-weight: 600;
  font-size: 14px;
}

.myroute-reschedule-title-row .actions {
  display: flex;
  gap: 6px;
}

/* FIELD */
.myroute-field {
  margin-bottom: 10px;
}

.myroute-field label {
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

/* FIELD WITH ICON */
.myroute-field-with-icon {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.myroute-field-with-icon select {
  flex: 1;
  width: 100%;
}

/* 🔥 NORMALIZAR TODOS LOS SELECTS */
.myroute-field select,
.myroute-row-2 select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 10px;
  font-size: 16px;
}

/* GEAR TEMP */
.gear-btn {
  background: red;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 10px;
  flex: 0 0 36px;
}

/* ROW 2 */
.myroute-row-2 {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.myroute-row-2 .field {
  flex: 1;
}

/* INLINE FIELD */
.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* SWITCH (iPhone style) */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  background: #ccc;
  border-radius: 20px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: '';
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: #2563eb;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.repeat-block {
  display: none;
  margin-bottom: 10px;
}

.repeat-weekdays {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  font-size: 16px;
}

/* =========================================
   REMOVE NUMBER SPINNERS
========================================= */

/* Chrome, Safari, Edge */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type='number'] {
  -moz-appearance: textfield;
}

/* =========================================
   INPUT STYLE (MATCH SCHEDULE)
========================================= */

.repeat-block input[type='number'] {
  width: 100%;
  padding: 8px 10px;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  font-size: 16px;
  background: #ffffff;

  box-sizing: border-box;
}

.repeat-block label {
  font-size: 16px;
  margin-bottom: 4px;
  display: block;
}

/* =========================================
   SECTION DIVIDER (LIKE SCHEDULE)
========================================= */

.myroute-section {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

/* INPUT STYLE CLEAN */

.myroute-row-2 input,
.myroute-row-2 select {
  width: 100%;
  padding: 6px 8px;

  border: 1px solid #d1d5db;
  border-radius: 8px;

  font-size: 13px;
  background: #ffffff;

  box-sizing: border-box;
}

.myroute-row-2 label {
  font-size: 12px;
  margin-bottom: 4px;
  display: block;
}

.myroute-row-2 {
  display: flex;
  gap: 10px;
}

.myroute-row-2 .field {
  flex: 1;
}

/* =========================================
   SWITCH + HORIZON (LIKE SCHEDULE)
========================================= */

.myroute-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* IZQUIERDA */
.switch-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-container label {
  font-size: 12px;
}

/* DERECHA */
.horizon-field {
  width: 120px;
}

.horizon-field input {
  width: 100%;
  text-align: center;
}

/* =========================================
   SWITCH AS FIELD (LIKE INPUT)
========================================= */

.switch-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.switch-wrapper {
  display: flex;
  align-items: center;
  height: 32px; /* 🔥 igual altura visual que inputs */
}

/* =========================================
   VISITS PREVIEW
========================================= */

.myroute-programacion {
  margin-top: 10px;
}

.myroute-programacion .title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.myroute-programacion .list {
  font-size: 12px;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.visits-table {
  width: 100%;
  font-size: 13px;
}

.visits-table-header {
  display: grid;
  grid-template-columns: 1fr 120px;
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid #ddd;
}

.visits-table-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.visit-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f1f1;
}

.visit-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  text-align: center;
}

.status-completed {
  background: #dcfce7;
  color: #166534;
}

.status-scheduled {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.status-inprogress {
  background: #fef3c7;
  color: #92400e;
}

.myroute-notes {
  margin-top: 10px;
}

.notes-group {
  margin-bottom: 10px;
}

.notes-group textarea {
  width: 100%;
  padding: 6px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #ddd;
  resize: vertical;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.notes-header label {
  font-weight: 600;
}

.notes-group textarea {
  width: 100%;
  padding: 6px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* =========================
   BASE
========================= */

.billing-table {
  width: 100%;
  font-size: 13px;
}

.billing-table-body {
  display: flex;
  flex-direction: column;
}

.billing-row > div {
  min-width: 0;
}

/* =========================
   UPCOMING
========================= */

.billing-upcoming-table .billing-table-header {
  display: grid;
  grid-template-columns: 18% 64% 18%;
  font-size: 12px;
  color: #666;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

.billing-upcoming-table .billing-row {
  display: grid;
  grid-template-columns: 18% 64% 18%;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f1;
}

/* service */
.billing-upcoming-table .billing-row div:nth-child(2) {
  white-space: normal;
  line-height: 1.2;
}

/* amount */
.billing-upcoming-table .billing-row div:nth-child(3) {
  display: flex;
  justify-content: flex-end;
}

/* =========================
   INPUTS
========================= */

.billing-amount-input,
.billing-upcoming-input {
  width: 70px;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  text-align: right;
}

.billing-upcoming-input {
  width: 70px;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  text-align: right;
}

/* =========================
   STATUS
========================= */

.billing-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.billing-status-paid {
  background: #dcfce7;
  color: #166534;
}

.billing-status-pending {
  background: #dbeafe;
  color: #1e3a8a;
}

.billing-status-overdue {
  background: #fee2e2;
  color: #991b1b;
}

/* =========================
   BUTTON
========================= */

.billing-pay-btn {
  background: #16a34a;
  border: none;
  color: white;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  width: 36px;
}

/* =========================
   BILLING STATUS BADGES
========================= */

.billing-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  display: inline-block;
}

/* PAID → VERDE */
.billing-status-paid {
  background: #dcfce7;
  color: #166534;
}

/* PENDING → AMARILLO */
.billing-status-pending {
  background: #fef9c3;
  color: #854d0e;
}

/* OVERDUE → ROJO */
.billing-status-overdue {
  background: #fee2e2;
  color: #991b1b;
}

/* =========================
   ROW STATES
========================= */

/* fila base */
.billing-row {
  align-items: center;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.billing-row {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

/* CONTENEDOR PRINCIPAL */
.billing-row-line {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.5fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

/* COLUMNAS */
.billing-col {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* DATE */
.billing-date {
  font-weight: 600;
}

/* AMOUNT */
.billing-amount {
  color: #374151;
}

/* EXTRA (paid info) */
.billing-extra {
  font-size: 12px;
  color: #6b7280;
}

/* ACTION */
.billing-action {
  text-align: right;
}

/* hover */
.billing-row:hover {
  background: #f9fafb;
}

/* overdue highlight */
.billing-row-overdue {
  background: #fff5f5;
  border-left: 4px solid #dc2626;
}

/* =========================
   ACTION BUTTONS
========================= */

.billing-pay-btn {
  background: #16a34a;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.billing-pay-btn:hover {
  background: #15803d;
}

.billing-reverse-btn {
  background: #e5e7eb;
  color: #111;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 5px;
}

.billing-reverse-btn:hover {
  background: #d1d5db;
}

/* =========================
   TABLE HEADER
========================= */

.billing-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  font-weight: 600;
  font-size: 13px;
  padding: 8px;
  border-bottom: 2px solid #ddd;
  background: #f8fafc;
}

/* =========================
   NEXT PAYMENT
========================= */

.billing-next {
  font-size: 14px;
  line-height: 1.6;
}

.billing-next-overdue {
  color: #dc2626;
  font-weight: 600;
}

/* BOTONES MÁS COMPACTOS */
.billing-pay-btn,
.billing-reverse-btn {
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.myroute-item-needed {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* 64% */
.myroute-item-col-text {
  width: 64%;
  font-size: 14px;
}

/* 16% */
.myroute-item-col-badge {
  width: 16%;
  text-align: center;
}

/* 16% */
.myroute-item-col-action {
  width: 16%;
  text-align: right;
}

/* BADGES */
.myroute-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 12px;
  color: #fff;
}

.badge-chemical {
  background: #2563eb;
}

.badge-product {
  background: #16a34a;
}

.badge-part {
  background: #f59e0b;
}

.badge-other {
  background: #6b7280;
}

.myroute-item-col-qty {
  width: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: #f3f4f6;
  border-radius: 6px;
  cursor: pointer;
}

.qty-value {
  min-width: 20px;
  text-align: center;
}
