#scientific-bulk-allocation-root {
  width: 100%;
  margin: 0 0 18px;
  font-family: inherit;
}

.bulk-card {
  border: 1px solid #cbdde5;
  border-radius: 14px;
  background: #ffffff;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(19, 56, 72, 0.08);
}

.bulk-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.bulk-heading h2 {
  margin: 0 0 6px;
  color: #153547;
  font-size: 20px;
}

.bulk-heading p {
  margin: 0;
  max-width: 900px;
  color: #45616d;
  line-height: 1.5;
}

.bulk-selected-counter {
  min-width: 120px;
  border-radius: 12px;
  background: #e7f7fa;
  color: #075d68;
  padding: 10px 14px;
  text-align: center;
}

.bulk-selected-counter strong {
  display: block;
  font-size: 24px;
}

.bulk-selected-counter span {
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.bulk-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(240px, 1.2fr) minmax(170px, 0.6fr);
  gap: 12px;
  margin-bottom: 14px;
}

.bulk-controls label {
  display: grid;
  gap: 6px;
}

.bulk-controls label > span {
  color: #254653;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.bulk-controls input,
.bulk-controls select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #b8ccd5;
  border-radius: 9px;
  background: #ffffff;
  padding: 9px 11px;
  color: #17333f;
  font: inherit;
  box-sizing: border-box;
}

.bulk-controls input:focus,
.bulk-controls select:focus {
  outline: 2px solid rgba(0, 122, 132, 0.2);
  border-color: #007a84;
}

.bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bulk-primary-button,
.bulk-secondary-button {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 800;
  cursor: pointer;
}

.bulk-primary-button {
  border: 1px solid #007985;
  background: #007985;
  color: #ffffff;
}

.bulk-secondary-button {
  border: 1px solid #9bb8c3;
  background: #ffffff;
  color: #224957;
}

.bulk-primary-button:disabled,
.bulk-secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bulk-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 10px;
  color: #52707c;
  font-size: 12px;
  font-weight: 700;
}

.bulk-table-wrap {
  width: 100%;
  max-height: 520px;
  overflow: auto;
  border: 1px solid #d3e1e7;
  border-radius: 10px;
}

.bulk-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.bulk-table th,
.bulk-table td {
  border-bottom: 1px solid #e2ebef;
  padding: 10px 11px;
  text-align: left;
  vertical-align: middle;
}

.bulk-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf7fa;
  color: #173d4b;
  font-size: 12px;
  text-transform: uppercase;
}

.bulk-table td {
  color: #263f49;
  font-size: 13px;
}

.bulk-check-cell {
  width: 78px;
  text-align: center !important;
}

.bulk-work-number {
  width: 90px;
  font-weight: 800;
}

.bulk-work-meta {
  margin-top: 4px;
  color: #68818b;
  font-size: 11px;
}

.bulk-row-blocked {
  background: #f7f8f9;
}

.bulk-row-blocked strong,
.bulk-row-blocked .bulk-work-number {
  color: #6f7d83;
}

.bulk-status-available,
.bulk-status-blocked {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.bulk-status-available {
  background: #e5f7ec;
  color: #166534;
}

.bulk-status-blocked {
  background: #f2f4f5;
  color: #5d6870;
}

.bulk-empty {
  padding: 28px !important;
  text-align: center !important;
  color: #627781 !important;
}

.bulk-message {
  margin-bottom: 14px;
  border-radius: 9px;
  padding: 10px 12px;
  font-weight: 700;
}

.bulk-message-info {
  background: #e9f5fb;
  color: #075985;
}

.bulk-message-warning {
  background: #fff7dd;
  color: #854d0e;
}

.bulk-message-error {
  background: #feecec;
  color: #991b1b;
}

@media (max-width: 980px) {
  .bulk-controls {
    grid-template-columns: 1fr;
  }

  .bulk-heading {
    flex-direction: column;
  }

  .bulk-selected-counter {
    width: 100%;
    box-sizing: border-box;
  }
}

/* AJUSTES DE INTERFACE DO LOTE V2 */

html.scientific-global-topbar-fixed .app-main {
  padding-top: var(
    --scientific-global-topbar-height,
    72px
  ) !important;
}

html.scientific-global-topbar-fixed .topbar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: var(
    --scientific-global-topbar-left,
    0px
  ) !important;
  z-index: 60 !important;
  width: auto !important;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(15, 35, 45, 0.12);
}

.bulk-card {
  position: relative;
}

.bulk-heading-actions {
  display: grid;
  min-width: 250px;
  gap: 9px;
}

.bulk-selected-counter {
  min-width: 220px;
  padding: 14px 16px;
  border: 2px solid #9dd5dc;
  background: linear-gradient(135deg, #e5f8fa, #f4fcfd);
  box-shadow: 0 8px 18px rgba(7, 93, 104, 0.12);
}

.bulk-selected-counter strong {
  font-size: 32px;
  line-height: 1;
}

.bulk-selected-counter span {
  margin-top: 5px;
  font-size: 12px;
}

.bulk-selected-counter small {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: #264f5b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.bulk-list-toggle {
  min-height: 36px;
  padding: 8px 12px;
  color: #234c59;
  font-weight: 800;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #9bb8c3;
  border-radius: 8px;
}

.bulk-list-toggle:hover {
  background: #f1f8fa;
}

.bulk-table-wrap {
  max-height: min(
    440px,
    calc(
      100vh
      - var(--scientific-global-topbar-height, 72px)
      - 230px
    )
  );
  min-height: 180px;
  scrollbar-gutter: stable;
}

.bulk-table th {
  z-index: 5;
  box-shadow: 0 2px 0 #c8dce4;
}

#scientific-bulk-allocation-root.bulk-list-collapsed
  .bulk-table-wrap,
#scientific-bulk-allocation-root.bulk-list-collapsed
  .bulk-summary {
  display: none;
}

.individual-allocation-section {
  margin-top: 30px !important;
  border: 2px solid #d5e1e6 !important;
  border-top: 6px solid #607d8b !important;
  box-shadow: 0 8px 22px rgba(38, 63, 73, 0.08) !important;
}

.individual-allocation-section h1,
.individual-allocation-section h2 {
  color: #263f49 !important;
}

.individual-allocation-intro {
  margin: -8px 0 18px;
  color: #5b7079;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 920px) {
  html.scientific-global-topbar-fixed .topbar {
    left: 0 !important;
  }
}

@media (max-width: 980px) {
  .bulk-heading-actions {
    width: 100%;
    min-width: 0;
  }

  .bulk-selected-counter {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .bulk-table-wrap {
    max-height: 420px;
  }
}
