@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --cro-primary: #660219;
  --cro-primary-hover: #4d0213;
  --cro-primary-soft: #f8eef1;
  --cro-secondary: #475569;
  --cro-secondary-hover: #334155;
  --cro-success: #12754a;
  --cro-success-hover: #0d5d3a;
  --cro-info: #1f5ea8;
  --cro-info-hover: #174b87;
  --cro-warning: #b7791f;
  --cro-warning-hover: #9a6318;
  --cro-danger: #b4233e;
  --cro-danger-hover: #8f1b32;
  --cro-dark: #1f2937;
  --cro-light-bg: #f8fafc;
  --cro-page-bg: #f3f6fa;
  --cro-surface: #ffffff;
  --cro-text: #1f2a3d;
  --cro-text-muted: #5c6a80;
  --cro-border: #cbd5e1;
  --cro-border-strong: #94a3b8;
  --cro-focus: rgba(31, 94, 168, 0.2);
  --cro-control-h: 34px;
  --cro-border-w: 1px;
  --cro-radius: 0;
}

html,
body,
button,
input,
select,
textarea,
.btn,
.form-control,
.custom-select,
.table,
.dropdown-item {
  font-family: "Roboto", sans-serif !important;
}

body {
  background: var(--cro-page-bg);
  color: var(--cro-text);
  font-size: 14px;
  line-height: 1.45;
  padding-bottom: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--cro-text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

p,
small,
.text-muted {
  color: var(--cro-text-muted) !important;
}

#topnav {
  position: static;
  left: auto;
  right: auto;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.navbar-custom {
  position: static;
  background-color: var(--cro-primary-hover);
}

.cro-brand-header {
  background: var(--cro-primary);
  border-bottom: var(--cro-border-w) solid #560215;
}

#topnav .navbar-custom .topnav-menu .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

#topnav .navbar-custom .topnav-menu .nav-link:hover,
#topnav .navbar-custom .topnav-menu .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

#topnav .navbar-custom .dropdown.show .nav-link {
  background: rgba(255, 255, 255, 0.12);
}

#topnav .topbar-menu {
  margin-top: 0;
}

#topnav .navigation-menu > li > a {
  color: #223247;
  font-weight: 500;
}

#topnav .navigation-menu > li > a i {
  color: var(--cro-primary);
}

#topnav .navigation-menu > li > a .arrow-down::after {
  border-color: var(--cro-primary);
}

#topnav .navigation-menu > li:hover > a,
#topnav .navigation-menu > li > a:focus,
#topnav .navigation-menu > li.active > a,
#topnav .has-submenu.active > a {
  color: var(--cro-primary);
  background: var(--cro-primary-soft);
}

#topnav .navigation-menu > li .submenu {
  border: var(--cro-border-w) solid var(--cro-border);
}

#topnav .navigation-menu > li .submenu li a {
  color: #2b3a50;
}

#topnav .navigation-menu > li .submenu li a:hover,
#topnav .navigation-menu > li .submenu li a:focus,
#topnav .navigation-menu > li .submenu li.active > a {
  color: var(--cro-primary);
  background: var(--cro-primary-soft);
}

@media (min-width: 992px) {
  #topnav .topbar-menu {
    position: relative;
    z-index: 1000;
    background: #fff;
    border-bottom: var(--cro-border-w) solid var(--cro-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
  }

  #topnav .topbar-menu .container-fluid {
    display: flex;
    align-items: center;
    min-height: 56px;
  }

  #topnav .topbar-menu #navigation {
    flex: 1 1 auto;
  }

  #topnav .topbar-menu .navigation-menu > li > a {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  #topnav .topbar-menu .topbar-scroll-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    color: var(--cro-primary);
    text-decoration: none;
    transition: width 0.18s ease, opacity 0.18s ease;
    margin-right: 0;
    white-space: nowrap;
  }

  #topnav .topbar-menu .topbar-scroll-brand__logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
  }

  #topnav .topbar-menu .topbar-scroll-brand__text {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  #topnav.topbar-menu-pinned {
    padding-bottom: var(--topbar-menu-h, 56px);
  }

  #topnav .topbar-menu.topbar-menu-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    z-index: 1030;
    border-bottom-color: var(--cro-border-strong);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.14);
  }

  #topnav .topbar-menu.topbar-menu-fixed .topbar-scroll-brand {
    width: 120px;
    opacity: 1;
    pointer-events: auto;
    margin-right: 14px;
  }
}

