/* ==========================================================================
   Telomando — UI profesional global (formularios, listas, paneles)
   Usar wrapper .app-pro-page en vistas de formulario; estilos base aplican
   en #main-wrapper .page-wrapper para el resto de pantallas.
   ========================================================================== */

:root {
  --app-brand: #36bea6;
  --app-brand-dark: #2a9d86;
  --app-border: #e9ecef;
  --app-muted: #6c757d;
  --app-panel-bg: #fff;
  --app-soft-bg: #f8fafc;
}

/* ---------- Base: cards, labels, inputs (todas las vistas) ---------- */
#main-wrapper .page-wrapper .card {
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
}

#main-wrapper .page-wrapper .card .card-body {
  padding: 1.15rem 1.25rem;
}

#main-wrapper .page-wrapper .card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #eef2f7;
}

#main-wrapper .page-wrapper .card-title + hr {
  display: none;
}

#main-wrapper .page-wrapper .card-title i,
#main-wrapper .page-wrapper .card-title [class*="fa-"],
#main-wrapper .page-wrapper .card-title .mdi {
  color: var(--app-brand) !important;
  font-size: 1.15rem;
}

#main-wrapper .page-wrapper .control-label.col-form-label,
#main-wrapper .page-wrapper label.col-form-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-muted);
  margin-bottom: 0.35rem;
}

#main-wrapper .page-wrapper .form-control,
#main-wrapper .page-wrapper .custom-select {
  border-color: #dee2e6;
  font-size: 0.875rem;
}

#main-wrapper .page-wrapper .form-control:focus,
#main-wrapper .page-wrapper .custom-select:focus {
  border-color: var(--app-brand);
  box-shadow: 0 0 0 0.15rem rgba(54, 190, 166, 0.15);
}

#main-wrapper .page-wrapper .page-breadcrumb > .row[style*="36bea6"] {
  border-radius: 0.5rem !important;
  box-shadow: 0 4px 14px rgba(54, 190, 166, 0.25);
  padding: 1rem 1.25rem !important;
}

#main-wrapper .page-wrapper .form-actions .card-body .text-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--app-panel-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
}

#main-wrapper .page-wrapper .form-actions .card-body {
  padding: 0;
}

#main-wrapper .page-wrapper .form-actions .card-body .btn-success {
  min-width: 160px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* ---------- Vistas pro (formularios completos) ---------- */
.app-pro-page,
.consolidate-add-page {
  /* scope marker */
}

.app-pro-page-header,
.consolidate-page-header {
  margin: 0 !important;
  background: linear-gradient(135deg, var(--app-brand) 0%, var(--app-brand-dark) 100%);
  padding: 1rem 1.25rem;
  color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(54, 190, 166, 0.25);
}

.app-pro-page-header .page-title,
.consolidate-page-header .page-title {
  color: #fff;
  font-weight: 600;
  margin: 0;
}

.app-pro-page-header .btn-back,
.consolidate-page-header .btn-back {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.app-pro-page-header .btn-back:hover,
.consolidate-page-header .btn-back:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.app-pro-panel,
.consolidate-panel,
.despachos-panel {
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.25rem;
}

.app-pro-panel .card-body,
.consolidate-panel .card-body,
.despachos-panel .card-body {
  padding: 1.15rem 1.25rem;
}

.app-pro-section-title,
.consolidate-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #eef2f7;
}

.despachos-panel__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #212529;
}

.app-pro-section-title i,
.consolidate-section-title i {
  color: var(--app-brand);
  font-size: 1.15rem;
}

.despachos-panel__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-radius: 0.5rem 0.5rem 0 0;
}

.despachos-panel__header-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(54, 190, 166, 0.12);
  color: var(--app-brand-dark);
  flex-shrink: 0;
}

.despachos-panel__subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: var(--app-muted);
}

.despachos-panel__body {
  padding: 1rem;
}

.despachos-filtros-toolbar .form-control {
  font-size: 0.875rem;
  height: calc(1.5em + 0.75rem + 2px);
}

.despachos-registro-cliente .input-group .form-control {
  background: #fff;
}

.despachos-direccion-input-group {
  flex-wrap: nowrap;
  align-items: stretch;
}

.despachos-direccion-select-wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.despachos-direccion-select-wrap .select2-container {
  width: 100% !important;
  max-width: 100%;
}

.despachos-registro-cliente .select2-container--default .select2-selection--single {
  height: auto;
  min-height: calc(1.5em + 0.75rem + 2px);
  border-color: #ced4da;
  border-radius: 0.25rem 0 0 0.25rem;
}

