:root {
  --pa-primary-color: #0d6efd;
  --pa-primary-hover: #0b5ed7;
  --pa-secondary-color: #6c757d;
  /* --pa-success-color: #198754; */
  --pa-success-color: #28a745;
  /* --pa-danger-color: #dc3545; */
  --pa-danger-color: #007bff;
  /* --pa-warning-color: #ffc107; */
  --pa-warning-color: #fd7e14;
  --pa-info-color: #0dcaf0;
  --pa-light-color: #f8f9fa;
  --pa-dark-color: #212529;
  --pa-white-color: #ffffff;
  --pa-black-color: #000000;
  --pa-gray-100: #f8f9fa;
  --pa-gray-200: #e9ecef;
  --pa-gray-300: #dee2e6;
  --pa-gray-400: #ced4da;
  --pa-gray-500: #adb5bd;
  --pa-gray-600: #6c757d;
  --pa-gray-700: #495057;
  --pa-gray-800: #343a40;
  --pa-gray-900: #212529;
  
  --pa-font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --pa-border-radius: 0.25rem;
  --pa-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --pa-transition: all 0.2s ease-in-out;
  
  --pa-body-bg: #f8f9fa;
  --pa-body-color: #212529;
  --pa-panel-bg: #ffffff;
  --pa-panel-header-bg: var(--pa-primary-color);
  --pa-panel-header-color: #ffffff;
  --pa-input-bg: #ffffff;
  --pa-input-border: #ced4da;
  --pa-input-color: #212529;
  --pa-table-border: #dee2e6;
  --pa-table-hover: rgba(0, 0, 0, 0.075);
  --pa-table-header-bg: #f8f9fa;
  --pa-modal-bg: #ffffff;
  --pa-modal-border: #dee2e6;
}

/* Dark mode variables */
body.dark-mode {
  --pa-body-bg: #121212;
  --pa-body-color: #e0e0e0;
  --pa-panel-bg: #1e1e1e;
  --pa-panel-header-bg: #2c2c2c;
  --pa-panel-header-color: #ffffff;
  --pa-input-bg: #2c2c2c;
  --pa-input-border: #444444;
  --pa-input-color: #e0e0e0;
  --pa-table-border: #444444;
  --pa-table-hover: rgba(255, 255, 255, 0.05);
  --pa-table-header-bg: #2c2c2c;
  --pa-modal-bg: #1e1e1e;
  --pa-modal-border: #444444;
  --pa-gray-100: #2c2c2c;
  --pa-gray-200: #333333;
  --pa-gray-300: #444444;
  --pa-gray-400: #555555;
  --pa-gray-500: #666666;
  --pa-gray-600: #888888;
  --pa-gray-700: #aaaaaa;
  --pa-gray-800: #cccccc;
  --pa-gray-900: #e0e0e0;
}

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

body {
  font-family: var(--pa-font-family);
  background-color: var(--pa-body-bg);
  color: var(--pa-body-color);
  line-height: 1.5;
  transition: var(--pa-transition);
}

/* Theme switcher */
.pa-theme-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.pa-theme-switcher {
  background-color: var(--pa-gray-800);
  color: var(--pa-gray-200);
  border: none;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--pa-transition);
}

.pa-theme-switcher:hover {
  background-color: var(--pa-gray-700);
}

.dark-mode .pa-theme-switcher {
  background-color: var(--pa-gray-200);
  color: var(--pa-gray-800);
}

