/* PAT Comanda/Fechamento styles */

/* ==================== SERVICE PICKER ==================== */
.agenda-service-picker {
  position: relative;
  display: grid;
  gap: 8px;
}

.agenda-service-search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 11px;
}

.agenda-service-results {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 6px;
  display: none;
  max-height: 220px;
  overflow: auto;
  z-index: 10000;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.agenda-service-results.is-open {
  display: grid;
  gap: 6px;
}

.agenda-service-result {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 9.6px;
}

.agenda-service-result:hover {
  border-color: #d1d5db;
  background: #f3f4f6;
}

.agenda-service-result.is-active {
  border-color: #2563eb;
  background: #eef2ff;
}

.agenda-service-result.is-disabled,
.agenda-service-result:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.agenda-service-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 9.6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.agenda-service-name {
  font-weight: 600;
  color: #111827;
}

.agenda-service-meta {
  color: #6b7280;
  font-size: 8.8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agenda-service-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 600;
  background: #eef2ff;
  color: #3730a3;
}

.agenda-service-hint {
  font-size: 9px;
  color: #9ca3af;
  padding: 0 10px 6px;
}

.agenda-service-remove {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 8.8px;
  cursor: pointer;
  justify-self: end;
}

.agenda-service-empty {
  font-size: 9.6px;
  color: #6b7280;
  padding: 8px 10px;
}

/* ==========================================================================
   FECHAMENTO DE CONTA - REORGANIZAÇÃO VISUAL (PRD)
   Layout 2 colunas, cards, hierarquia visual clara
   ========================================================================== */

/* ==================== PAGE CONTAINER ==================== */
.fechamento-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 100px; /* Espaço para barra de ações fixa */
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ==================== HEADER FIXO (PRD Seção 5) ==================== */
.fechamento-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(to right, #ffffff, #fafbfc);
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
  margin: -16px -16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fechamento-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.fechamento-back-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.fechamento-back-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

.fechamento-header-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fechamento-header-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.fechamento-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fechamento-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  white-space: nowrap;
}

.fechamento-header-subtitle {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fechamento-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fechamento-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.fechamento-header-btn--outline {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.fechamento-header-btn--outline:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.fechamento-header-btn--close {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: #6b7280;
}

.fechamento-header-btn--close:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* ==================== GRID 2 COLUNAS (PRD Seção 4) ==================== */
.fechamento-grid {
  display: grid;
  gap: 20px;
  padding: 0 4px;
}

.fechamento-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== CARDS BASE (PRD Seção 9) ==================== */
.fechamento-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.fechamento-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
}

.fechamento-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.fechamento-card-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.fechamento-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.fechamento-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== CARD CLIENTE (6.1) ==================== */
.fechamento-client-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fechamento-client-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid #e2e8f0;
  overflow: hidden;
}

.fechamento-client-avatar.has-photo {
  background: #e5e7eb;
}

.fechamento-client-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fechamento-client-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fechamento-client-name {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.fechamento-client-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #25d366;
  text-decoration: none;
  transition: color 0.15s;
}

.fechamento-client-phone:hover {
  color: #128c7e;
}

.fechamento-client-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 14px;
  background: #f9fafb;
  border-radius: 12px;
}

.fechamento-client-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fechamento-client-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
}

.fechamento-client-stat strong {
  font-size: 13px;
  color: #111827;
}

.fechamento-client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==================== BOTÕES GERAIS ==================== */
.fechamento-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.fechamento-btn--sm {
  padding: 7px 12px;
  font-size: 12px;
}