.despachos-registro-cliente .select2-container--default .select2-selection--single .select2-selection__rendered {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.35;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
}

.despachos-registro-cliente .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  align-items: center;
  display: flex;
}

.despachos-registro-cliente .select2-container--default.select2-container--disabled .select2-selection--single {
  background-color: #e9ecef;
}

.despachos-registro-cliente .select2-results__option {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.despachos-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.75rem;
}

.despachos-tabla-direccion {
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.875rem;
}

#modalSeleccionarClientes .modal-dialog {
  max-width: 720px;
}

#modalSeleccionarClientes .table-responsive {
  min-height: 320px;
  max-height: 400px;
  overflow-y: auto;
}

#myModalConsolidate .modal-dialog {
  max-width: 920px;
}

#myModalConsolidate .app-pro-modal__header {
  align-items: flex-start;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--app-border);
  background: #fff;
}

#myModalConsolidate .app-pro-modal__header .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}

#myModalConsolidate .app-pro-modal__subtitle {
  font-size: 0.85rem;
  color: var(--app-muted);
  margin-top: 0.2rem;
}

#myModalConsolidate .app-pro-modal__body {
  padding: 1.15rem 1.25rem;
  background: #f8fafc;
}

#myModalConsolidate .app-pro-modal__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--app-border);
  background: #fff;
}

#myModalConsolidate .app-pro-modal-search .input-group-text {
  background: #fff;
  border-color: #dee2e6;
  color: #6c757d;
}

#myModalConsolidate .app-pro-modal-table-host {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

#myModalConsolidate .consolidate-modal-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--app-soft-bg);
  border-bottom: 1px solid var(--app-border);
}

#myModalConsolidate .consolidate-modal-bulk-bar.hide {
  display: none !important;
}

#myModalConsolidate .app-pro-modal-table-wrap {
  max-height: 360px;
  overflow-y: auto;
}

#myModalConsolidate .app-pro-modal-table-wrap .app-pro-table-head,
#myModalConsolidate .app-pro-modal-table-wrap .app-pro-table-head tr {
  background-color: #3e5569 !important;
}

#myModalConsolidate .app-pro-modal-table-wrap .app-pro-table-head th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #3e5569 !important;
  color: #fff !important;
  border-color: #4a6478 !important;
  box-shadow: 0 1px 0 #4a6478;
}

#myModalConsolidate .app-pro-modal-table-wrap .app-pro-table-head th b,
#myModalConsolidate .app-pro-modal-table-wrap .app-pro-table-head th strong {
  color: #fff !important;
}

#myModalConsolidate .despachos-empty-state {
  padding: 2rem 1rem;
}

#tabla-despachos-responsive {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
}

#tabla-despachos-responsive thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fa;
  box-shadow: 0 1px 0 0 #dee2e6;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #495057;
}

.app-pro-page .table td,
.consolidate-add-page .table td {
  padding: 5px 8px !important;
}

.select2-selection__rendered {
  line-height: 31px !important;
}

.select2-container .select2-selection--single {
  height: 35px !important;
}

.select2-selection__arrow {
  height: 34px !important;
}

.consolidate-recipient-address-field {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.consolidate-recipient-address-field select,
.consolidate-recipient-address-field .select2-container {
  width: 100% !important;
  max-width: 100%;
}

.consolidate-add-page #recipient_address_id + .select2-container {
  width: 100% !important;
}

.consolidate-recipient-address-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  gap: 0.35rem;
}

.consolidate-recipient-address-wrap .select2-container {
  width: 100% !important;
}

.consolidate-despacho-address-active.select2-container--default .select2-selection--single {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.18);
}

.consolidate-despacho-address-selected {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #198754;
  font-weight: 600;
}

.consolidate-despacho-address-selected .fa-check-circle {
  color: #28a745;
  font-size: 1rem;
}

.consolidate-despacho-address-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #198754;
  font-size: 0.82rem;
  font-weight: 600;
}

.consolidate-despacho-address-badge .fa-check-circle {
  color: #28a745;
}

.consolidate-recipient-vendedor {
  display: inline;
  margin-left: 0.35rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: #495057;
}

.consolidate-recipient-vendedor strong {
  font-weight: 600;
  color: #212529;
}

.consolidate-recipient-vendedor .env-inm-label {
  font-weight: 800;
  color: #0057e7;
  letter-spacing: 0.02em;
}

.env-inm-status-badge {
  background: #ff9800 !important;
  color: #fff !important;
  font-weight: 700;
  margin-top: 0.25rem;
}

.consolidate-despacho-address-option {
  position: relative;
  padding-left: 1.5rem;
}

