﻿.field-status-chip {
  background: #eef5ff;
  color: #2a4b6f;
  border: 1px solid #cfdff2;
}

.field-status-chip strong {
  color: #173652;
}

.field-status-chip-danger {
  background: #ffe8e6;
  border-color: #ffc9c5;
  color: #972e28;
}

.field-status-chip-warning {
  background: #fff4dc;
  border-color: #f9dca7;
  color: #8f5d12;
}

.field-americanas-expand {
  margin: 4px 0 10px;
  position: relative;
  display: inline-block;
  width: auto;
  max-width: 100%;
}

#field-chip-americanas-toggle {
  cursor: pointer;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 270px;
  font-size: 0.76rem;
  min-height: 30px;
  padding: 0.28rem 0.62rem;
  border-color: #b7d2ea;
  background: linear-gradient(180deg, #eef7ff 0%, #e4f1fd 100%);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.field-americanas-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.field-americanas-chip-name {
  font-weight: 700;
}

.field-americanas-chip-alerts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.field-americanas-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 19px;
  padding: 0.1rem 0.34rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
}

.field-americanas-alert-danger {
  background: #ffe6e4;
  border-color: #ffc6c2;
  color: #a03631;
}

#field-chip-americanas-toggle.has-critical .field-americanas-alert-danger {
  background: #f8c4bf;
  border-color: #eb8f86;
  color: #7b1f1a;
}

.field-americanas-alert-warning {
  background: #fff1d5;
  border-color: #f8d79a;
  color: #8d5b12;
}

#field-chip-americanas-toggle:hover,
#field-chip-americanas-toggle:focus {
  transform: translateY(-1px) scale(1.03);
  border-color: #7cade0;
  box-shadow: 0 8px 18px rgba(26, 84, 132, 0.18);
}

#field-chip-americanas-toggle.is-active {
  border-color: #1f67a8;
  background: linear-gradient(180deg, #def0ff 0%, #d3e9fc 100%);
  box-shadow: 0 10px 22px rgba(31, 103, 168, 0.2);
}

#field-chip-americanas-toggle.has-critical {
  border-color: #d2534d;
  background: linear-gradient(180deg, #ffeceb 0%, #ffe2e0 100%);
  box-shadow: 0 0 0 2px rgba(210, 83, 77, 0.16), 0 8px 18px rgba(210, 83, 77, 0.22);
  animation: field-americanas-critical-pulse 1.4s ease-in-out infinite;
}

.field-americanas-expand.is-open #field-chip-americanas-toggle {
  border-radius: 12px 12px 0 0;
  border-bottom-color: #d4e3f2;
  transform: translateY(0) scale(1.01);
}

.field-americanas-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  margin: 0;
  z-index: 45;
  width: min(920px, calc(100vw - 48px));
  border: 1px solid #d4e3f2;
  border-radius: 0 12px 12px 12px;
  background: linear-gradient(180deg, #f8fcff 0%, #f3f9ff 100%);
  padding: 0 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, padding 0.2s ease;
}

.field-americanas-panel.is-open {
  max-height: 480px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  padding: 12px;
}