.fechamento-btn--outline {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.fechamento-btn--outline:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.fechamento-btn--cancel {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #6b7280;
}

.fechamento-btn--cancel:hover {
  background: #f3f4f6;
  color: #374151;
}

.fechamento-btn--secondary {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.fechamento-btn--secondary:hover {
  background: #e5e7eb;
}

.fechamento-btn--primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
  font-size: 14px;
  padding: 12px 24px;
}

.fechamento-btn--primary:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

.fechamento-btn--primary:disabled,
.fechamento-btn--secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==================== ITENS DA CONTA (6.2) ==================== */
.fechamento-items-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fechamento-items-section + .fechamento-items-section {
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
}

.fechamento-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fechamento-items-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.fechamento-items-total {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.fechamento-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fechamento-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #f3f4f6;
}

.fechamento-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fechamento-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.fechamento-item-professional,
.fechamento-item-detail {
  font-size: 11px;
  color: #6b7280;
}

.fechamento-item-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.fechamento-empty {
  padding: 16px;
  border-radius: 10px;
  background: #f9fafb;
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
}

/* ==================== DESCONTOS (6.3) ==================== */
.fechamento-discount-row {
  display: grid;
  gap: 12px;
}

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

.fechamento-field label {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
}

.fechamento-select,
.fechamento-input {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fechamento-select:focus,
.fechamento-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.fechamento-discount-feedback {
  padding: 10px 14px;
  background: #ecfdf5;
  border-radius: 8px;
  font-size: 12px;
  color: #15803d;
}

/* ==================== PAGAMENTOS (6.4) ==================== */
.fechamento-payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.fechamento-payment-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  transition: all 0.15s ease;
}

.fechamento-payment-card.is-active {
  border-color: #22c55e;
  background: linear-gradient(to bottom, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.fechamento-payment-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.fechamento-payment-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #22c55e;
  cursor: pointer;
}

.fechamento-payment-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.fechamento-payment-value-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fechamento-payment-value-wrap label {
  font-size: 10px;
  color: #6b7280;
}

.fechamento-payment-value-wrap .fechamento-input {
  padding: 8px 12px;
  font-size: 13px;
}

/* ==================== RESUMO FINANCEIRO (7.1) - DESTAQUE MÁXIMO ==================== */
.fechamento-card--summary {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #dcfce7 100%);
  border-color: #86efac;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.12);
}

.fechamento-card--summary .fechamento-card-header {
  border-bottom-color: rgba(34, 197, 94, 0.2);
}

.fechamento-summary-total {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.fechamento-summary-total-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 4px;
}

.fechamento-summary-total-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.fechamento-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.fechamento-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
}

.fechamento-summary-row:last-child {
  border-bottom: none;
}

.fechamento-summary-row span {
  font-size: 13px;
  color: #6b7280;
}

.fechamento-summary-row strong {
  font-size: 15px;
  font-weight: 700;
}

.fechamento-summary-row--highlight {
  background: #fafafa;
}

.fechamento-value--received {
  color: #6b7280;
}

.fechamento-value--pending {
  color: #dc2626 !important;
}

.fechamento-value--success {
  color: #16a34a !important;
}

.fechamento-summary-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border-radius: 12px;
}

.fechamento-summary-status-label {
  font-size: 12px;
  color: #6b7280;
}

.fechamento-summary-status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.fechamento-status--pago {
  background: #dcfce7;
  color: #15803d;
}

.fechamento-status--parcial {
  background: #fef3c7;
  color: #b45309;
}

.fechamento-status--pendente {
  background: #f3f4f6;
  color: #6b7280;
}

/* ==================== OPÇÕES COMPLEMENTARES (7.2) ==================== */
.fechamento-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fechamento-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.fechamento-option:hover {
  background: #f3f4f6;
}

.fechamento-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #22c55e;
  cursor: pointer;
}

.fechamento-option-text {
  font-size: 13px;
  color: #374151;
}