.consolidate-despacho-address-check {
  position: absolute;
  left: 0;
  top: 0.15rem;
  color: #28a745;
  font-size: 1rem;
}

#capturar_bar_code {
  display: none;
}

div.is_insert_tracking {
  display: none;
}

.app-pro-notify-options,
.consolidate-notify-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
}

.app-pro-notify-options label,
.consolidate-notify-options label {
  margin-bottom: 0;
}

.consolidate-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: nowrap;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #eef2f7;
}

.consolidate-section-header-row .consolidate-section-title--inline {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex: 1 1 auto;
  min-width: 0;
}

.consolidate-whatsapp-channel-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.consolidate-whatsapp-channel-inline label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.consolidate-whatsapp-channel-inline select {
  width: auto;
  min-width: 120px;
  max-width: 150px;
}

.app-pro-table-block,
.consolidate-packages-block {
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
  overflow: hidden;
  background: var(--app-panel-bg);
}

.app-pro-table-block__header,
.consolidate-packages-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--app-soft-bg);
  border-bottom: 1px solid var(--app-border);
}

.app-pro-table-block__header .app-pro-section-title,
.app-pro-table-block__header .consolidate-section-title,
.consolidate-packages-block__header .consolidate-section-title {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.app-pro-table-block .table-responsive,
.consolidate-packages-block .table-responsive {
  margin: 0;
}

.app-pro-attachments-bar,
.consolidate-attachments-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--app-soft-bg);
  border: 1px dashed #ced4da;
  border-radius: 0.375rem;
}

.app-pro-packages-add-page .app-pro-attachments-bar,
.consolidate-add-page .consolidate-attachments-bar {
  justify-content: center;
}

.app-pro-submit-bar,
.consolidate-submit-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--app-panel-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
}

.app-pro-submit-bar .btn-success,
.consolidate-submit-bar .btn-success,
.app-pro-submit-bar #create_invoice,
.consolidate-submit-bar #create_invoice {
  min-width: 180px;
  font-weight: 600;
  padding: 0.55rem 1.5rem;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Tabla invoice-item (consolidados) */
.app-pro-page #invoice-item-table,
.consolidate-add-page #invoice-item-table {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

.app-pro-page #invoice-item-table thead tr,
.consolidate-add-page #invoice-item-table thead tr {
  background: linear-gradient(180deg, #343a40 0%, #2c3136 100%) !important;
}

.app-pro-page #invoice-item-table thead th,
.consolidate-add-page #invoice-item-table thead th {
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.65rem;
  vertical-align: middle;
  color: #fff !important;
}

/* ---------- Cabeceras de tabla con fondo oscuro (texto blanco) ---------- */
.app-pro-table-head,
.app-pro-table-head tr {
  background-color: #3e5569 !important;
  color: #fff !important;
}

.app-pro-table-head th,
.app-pro-table-head th b,
.app-pro-table-head th strong {
  color: #fff !important;
  border-color: #4a6478 !important;
  font-weight: 600;
}

.app-pro-list-table-host thead tr[style*="3e5569"],
.app-pro-list-page .app-pro-list-table-host thead tr[style*="3e5569"],
.app-pro-page thead tr[style*="3e5569"] {
  background-color: #3e5569 !important;
  color: #fff !important;
}

.app-pro-list-table-host thead tr[style*="3e5569"] th,
.app-pro-list-table-host thead tr[style*="3e5569"] th b,
.app-pro-list-page .app-pro-list-table-host thead tr[style*="3e5569"] th,
.app-pro-list-page .app-pro-list-table-host thead tr[style*="3e5569"] th b,
.app-pro-page thead tr[style*="3e5569"] th,
.app-pro-page thead tr[style*="3e5569"] th b {
  color: #fff !important;
  border-color: #4a6478 !important;
}

.app-pro-page #invoice-item-table tbody td,
.app-pro-page #invoice-item-table tfoot td,
.consolidate-add-page #invoice-item-table tbody td,
.consolidate-add-page #invoice-item-table tfoot td {
  padding: 0.5rem 0.65rem !important;
  vertical-align: middle;
}

.app-pro-dimensions-row td,
.consolidate-dimensions-row td {
  border-top: 3px solid #343a40 !important;
  background: #eef1f4;
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
  font-weight: 600;
}

.app-pro-dimensions-row td b,
.consolidate-dimensions-row td b {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #343a40;
}

.app-pro-dimensions-row input.form-control,
.consolidate-dimensions-row input.form-control {
  font-weight: 600;
  background: #fff;
  border-color: #adb5bd;
}