.dark-mode .pa-theme-switcher:hover {
  background-color: var(--pa-gray-300);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

.pa-main-title {
  text-align: center;
  margin: 1rem 0;
  font-size: 2rem;
  color: var(--pa-primary-color);
}

.pa-text-muted {
  color: var(--pa-gray-600);
}

.pa-text-center {
  text-align: center;
}

/* Layout */
.pa-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Panel */
.pa-panel {
  background-color: var(--pa-panel-bg);
  border-radius: var(--pa-border-radius);
  box-shadow: var(--pa-box-shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.pa-panel-heading {
  background-color: var(--pa-panel-header-bg);
  color: var(--pa-panel-header-color);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pa-panel-title {
  margin: 0;
  font-size: 1.25rem;
  color: #fff;
}

.pa-panel-body {
  padding: 1rem;
}

/* Search and filter container */
.pa-search-filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.pa-search-container {
  flex: 1 1 200px;
}

.pa-filter-container {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  justify-content: space-evenly;
}

/* Input group */
.pa-input-group {
  display: flex;
  position: relative;
}

.pa-input-group-text {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background-color: var(--pa-primary-color);
  color: var(--pa-white-color);
  border: 1px solid var(--pa-primary-color);
  border-radius: var(--pa-border-radius) 0 0 var(--pa-border-radius);
}

.pa-form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--pa-input-color);
  background-color: var(--pa-input-bg);
  background-clip: padding-box;
  border: 1px solid var(--pa-input-border);
  border-radius: 0;
  transition: var(--pa-transition);
}

.pa-form-control:focus {
  border-color: var(--pa-primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.pa-btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: var(--pa-border-radius);
  transition: var(--pa-transition);
  border: 1px solid transparent;
}

.pa-btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
}

.pa-btn-icon {
  background-color: transparent;
  color: var(--pa-primary-color);
  border: none;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 50%;
  transition: var(--pa-transition);
}

.pa-btn-icon:hover {
  color: var(--pa-primary-hover);
  background-color: var(--pa-gray-200);
}

.pa-btn-primary {
  background-color: var(--pa-primary-color);
  color: var(--pa-white-color);
  border-color: var(--pa-primary-color);
}

.pa-btn-primary:hover {
  background-color: var(--pa-primary-hover);
  border-color: var(--pa-primary-hover);
}

.pa-btn-secondary {
  background-color: var(--pa-secondary-color);
  color: var(--pa-white-color);
  border-color: var(--pa-secondary-color);
}

.pa-btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.pa-btn-light {
  background-color: var(--pa-light-color);
  color: var(--pa-dark-color);
  border-color: var(--pa-light-color);
}

.pa-btn-light:hover {
  background-color: #e2e6ea;
  border-color: #dae0e5;
}

.pa-btn-outline {
  background-color: transparent;
  color: var(--pa-primary-color);
  border-color: var(--pa-primary-color);
}

.pa-btn-outline:hover {
  background-color: var(--pa-primary-color);
  color: var(--pa-white-color);
}

/* Dropdown */
.pa-dropdown {
  position: relative;
  display: inline-block;
}

.pa-dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.255em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
}

.pa-dropdown-menu {
  position: absolute;
  z-index: 1000;
  display: none;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0;
  font-size: 1rem;
  color: var(--pa-body-color);
  text-align: left;
  list-style: none;
  background-color: var(--pa-panel-bg);
  background-clip: padding-box;
  border: 1px solid var(--pa-gray-300);
  border-radius: var(--pa-border-radius);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  top: 100%;
  left: 0;
  margin-top: 0.125rem;
}

.pa-dropdown-menu.show {
  display: block;
}

.pa-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.25rem 1rem;
  clear: both;
  font-weight: 400;
  color: var(--pa-body-color);
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
  cursor: pointer;
}

.pa-dropdown-item:hover, .pa-dropdown-item:focus {
  color: var(--pa-gray-900);
  background-color: var(--pa-gray-200);
}

.pa-dropdown-item.active {
  color: var(--pa-white-color);
  text-decoration: none;
  background-color: var(--pa-primary-color);
}

/* Table */
.pa-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pa-table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--pa-body-color);
  vertical-align: middle;
  border-collapse: collapse;
  /* table-layout: fixed; */
}

.pa-table th,
.pa-table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--pa-table-border);
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 300px;
}

.pa-table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #222425;
  background-color: var(--pa-table-header-bg);
  font-weight: 600;
  color:#070707;
}

.pa-table tbody tr:hover {
  background-color: var(--pa-table-hover);
}

.pa-table-sm th,
.pa-table-sm td {
  padding: 0.3rem;
}

.pa-fw-medium {
  font-weight: 500;
  word-break: break-word;
}

/* Badges */
.pa-badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: var(--pa-white-color);
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--pa-border-radius);
}

.pa-badge.pa-success {
  background-color: var(--pa-success-color);
}

