/* ==========================================================================
   Emissão de NFS-e em lote (redesign)
   ========================================================================== */

.nfse-batch-page h1 {
  margin-bottom: 4px;
}

.nfse-batch-subtitle {
  color: #7d728c;
  margin-bottom: 18px;
}

.nfse-batch-actions {
  margin-bottom: 16px;
}

.nfse-batch-actions .btn {
  margin-right: 8px;
}

/* ---- Empty state ---- */
.nfse-batch-empty {
  text-align: center;
  padding: 60px 20px;
  color: #7d728c;
}

.nfse-batch-empty .glyphicon {
  font-size: 42px;
  display: block;
  margin-bottom: 12px;
  color: #c9c2d3;
}

/* ---- Layout columns ---- */
.nfse-batch-layout {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.nfse-batch-left {
  flex: 0 0 320px;
  max-width: 320px;
}

.nfse-batch-center {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---- Left column (LOTES ENVIADOS) ---- */
.nfse-batch-left .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nfse-batch-left-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 12px;
  text-transform: uppercase;
  color: #7d728c;
}

.nfse-batch-left-count {
  background: #ece9f1;
  color: #7d728c;
  border-radius: 12px;
  padding: 1px 9px;
  font-size: 12px;
  font-weight: 600;
}

.nfse-batch-search {
  position: relative;
  padding: 10px 12px;
  border-bottom: 1px solid #ece9f1;
}

.nfse-batch-search input {
  width: 100%;
}

.nfse-batch-list {
  max-height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
}

.nfse-batch-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f0edf4;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.nfse-batch-card:hover {
  background: #faf9fc;
}

.nfse-batch-card.is-selected {
  background: #f1ecfb;
  border-left: 3px solid #6f42c1;
  padding-left: 11px;
}

.nfse-batch-card-info {
  min-width: 0;
  flex: 1 1 auto;
}

.nfse-batch-card-company {
  font-weight: 700;
  color: #2b2240;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nfse-batch-card-user,
.nfse-batch-card-file {
  font-size: 12px;
  color: #7d728c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nfse-batch-card-indicators {
  flex: 0 0 auto;
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nfse-batch-error-badge {
  background: #f8d7da;
  color: #b02a37;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.nfse-batch-list-loading,
.nfse-batch-list-empty {
  text-align: center;
  padding: 16px;
  color: #7d728c;
  font-size: 13px;
}

/* ---- Status icons ---- */
.nfse-batch-status-icon {
  display: inline-block;
  line-height: 1;
}

.nfse-batch-status-icon.status-concluido {
  color: #2e7d32;
}

.nfse-batch-status-icon.status-erro {
  color: #c62828;
}

.nfse-batch-status-icon.status-pendente {
  color: #9e9e9e;
}

.nfse-batch-status-icon.status-processando {
  color: #9e9e9e;
}

/* ---- Center header ---- */
.nfse-batch-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.nfse-batch-header-company {
  font-weight: 700;
  font-size: 18px;
  color: #2b2240;
  margin: 0;
}

.nfse-batch-header-cnpj {
  color: #7d728c;
  font-size: 13px;
}

.nfse-batch-header-meta {
  margin-top: 6px;
  color: #7d728c;
  font-size: 13px;
}

.nfse-batch-header-meta span {
  margin-right: 14px;
}

.nfse-batch-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nfse-batch-summary-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #2b2240;
}

/* ---- Items table ---- */
.nfse-batch-items .tomador-cnpj {
  font-size: 12px;
  color: #7d728c;
}

.nfse-batch-items .item-error-message {
  color: #c62828;
  font-size: 12px;
  margin-top: 2px;
}

.nfse-batch-items tr {
  cursor: pointer;
}

.nfse-batch-items .row-actions {
  white-space: nowrap;
}

.nfse-batch-items-footer {
  color: #7d728c;
  font-size: 13px;
  padding-top: 8px;
}

.nfse-batch-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: #7d728c;
}

/* ==========================================================================
   Right slide-over drawer
   ========================================================================== */
.nfse-batch-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(43, 34, 64, 0.35);
  z-index: 1040;
}

.nfse-batch-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100%;
  background: #fff;
  z-index: 1050;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.nfse-batch-drawer.is-open {
  transform: translateX(0);
}

.nfse-batch-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #ece9f1;
}

.nfse-batch-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: #2b2240;
}

.nfse-batch-drawer-status-line {
  margin: 4px 20px 0;
  color: #7d728c;
  font-size: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ece9f1;
}

.nfse-batch-drawer-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #7d728c;
  cursor: pointer;
}

.nfse-batch-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

.nfse-batch-drawer-section {
  margin-bottom: 22px;
}

.nfse-batch-drawer-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9e94ad;
  margin-bottom: 8px;
}

.nfse-batch-drawer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.nfse-batch-drawer-field-label {
  font-size: 11px;
  color: #9e94ad;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nfse-batch-drawer-field-value {
  font-size: 13px;
  color: #2b2240;
  word-break: break-word;
}

.nfse-batch-drawer-loading {
  text-align: center;
  padding: 40px;
  color: #7d728c;
}