.app-pro-page #invoice-item-table tfoot tr:last-child,
.consolidate-add-page #invoice-item-table tfoot tr:last-child {
  background: #f0fdf9;
  font-size: 1.05rem;
}

.app-pro-page #invoice-item-table tfoot tr:last-child td,
.consolidate-add-page #invoice-item-table tfoot tr:last-child td {
  font-weight: 700;
  color: #1e5631;
}

.app-pro-tfoot-label,
.consolidate-tfoot-label {
  text-align: right;
  white-space: nowrap;
}

.app-pro-tfoot-input-cell,
.consolidate-tfoot-input-cell {
  min-width: 110px;
  width: 12%;
}

.app-pro-page #invoice-item-table tfoot input.form-control,
.consolidate-add-page #invoice-item-table tfoot input.form-control {
  width: 100%;
  max-width: 100%;
  text-align: right;
}

.app-pro-tfoot-value,
.consolidate-tfoot-value,
.app-pro-page #invoice-item-table tfoot #total_envio,
.consolidate-add-page #invoice-item-table tfoot #total_envio {
  text-align: right !important;
  font-weight: 500;
  white-space: nowrap;
}

.app-pro-page #invoice-item-table .card-hover,
.app-pro-page #invoice-item-table .card-hover:hover,
.consolidate-add-page #invoice-item-table .card-hover,
.consolidate-add-page #invoice-item-table .card-hover:hover {
  transition: none;
  transform: none;
  box-shadow: none;
}

/* Despachos filtros toolbar */
.despachos-filtros-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.despachos-filtros-toolbar .filtro-field {
  flex: 1 1 140px;
  min-width: 130px;
}

.despachos-filtros-toolbar .filtro-field--cliente {
  flex: 2 1 200px;
  min-width: 180px;
}

.despachos-filtros-toolbar .filtro-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.despachos-filtros-toolbar label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-muted);
}

.despachos-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
}

.despachos-empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--app-muted);
}

.despachos-empty-state i {
  font-size: 1.75rem;
  color: #adb5bd;
  margin-bottom: 0.5rem;
  display: block;
}

@media (max-width: 767.98px) {
  .app-pro-page-header .d-flex,
  .consolidate-page-header .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .app-pro-submit-bar,
  .consolidate-submit-bar {
    justify-content: stretch;
  }

  .app-pro-submit-bar .btn-success,
  .consolidate-submit-bar #create_invoice {
    width: 100%;
  }

  .despachos-filtros-toolbar .filtro-actions {
    width: 100%;
    margin-left: 0;
  }

  .despachos-filtros-toolbar .filtro-actions .btn {
    flex: 1;
  }
}

/* ---------- Paquetes: formulario agregar ---------- */
.app-pro-page-header .page-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.92;
  margin: 0.35rem 0 0;
  font-weight: 400;
}

.app-pro-input-action-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.app-pro-input-action-row__field {
  flex: 1 1 auto;
  min-width: 0;
}

.app-pro-input-action-row__btn {
  flex: 0 0 42px;
  width: 42px;
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-pro-tracking-input .input-group-text {
  background: var(--app-soft-bg);
  color: var(--app-brand-dark);
}

.app-pro-tracking-input .btn-primary {
  background: var(--app-brand);
  border-color: var(--app-brand);
}

.app-pro-tracking-input .btn-primary:hover {
  background: var(--app-brand-dark);
  border-color: var(--app-brand-dark);
}

.app-pro-barcode-scanner {
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
}

.app-pro-barcode-scanner p {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-muted);
}

.app-pro-active-packages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
}

.app-pro-active-packages:empty::before {
  content: "Sin paquetes activos para este cliente";
  color: #adb5bd;
  font-size: 0.85rem;
  font-style: italic;
}

.app-pro-media-zone {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--app-soft-bg);
  border: 1px dashed #ced4da;
  border-radius: 0.375rem;
}

.app-pro-media-zone #image_preview {
  margin: 0;
}

.app-pro-attachments-bar .btn-outline-secondary,
.app-pro-attachments-bar .btn-outline-primary,
.app-pro-attachments-bar .btn-outline-danger {
  font-size: 0.8125rem;
}

.app-pro-field-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--app-muted);
}

.app-pro-packages-add-page .form-group {
  margin-bottom: 1rem;
}

.app-pro-packages-multiple-page .app-pro-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #eef2f7;
}

.app-pro-toggle-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 0;
}

.app-pro-tracking-quick-add .input-group-append {
  display: flex;
}

.app-pro-tracking-quick-add .input-group-append .btn {
  border-radius: 0;
}

