* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  height: 100%;
}

/* Mobile First - Base */
@media (max-width: 575.98px) {
  html {
    font-size: 14px;
  }
  
  body {
    font-size: 14px;
  }
}

/* Contenido responsivo */
.content {
  transition: margin-left 0.3s ease, width 0.3s ease;
  margin-left: 225px;
  width: calc(100% - 225px);
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 991.98px) {
  .content {
    margin-left: 0;
    width: 100%;
  }
}

@media (min-width: 992px) {
  .content {
    margin-left: 225px;
    width: calc(100% - 225px);
  }
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1050;
  transition: transform 0.3s ease;
}

/* Sidebar responsivo */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    position: fixed;
  }
  
  .sidebar.show {
    transform: translateX(0) !important;
  }
}

@media (min-width: 992px) {
  .sidebar {
    width: 225px;
    transform: translateX(0) !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (max-width: 575.98px) {
  .sidebar {
    width: 250px;
    position: fixed;
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0) !important;
  }
}

.sidebar::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(102, 126, 234, 0.5);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(102, 126, 234, 0.8);
}

/* Botón hamburgesa (toggle sidebar) */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  z-index: 1051;
}

/* Botón cerrar sidebar (dentro del sidebar) */
.sidebar-close-btn {
  display: none !important;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.sidebar-close-btn:focus {
  box-shadow: none !important;
  opacity: 0.7;
}

@media (max-width: 991.98px) {
  .sidebar-toggle {
    display: block;
  }
  
  .sidebar-close-btn {
    display: block !important;
  }
}

.nav-link {
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  transform: translateX(5px);
}

.nav-link.active {
  background-color: rgba(255, 255, 255, 0.2) !important;
  font-weight: 600;
}

/* Responsive para nav-link */
@media (max-width: 575.98px) {
  .nav-link {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

.card {
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Tarjetas responsive */
@media (max-width: 575.98px) {
  .card {
    border-radius: 10px;
    margin-bottom: 15px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }
}

/* Modal responsive */
.modal-dialog {
  margin: auto;
}

@media (max-width: 575.98px) {
  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
  
  .modal-content {
    border-radius: 12px;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  .modal-header {
    padding: 15px;
  }
}

/* Video container - Asegurar interactividad en todos los dispositivos */
#modalTaskVideoContainer {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#modalTaskVideoContainer iframe {
  pointer-events: auto !important;
  touch-action: auto !important;
}

@media (min-width: 768px) {
  /* En desktop, revertir el flex-direction para que sea horizontal */
  .row[style*="flex-direction: column-reverse"] {
    flex-direction: row !important;
  }
}

@media (max-width: 767.98px) {
  #modalTaskVideoContainer {
    height: 220px !important;
    margin-bottom: 10px;
  }
}

.btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Botones responsive */
@media (max-width: 575.98px) {
  .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 8px;
  }
  
  .btn-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
    width: auto;
  }
}

@media (max-width: 767.98px) {
  .btn {
    display: block;
    width: 100%;
  }
}

.table {
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.95rem;
}

.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 12px 8px;
}

.table tbody td {
  padding: 12px 8px;
  vertical-align: middle;
}

/* Tablas responsive */
@media (max-width: 767.98px) {
  .table {
    font-size: 0.9rem;
  }
  
  .table thead th {
    font-size: 0.75rem;
    padding: 8px 4px;
  }
  
  .table tbody td {
    padding: 8px 4px;
  }
  
  /* Convertir tabla a versión mobile */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }
  
  /* Si quieres una versión de tarjetas en lugar de tabla */
  .table-card {
    display: block;
    border: 1px solid #dee2e6;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .table-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
  }
  
  .table-card-label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.85rem;
  }
}

.badge {
  padding: 6px 12px;
  font-weight: 500;
  border-radius: 6px;
}

