html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #4db896;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Override bootstrap container styles for sidebar layout */
.page-content .container {
  max-width: 100%;
  padding: 0;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .d-lg-none {
    display: block !important;
  }
}

/* Setup Index styles - aligned with dashboard and layout */
.container-setup {
  /* page-content ya define el fondo y padding */
}

.container-setup .header {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d4f1e8;
}

.container-setup .search-bar {
  margin: 16px 0 24px;
}

.container-setup .search-bar input {
  width: 100%;
  max-width: 520px;
  padding: 12px 16px;
  border: 1px solid #d4f1e8;
  border-radius: 10px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.container-setup .search-bar input:focus {
  border-color: #b8e6d5;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
}

.container-setup .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.container-setup .option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #d4f1e8;
  border-radius: 12px;
  padding: 20px;
  color: #4a5568;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.container-setup .option:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: #b8e6d5;
  color: #1a1a1a;
}

.container-setup .option-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.container-setup .option-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1a1a1a;
  margin-bottom: 6px;
  text-align: center;
}

.container-setup .option-description {
  color: #718096;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 768px) {
  .container-setup .grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .container-setup .option {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .container-setup .grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------
   Global Visual Refresh (views only, not navbar/sidebar)
   Applies a soft, modern background to the main page content.
------------------------------------------------------------ */

:root {
  /* Near-white palette for a cleaner, brighter look */
  --page-bg-1: #ffffff;
  --page-bg-2: #f8fdfb;  /* neutral-50 */
  --page-bg-3: #ffffff;
  --card-bg: #ffffff;
  --border-soft: #d4f1e8; /* slate-200 */
}

/* Only the content area gets the decorative background */
.page-content {
  padding: 24px 32px;
  /* Fondo blanco sólido para un look más limpio */
  background: #ffffff;
  min-height: calc(100vh - 64px);
}

/* -----------------------------------------------------------
   Global Form Styles
   Reusable styles for all HTML forms across the application
   Applied to cards, labels, inputs, buttons, and alerts
------------------------------------------------------------ */

.form-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card-header-custom {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #d4f1e8;
}

.card-header-custom i {
  font-size: 2rem;
  color: #4db896;
  margin-right: 1rem;
}

.card-header-custom h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: #1a1a1a;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.form-section-title i {
  margin-right: 0.5rem;
  color: #718096;
}

.form-label {
  font-weight: 500;
  color: #4a5568;
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  border: 1px solid #d4f1e8;
  border-radius: 8px;
  padding: 0.75rem;
  transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: #4db896;
  box-shadow: 0 0 0 3px rgba(77, 184, 150, 0.1);
  outline: none;
}

.btn-submit {
  background: linear-gradient(135deg, #4db896 0%, #6dd4a8 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(77, 184, 150, 0.3);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.tc-btn-loading {
  justify-content: center;
}

.tc-btn-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  animation: tcButtonSpin 0.85s linear infinite;
  flex: 0 0 auto;
}

.tc-btn-loading-text {
  white-space: nowrap;
}

.tc-form-loading {
  position: relative;
}

.tc-form-loading .btn-submit:not(.tc-btn-loading) {
  opacity: 0.72;
}

.btn-cancel {
  background: #e8f9f3;
  color: #718096;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s;
  margin-left: 1rem;
  cursor: pointer;
}

.btn-cancel:hover {
  background: #d4f1e8;
}

.info-alert {
  background: #d4f1e8;
  border-left: 4px solid #4db896;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: start;
}

.info-alert i {
  font-size: 1.5rem;
  color: #4db896;
  margin-right: 1rem;
  margin-top: 0.25rem;
}

.info-alert-content {
  flex: 1;
}

.info-alert-title {
  font-weight: 600;
  color: #2d6c8e;
  margin-bottom: 0.25rem;
}

.info-alert-text {
  color: #2d6c8e;
  font-size: 0.9rem;
  margin: 0;
}

/* ========================================
   TABLE STYLES (STANDARD HTML TABLES)
   ======================================== */

.table-responsive {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-default {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  background: white;
}

.table-default thead {
  background-color: #f8fdfb;
}

.table-default th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  border-bottom: 2px solid #d4f1e8;
  font-size: 0.85rem;
  white-space: nowrap;
}

.table-default td {
  padding: 0.75rem;
  border-bottom: 1px solid #d4f1e8;
  color: #4a5568;
  font-size: 0.85rem;
}

.table-default tbody tr:hover {
  background-color: #f8fdfb;
  transition: background-color 0.2s ease;
}

.table-default tbody tr:last-child td {
  border-bottom: none;
}

.tc-pagination-hidden-row {
  display: none !important;
}

.tc-table-search-hidden-row {
  display: none !important;
}

.tc-table-search {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
  margin-bottom: 0.45rem;
}

.tc-table-search__input {
  width: min(280px, 100%);
  max-width: 280px;
  min-height: 30px;
  padding: 0.25rem 0.6rem;
  font-size: 0.82rem;
  border: 1px solid #d4f1e8;
  border-radius: 6px;
}

.tc-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #ffffff;
  border: 1px solid #d4f1e8;
  border-radius: 8px;
}

.tc-table-pagination__summary {
  font-size: 0.8rem;
  color: #4a5568;
}