.app-pro-tracking-quick-add .input-group-append .btn:last-child {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.app-pro-shipping-options {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
}

.app-pro-totals-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
  margin: 1rem 0;
  font-size: 0.8125rem;
}

.app-pro-totals-summary .totals-label {
  color: var(--app-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-pro-totals-summary .totals-value {
  font-weight: 700;
  color: #212529;
  min-width: 3rem;
  text-align: center;
}

.app-pro-packages-multiple-page #table-totals {
  border: 1px solid var(--app-border);
  border-radius: 0.375rem;
  overflow: hidden;
  margin-top: 1rem;
}

.app-pro-packages-multiple-page #insvoice-item-table {
  margin-bottom: 0;
}

.app-pro-packages-multiple-page #insvoice-item-table tfoot tr:last-child {
  background: #f0fdf9;
  font-size: 1.05rem;
}

.app-pro-packages-multiple-page #insvoice-item-table tfoot tr:last-child td {
  font-weight: 700;
  color: #1e5631;
}

.app-pro-packages-multiple-page #insvoice-item-table tfoot td {
  padding: 0.5rem 0.65rem;
  vertical-align: middle;
}

.app-pro-list-page .app-pro-list-filters .filtro-field--search {
  flex: 2 1 280px;
  min-width: 220px;
}

.app-pro-list-page .app-pro-list-filters .filtro-field--select {
  flex: 1 1 180px;
  min-width: 160px;
}

.app-pro-list-page .app-pro-panel--table > .card-body {
  padding: 0;
}

.app-pro-list-table-host {
  min-height: 300px;
}

.app-pro-list-table-host > .table-responsive:first-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

.app-pro-list-page .report-col-email {
  max-width: 11rem;
  width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-pro-list-page .report-col-fecha {
  min-width: 9.5rem;
  width: 9.5rem;
  white-space: nowrap;
}

.app-pro-list-page .report-col-origen {
  max-width: 6.5rem;
  width: 6.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-pro-list-page .app-pro-bulk-bar {
  margin-bottom: 1rem;
}

.app-pro-packages-actions-bar {
  justify-content: flex-start;
}

.app-pro-packages-actions-bar__quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.app-pro-packages-actions-bar__bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.app-pro-packages-actions-bar__bulk:not(.hide) {
  margin-left: auto;
}

@media (max-width: 767.98px) {
  .app-pro-packages-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .app-pro-packages-actions-bar__quick,
  .app-pro-packages-actions-bar__bulk:not(.hide) {
    width: 100%;
    margin-left: 0;
  }

  .app-pro-packages-actions-bar__quick .btn,
  .app-pro-packages-actions-bar__bulk .btn-group {
    width: 100%;
  }

  .app-pro-packages-actions-bar__bulk .btn-group .btn {
    width: 100%;
  }
}

.app-pro-list-page .app-pro-bulk-bar .bulk-count {
  font-weight: 600;
  color: #343a40;
}

.app-pro-list-page #load {
  padding: 0.75rem 1rem 0;
}

.app-pro-list-table-host .report-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.app-pro-list-table-host .report-loading img {
  max-width: 64px;
  height: auto;
}

.app-pro-list-page .app-pro-page-header .header-actions {
  gap: 0.5rem;
}

.app-pro-packages-actions-bar__toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.app-pro-packages-actions-bar .grouped-label-type-select {
  width: auto;
  min-width: 150px;
  max-width: 180px;
  flex: 0 0 auto;
}

@media (max-width: 767.98px) {
  .app-pro-packages-actions-bar__toolbar {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 0.75rem;
    flex-wrap: wrap;
  }

  .app-pro-packages-actions-bar__toolbar .btn,
  .app-pro-packages-actions-bar__toolbar .grouped-label-type-select {
    flex: 1 1 auto;
  }
}

@media (max-width: 767.98px) {
  .app-pro-list-page .app-pro-page-header .header-actions {
    width: 100%;
    margin-top: 0.75rem;
    justify-content: flex-start !important;
  }

  .app-pro-list-page .app-pro-page-header .header-actions .btn {
    width: auto;
    flex: 0 0 auto;
  }

  .app-pro-input-action-row {
    flex-wrap: wrap;
  }

  .app-pro-input-action-row__btn {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    padding: 0.45rem;
  }
}

/* ---------- Hub de reportes (reports.php) ---------- */
.app-pro-reports-hub .app-pro-report-category {
  height: 100%;
}

.app-pro-reports-hub .app-pro-report-category .category-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--app-border);
}