/* ==================== OBSERVAÇÕES (7.3) ==================== */
.fechamento-textarea {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fechamento-textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.fechamento-textarea::placeholder {
  color: #9ca3af;
}

/* ==================== AÇÕES FINAIS FIXAS (7.4) ==================== */
.fechamento-actions-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #ffffff 85%, rgba(255, 255, 255, 0));
  padding: 16px 20px 20px;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.fechamento-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Tornar Fechar conta o botão mais visível */
.fechamento-actions .fechamento-btn--primary {
  order: 3;
}

.fechamento-actions .fechamento-btn--secondary {
  order: 2;
}

.fechamento-actions .fechamento-btn--cancel {
  order: 1;
  margin-right: auto;
}

/* ==================== MODAL SIZE (PAT) ==================== */
.pat-modal-dialog.pat-modal-dialog--fechamento {
  max-width: min(1280px, 96vw);
}

/* ==================== PAT LAYOUT (STACKED) ==================== */
.fechamento-page--pat {
  padding-bottom: 24px;
}

.fechamento-page--pat .fechamento-header {
  margin: 0 0 12px;
  border-radius: 12px;
}

.fechamento-page--pat .fechamento-grid {
  grid-template-columns: 1fr;
  padding: 0;
}

.fechamento-page--pat .fechamento-column--left {
  order: 1;
}

.fechamento-page--pat .fechamento-column--right {
  order: 2;
  position: static;
}

.fechamento-page--pat .fechamento-actions-sticky {
  position: static;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.fechamento-page--pat .fechamento-actions {
  max-width: 100%;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* ==================== EMBEDDED CONTEXT (MODAIS) ==================== */
.pat-modal-body-v2 .fechamento-page,
.agenda-modal-body .fechamento-page {
  max-width: 100%;
  padding-bottom: 24px;
}

.pat-modal-body-v2 .fechamento-header,
.agenda-modal-body .fechamento-header {
  margin: 0 0 12px;
  border-radius: 12px;
}

/* ==================== COMANDA PAGE (ORIGINAL) ==================== */
.comanda-page {
  display: grid;
  gap: 16px;
}

.comanda-header {
  position: sticky;
  top: 16px;
  z-index: 5;
  display: grid;
  gap: 12px;
}

.comanda-header-main {
  display: grid;
  gap: 16px;
  align-items: center;
}

.comanda-client {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comanda-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.comanda-avatar.has-photo {
  background: #e5e7eb;
}

.comanda-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comanda-kicker {
  font-size: 9.6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  display: block;
}

.comanda-client-name {
  display: block;
  font-size: 16px;
}

.comanda-client-meta {
  font-size: 11px;
  color: #6b7280;
}

.comanda-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.comanda-meta-item span {
  font-size: 9.6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  display: block;
}

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

.comanda-grid {
  display: grid;
  gap: 16px;
  overflow: visible;
}

.comanda-column {
  display: grid;
  gap: 16px;
  overflow: visible;
}

.comanda-section {
  display: grid;
  gap: 12px;
  overflow: visible;
}

.comanda-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.comanda-section-sub {
  font-size: 11px;
  color: #6b7280;
  display: block;
}

.comanda-list {
  display: grid;
  gap: 10px;
}

.comanda-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  align-items: start;
}

.comanda-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.comanda-cell-label {
  font-size: 9.6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.comanda-cell-value {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.comanda-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.comanda-inline-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.comanda-actions-cell {
  align-self: center;
  min-width: 0;
}

.comanda-empty {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #6b7280;
  font-size: 11px;
}

.comanda-summary-grid {
  display: grid;
  gap: 10px;
}

.comanda-summary-grid > div {
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.comanda-summary-grid strong {
  font-size: 12px;
}

.comanda-summary-grid .is-highlight {
  background: #ecfdf5;
  color: #0f766e;
  font-weight: 700;
}

.comanda-discount-grid {
  display: grid;
  gap: 12px;
}

.comanda-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.comanda-toggle-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #374151;
}

.payment-grid {
  display: grid;
  gap: 10px;
}

.payment-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.payment-card summary {
  list-style: none;
  padding: 10px 12px;
  cursor: pointer;
}

.payment-card summary::-webkit-details-marker {
  display: none;
}

.payment-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.payment-body {
  padding: 10px 12px;
  border-top: 1px solid #e5e7eb;
  display: grid;
  gap: 6px;
}

.is-positive {
  color: #16a34a;
}

.is-negative {
  color: #dc2626;
}

.agenda-photo-section {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

/* ==================== RESPONSIVE ==================== */
/* ==================== RESPONSIVE - FECHAMENTO ==================== */
@media (max-width: 599px) {
  .fechamento-header {
    padding: 12px 14px;
    flex-wrap: wrap;
  }
  
  .fechamento-header-title {
    font-size: 16px;
  }
  
  .fechamento-header-subtitle {
    display: none;
  }
  
  .fechamento-header-btn--outline span:not(:first-child) {
    display: none;
  }
  
  .fechamento-client-stats {
    grid-template-columns: 1fr 1fr;
  }
  
  .fechamento-payment-grid {
    grid-template-columns: 1fr;
  }
  
  .fechamento-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .fechamento-actions .fechamento-btn {
    width: 100%;
    justify-content: center;
  }
  
  .fechamento-actions .fechamento-btn--cancel {
    margin-right: 0;
    order: 3;
  }
  
  .fechamento-actions .fechamento-btn--primary {
    order: 1;
  }
  
  .fechamento-actions .fechamento-btn--secondary {
    order: 2;
  }
}

@media (min-width: 600px) {
  .fechamento-discount-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  .fechamento-client-stats {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .fechamento-payment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .fechamento-payment-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .fechamento-grid {
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
  }

  .fechamento-column--right {
    position: sticky;
    top: 100px;
  }
  
  .fechamento-actions-sticky {
    position: sticky;
    bottom: 0;
    left: auto;
    right: auto;
    background: transparent;
    box-shadow: none;
    padding: 16px 0;
    margin-top: -16px;
  }
  
  .fechamento-page {
    padding-bottom: 24px;
  }
}

@media (min-width: 1200px) {
  .fechamento-payment-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 960px) {
  .comanda-row {
    grid-template-columns: 1.6fr 1fr 1fr 0.8fr 0.9fr;
  }

  .comanda-discount-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .comanda-header-main {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .comanda-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  }
}

/* ==================== PRINT STYLES - FECHAMENTO ==================== */
@media print {
  .fechamento-header {
    position: static;
    box-shadow: none;
  }
  
  .fechamento-header-right,
  .fechamento-actions-sticky,
  .fechamento-client-actions {
    display: none !important;
  }
  
  .fechamento-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  
  .fechamento-grid {
    display: block;
  }
  
  .fechamento-column {
    display: block;
  }
  
  .fechamento-card + .fechamento-card {
    margin-top: 16px;
  }
  
  .fechamento-card--summary {
    background: #f9f9f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