.pa-badge.pa-danger {
  background-color: var(--pa-danger-color);
}

.pa-badge.pa-warning {
  background-color: var(--pa-warning-color);
}

.pa-badge.pa-info {
  background-color: var(--pa-info-color);
}

/* Alerts */
.pa-alert-info {
  position: relative;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--pa-border-radius);
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
  display: none;
}

.pa-alert-info.show {
  display: block;
}

/* Modal */
.pa-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
  display: none;
}

.pa-modal.show {
  display: block;
}

.pa-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: var(--pa-black-color);
  opacity: 0.5;
  display: none;
}

.pa-modal-backdrop.show {
  display: block;
}

.pa-modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  max-width: 800px;
  pointer-events: none;
}

.pa-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: var(--pa-modal-bg);
  background-clip: padding-box;
  border: 1px solid var(--pa-modal-border);
  border-radius: var(--pa-border-radius);
  outline: 0;
  box-shadow: var(--pa-box-shadow);
}

.pa-modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--pa-modal-border);
  background-color: var(--pa-primary-color);
  color: var(--pa-white-color);
  border-top-left-radius: calc(var(--pa-border-radius) - 1px);
  border-top-right-radius: calc(var(--pa-border-radius) - 1px);
}

.pa-modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pa-modal-close {
  padding: 0.3rem 0.5rem 0.5rem 0.5rem;
  background-color: transparent;
  border: 0;
  font-size: 1.5rem;
  color: var(--pa-white-color);
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

/* .pa-modal-close:hover {
  transform: rotate(90deg);
} */

.pa-modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1.5rem;
}

.pa-modal-footer {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--pa-modal-border);
}

/* Flow Info Styles */
.pa-flow-info {
  display: flex !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem;
}

.pa-flow-info-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.pa-flow-info-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.pa-flow-info-item i {
  font-size: 1.25rem;
  color: var(--pa-primary-color);
}

.pa-flow-info-content {
  flex: 1;
}

.pa-flow-info-label {
  display: block;
  font-size: 0.875rem;
  color: var(--pa-gray-600);
  margin-bottom: 0.25rem;
}

.pa-flow-info-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--pa-body-color);
}

/* Flow Details Styles */
.pa-flow-details {
  background-color: var(--pa-gray-100);
  border-radius: var(--pa-border-radius);
  padding: 1.5rem;
}

.pa-flow-details-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--pa-body-color);
}

.pa-flow-details-title i {
  color: var(--pa-primary-color);
}

.pa-flow-details-text {
  color: var(--pa-body-color);
  line-height: 1.6;
  margin: 0;
}

/* Dark Mode Adjustments */
body.dark-mode .pa-modal-content,
body.dark-mode .pa-modal-header,
body.dark-mode .pa-modal-body,
body.dark-mode .pa-modal-footer {
  background-color: var(--pa-modal-bg);
  border-color: var(--pa-modal-border);
}

body.dark-mode .pa-flow-details {
  background-color: #2b2a2a;
}

body.dark-mode .pa-flow-info-label {
  color: var(--pa-gray-400);
}

body.dark-mode .pa-table {
  color: var(--pa-body-color);
}

body.dark-mode .pa-table th,
body.dark-mode .pa-table td {
  border-color: var(--pa-table-border);
}

body.dark-mode .pa-table thead th {
  background-color: #000000;
  color: #fff;
}

body.dark-mode .pa-table tbody tr:hover {
  background-color: var(--pa-table-hover);
}

/* Paginación */
.pa-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem 0;
}

.pa-pagination-btn {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--pa-gray-300);
  background-color: var(--pa-panel-bg);
  color: var(--pa-body-color);
  border-radius: var(--pa-border-radius);
  cursor: pointer;
  transition: var(--pa-transition);
}

.pa-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pa-pagination-btn:hover:not(:disabled) {
  background-color: var(--pa-gray-200);
}