.app-pro-reports-hub .app-pro-report-category .category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(54, 190, 166, 0.12);
  color: var(--app-brand-dark);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.app-pro-reports-hub .app-pro-report-category .category-title {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.2rem;
}

.app-pro-reports-hub .app-pro-report-category .category-desc {
  font-size: 0.8125rem;
  color: var(--app-muted);
  margin: 0;
}

.app-pro-reports-hub .app-pro-report-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app-pro-reports-hub .app-pro-report-links li + li {
  margin-top: 0.35rem;
}

.app-pro-reports-hub .app-pro-report-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.375rem;
  color: #343a40;
  font-size: 0.875rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-pro-reports-hub .app-pro-report-link:hover {
  background: var(--app-soft-bg);
  border-color: var(--app-border);
  color: var(--app-brand-dark);
  text-decoration: none;
}

.app-pro-reports-hub .app-pro-report-link i {
  color: var(--app-brand);
  font-size: 0.75rem;
}

/* ---------- Tablas de reportes ---------- */
.app-pro-list-page .outer_div table,
.app-pro-list-page .app-pro-list-table-host table {
  table-layout: auto;
  width: 100%;
}

.app-pro-list-page .outer_div th,
.app-pro-list-page .outer_div td,
.app-pro-list-page .app-pro-list-table-host th,
.app-pro-list-page .app-pro-list-table-host td {
  word-wrap: break-word;
}

.app-pro-list-page .expand-checkbox {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.app-pro-list-page .packages-row {
  background-color: #f9f9f9;
}

.app-pro-list-page .packages-row table {
  margin-bottom: 0;
}

.app-pro-list-page .table-hover tbody tr.client-row:hover,
.app-pro-list-page .table-hover tbody tr.client-row:hover td {
  background-color: transparent !important;
}

.casillero-cliente-list-page table tbody tr,
.casillero-cliente-list-page table tbody tr:hover,
.casillero-cliente-list-page table .card-hover,
.casillero-cliente-list-page table .card-hover:hover {
  transform: none !important;
  -webkit-transform: none !important;
  transition: none !important;
  box-shadow: none !important;
}

.app-pro-list-page .app-pro-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.app-pro-list-page .app-pro-report-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
  margin-left: 0;
  margin-right: 0;
}

.app-pro-list-page .app-pro-report-filters > [class*="col-"],
.app-pro-list-page .app-pro-report-filters > .filtro-field,
.app-pro-list-page .app-pro-report-filters > .input-group {
  flex: 1 1 0;
  min-width: 120px;
  max-width: none;
  width: auto;
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0 !important;
}

.app-pro-list-page .app-pro-report-filters > .filtro-actions,
.app-pro-list-page .app-pro-report-filters > .report-filtro-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.app-pro-list-page .app-pro-report-filters .filtro-field .input-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
}

.app-pro-list-page .app-pro-report-filters .filtro-field .input-group-prepend,
.app-pro-list-page .app-pro-report-filters .filtro-field .input-group-append {
  flex: 0 0 auto;
  display: flex;
}

.app-pro-list-page .app-pro-report-filters .filtro-field .input-group .form-control {
  flex: 1 1 auto;
  width: 1% !important;
  min-width: 0;
}

.app-pro-list-page .app-pro-report-filters .filtro-field > .form-control,
.app-pro-list-page .app-pro-report-filters .filtro-field > .custom-select,
.app-pro-list-page .app-pro-report-filters .filtro-field .select2-container {
  width: 100% !important;
}

.app-pro-list-page .app-pro-report-filters .app-pro-report-actions {
  margin-bottom: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.app-pro-list-page .despachos-filtros-toolbar.app-pro-list-filters,
.app-pro-list-page .despachos-filtros-toolbar.app-pro-report-filters {
  flex-wrap: nowrap;
}

@media (max-width: 991.98px) {
  .app-pro-list-page .app-pro-report-filters,
  .app-pro-list-page .despachos-filtros-toolbar.app-pro-list-filters,
  .app-pro-list-page .despachos-filtros-toolbar.app-pro-report-filters {
    flex-wrap: wrap;
  }
}

/* ---------- Newsletter / envío masivo de correo ---------- */
.newsletter-page .newsletter-excel-block {
  margin-top: 0.5rem;
  padding: 1rem 1.1rem;
  background: var(--app-soft-bg);
  border: 1px dashed #ced4da;
  border-radius: 0.5rem;
}

.newsletter-page .newsletter-excel-block__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 0.85rem;
}

.newsletter-page .newsletter-excel-block__title i {
  margin-right: 0.35rem;
}

.newsletter-page .newsletter-excel-block__hint {
  font-size: 0.8rem;
  color: var(--app-muted);
  line-height: 1.45;
}