.field-americanas-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.field-americanas-client {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.field-americanas-client-label {
  color: #5e7f9e;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-americanas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-americanas-grid .rec-status-chip {
  min-height: 28px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  line-height: 1.05;
}

.field-americanas-chip-filter {
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.field-americanas-chip-filter:hover,
.field-americanas-chip-filter:focus {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(31, 103, 168, 0.15);
}

.field-americanas-chip-filter.is-active {
  border-color: #1f67a8;
  background: #d9ebfb;
  box-shadow: 0 0 0 2px rgba(31, 103, 168, 0.16);
}

.field-americanas-meta {
  margin-top: 8px;
  font-size: 0.76rem;
  color: #55728d;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.field-import-trigger {
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.78rem;
  min-height: 33px;
}

.field-import-modal .modal-content {
  border: 1px solid #cfe0f1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(22, 63, 97, 0.2);
}

.field-import-modal .modal-header {
  background: linear-gradient(135deg, #2f81c3 0%, #1f67a8 100%);
  color: #fff;
  border-bottom: none;
}

.field-import-modal .modal-header .close {
  color: #fff;
  opacity: 0.9;
}

.field-import-modal .modal-header .close:hover {
  opacity: 1;
}

.field-import-modal .modal-body {
  background: #f8fbff;
}

.field-import-modal .modal-footer {
  border-top: 1px solid #d8e5f2;
  background: #f4f9ff;
}

.field-import-modal-client {
  border: 1px solid #c1d8ec;
  background: #ecf5ff;
  color: #2b5578;
  border-radius: 10px;
  font-weight: 700;
  padding: 0.5rem 0.72rem;
}

.field-import-modal-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #507090;
  margin-bottom: 0.35rem;
  display: inline-block;
}

.rec-status-group .rec-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0.36rem 0.66rem;
  border-radius: 999px;
  line-height: 1.1;
  white-space: nowrap;
  font-size: 0.79rem;
}

.field-status-filter-chip {
  appearance: none;
  font: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.field-status-filter-chip:hover,
.field-status-filter-chip:focus {
  border-color: #a8c6e1;
  background: #e7f1fb;
}

.field-status-filter-chip.is-active {
  border-color: #1f67a8;
  background: #d9ebfb;
  box-shadow: 0 0 0 2px rgba(31, 103, 168, 0.16);
}

.field-nf-filter {
  position: relative;
}

.field-nf-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #c4d8ea;
  background: #f9fcff;
  color: #2a5374;
  font-weight: 600;
  cursor: pointer;
}

.field-nf-toggle::after {
  content: "\25BE";
  font-size: 0.82rem;
  color: #486e8f;
}

.field-nf-filter.is-open .field-nf-toggle {
  border-color: #8fb5d3;
  box-shadow: 0 0 0 2px rgba(143, 181, 211, 0.2);
  background: #eef6fd;
}

.field-nf-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 240px;
  z-index: 35;
  background: #fff;
  border: 1px solid #c8dbec;
  border-radius: 10px;
  box-shadow: 0 12px 22px rgba(18, 62, 98, 0.14);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-filter-compact .field-nf-toggle {
  font-size: 0.76rem;
  min-height: 34px;
  padding: 0.18rem 0.48rem;
}

.field-filter-menu-compact {
  max-height: min(220px, 48vh);
  overflow-y: auto;
}

.field-nf-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  color: #254b6a;
  font-size: 0.82rem;
  cursor: pointer;
}

.field-nf-option:hover {
  background: #f0f7ff;
}

.field-nf-option input {
  width: 14px;
  height: 14px;
}

.field-nf-group-block {
  padding-bottom: 4px;
  margin-bottom: 2px;
  border-bottom: 1px solid #e7eff7;
}

.field-nf-group-block:last-of-type {
  border-bottom: none;
  padding-bottom: 2px;
}

.field-nf-group-title {
  margin: 2px 8px 4px;
  color: #5c7b97;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-nf-clear {
  margin-top: 4px;
  width: 100%;
  border-radius: 8px;
}
#field-clear-filters {
  min-width: 110px;
}

.field-date-range-input {
  min-height: 38px;
  padding-right: 74px;
}

.field-date-inline {
  position: relative;
  display: block;
}

.field-date-inline .flatpickr-input {
  min-height: 38px;
  padding-right: 74px;
}

.field-date-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 28px;
  height: 28px;
  border-radius: 7px;
  padding: 0.12rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  z-index: 3;
}

.flatpickr-calendar {
  border: 1px solid #b8d3e8;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(18, 62, 98, 0.18);
  font-family: "Segoe UI", Tahoma, sans-serif;
}