.wrapper {
  padding-top: 16px;
}

.page-title-box h3 {
  font-size: 1.25rem;
}

.card,
.card-box,
.panel,
.well,
.modal-content,
.dropdown-menu,
.alert {
  background: var(--cro-surface);
  border: var(--cro-border-w) solid var(--cro-border);
  border-radius: var(--cro-radius) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.card-header,
.card-footer,
.modal-header,
.modal-footer {
  border-color: var(--cro-border);
}

.btn,
.btn-rounded,
.badge,
.page-link,
.form-control,
.custom-select,
.input-group-text,
.nav-tabs .nav-link,
.nav-pills .nav-link,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple,
.bootstrap-select > .dropdown-toggle {
  border-radius: var(--cro-radius) !important;
}

.btn,
.btn-sm,
.btn-xs {
  min-height: var(--cro-control-h);
  border-width: var(--cro-border-w);
  border-style: solid;
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 500;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.btn:focus,
.btn.focus {
  box-shadow: 0 0 0 2px var(--cro-focus) !important;
}

.btn-primary {
  background: var(--cro-primary);
  border-color: var(--cro-primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background: var(--cro-primary-hover);
  border-color: var(--cro-primary-hover);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  border-color: var(--cro-border-strong);
  color: var(--cro-secondary);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active {
  background: var(--cro-light-bg);
  border-color: var(--cro-secondary);
  color: var(--cro-secondary-hover);
}

.btn-success {
  background: var(--cro-success);
  border-color: var(--cro-success);
  color: #fff;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active {
  background: var(--cro-success-hover);
  border-color: var(--cro-success-hover);
  color: #fff;
}

.btn-info {
  background: var(--cro-info);
  border-color: var(--cro-info);
  color: #fff;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active {
  background: var(--cro-info-hover);
  border-color: var(--cro-info-hover);
  color: #fff;
}

.btn-warning {
  background: var(--cro-warning);
  border-color: var(--cro-warning);
  color: #2a1a03;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active {
  background: var(--cro-warning-hover);
  border-color: var(--cro-warning-hover);
  color: #201301;
}

.btn-danger {
  background: var(--cro-danger);
  border-color: var(--cro-danger);
  color: #fff;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active {
  background: var(--cro-danger-hover);
  border-color: var(--cro-danger-hover);
  color: #fff;
}

.btn-light {
  background: #fff;
  border-color: var(--cro-border);
  color: var(--cro-dark);
}

.btn-light:hover,
.btn-light:focus {
  background: var(--cro-light-bg);
  border-color: var(--cro-border-strong);
  color: var(--cro-dark);
}

.btn-dark {
  background: var(--cro-dark);
  border-color: var(--cro-dark);
  color: #fff;
}

.btn-dark:hover,
.btn-dark:focus {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.btn-outline-primary {
  border-color: var(--cro-primary);
  color: var(--cro-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
  background: var(--cro-primary);
  border-color: var(--cro-primary);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--cro-secondary);
  color: var(--cro-secondary);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background: var(--cro-secondary);
  border-color: var(--cro-secondary);
  color: #fff;
}

.btn-outline-success {
  border-color: var(--cro-success);
  color: var(--cro-success);
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active,
.btn-outline-success.active {
  background: var(--cro-success);
  border-color: var(--cro-success);
  color: #fff;
}

.btn-outline-info {
  border-color: var(--cro-info);
  color: var(--cro-info);
}

.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info:active,
.btn-outline-info.active {
  background: var(--cro-info);
  border-color: var(--cro-info);
  color: #fff;
}

.btn-outline-warning {
  border-color: var(--cro-warning);
  color: #805315;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active,
.btn-outline-warning.active {
  background: var(--cro-warning);
  border-color: var(--cro-warning);
  color: #2a1a03;
}

.btn-outline-danger {
  border-color: var(--cro-danger);
  color: var(--cro-danger);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active,
.btn-outline-danger.active {
  background: var(--cro-danger);
  border-color: var(--cro-danger);
  color: #fff;
}

.btn-link {
  color: var(--cro-info);
}

.btn-link:hover,
.btn-link:focus {
  color: var(--cro-info-hover);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.65;
}

.form-control,
.custom-select,
.bootstrap-select > .dropdown-toggle {
  min-height: var(--cro-control-h);
  border: var(--cro-border-w) solid var(--cro-border);
  color: var(--cro-text);
  font-size: 0.84rem;
  background: #fff;
}

.form-control::placeholder {
  color: #8a97ac;
}

.form-control:focus,
.custom-select:focus,
.bootstrap-select .dropdown-toggle:focus,
.bootstrap-select .dropdown-toggle:active {
  border-color: var(--cro-info);
  box-shadow: 0 0 0 2px var(--cro-focus) !important;
}

.input-group > .form-control,
.input-group > .custom-select,
.input-group > .input-group-append > .btn,
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-append > .input-group-text {
  border-radius: 0 !important;
}

.input-group-text {
  border: var(--cro-border-w) solid var(--cro-border);
  background: #f8fafc;
  color: #4b5a70;
}

.form-group label,
.control-label,
.col-form-label {
  font-size: 0.79rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--cro-text-muted);
}

.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
  min-height: var(--cro-control-h);
  border: var(--cro-border-w) solid var(--cro-border) !important;
  background: #fff;
}

.select2-container .select2-selection--multiple .select2-selection__choice {
  border-radius: 0 !important;
  border: var(--cro-border-w) solid var(--cro-border-strong);
}

.select2-container .select2-selection--single .select2-selection__rendered {
  color: var(--cro-text);
  line-height: 32px;
  font-size: 0.84rem;
}

.select2-dropdown {
  border: var(--cro-border-w) solid var(--cro-border) !important;
  border-radius: 0 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--cro-info);
}

.dropdown-menu {
  border: var(--cro-border-w) solid var(--cro-border);
  border-radius: 0 !important;
}

.dropdown-item {
  font-size: 0.84rem;
  color: #334155;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: #f8fafc;
  color: #0f172a;
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--cro-primary);
  color: #fff;
}

.nav-tabs {
  border-bottom: var(--cro-border-w) solid var(--cro-border);
}

.nav-tabs .nav-link {
  border: var(--cro-border-w) solid transparent;
  border-bottom: 0;
  color: #4d5a70;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.56rem 0.8rem;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
  background: #f8fafc;
  border-color: var(--cro-border);
  color: var(--cro-info);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  background: #fff;
  border-color: var(--cro-border) var(--cro-border) #fff;
  color: var(--cro-primary);
}

.nav-pills .nav-link {
  border: var(--cro-border-w) solid transparent;
  color: #4d5a70;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.48rem 0.72rem;
}

.nav-pills .nav-link:hover,
.nav-pills .nav-link:focus {
  border-color: var(--cro-border);
  background: #f8fafc;
  color: var(--cro-info);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background: var(--cro-primary);
  border-color: var(--cro-primary);
  color: #fff;
}

.tab-content {
  padding-top: 0.75rem;
}

.nav-bordered a.active {
  border-bottom-color: var(--cro-primary) !important;
}

.table {
  color: var(--cro-text);
}

.table thead th {
  background: #f8fafc;
  color: #4b5a70;
  border: var(--cro-border-w) solid var(--cro-border);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table td,
.table th {
  border: var(--cro-border-w) solid var(--cro-border);
  padding: 0.56rem 0.68rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover td {
  background: #f7fafc;
}

.badge {
  border: var(--cro-border-w) solid transparent;
  font-weight: 600;
  font-size: 0.74rem;
  padding: 0.2rem 0.45rem;
}

.badge-primary {
  background: var(--cro-primary);
  color: #fff;
}

.badge-secondary {
  background: var(--cro-secondary);
  color: #fff;
}

.badge-success {
  background: var(--cro-success);
  color: #fff;
}

.badge-info {
  background: var(--cro-info);
  color: #fff;
}

.badge-warning {
  background: var(--cro-warning);
  color: #2a1a03;
}

.badge-danger {
  background: var(--cro-danger);
  color: #fff;
}

/* Legacy status labels + contrast-safe semantic states */
.label,
.badge {
  font-weight: 600;
}

.label-default,
.badge-default {
  background: #e2e8f0;
  color: #1f2937 !important;
}

.label-primary,
.badge-primary,
.btn-primary {
  color: #fff !important;
}

.label-success,
.badge-success,
.btn-success {
  background: var(--cro-success);
  color: #fff !important;
}

.label-info,
.badge-info,
.btn-info {
  background: var(--cro-info);
  color: #fff !important;
}

.label-warning,
.badge-warning,
.btn-warning {
  background: var(--cro-warning);
  color: #1f1302 !important;
}

.label-danger,
.badge-danger,
.btn-danger {
  background: var(--cro-danger);
  color: #fff !important;
}

.label[class*="label-"] a,
.badge[class*="badge-"] a,
.btn[class*="btn-"] a {
  color: inherit !important;
  text-decoration: none;
}

/* Billing action hierarchy: neutral docs, primary operation, destructive isolated */
.billing-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Boleta Step Wizard --- */
.boleta-step-card .card-body {
  padding: 1.25rem;
}

.boleta-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: var(--cro-border-w) solid var(--cro-border);
}

.boleta-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.boleta-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 0.75rem;
  font-weight: 700;
  border: var(--cro-border-w) solid var(--cro-border);
  color: var(--cro-text-muted);
  background: var(--cro-light-bg);
}

.boleta-step-number.boleta-step-active {
  background: var(--cro-primary);
  border-color: var(--cro-primary);
  color: #fff;
}

.boleta-step-text {
  font-size: 0.82rem;
  color: var(--cro-text-muted);
  font-weight: 500;
}

.boleta-step-text.boleta-step-active {
  color: var(--cro-text);
  font-weight: 700;
}

.boleta-step-separator {
  width: 28px;
  height: 1px;
  background: var(--cro-border);
  margin: 0 0.25rem;
}

.boleta-step-boleta-nro {
  font-size: 0.88rem;
  color: var(--cro-text-muted);
}

.boleta-step-boleta-nro strong {
  color: var(--cro-text);
}

.boleta-step-form-body {
  padding: 0.5rem 0;
}

.boleta-step-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.85rem;
  margin-top: 0.5rem;
  border-top: var(--cro-border-w) solid var(--cro-border);
}

@media (max-width: 767.98px) {
  .boleta-step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* --- Boleta Summary Card (header) --- */
.boleta-summary-card .card-body {
  position: relative;
  padding: 1rem 1.25rem;
  padding-right: 11.5rem;
}

.boleta-summary-status {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
}

.boleta-header-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.boleta-header-main {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.boleta-header-nro {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cro-text);
}

.boleta-header-date {
  font-size: 0.88rem;
  color: var(--cro-text-muted);
  white-space: nowrap;
}

.boleta-header-meta {
  font-size: 0.92rem;
  color: var(--cro-text);
  line-height: 1.5;
}

.boleta-header-label {
  font-weight: 600;
  color: #4d5e75;
}

.boleta-header-address {
  font-size: 0.85rem;
  color: var(--cro-text-muted);
  margin-left: 0;
  padding-left: 0;
}

/* --- Billing Section Titles --- */
.billing-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cro-text);
  margin-bottom: 0.6rem;
}

/* --- Billing Items Table --- */
.billing-items-table {
  margin-bottom: 0;
}

.billing-items-table {
  border: none;
}

.billing-items-table thead th {
  background: var(--cro-primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.5rem 0.6rem;
}

.billing-items-table tbody td {
  border-left: none;
  border-right: none;
}

.billing-items-table tbody td {
  padding: 0.45rem 0.6rem;
  font-size: 0.88rem;
  vertical-align: middle;
}

/* --- Billing Summary (right panel) --- */
.billing-summary-detail {
  display: flex;
  gap: 0.4rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  line-height: 1.5;
  border-bottom: 1px solid #f1f5f9;
}

.billing-summary-detail:last-of-type {
  border-bottom: none;
}

.billing-summary-label {
  font-weight: 600;
  color: #4d5e75;
  white-space: nowrap;
  min-width: 100px;
}

.billing-summary-value {
  color: var(--cro-text);
  word-break: break-word;
}

.billing-summary-detail--reference {
  align-items: baseline;
}

.billing-summary-reference-block {
  flex: 1 1 auto;
  min-width: 0;
}

.billing-summary-reference-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.65rem;
}

.billing-summary-value--reference {
  flex: 0 1 auto;
  min-width: 0;
}

.billing-reference-edit {
  margin-left: 0;
  font-size: 0.74rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  line-height: 1.2;
  vertical-align: baseline;
}

.billing-reference-edit:hover,
.billing-reference-edit:focus {
  color: var(--cro-text);
  text-decoration: underline;
}

.billing-summary-note {
  margin-top: 0.2rem;
  margin-left: 0;
  font-size: 0.74rem;
  color: #7a8798;
}

@media (max-width: 767.98px) {
  .billing-summary-reference-row {
    flex-wrap: wrap;
  }

  .billing-summary-note {
    margin-left: 0;
  }
}

/* --- Billing Summary Amounts (view.php static display) --- */
.billing-summary-amounts {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: var(--cro-border-w) solid #dbe4f0;
}

.billing-summary-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.2rem 0;
  font-size: 0.88rem;
  color: var(--cro-text);
}

.billing-summary-total {
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: var(--cro-border-w) solid #dbe4f0;
}

.billing-total-label {
  color: #2f3f56 !important;
  font-weight: 700;
  font-size: 1.05rem;
}

.billing-total-value {
  color: var(--cro-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

/* --- Billing Form Fields (step2 wraps Bootstrap .row form groups) --- */
.billing-form-fields {
  border-bottom: var(--cro-border-w) solid #f1f5f9;
  padding-bottom: 0.5rem;
  margin-bottom: 0;
}

/* --- Billing Amount Rows (step2 label + input side by side) --- */
.billing-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: var(--cro-text);
  gap: 0.5rem;
}

.billing-amount-row + .billing-amount-row {
  border-top: var(--cro-border-w) solid #f1f5f9;
}

.billing-amount-label {
  font-size: 0.88rem;
  color: var(--cro-text-muted);
  white-space: nowrap;
  min-width: 90px;
  font-weight: 500;
}

.billing-amount-field {
  flex: 0 0 140px;
  max-width: 160px;
}

.billing-amount-total {
  margin-top: 0.25rem;
  padding-top: 0.5rem !important;
  border-top: 2px solid #dbe4f0 !important;
}

/* --- Billing CTA Button (Crear Boleta) --- */
.billing-cta-wrapper {
  margin-top: 1rem;
  padding-top: 0.75rem;
}

.billing-cta-btn {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--cro-primary);
  border-color: var(--cro-primary);
  color: #fff;
}

.billing-cta-btn:hover,
.billing-cta-btn:focus {
  background: var(--cro-primary-hover);
  border-color: var(--cro-primary-hover);
  color: #fff;
}

/* --- Billing Status Badge --- */
.billing-status-badge {
  font-size: 0.82rem;
  padding: 0.22rem 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* --- Boleta Actions Card (footer bar) --- */
.boleta-actions-card {
  margin-top: 0.75rem;
}

.billing-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.billing-actions-group--primary {
  margin-left: 0;
}

.billing-actions-group--docs {
  margin-left: 0;
}

.billing-actions-group--danger {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.billing-actions-bar .btn {
  min-width: 124px;
}

.billing-danger-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8f1b32;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* --- Anulado Footer --- */
.billing-anulado-footer {
  border-top: var(--cro-border-w) solid #e2e8f0;
  background: #fdf1f3;
}

@media (max-width: 767.98px) {
  .boleta-summary-card .card-body {
    padding-right: 1rem;
    padding-top: 2.75rem;
  }

  .boleta-summary-status {
    top: 0.7rem;
    right: 0.7rem;
  }

  .boleta-header-main {
    flex-direction: column;
    gap: 0.25rem;
  }

  .billing-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-actions-group,
  .billing-actions-group--docs,
  .billing-actions-group--danger {
    width: 100%;
    justify-content: center;
  }

  .billing-actions-group--danger {
    margin-left: 0;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: var(--cro-border-w) solid #e2e8f0;
  }

  .billing-danger-label {
    display: none;
  }

  .billing-actions-bar .btn {
    width: 100%;
  }
}

.alert {
  border-width: var(--cro-border-w);
  font-size: 0.84rem;
}

.alert-success {
  border-color: #9fd7be;
  background: #edf9f3;
  color: #0d5d3a;
}

.alert-info {
  border-color: #9dc3ee;
  background: #edf4fd;
  color: #174b87;
}

.alert-warning {
  border-color: #e7cc9f;
  background: #fdf7ec;
  color: #7a4d0f;
}

.alert-danger {
  border-color: #e7a9b5;
  background: #fdf1f3;
  color: #8f1b32;
}

.pagination .page-link {
  border: var(--cro-border-w) solid var(--cro-border);
  color: #4b5a70;
  font-size: 0.8rem;
}

.pagination .page-link:hover {
  background: #f8fafc;
  color: var(--cro-info);
  border-color: var(--cro-border-strong);
}

.pagination .page-item.active .page-link {
  background: var(--cro-primary);
  border-color: var(--cro-primary);
  color: #fff;
}

a {
  color: var(--cro-info);
  text-decoration-color: rgba(31, 94, 168, 0.45);
}

a:hover {
  color: var(--cro-info-hover);
  text-decoration-color: var(--cro-info-hover);
}

a:focus,
a:active {
  color: var(--cro-info-hover);
}

.footer {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 1rem;
  padding: 0.72rem 0.75rem;
  border-top: var(--cro-border-w) solid var(--cro-border);
  background: #f0f4fa;
  color: #5f6c80;
}

.footer .footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  line-height: 1.2;
}

.footer .footer-meta strong {
  font-size: 0.78rem;
  font-weight: 600;
  color: #3f4c62;
}

.footer .footer-meta small {
  font-size: 0.68rem;
  color: #7a879b;
}

.footer .footer-links {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  line-height: 1.1;
}

.footer .footer-links a {
  margin-left: 0;
  text-decoration: none;
}

.footer .footer-links .footer-maintained {
  font-size: 0.78rem;
  color: #3f4c62;
}

.footer .footer-links .footer-maintained strong {
  color: #263248;
  font-weight: 700;
}

.footer .footer-links .footer-created {
  font-size: 0.51rem;
  opacity: 0.25;
  color: #7f8898;
}

.pagination-rounded .page-link,
.navbar-custom .app-search .form-control,
.navbar-custom .app-search .btn {
  border-radius: 0 !important;
}

/* Input coverage: text-like + date/time + file + choice inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"],
textarea,
select {
  border: var(--cro-border-w) solid var(--cro-border);
  border-radius: 0 !important;
  min-height: var(--cro-control-h);
  background: #fff;
  color: var(--cro-text);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="date"]:hover,
input[type="datetime-local"]:hover,
input[type="time"]:hover,
input[type="month"]:hover,
input[type="week"]:hover,
textarea:hover,
select:hover {
  border-color: var(--cro-border-strong);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
textarea:focus,
select:focus {
  border-color: var(--cro-info);
  box-shadow: 0 0 0 2px var(--cro-focus) !important;
  outline: 0;
}

input[type="file"] {
  border: var(--cro-border-w) solid var(--cro-border);
  border-radius: 0 !important;
  min-height: var(--cro-control-h);
  padding: 0.24rem 0.4rem;
  background: #fff;
}

input[type="file"]:hover {
  border-color: var(--cro-border-strong);
}

input[type="file"]:focus {
  border-color: var(--cro-info);
  box-shadow: 0 0 0 2px var(--cro-focus) !important;
  outline: 0;
}

input[type="checkbox"],
input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: var(--cro-primary);
}

@media (max-width: 767.98px) {
  .wrapper {
    padding-top: 12px;
  }

  .footer .footer-meta,
  .footer .footer-links {
    align-items: flex-start;
    text-align: left;
  }
}