.newsletter-page .newsletter-compose-box {
  padding: 1.25rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
}

.newsletter-page .newsletter-image-zone {
  text-align: center;
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  background: #fff;
  border: 1px dashed #ced4da;
  border-radius: 0.5rem;
}

.newsletter-page .newsletter-image-zone__preview {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.newsletter-page .newsletter-image-zone__img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 0.35rem;
  display: none;
}

.newsletter-page .newsletter-image-zone__img.is-visible {
  display: block;
}

.newsletter-page .newsletter-image-zone__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--app-muted);
  font-size: 0.85rem;
}

.newsletter-page .newsletter-image-zone__placeholder i {
  font-size: 2rem;
  opacity: 0.45;
}

.newsletter-page .newsletter-image-zone__placeholder.is-hidden {
  display: none;
}

.newsletter-page .newsletter-compose-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #0c5460;
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 0.45rem;
}

.newsletter-page .newsletter-compose-tip i {
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.newsletter-page #resultados_ajax .alert {
  border-radius: 0.45rem;
  margin-bottom: 1rem;
}

/* ---------- Vista detalle consolidado ---------- */
.consolidate-view-page .consolidate-view-summary {
  margin-top: 0.25rem;
}

.consolidate-view-page .consolidate-view-stat {
  height: 100%;
  padding: 1rem 1.1rem;
  background: var(--app-panel-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.consolidate-view-page .consolidate-view-stat__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-muted);
}

.consolidate-view-page .consolidate-view-stat__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
}

.consolidate-view-page .consolidate-view-stat__badge {
  align-self: flex-start;
  font-size: 0.8rem;
}

.consolidate-view-page .consolidate-view-meta__item {
  height: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--app-soft-bg);
  border: 1px solid var(--app-border);
  border-radius: 0.45rem;
}

.consolidate-view-page .consolidate-view-meta__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-muted);
  margin-bottom: 0.25rem;
}

.consolidate-view-page .consolidate-view-meta__value {
  display: block;
  font-size: 0.9rem;
  color: #212529;
  word-break: break-word;
}

.consolidate-view-page .consolidate-view-meta h5 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--app-muted);
  margin-bottom: 0.25rem;
}

.consolidate-view-page .consolidate-view-meta .text-muted {
  margin-left: 0 !important;
  color: #212529 !important;
  font-size: 0.9rem;
}

.consolidate-view-page .header-actions .dropdown-menu {
  max-height: 320px;
  overflow-y: auto;
}

.consolidate-view-page .img-thumbnail {
  border-radius: 0.45rem;
  object-fit: cover;
}

/* ---------- Topbar profesional (fondo amarillo del tema sin cambiar) ---------- */
.app-pro-topbar.topbar {
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.app-pro-topbar .top-navbar .navbar-nav > .nav-item > .nav-link.app-pro-topbar__menu-btn {
  line-height: 1.25 !important;
  height: auto !important;
}

.app-pro-topbar__menu-btn {
  width: auto;
  height: auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem !important;
  border-radius: 0.35rem;
  background: transparent !important;
  border: none;
  box-shadow: none;
  color: #000 !important;
  line-height: 1.25 !important;
  transition: background 0.2s ease;
}

.app-pro-topbar .top-navbar .navbar-nav > .nav-item.app-pro-topbar__menu:hover {
  background: transparent !important;
}

.app-pro-topbar__menu-btn:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  box-shadow: none;
  color: #000 !important;
}

.app-pro-topbar__menu-btn i {
  font-size: 1.75rem;
  color: #000 !important;
}

.app-pro-topbar__quick-action {
  margin-left: 0.15rem;
}

.app-pro-topbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid transparent;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  color: #fff !important;
}

.app-pro-topbar__btn i {
  color: #fff !important;
}

.app-pro-topbar__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}

.app-pro-topbar__btn--packages {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  color: #fff !important;
}

.app-pro-topbar__btn--packages:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff !important;
}

.app-pro-topbar__btn--consolidate {
  background: linear-gradient(135deg, var(--app-brand) 0%, var(--app-brand-dark) 100%);
  border-color: var(--app-brand-dark);
  color: #fff !important;
}

.app-pro-topbar__btn--consolidate:hover {
  background: linear-gradient(135deg, #31ab94 0%, #248f7a 100%);
  color: #fff !important;
}

.app-pro-topbar__right {
  align-items: center;
  gap: 0.85rem;
}

/* Idioma — texto sobre barra amarilla */
.app-pro-topbar__lang-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #000 !important;
  line-height: 1.2;
}