.tc-table-pagination__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.tc-table-pagination__size {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tc-table-pagination__label {
  margin: 0;
  font-size: 0.8rem;
  color: #4a5568;
  white-space: nowrap;
}

.tc-pagination-size {
  min-width: 72px;
}

.tc-table-pagination__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tc-table-pagination__page-info {
  min-width: 110px;
  text-align: center;
  font-size: 0.8rem;
  color: #4a5568;
}

.tc-table-pagination__button {
  padding: 0.3rem 0.6rem;
  min-height: 34px;
  line-height: 1;
}

@media (max-width: 768px) {
  .tc-table-search {
    justify-content: stretch;
  }

  .tc-table-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .tc-table-pagination__right {
    justify-content: space-between;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .tc-table-search__input {
    width: 100%;
    max-width: 100%;
  }
}

/* Table Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-pending {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-approved {
  background-color: #d4f1e8;
  color: #3a9478;
}

.badge-rejected {
  background-color: #fee2e2;
  color: #7f1d1d;
}

.badge-completed {
  background-color: #d4f1e8;
  color: #3a9478;
}

.badge-active {
  background-color: #d4f1e8;
  color: #3a9478;
}

.badge-inactive {
  background-color: #f8fdfb;
  color: #718096;
}

/* Table Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-table-action {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 500;
}

.btn-table-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-table-view {
  background-color: #e3f2fd;
  color: #4a8fb8;
}

.btn-table-view:hover:not(:disabled) {
  background-color: #e3f2fd;
}

.btn-table-approve {
  background-color: #d4f1e8;
  color: #3a9478;
}

.btn-table-approve:hover:not(:disabled) {
  background-color: #d4f1e8;
}

.btn-table-reject {
  background-color: #fee2e2;
  color: #7f1d1d;
}

.btn-table-reject:hover:not(:disabled) {
  background-color: #fee2e2;
}

.btn-table-edit {
  background-color: #e3f2fd;
  color: #4a8fb8;
}

.btn-table-edit:hover:not(:disabled) {
  background-color: #e3f2fd;
}

.btn-table-delete {
  background-color: #fee2e2;
  color: #7f1d1d;
}

.btn-table-delete:hover:not(:disabled) {
  background-color: #fee2e2;
}

/* Empty State */
.table-empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #718096;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-empty-state i {
  font-size: 2rem;
  color: #b8e6d5;
  margin-bottom: 0.5rem;
  display: block;
}

.table-empty-state p {
  font-size: 0.875rem;
  margin: 0.25rem 0;
}

/* Loading State */
.table-loading {
  text-align: center;
  padding: 2rem;
  color: #718096;
}

.table-loading i {
  display: inline-block;
  font-size: 1.5rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes tcButtonSpin {
  to { transform: rotate(360deg); }
}
/* Searchable selects as combobox */
.select-searchable {
    position: relative;
    width: 100%;
}

.select-searchable-native {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
}

.select-searchable-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
    background-image: none !important;
}

.select-searchable-trigger:disabled {
    cursor: not-allowed;
}

.select-searchable-trigger.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.12);
}

.select-searchable-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-searchable-trigger-icon {
    font-size: 1rem;
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.select-searchable.is-open .select-searchable-trigger-icon {
    transform: rotate(180deg);
}

.select-searchable-panel {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d4f1e8;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12);
    padding: 0.5rem;
}

.select-searchable-search-wrap {
    margin-bottom: 0.5rem;
}

.select-searchable-input {
    width: 100%;
    min-height: 38px;
}

.select-searchable-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 188px;
    overflow-y: auto;
}

.select-searchable-item {
    margin: 0;
    padding: 0;
}

.select-searchable-option {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    color: #4a5568;
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    text-align: left;
    line-height: 1.35;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.select-searchable-option:hover,
.select-searchable-option:focus {
    border-color: #d4f1e8;
    background: #d4f1e8;
    outline: none;
}

.select-searchable-option.is-selected {
    border-color: #b8e6d5;
    background: #d4f1e8;
    font-weight: 600;
}

.select-searchable-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.select-searchable-empty {
    border-radius: 8px;
    padding: 0.5rem 0.625rem;
    background: #f8fdfb;
    color: #718096;
    font-size: 0.82rem;
}

.select-searchable-meta {
    margin-top: 0.4rem;
    color: #718096;
    font-size: 0.75rem;
    min-height: 1.125rem;
}

/* -----------------------------------------------------------
   Global responsive refinements (mobile-first hardening)
------------------------------------------------------------ */

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.table-default {
  min-width: 680px;
}

@media (max-width: 991.98px) {
  .form-card {
    padding: 1.25rem;
    border-radius: 10px;
  }

  .card-header-custom {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }

  .card-header-custom h2 {
    font-size: 1.25rem;
  }

  .page-content .container,
  .page-content .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 767.98px) {
  .form-card {
    padding: 1rem;
  }

  .form-section {
    margin-bottom: 1.25rem;
  }

  .info-alert {
    flex-direction: column;
    gap: 0.6rem;
  }

  .info-alert i {
    margin-right: 0;
    margin-top: 0;
  }

  .table-responsive {
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid #d4f1e8;
  }

  .table-default {
    min-width: 560px;
  }

  .table-default th,
  .table-default td {
    padding: 0.6rem;
    font-size: 0.8rem;
  }

  .action-buttons {
    gap: 0.25rem;
  }

  .btn-table-action {
    padding: 0.3rem 0.55rem;
  }

  .modal-dialog {
    margin: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .form-card {
    padding: 0.85rem;
  }

  .card-header-custom i {
    font-size: 1.5rem;
    margin-right: 0.65rem;
  }

  .card-header-custom h2 {
    font-size: 1.1rem;
  }

  .form-card .btn-submit,
  .form-card .btn-cancel {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .form-card .btn-cancel {
    margin-top: 0.5rem;
  }

  .table-default {
    min-width: 500px;
  }

  .table-empty-state {
    padding: 1.25rem 0.85rem;
  }

  .tc-table-pagination {
    padding: 0.5rem;
  }

  .select-searchable-panel {
    padding: 0.45rem;
  }
}