.alert {
  border-radius: 10px;
  border: none;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Formularios responsive */
@media (max-width: 575.98px) {
  .form-control, .form-select {
    font-size: 16px; /* Evita zoom en iOS */
    padding: 12px;
    width: 100%;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-label {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
}

.bg-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Services page purple theme enhancements */
.services-filter-card {
  background: #fff;
  padding: 18px 22px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(111,45,189,0.08);
  display: flex;
  gap: 18px;
  align-items: center;
}

/* Improved visuals for the filters area */
.services-filter-card {
  border: 1px solid rgba(111,45,189,0.06);
  background: linear-gradient(180deg, #ffffff, #fbf8ff);
  padding: 14px 18px;
  gap: 16px;
}
.services-filter-card .form-label.small {
  color: #6f2dbd;
  font-weight: 600;
  font-size: 0.78rem;
}
.services-filter-card .form-control,
.services-filter-card .form-select {
  min-width: auto;
  max-width: 420px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(111,45,189,0.12);
}
.services-filter-card .form-control:focus,
.services-filter-card .form-select:focus {
  border-color: #49a6a6;
  box-shadow: 0 4px 14px rgba(73,166,166,0.08);
}

@media (min-width: 992px) {
  .services-filter-card .form-control,
  .services-filter-card .form-select {
    min-width: 220px;
  }
}
.services-filter-actions {
  display:flex; align-items:flex-end; gap:8px;
}
.services-filter-actions .btn {
  border-radius: 8px;
  padding: 8px 12px;
}

/* Ordenar button variant: green */
.btn-order-green {
  background: linear-gradient(90deg,#28a745 0%, #198754 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 18px rgba(25,135,84,0.12);
}
.btn-order-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(25,135,84,0.14);
}

/* Small responsive tweaks for the filter area */
@media (max-width: 900px) {
  .services-filter-card { flex-direction: column; align-items: stretch; }
  .services-filter-card .form-control, .services-filter-card .form-select { width: 100% !important; }
  .services-filter-actions { justify-content: flex-end; }
}

.services-card {
  border-radius: 14px;
  overflow: visible;
}

/* Platform card styling to match reference: purple accent, rounded container */
.platform-card {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid rgba(111,45,189,0.06);
  box-shadow: 0 14px 40px rgba(111,45,189,0.04);
}
.platform-card .platform-card-inner {
  display: block;
  padding: 12px 18px 18px 18px;
  background: linear-gradient(180deg,#fff,#fbf6ff);
}
.platform-card .platform-title {
  display: flex; align-items:center; gap:12px;
  padding: 10px 16px;
  border-left: 6px solid #6f2dbd;
  background: transparent;
  margin: 0 12px 8px 12px;
  border-radius: 10px;
}
.platform-card .platform-title h5 {
  margin: 0; color:#6f2dbd; font-weight:800; font-size:1.05rem;
}
.platform-card .table thead th {
  background: linear-gradient(180deg,#fbf0ff,#f7f2ff);
  color: #5a2d86;
  border-bottom: none;
}
.platform-card .btn-buy {
  background: linear-gradient(90deg,#7a3bd9 0%, #5a2d86 100%);
  color: #fff; border: none; padding: 6px 12px; border-radius: 8px;
}
.platform-card .btn-desc {
  background: rgba(111,45,189,0.06); color:#5a2d86; border: none; padding: 6px 10px; border-radius: 8px;
}

.services-table thead th {
  background: linear-gradient(180deg,#f6eaff,#f3ecff);
  color: #5a2d86;
  border-bottom: none;
  text-transform: uppercase;
  font-weight: 700;
}

.services-table tbody tr:hover {
  background: rgba(111,45,189,0.03);
}

.services-price {
  color: #6f2dbd;
  font-weight: 700;
}

.btn-purple {
  background: linear-gradient(90deg,#7a3bd9 0%, #5a2d86 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(111,45,189,0.12);
}

.btn-purple:active, .btn-purple:focus {
  box-shadow: 0 6px 16px rgba(111,45,189,0.18);
  transform: translateY(-1px);
}

.chip-category {
  background: rgba(111,45,189,0.06);
  color: #5a2d86;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
}

.content {
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

@media (min-width: 992px) {
  .content {
    margin-left: 225px;
    width: calc(100% - 225px);
  }
}

@media (max-width: 991.98px) {
  .content {
    margin-left: 0;
    width: 100%;
    padding: 10px;
  }
}

@media (max-width: 575.98px) {
  .content {
    padding: 5px;
  }
}

.list-group-item {
  border: none;
  border-radius: 8px !important;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

.list-group-item:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

.accordion-button {
  border-radius: 8px !important;
  font-weight: 500;
}

.accordion-button:not(.collapsed) {
  background-color: #667eea;
  color: white;
}

.accordion-item {
  border-radius: 8px !important;
  overflow: hidden;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card, .alert {
  animation: fadeIn 0.5s ease;
}

/* Loading spinner */
.spinner-border {
  width: 3rem;
  height: 3rem;
}
.input-group .btn {
  border-color: #ced4da;
  background-color: #f8f9fa;
}

.input-group .btn:hover {
  background-color: #e9ecef;
}

.input-group .btn i {
  color: #6c757d;
}
/* ===================================
   SELECT DE PAÍSES CON BANDERAS
   =================================== */
.custom-select-flags {
  font-size: 16px !important;
  padding: 12px 15px !important;
  height: auto !important;
  line-height: 1.5;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.custom-select-flags:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.custom-select-flags option {
  padding: 12px 8px;
  font-size: 16px;
  line-height: 1.8;
  background-color: #fff;
  color: #212529;
}

/* Asegurar que los emojis funcionen en todos los navegadores */
.custom-select-flags,
.custom-select-flags option {
  font-family: 
    'Segoe UI Emoji',
    'Noto Color Emoji', 
    'Apple Color Emoji',
    -apple-system, 
    BlinkMacSystemFont, 
    'Segoe UI', 
    Roboto, 
    Arial, 
    sans-serif;
}

/* Fix para Firefox */
@-moz-document url-prefix() {
  .custom-select-flags option {
    padding: 10px 5px;
  }
}

/* Fix para Safari */
@supports (-webkit-appearance: none) {
  .custom-select-flags option {
    padding: 10px;
  }
}

/* Responsive Services Header */
.services-header {
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .services-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }
  
  .services-header h5 {
    width: 100%;
    margin-bottom: 0.5rem !important;
  }
  
  .services-filter-card {
    width: 100%;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  
  .services-filter-card > div {
    width: 100%;
  }
  
  .services-filter-card select {
    width: 100% !important;
    min-width: unset !important;
  }
  
  .services-filter-actions {
    width: 100%;
  }
  
  .services-filter-actions .btn {
    width: 100%;
  }
  
  /* Services table to cards mobile view */
  .services-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .services-table thead {
    display: none;
  }
  
  .services-table tbody {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  .services-table tr {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  .services-table td {
    width: 100% !important;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .services-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #667eea;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* Inline layout for ID, CATEGORÍA, PRECIO, MÍNIMO, MÁXIMO - SOLO MOBILE */
  @media (max-width: 767.98px) {
    .services-table {
      gap: 0.75rem;
      padding: 0.5rem 0;
    }
    
    .services-table tr {
      gap: 0.5rem;
      padding: 0.75rem;
    }
    
    .services-table td {
      gap: 0.15rem;
    }
    
    .services-table td[data-label="ID"],
    .services-table td[data-label="Categoría"],
    .services-table td[data-label="Precio x 1000"],
    .services-table td[data-label="Mínimo"],
    .services-table td[data-label="Máximo"] {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
    }
    
    .services-table td[data-label="ID"]::before,
    .services-table td[data-label="Categoría"]::before,
    .services-table td[data-label="Precio x 1000"]::before,
    .services-table td[data-label="Mínimo"]::before,
    .services-table td[data-label="Máximo"]::before {
      order: -1;
      flex-shrink: 0;
    }
  }
  
  .services-table td:last-child {
    margin-top: 0.5rem;
  }
  
  .services-table .btn-buy,
  .services-table .btn-desc {
    width: 100%;
    padding: 0.75rem;
    text-align: center !important;
  }
  
  .services-table .btn-buy {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .services-table .chip-category {
    width: fit-content;
  }
}

/* Deposits table to cards mobile view - SOLO PARA CELULARES */
@media (max-width: 767.98px) {
  .deposits-table {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 1rem 0;
  }

  .deposits-table thead {
    display: none !important;
  }

  .deposits-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .deposits-table tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 1.5rem !important;
  }

  .deposits-table td {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem;
  }

  .deposits-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #667eea;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* ID, Método, Monto - layout horizontal */
  .deposits-table td[data-label="ID"],
  .deposits-table td[data-label="Método"],
  .deposits-table td[data-label="Monto"] {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .deposits-table td[data-label="ID"]::before,
  .deposits-table td[data-label="Método"]::before,
  .deposits-table td[data-label="Monto"]::before {
    order: -1;
    flex-shrink: 0;
  }

  /* Voucher, Recibo, Fecha - layout horizontal */
  .deposits-table td[data-label="Voucher"],
  .deposits-table td[data-label="Recibo"],
  .deposits-table td[data-label="Fecha y Hora"] {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .deposits-table td[data-label="Voucher"]::before,
  .deposits-table td[data-label="Recibo"]::before,
  .deposits-table td[data-label="Fecha y Hora"]::before {
    order: -1;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Estado - al final, centrado y más grande */
  .deposits-table td[data-label="Estado"] {
    order: 10;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    padding: 1rem 0 !important;
    border-top: 1px solid #e0e0e0;
    margin-top: 0.5rem !important;
  }

  .deposits-table td[data-label="Estado"]::before {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }

  .deposits-table td[data-label="Estado"] .badge {
    font-size: 0.95rem !important;
    padding: 0.6rem 1.2rem !important;
  }

  /* Botones más compactos en móvil */
  .deposits-table .btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
  }
}
}

/* Celulares pequeños - Asegurar botón centrado */
@media (max-width: 575.98px) {
  .services-table .btn-buy {
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }
}

/* Móviles - Unified mobile breakpoint */
@media (max-width: 767.98px) {
  .custom-select-flags {
    font-size: 14px !important;
  }
  
  .custom-select-flags option {
    font-size: 14px;
    padding: 10px 5px;
  }
}

/* Nueva Orden Page Enhancements */
.form-select-lg, .form-control-lg {
  border-radius: 12px;
  border: 1px solid #dee2e6;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-select-lg:focus, .form-control-lg:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.3rem rgba(102, 126, 234, 0.15);
}

.rounded-3 {
  border-radius: 12px !important;
}

.rounded-2 {
  border-radius: 10px !important;
}

/* Orders Table Desktop/Mobile Display Rules */
.orders-table-desktop {
  display: block;
}

.orders-table-mobile {
  display: none;
}

/* ALL MOBILE-ONLY STYLES - Unified breakpoint 767.98px */
@media (max-width: 767.98px) {
  .orders-table-desktop {
    display: none;
  }

  .orders-table-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .col-lg-3, .col-lg-9 {
    flex: 0 0 100% !important;
  }
  
  /* Orders Filters - 2 columns layout */
  .orders-filters-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    margin-bottom: 1rem;
  }
  
  .orders-filters-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .orders-filters-buttons .btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.625rem 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
  
  .btn-nueva-orden {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
  }

  /* Mobile: Orders Cards */
  .orders-table-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
  }
  
  /* Orders Cards Styling */
  .orders-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
  }

  .orders-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #e0e0e0;
  }

  .orders-card-header strong {
    color: white !important;
  }

  .orders-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .orders-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
  }

  .orders-card-row:last-child {
    border-bottom: none;
  }

  .orders-card-label {
    font-weight: 600;
    color: #667eea;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 0 0 40%;
  }

  .orders-card-value {
    flex: 1;
    text-align: right;
    color: #333;
    font-size: 0.95rem;
    word-break: break-word;
  }

  /* Row vertical para SERVICIO */
  .orders-card-row-vertical {
    flex-direction: column;
    align-items: flex-start;
  }

  .orders-card-row-vertical .orders-card-value {
    text-align: left;
    margin-top: 0.5rem;
  }

  .orders-card-footer {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
  }

  .orders-card-footer .btn,
  .orders-card-footer .badge {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem !important;
  }

  /* Formularios y cards - Responsive en móvil */
  .card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .form-label {
    font-size: 0.95rem;
  }
  
  .input-group-text {
    font-size: 0.9rem;
  }
  
  .form-control, .form-select {
    font-size: 1rem;
    padding: 0.625rem 0.75rem;
  }
  
  .btn {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
  
  /* Logo responsivo */
  .logo-circle {
    width: 80px !important;
    height: 80px !important;
  }
  
  /* Modales responsivos */
  dialog {
    max-width: 100% !important;
    width: 95vw !important;
    max-height: 95vh !important;
  }
  
  @media (max-width: 575.98px) {
    .card-body {
      padding: 1rem !important;
    }
    
    .logo-circle {
      width: 60px !important;
      height: 60px !important;
    }
    
    .logo-circle i {
      font-size: 1.2rem !important;
    }
  }
}

/* MEJORAS DE UX MÓVIL ADICIONALES */
@media (max-width: 767.98px) {
  /* Asegurar espaciado mínimo en botones */
  .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Asegurar links clickeables */
  a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  
  /* Mejorar inputs */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    min-height: 44px;
    padding: 0.625rem 0.875rem !important;
  }

  /* Tasks Mobile Layout */
  #tasksHeaderDesktop {
    display: flex !important;
  }

  #tasksHeaderMobile {
    display: none !important;
  }

  #tasksFilterDesktop {
    display: flex !important;
  }

  #tasksGridDesktop {
    display: block !important;
  }

  #tasksListMobile {
    display: none !important;
  }

  @media (max-width: 767.98px) {
    #tasksHeaderDesktop {
      display: none !important;
    }

    #tasksHeaderMobile {
      display: block !important;
    }

    #tasksFilterDesktop {
      display: none !important;
    }

    #tasksGridDesktop {
      display: none !important;
    }

    #tasksListMobile {
      display: block !important;
    }

    .tasks-mobile-header {
      padding: 0;
    }

    .tasks-mobile-header .form-label {
      font-size: 0.85rem;
    }

    .tasks-mobile-header select {
      font-size: 0.95rem;
    }

    .task-card-mobile {
      transition: all 0.2s ease;
    }

    .task-card-mobile:active {
      transform: scale(0.98);
    }
  }
  
  /* Evitar overflow en items */
  .item, 
  .card,
  .modal-content {
    overflow-x: hidden;
  }
  
  /* Asegurar iconos clickeables */
  i[class*="fas"],
  i[class*="fab"] {
    min-width: 24px;
    min-height: 24px;
  }

  /* Distribución de botones de tipo reporte en móvil */
  .card-body > .mb-3.d-flex {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
  }

  .card-body > .mb-3.d-flex .type-btn {
    flex: 0 1 calc(33.333% - 0.35rem) !important;
    min-width: 70px;
    padding: 0.4rem 0.5rem !important;
    font-size: 0.75rem !important;
  }

  .card-body > .mb-3.d-flex .type-btn i {
    font-size: 0.9rem !important;
  }

  /* Retiros y Otros en segunda fila */
  .card-body > .mb-3.d-flex .retiros,
  .card-body > .mb-3.d-flex .otros {
    flex: 0 1 calc(50% - 0.25rem) !important;
  }

  /* Filtros de status en 2 columnas en móvil */
  .col-lg-8 > .mb-3.d-flex.gap-2.flex-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
  }

  .col-lg-8 > .mb-3.d-flex.gap-2.flex-wrap > .btn {
    flex: 0 1 calc(50% - 0.25rem) !important;
    min-width: 60px;
    padding: 0.4rem 0.3rem !important;
    font-size: 0.75rem !important;
  }

  .col-lg-8 > .mb-3.d-flex.gap-2.flex-wrap > .btn i {
    font-size: 0.85rem !important;
    margin-right: 0.3rem !important;
  }

  /* ===== HISTORIAL DE TICKETS EN CARDS - MOBILE ===== */
  .table-responsive {
    overflow: visible !important;
  }

  .table-responsive table {
    display: block !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .table-responsive table thead {
    display: none !important;
  }

  .table-responsive table tbody {
    display: block !important;
  }

  /* SOLO PARA TABLA DE TICKETS - NO APLICA A SERVICIOS */
  .tickets-table tbody tr {
    display: block !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    background-color: white !important;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    width: 100% !important;
  }

  .tickets-table tbody tr td {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 0 !important;
    border: none !important;
    background-color: transparent !important;
    text-align: left !important;
  }

  .tickets-table tbody tr td::before {
    font-weight: 600 !important;
    color: #6c757d !important;
    display: block !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
  }

  .tickets-table tbody tr td:nth-child(1)::before {
    content: 'ID TICKET:' !important;
  }

  .tickets-table tbody tr td:nth-child(2)::before {
    content: 'FECHA:' !important;
  }

  .tickets-table tbody tr td:nth-child(3)::before {
    content: 'DESCRIPCIÓN:' !important;
  }

  .tickets-table tbody tr td:nth-child(4)::before {
    content: 'ESTADO:' !important;
  }

  .tickets-table tbody tr td:nth-child(5)::before {
    content: 'ACCIONES:' !important;
  }

  .tickets-table tbody tr td.fw-bold {
    font-size: 1rem !important;
  }

  .tickets-table tbody tr small {
    font-size: 0.9rem !important;
  }

  /* Alinear etiqueta a la izquierda y datos a la derecha: ID, FECHA, ESTADO */
  .tickets-table tbody tr td:nth-child(1),
  .tickets-table tbody tr td:nth-child(2),
  .tickets-table tbody tr td:nth-child(4) {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .tickets-table tbody tr td:nth-child(1)::before,
  .tickets-table tbody tr td:nth-child(2)::before,
  .tickets-table tbody tr td:nth-child(4)::before {
    margin-right: auto !important;
    margin-bottom: 0 !important;
  }

  /* Icono de monedas en Saldo de Tareas - Mobile */
  #totalEarningsMobile::before {
    content: '\f51e' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    margin-right: 0.5rem !important;
    color: inherit !important;
    display: inline-block !important;
  }

  /* Cuadros de estado en página de Retiros - Mobile */
  .withdrawals-status-boxes {
    flex: 1 1 100% !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  .withdrawals-status-boxes > div {
    flex: 1 1 calc(33.333% - 0.35rem) !important;
    max-width: none !important;
    padding: 2px 6px !important;
    min-width: 0 !important;
  }

  /* TABLA DE RETIROS EN TARJETAS - MOBILE */
  .withdrawals-table {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 1rem 0 !important;
  }

  .withdrawals-table thead {
    display: none !important;
  }

  .withdrawals-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .withdrawals-table tbody tr {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
  }

  .withdrawals-table tbody tr td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
  }

  .withdrawals-table tbody tr td::before {
    content: attr(data-label) !important;
    font-weight: 600 !important;
    color: #6c757d !important;
    font-size: 0.85rem !important;
    margin-right: auto !important;
  }

  .withdrawals-table tbody tr td[data-label="Estado"] {
    justify-content: center !important;
    padding-top: 0.75rem !important;
    border-top: 1px solid #e0e0e0 !important;
  }

  .withdrawals-table tbody tr td[data-label="Estado"]::before {
    display: none !important;
  }

  .withdrawals-table tbody tr td span {
    text-align: right !important;
  }

  .withdrawals-table tbody tr td[data-label="Cuenta/Email"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .withdrawals-table tbody tr td[data-label="Cuenta/Email"]::before {
    margin-right: 0 !important;
    margin-bottom: 0.5rem !important;
  }
}