.flatpickr-months {
  background: linear-gradient(135deg, #2f81c3 0%, #1f67a8 100%);
  border-radius: 11px 11px 0 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #fff;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #fff;
}

.flatpickr-weekdays {
  background: #eaf4ff;
}

span.flatpickr-weekday {
  color: #2b567a;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 8px;
  color: #284b68;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: #1f67a8;
  border-color: #1f67a8;
  color: #fff;
}

.flatpickr-day.inRange {
  background: #dceeff;
  border-color: #dceeff;
}

.field-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.field-copy-trigger {
  cursor: pointer;
}

.field-copy-os {
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
}

.field-copy-serial {
  border: 1px dashed #a7c4dd;
  background: #f5faff;
  color: #2a5375;
  border-radius: 8px;
  padding: 0.12rem 0.42rem;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.field-copy-serial:hover,
.field-copy-serial:focus {
  border-color: #7ca7cb;
  background: #e9f3ff;
  color: #1f4968;
  transform: translateY(-1px);
}

.field-copy-trigger.is-copied {
  box-shadow: 0 0 0 2px rgba(79, 170, 106, 0.2);
}

.field-copy-trigger.is-copy-error {
  box-shadow: 0 0 0 2px rgba(212, 92, 84, 0.2);
}

.field-actions .btn {
  white-space: nowrap;
}

.field-action-primary,
.field-action-secondary {
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.24rem 0.72rem;
  min-height: 31px;
  transition: transform 0.12s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.field-action-ticket {
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.24rem 0.72rem;
  min-height: 31px;
}

.field-ticket-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.field-ticket-status-danger {
  background: #ffe7e6;
  border-color: #ffc7c5;
  color: #a0342f;
}

.field-ticket-status-warning {
  background: #fff4dc;
  border-color: #f9dca6;
  color: #935f13;
}

.field-ticket-status-success {
  background: #e7f8ef;
  border-color: #bdeacb;
  color: #1f6e46;
}

.field-ticket-status-muted {
  background: #eef3f8;
  border-color: #d6e0ea;
  color: #5f768d;
}

.field-ticket-loja {
  font-weight: 700;
  color: #244c6b;
}

.field-action-primary {
  color: #fff;
  border: 1px solid #1f67a8;
  background: linear-gradient(135deg, #2f81c3 0%, #1f67a8 100%);
  box-shadow: 0 2px 8px rgba(31, 103, 168, 0.2);
}

.field-action-primary:hover,
.field-action-primary:focus {
  color: #fff;
  border-color: #185689;
  background: linear-gradient(135deg, #2b75b0 0%, #185689 100%);
  box-shadow: 0 4px 11px rgba(24, 86, 137, 0.28);
  transform: translateY(-1px);
}

.field-action-secondary {
  color: #2d5677;
  border: 1px solid #bdd2e6;
  background: #f7fbff;
  box-shadow: 0 1px 4px rgba(25, 70, 109, 0.08);
}

.field-action-secondary:hover,
.field-action-secondary:focus {
  color: #234a69;
  border-color: #9ebfd9;
  background: #edf5fd;
  box-shadow: 0 3px 8px rgba(25, 70, 109, 0.16);
  transform: translateY(-1px);
}

.field-alert {
  display: inline-block;
  max-width: 220px;
  padding: 3px 7px;
  border-radius: 7px;
  border: 1px solid #f3d8ab;
  background: #fff2d9;
  color: #8b5a0f;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.field-cell-wrap {
  max-width: 320px;
  white-space: normal;
  word-break: break-word;
}

.field-text-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-preview-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
  color: #3b5d7a;
  font-size: 0.79rem;
}

.field-open-text {
  align-self: flex-start;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
}

.field-text-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  color: #233f57;
  font-size: 0.92rem;
  background: #f7fbff;
  border: 1px solid #dbe7f2;
  border-radius: 8px;
  padding: 12px;
  max-height: 62vh;
  overflow: auto;
}

.field-ticket-filters {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #d8e5f2;
  border-radius: 10px;
  background: #f8fbff;
}

.field-ticket-filters label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4b6f8d;
  margin-bottom: 0.3rem;
}

.field-ticket-filters .form-control {
  min-height: 34px;
  font-size: 0.8rem;
}

.modal-recobranca #field-items-tbody td,
.modal-recobranca #field-movements-tbody td,
.modal-recobranca #field-tickets-tbody td {
  vertical-align: top;
}

.field-pagination-bar {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  background: #f8fbff;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.field-pagination-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2e5678;
  font-size: 0.82rem;
}

.field-pagination-meta .form-control {
  width: 72px;
}

.field-page-info {
  color: #234a69;
  font-weight: 600;
}

.field-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-page-number {
  min-width: 34px;
  border-radius: 8px;
  border: 1px solid #c1d5e8;
  background: #fff;
  color: #2c577a;
  font-weight: 700;
}

.field-page-number:hover,
.field-page-number:focus {
  border-color: #90b4d2;
  background: #eef6ff;
  color: #1d4666;
}

.field-page-number.is-active {
  border-color: #1f67a8;
  background: #1f67a8;
  color: #fff;
}

.field-page-ellipsis {
  min-width: 20px;
  text-align: center;
  color: #5f7f9b;
  font-weight: 700;
}

@keyframes field-americanas-critical-pulse {
  0% {
    box-shadow: 0 0 0 2px rgba(210, 83, 77, 0.16), 0 8px 18px rgba(210, 83, 77, 0.22);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(210, 83, 77, 0.24), 0 11px 24px rgba(210, 83, 77, 0.3);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(210, 83, 77, 0.16), 0 8px 18px rgba(210, 83, 77, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  #field-chip-americanas-toggle.has-critical {
    animation: none;
  }
}

@media (max-width: 991px) {
  .field-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .field-actions .btn {
    width: 100%;
  }

  .field-alert {
    max-width: 100%;
  }

  .field-nf-menu {
    min-width: 100%;
  }

  .rec-status-group .rec-status-chip {
    white-space: normal;
  }

  .field-americanas-panel-head {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .field-americanas-expand {
    display: block;
    width: 100%;
  }

  .field-americanas-panel {
    position: static;
    width: 100%;
    border-radius: 12px;
    margin-top: 6px;
  }

  .field-pagination-bar,
  .field-pagination-meta,
  .field-pagination-actions {
    width: 100%;
  }

  .field-pagination-actions {
    justify-content: space-between;
  }

  .field-ticket-filters .btn {
    width: 100%;
  }

  #field-chip-americanas-toggle {
    width: 100%;
  }

  .field-import-trigger {
    width: 100%;
  }
}

