/* ═══════════════════════════════════════════════════════════
   Lab Avulso — Dashboard Moderno (Data-Dense)
   Scoped via .lab-modern wrapper
   ═══════════════════════════════════════════════════════════ */

/* Kill page scroll when this dashboard is active */
html:has(.lab-modern),
html:has(.lab-modern) body {
  overflow: hidden;
  height: 100vh;
}

.lab-modern {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
}

/* ─── Page Grid ─── */
.lab-modern .lab-grid {
  padding: var(--sp-2) var(--sp-3) 40px;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  height: calc(100vh - 70px);
  overflow: hidden;
}

/* ─── Metric Cards (top row) ─── */
.lab-modern .lab-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  margin: 0;
  flex-shrink: 0;
}

.lab-modern .lab-metric-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.lab-modern .lab-metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lab-modern .lab-metric-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.lab-modern .lab-metric-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-primary);
}

.lab-modern .lab-metric-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.lab-modern .lab-metric-sub span {
  font-weight: 600;
  color: var(--sla-success);
}

.lab-modern .lab-metric-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 150ms, color 150ms;
}

.lab-modern .lab-metric-icon:hover {
  background: #e2e8f0;
  color: var(--brand-blue);
  text-decoration: none;
}

.lab-modern .lab-metric-icon .material-icons {
  font-size: 20px;
}

/* ─── Summary Gradient Cards ─── */
.lab-modern .lab-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  margin: 0;
  flex-shrink: 0;
}

.lab-modern .lab-summary-card {
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  overflow: hidden;
  position: relative;
}

.lab-modern .lab-summary-card.card-custom-gradient::after,
.lab-modern .lab-summary-card.card-custom-gradient2::after {
  width: 120px;
  height: 120px;
  opacity: 0.25;
}

.lab-modern .lab-summary-body {
  position: relative;
  z-index: 2;
}

.lab-modern .lab-summary-header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: 4px;
}

.lab-modern .lab-summary-title {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.85;
  color: #ffffff;
}

.lab-modern .lab-summary-total {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
}

.lab-modern .lab-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.lab-modern .lab-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(2px);
  transition: background 150ms;
}

.lab-modern .lab-chip:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  text-decoration: none;
}

.lab-modern .lab-chip-count {
  font-weight: 700;
  font-size: 14px;
  min-width: 16px;
}

/* ─── Tables ─── */
.lab-modern .lab-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  gap: var(--sp-3);
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lab-modern .lab-table-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.lab-modern .lab-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-table-header);
  color: #ffffff;
}

.lab-modern .lab-table-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lab-modern .lab-table-count {
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 10px;
  border-radius: 999px;
}

.lab-modern .lab-table {
  margin: 0;
  font-size: 13px;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* Override global style.css rules that force 50px height and 145px min-width */
.lab-modern .lab-table td,
.lab-modern .lab-table th {
  min-width: 0;
}

.lab-modern .lab-table td {
  height: auto;
}

.lab-modern .lab-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
  flex-shrink: 0;
  height: auto;
}

.lab-modern .lab-table thead tr {
  display: table-row;
}

.lab-modern .lab-table tbody {
  display: block;
  overflow-y: scroll;
  overflow-x: hidden;
  min-height: 0;
  height: auto;
  padding: 0;
  margin: 0;
  /* Hide native scrollbar completely */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lab-modern .lab-table tbody::-webkit-scrollbar {
  display: none;
}

/* Custom scrollbar track + thumb */
.lab-modern .lab-table-card {
  position: relative;
}

.lab-custom-scrollbar {
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.lab-custom-scrollbar-thumb {
  position: absolute;
  right: 0;
  width: 4px;
  min-height: 20px;
  background: #cbd5e1;
  border-radius: 2px;
  pointer-events: auto;
  cursor: pointer;
  transition: background 150ms;
}

.lab-custom-scrollbar-thumb:hover,
.lab-custom-scrollbar-thumb.is-dragging {
  background: #94a3b8;
}

.lab-modern .lab-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.lab-modern .lab-table th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
  padding: 8px 12px;
  min-width: 0;
  line-height: 1.3;
}

.lab-modern .lab-table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: none;
  height: auto;
  min-width: 0;
  line-height: 1.3;
  overflow: hidden;
}

.lab-modern .lab-table tr {
  line-height: normal;
}

/* Zebra stripes */
.lab-modern .lab-table tbody tr:nth-child(odd) td {
  background: #fff;
}

.lab-modern .lab-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

/* Hover with left accent */
.lab-modern .lab-table tbody tr {
  border-left: 3px solid transparent;
  transition: border-color 100ms;
}

.lab-modern .lab-table tbody tr:hover {
  border-left-color: var(--brand-blue);
}