.app-pro-topbar__lang-text img {
  width: 28px;
  height: 20px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.app-pro-topbar .top-navbar .navbar-nav > .nav-item.app-pro-topbar__notify:hover,
.app-pro-topbar .top-navbar .navbar-nav > .nav-item.app-pro-topbar__user:hover,
.app-pro-topbar .top-navbar .navbar-nav > .nav-item.app-pro-topbar__lang:hover {
  background: transparent !important;
}

/* Campana + contador al estilo original */
.app-pro-topbar__notify {
  overflow: visible;
}

.app-pro-topbar .top-navbar .navbar-nav > .nav-item > .nav-link.app-pro-topbar__notify-btn,
.app-pro-topbar .top-navbar .navbar-nav > .nav-item > .nav-link.app-pro-topbar__user-btn {
  display: inline-flex !important;
  align-items: center;
  line-height: 1.25 !important;
  height: auto !important;
  padding: 0 0.5rem !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.app-pro-topbar__notify-btn::after,
.app-pro-topbar__user-btn::after {
  display: none;
}

.app-pro-topbar__notify-group {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.app-pro-topbar__notify-group i,
.app-pro-topbar__notify-btn .fa-bell,
.app-pro-topbar__notify-btn .fas.fa-bell {
  font-size: 2.05rem !important;
  line-height: 1 !important;
  width: 2.05rem;
  text-align: center;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.app-pro-topbar__notify-badge {
  position: static;
  left: auto !important;
  top: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  font-size: 0.78rem;
  line-height: 1;
  background: #1a4b8c !important;
  color: #fff !important;
  border: none;
  font-weight: 700;
  white-space: nowrap;
  box-sizing: border-box;
}

.app-pro-topbar__notify-badge.is-empty {
  display: none;
}

.app-pro-topbar .top-navbar {
  min-height: 64px;
  padding: 0;
}

.app-pro-topbar .top-navbar .navbar-collapse {
  padding-right: 0.75rem;
}

.app-pro-topbar .navbar-header {
  min-height: 64px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .app-pro-topbar .navbar-header {
    width: 250px !important;
  }

  #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .app-pro-topbar .navbar-header:not(.expand-logo) {
    width: 65px !important;
  }

  #main-wrapper[data-layout="vertical"][data-sidebartype="mini-sidebar"] .app-pro-topbar .navbar-header.expand-logo {
    width: 250px !important;
  }
}

.app-pro-topbar__brand {
  width: 100%;
  min-height: 64px;
  justify-content: center;
  box-sizing: border-box;
}

.app-pro-topbar__brand .logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.app-pro-topbar__brand .logo-text img {
  max-height: 65px;
  width: auto;
  object-fit: contain;
}

.app-pro-topbar__left {
  align-items: center;
  gap: 0.35rem;
}

.app-pro-topbar__notify-menu {
  min-width: 320px;
  border: 1px solid var(--app-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.15);
  overflow: hidden;
}

.app-pro-topbar .top-navbar .navbar-nav > .nav-item > .nav-link.app-pro-topbar__user-btn {
  color: #000 !important;
}

.app-pro-topbar__user-btn {
  gap: 0.45rem;
}

.app-pro-topbar__avatar-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.app-pro-topbar__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: none;
}

.app-pro-topbar__username {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000 !important;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-pro-topbar__user-caret {
  font-size: 1rem;
  color: #000 !important;
  opacity: 1;
}

.app-pro-topbar__user-menu {
  min-width: 260px;
  border: 1px solid var(--app-border);
  border-radius: 0.55rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  padding: 0;
  overflow: hidden;
}

.app-pro-topbar__user-menu .with-arrow {
  display: none;
}

.app-pro-topbar__user-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--app-brand) 0%, var(--app-brand-dark) 100%);
  color: #fff;
}

.app-pro-topbar__user-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.app-pro-topbar__user-header strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.app-pro-topbar__user-header small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.9;
  word-break: break-word;
}

.app-pro-topbar__user-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
}

.app-pro-topbar__user-menu .dropdown-item i {
  width: 1rem;
  text-align: center;
  color: var(--app-muted);
}

.app-pro-topbar__user-menu .dropdown-item.text-danger i {
  color: #dc3545;
}

@media (max-width: 767.98px) {
  .app-pro-topbar__btn span {
    display: none;
  }

  .app-pro-topbar__btn {
    width: 2.2rem;
    height: 2.2rem;
    padding: 0;
    justify-content: center;
    border-radius: 0.45rem;
  }

  .app-pro-topbar__left {
    flex-wrap: wrap;
  }
}
