:root {
  --font-dmsans: "DM Sans", serif;
  --font-poppins: "Poppins", serif;
  --font-inter: "Inter", serif;
  --clr-background: #f5f7fb;
  --clr-background-modal: #fff;
  --clr-cta-dark-blue: #003459;
  --clr-cta-blue: #3b7ddd;
  --clr-cta-red: #dc3545;
  --clr-cta-green: #34c99c;
  --clr-cta-yellow: #fca311;
  --clr-cta-gray: #d0d2d6;
  --clr-primary: #222e3c;
  --clr-secondary: #d0d2d6;
  --clr-gray: #eef0f2;
  --clr-soft-gray: #eef0f2bf;
  --clr-text: #383838;
  --clr-text-alt: #fff;
  --clr-text-offwhite: #d0d2d6;
  --clr-text-gray: #e9ecefbf;
  --clr-input-outline: #0d6efd40;
  --clr-approved: #34c99c;
  --clr-approved-bg: #a3e9d4;
  --clr-pending: #fcbd11;
  --clr-pending-bg: #f4e3b4;
  --clr-danger: #dc3545;
  --clr-danger-bg: #f5c6cb;
}

html {
  font-family: var(--font-dmsans);
  font-style: normal;
  font-optical-sizing: auto;
  background: var(--clr-background);
}

body {
  position: relative;
  box-sizing: border-box;
  height: 100vh;
  background: var(--clr-background);
  line-height: 1;
  border: 0;
  margin: 0;
  overflow-y: inherit;
}

table,
dialog {
  &:focus-visible {
    outline: 0;
    border: 0;
  }
}

button {
  outline: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
}

.custom_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  row-gap: 2rem;
  padding: 2rem 4rem;
}

@media (max-width: 80rem) {
  .custom_wrapper {
    padding: 2rem 3.25rem;
    row-gap: 2rem;
  }
}

@media (max-width: 64rem) {
  .custom_wrapper {
    row-gap: 1.5rem;
    padding: 2rem 2.5rem;
  }
}

@media (max-width: 39.375rem) {
  .custom_wrapper {
    row-gap: 1.5rem;
    padding: 1.5rem 2rem;
  }
}

/* =========================
   PAYMENTS - Mobile friendly
========================= */

/* Wrapper con scroll horizontal */
.dashboard_table.table_scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* La tabla mantiene ancho mínimo para no aplastarse */
table.payments_table {
  min-width: 820px;
  width: 100%;
}

table.payments_table tbody td:first-child {
  white-space: normal;
  word-break: break-word;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 768px) {
  /* Acciones en columna */
  .dashboard_actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .dashboard_actions .text_content {
    width: 100%;
  }

  /* Botones a full width */
  .dashboard_actions .text_content button {
    width: 100%;
    margin-top: 8px;
  }

  /* Filtros apilados */
  .btn_group.flex_row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
  }

  .btn_group.flex_row label {
    margin: 0;
    font-size: 12px;
    opacity: 0.85;
  }

  .btn_group.flex_row .field_wrapper,
  .btn_group.flex_row .select_wrapper {
    width: 100%;
  }

  .btn_group.flex_row select,
  .btn_group.flex_row input {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Tabla más compacta */
  .dashboard_table table th,
  .dashboard_table table td {
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Inputs dentro de celdas */
  .dashboard_table .input_cell input {
    width: 140px;
  }

  /* Acciones una debajo de otra */
  .table_actions.text_actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
  }

  .table_actions.text_actions .custom_cta {
    width: 100%;
    justify-content: center;
  }

  /* ✅ Ocultar NOTAS en mobile (opcional) */
  .col_notes {
    display: none;
  }
}