.lab-modern .lab-table tbody tr:hover td {
  background: #f0f7ff !important;
}

/* Column widths — 5 columns */
.lab-modern .lab-th-os { width: 8%; }
.lab-modern .lab-th-data { width: 13%; }
.lab-modern .lab-th-sla { width: 14%; }
.lab-modern .lab-th-client { width: 30%; }
.lab-modern .lab-th-equip { width: 35%; }

/* SLA Grid Cards */
.lab-modern .lab-sla-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.lab-modern .lab-sla-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.lab-modern .lab-sla-cell-label {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.85;
}

.lab-modern .lab-sla-cell-val {
  font-size: 12px;
  font-weight: 700;
}

.lab-modern .lab-sla-cell.sla-success {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}
.lab-modern .lab-sla-cell.sla-success .lab-sla-cell-label { color: #15803d; }

.lab-modern .lab-sla-cell.sla-warning {
  background: #fef9c3;
  border-color: #fef08a;
  color: #854d0e;
}
.lab-modern .lab-sla-cell.sla-warning .lab-sla-cell-label { color: #a16207; }

.lab-modern .lab-sla-cell.sla-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #991b1b;
}
.lab-modern .lab-sla-cell.sla-danger .lab-sla-cell-label { color: #b91c1c; }

/* OS badge — horizontal */
.lab-modern .lab-os-badge {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  min-width: 54px;
  white-space: nowrap;
}

.lab-modern .lab-os-badge.badge-success { background: var(--sla-success); }
.lab-modern .lab-os-badge.badge-warning { background: var(--sla-warning); }
.lab-modern .lab-os-badge.badge-danger { background: var(--sla-danger); }

/* Data column */
.lab-modern .lab-td-data-inner {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lab-modern .lab-data-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.lab-modern .lab-data-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.lab-modern .lab-data-corte {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #ffffff;
  width: fit-content;
}

.lab-modern .lab-data-corte.badge-success { background: var(--sla-success); }
.lab-modern .lab-data-corte.badge-warning { background: var(--sla-warning); }
.lab-modern .lab-data-corte.badge-danger { background: var(--sla-danger); }
.lab-modern .lab-data-corte.badge-secondary { background: #94a3b8; }

/* Client column */
.lab-modern .lab-table tbody tr td:nth-child(4) {
  overflow: hidden;
  max-width: 0;
}

.lab-modern .lab-client-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Equipment column */
.lab-modern .lab-table tbody tr td:nth-child(5) {
  overflow: hidden;
  max-width: 0;
}

.lab-modern .lab-td-equip-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  overflow: hidden;
}

.lab-modern .lab-equip-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.lab-modern .lab-equip-details {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lab-modern .lab-equip-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  background: #eef2ff;
  color: #4338ca;
  line-height: 1.6;
}

.lab-modern .lab-equip-tag--tech {
  background: #ecfdf5;
  color: #065f46;
}

.lab-modern .lab-equip-tecnico {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Separator between CLIENTE and EQUIPAMENTO */
.lab-modern .lab-table tbody tr td:nth-child(5),
.lab-modern .lab-table thead tr th:nth-child(5) {
  border-left: 1px solid var(--border-light);
  padding-left: 14px;
}

/* Extra right padding on CLIENTE column for visual separation */
.lab-modern .lab-table tbody tr td:nth-child(4) {
  padding-right: 14px;
}

/* ─── Footer ─── */
.lab-modern .lab-footer {
  background: #1e293b;
  border-top: 1px solid #334155;
  padding: 0;
  z-index: 100;
}

.lab-modern .lab-footer-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  max-width: 100%;
  overflow: hidden;
}

.lab-modern .lab-footer-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.lab-modern .lab-footer-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lab-modern .lab-footer-badge {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  color: #ffffff;
  text-decoration: none;
}

.lab-modern .lab-footer-badge--blue { background: var(--brand-blue); }
.lab-modern .lab-footer-badge--red { background: var(--sla-danger); }

/* Ticker animation (replaces marquee) */
.lab-modern .lab-footer-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.lab-modern .lab-footer-ticker-track {
  display: flex;
  gap: var(--sp-4);
  animation: lab-ticker var(--ticker-duration, 60s) linear infinite;
  width: max-content;
}

.lab-modern .lab-footer-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes lab-ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.lab-modern .lab-footer-os {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 150ms;
}

.lab-modern .lab-footer-os:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lab-modern .lab-footer-os-id {
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
}

.lab-modern .lab-footer-os-date {
  font-size: 10px;
  color: #94a3b8;
}

/* ─── Responsive ─── */

/* Notebook 1366x768 */
@media (max-width: 1399px) {
  .lab-modern .lab-grid {
    padding: var(--sp-2) var(--sp-2) 36px;
    gap: 4px;
    height: calc(100vh - 60px);
  }
  .lab-modern .lab-metric-value { font-size: 22px; }
  .lab-modern .lab-metric-card { padding: 4px var(--sp-2); }
  .lab-modern .lab-metric-label { font-size: 9px; }
  .lab-modern .lab-metric-sub { font-size: 9px; }
  .lab-modern .lab-summary-total { font-size: 24px; }
  .lab-modern .lab-summary-title { font-size: 11px; }
  .lab-modern .lab-summary-card { padding: var(--sp-2) var(--sp-3); }
  .lab-modern .lab-table { font-size: 11px; }
  .lab-modern .lab-table td { padding: 7px 8px; }
  .lab-modern .lab-table th { padding: 5px 8px; }
  .lab-modern .lab-chip { font-size: 10px; padding: 2px 6px; }
  .lab-modern .lab-chip-count { font-size: 12px; }
  .lab-modern .lab-os-badge { font-size: 13px; padding: 3px 9px; min-width: 46px; }
  .lab-modern .lab-client-name { font-size: 12px; }
  .lab-modern .lab-equip-name { font-size: 11px; }
  .lab-modern .lab-equip-tag { font-size: 9px; padding: 1px 5px; }
  .lab-modern .lab-data-value { font-size: 12px; }
  .lab-modern .lab-data-label { font-size: 8px; }
  .lab-modern .lab-sla-cell-val { font-size: 11px; }
  .lab-modern .lab-sla-cell-label { font-size: 6px; }
  .lab-modern .lab-sla-cell { padding: 3px 5px; }
  .lab-modern .lab-sla-grid { gap: 3px; }
  .lab-modern .lab-footer-os-id { font-size: 11px; }
  .lab-modern .lab-footer-os { padding: 2px 8px; }
  .lab-modern .lab-table-header { padding: 4px var(--sp-2); }
  .lab-modern .lab-table-title { font-size: 10px; }
  .lab-modern .lab-table-count { font-size: 12px; padding: 1px 8px; }
}

/* Full HD TV */
@media (min-width: 1400px) and (max-width: 1920px) {
  .lab-modern .lab-grid {
    height: calc(100vh - 70px);
  }
}

/* Large monitors / 4K */
@media (min-width: 1921px) {
  .lab-modern .lab-metric-value { font-size: 38px; }
  .lab-modern .lab-summary-total { font-size: 42px; }
  .lab-modern .lab-table { font-size: 14px; }
  .lab-modern .lab-os-badge { font-size: 17px; padding: 5px 14px; min-width: 60px; }
  .lab-modern .lab-client-name { font-size: 15px; }
  .lab-modern .lab-equip-name { font-size: 14px; }
}

/* ─── Polish: transitions & hover states ─── */
.lab-modern .lab-metric-card {
  transition: box-shadow 150ms, transform 150ms;
}

.lab-modern .lab-metric-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.lab-modern .lab-summary-card {
  transition: box-shadow 200ms;
}

.lab-modern .lab-summary-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.lab-modern .lab-table-card {
  transition: box-shadow 150ms;
}

.lab-modern .lab-table-card:hover {
  box-shadow: var(--shadow-md);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lab-modern .lab-footer-ticker-track {
    animation: none;
  }
  .lab-modern .lab-metric-card,
  .lab-modern .lab-summary-card,
  .lab-modern .lab-table-card {
    transition: none;
  }
  .lab-modern .lab-table tbody tr {
    transition: none;
  }
}

/* === Kanban Cards Layout (D3) === */
.lab-modern .lab-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lab-modern .lab-cards-stack::-webkit-scrollbar {
  display: none;
}

.lab-modern .lab-kanban-card {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: stretch;
  border-radius: 6px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  min-height: 60px;
  flex-shrink: 0;
  background: var(--bg-card);
}

.lab-modern .lab-kanban-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lab-modern .lab-kanban-badge {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  min-height: 56px;
}
.lab-modern .lab-kanban-badge.badge-success { background: var(--sla-success); }
.lab-modern .lab-kanban-badge.badge-warning { background: var(--sla-warning); }
.lab-modern .lab-kanban-badge.badge-danger { background: var(--sla-danger); }

.lab-modern .lab-kanban-main {
  padding: 8px 14px;
  min-width: 0;
}

.lab-modern .lab-kanban-line1 {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.lab-modern .lab-kanban-client {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-modern .lab-kanban-equip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-modern .lab-kanban-line2 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.lab-modern .lab-kanban-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}
.lab-modern .lab-kanban-tag--tech {
  background: var(--primary);
  color: #fff;
}

.lab-modern .lab-kanban-date {
  font-size: 11px;
  color: var(--text-muted);
}

.lab-modern .lab-kanban-corte {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}
.lab-modern .lab-kanban-corte.badge-success { background: #dcfce7; color: #166534; }
.lab-modern .lab-kanban-corte.badge-warning { background: #fef3c7; color: #92400e; }
.lab-modern .lab-kanban-corte.badge-danger { background: #fee2e2; color: #991b1b; }
.lab-modern .lab-kanban-corte.badge-secondary { background: #f1f5f9; color: #64748b; }

.lab-modern .lab-kanban-metrics {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  border-left: 1px solid var(--border);
  min-width: 100px;
}

.lab-modern .lab-kanban-metric {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lab-modern .lab-kanban-metric-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 35px;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.lab-modern .lab-kanban-metric-value {
  font-size: 14px;
  font-weight: 700;
  min-width: 55px;
  text-align: right;
}
.lab-modern .lab-kanban-metric-value.sla-success { color: var(--sla-success); }
.lab-modern .lab-kanban-metric-value.sla-warning { color: var(--sla-warning); }
.lab-modern .lab-kanban-metric-value.sla-danger { color: var(--sla-danger); }

.lab-modern .lab-kanban-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-size: 14px;
}

/* Kanban responsive for TV */
@media (min-width: 1600px) {
  .lab-modern .lab-kanban-client { font-size: 15px; }
  .lab-modern .lab-kanban-badge { font-size: 16px; min-height: 64px; }
  .lab-modern .lab-kanban-metric-value { font-size: 16px; }
  .lab-modern .lab-kanban-equip { font-size: 13px; }
  .lab-modern .lab-kanban-metrics { min-width: 120px; }
  .lab-modern .lab-cards-stack { flex: 1 1 0; }
}

@media (max-width: 1200px) {
  .lab-modern .lab-kanban-card {
    grid-template-columns: 54px 1fr auto;
  }
  .lab-modern .lab-kanban-badge { font-size: 12px; }
  .lab-modern .lab-kanban-client { font-size: 13px; }
  .lab-modern .lab-kanban-metrics { min-width: 80px; padding: 6px 10px; }
  .lab-modern .lab-kanban-metric-value { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   Lab Modals — Modern Design (Kanban Cards)
   Scoped via .lab-modern .lab-modal
   ═══════════════════════════════════════════════════════════ */

.lab-modern .lab-modal .modal-dialog {
  max-width: 1050px;
  width: 90vw;
}

.lab-modern .lab-modal .modal-content {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.24);
}

.lab-modern .lab-modal .modal-header {
  background: linear-gradient(90deg, #226cc9 0%, #177d95 48%, #2e9d32 100%);
  color: #ffffff;
  border-bottom: 0;
  padding: 14px 20px;
}

.lab-modern .lab-modal .modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.lab-modern .lab-modal .close,
.lab-modern .lab-modal .btn-close {
  color: #ffffff;
  opacity: 0.9;
  text-shadow: none;
}

.lab-modern .lab-modal .modal-body {
  padding: 0;
  max-height: 55vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-page);
}

.lab-modern .lab-modal .modal-body::-webkit-scrollbar {
  width: 4px;
}
.lab-modern .lab-modal .modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.lab-modern .lab-modal .modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}
.lab-modern .lab-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Cards container inside modal */
.lab-modern .lab-modal .lab-modal-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
}

/* Kanban cards inside modal — larger and more horizontal */
.lab-modern .lab-modal .lab-kanban-card {
  min-height: 64px;
  grid-template-columns: 68px 1fr 140px;
}

.lab-modern .lab-modal .lab-kanban-badge {
  font-size: 15px;
  min-height: 64px;
}

.lab-modern .lab-modal .lab-kanban-main {
  padding: 10px 16px;
}

.lab-modern .lab-modal .lab-kanban-client {
  font-size: 15px;
}

.lab-modern .lab-modal .lab-kanban-equip {
  font-size: 13px;
  margin-top: 2px;
}

.lab-modern .lab-modal .lab-kanban-line2 {
  margin-top: 5px;
  gap: 10px;
  font-size: 12px;
}

.lab-modern .lab-modal .lab-kanban-metrics {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  padding: 10px 12px;
  overflow: hidden;
}

.lab-modern .lab-modal .lab-kanban-metric-label {
  font-size: 10px;
}

.lab-modern .lab-modal .lab-kanban-metric-value {
  font-size: 14px;
  min-width: 60px;
  white-space: nowrap;
}

/* Tag comercial para reprovados */
.lab-modern .lab-kanban-tag--comercial {
  background: #fef3c7;
  color: #92400e;
}

.lab-modern .lab-modal .modal-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 12px 20px;
}

.lab-modern .lab-modal .lab-modal-btn-close {
  padding: 8px 20px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}

.lab-modern .lab-modal .lab-modal-btn-close:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-primary);
}

.lab-modern .lab-modal .lab-modal-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}