.pa-pagination-btn.active {
  background-color: var(--pa-primary-color);
  color: var(--pa-white-color);
  border-color: var(--pa-primary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .pa-flow-info {
    flex-direction: column !important;
  }

  .pa-flow-info-item {
    width: 100%;
  }
  
  .pa-modal-dialog {
    margin: 0.5rem;
  }
  
  .pa-search-filter-container {
    flex-direction: column;
  }
  
  .pa-filter-container {
    justify-content: space-between;
  }
}

/* Centrado del icono de ojo */
.pa-table td:last-child {
  text-align: center !important;
}

.pa-btn-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Mejoras en el modal */
.pa-modal-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
}

.pa-modal-title i {
  font-size: 1.5rem;
}

.pa-modal-close {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  width: 32px;
  height: 32px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.pa-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Ajuste del layout del modal */
.pa-flow-info {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10rem !important;
  margin-bottom: 1.5rem;
}

/* Paginación mejorada */
.pa-pagination {
  margin-top: 1.5rem;
  padding: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pa-pagination-btn {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--pa-border-radius);
  border: 1px solid var(--pa-gray-300);
  background-color: var(--pa-panel-bg);
  color: var(--pa-body-color);
  cursor: pointer;
  transition: all 0.2s;
}

.pa-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pa-pagination-btn:not(:disabled):hover {
  background-color: var(--pa-gray-200);
  border-color: var(--pa-gray-400);
}

.pa-pagination-btn.active {
  background-color: var(--pa-primary-color);
  color: white;
  border-color: var(--pa-primary-color);
}

/* Alineación de la columna Estado y sus valores */
.pa-table th:nth-child(2),
.pa-table td:nth-child(2) {
  padding-left: 160px;
}

.pa-table th:nth-child(3),
.pa-table td:nth-child(3) {
  padding-left: 120px;
}

/* Responsive Adjustments */

@media (max-width: 768px) {

  .pa-flow-info {

    flex-direction: column !important;

  }
 
  .pa-flow-info-item {

    width: 100%;

  }

  .pa-modal-dialog {

    margin: 0.5rem;

  }

  .pa-search-filter-container {

    flex-direction: column;

    gap: 0.75rem;

  }

  .pa-filter-container {

    flex-direction: row !important;

    justify-content: space-between;

    width: 100%;

  }
 
  .pa-dropdown {

    width: 48%;

  }
 
  /* Ajustes para la tabla en móvil */

  .pa-table tbody tr {

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 0.5rem;

    padding: 1rem;

    border: 1px solid var(--pa-table-border);

    border-radius: var(--pa-border-radius);

    margin-bottom: 1rem;

  }
 
  .pa-table td {

    padding: 0.5rem;

    border: none;

    display: flex;

    align-items: center;

    justify-content: flex-start;

    text-align: left !important;

  }
 
  .pa-table td:first-child {

    grid-column: 1 / -1;

    font-weight: 600;

    font-size: 1rem;

    padding-left: 0;

  }
 
  .pa-table td:nth-child(2),

  .pa-table td:nth-child(3) {

    padding-left: 0;

    justify-content: flex-start;

  }
 
  .pa-table td:last-child {

    justify-content: flex-start;

  }
 
  .pa-table thead {

    display: none;

  }
 
  .pa-table td:nth-child(2)::before {

    content: "Tipo: ";

    font-weight: 600;

    margin-right: 0.5rem;

  }
 
  .pa-table td:nth-child(3)::before {

    content: "Frecuencia: ";

    font-weight: 600;

    margin-right: 0.5rem;

  }

}
 
/* Ajustes para pantallas muy pequeñas */

@media (max-width: 480px) {

  .pa-main-title {

    font-size: 1.5rem;

    margin: 0.75rem 0;

  }
 
  .pa-search-container {

    flex: content;

  }

  .pa-panel-heading {

    flex-direction: column;

    gap: 0.5rem;

    text-align: center;

  }

  .pa-modal-body {

    padding: 1rem;

  }

  .pa-flow-details {

    padding: 1rem;

  }

  .pa-dropdown {

    flex: 1 1 100%;

  }
 
  .pa-filter-container {

    gap: 0.5rem;

  }
 
  .pa-table tbody tr {

    grid-template-columns: 1fr;

  }
 
  .pa-table td {

    justify-content: space-between;

  }

  .pa-table td:first-child {

    font-size: 0.9rem;

    line-height: 1.4;

  }

}
 