.ngslc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

@media (min-width: 980px) {
  .ngslc-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ngslc-span-2 {
    grid-column: 1 / -1;
  }
}

.ngslc-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 620px) {
  .ngslc-row {
    grid-template-columns: 1fr 1fr;
  }
}

.ngslc-inline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ngslc-inline > span {
  font-size: 0.92rem;
  font-weight: 600;
}

.ngslc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.ngslc-actions .button {
  flex: 1 1 180px;
}

.ngslc-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.ngslc-table-wrap::before,
.ngslc-table-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.ngslc-table-wrap::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.ngslc-table-wrap::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0));
}

.ngslc-table-wrap[data-scroll-left="1"]::before {
  opacity: 1;
}

.ngslc-table-wrap[data-scroll-right="1"]::after {
  opacity: 1;
}

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

.ngslc-table th,
.ngslc-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  vertical-align: middle;
}

.ngslc-table th {
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.02);
}

.ngslc-table .input {
  width: 100%;
  min-width: 0;
}

.ngslc-table .ngslc-readonly {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.ngslc-tiny {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.ngslc-row-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ngslc-row-actions .button {
  padding: 6px 10px;
}

.ngslc-warn-tiny td {
  background: rgba(245, 158, 11, 0.08);
}

.ngslc-warn-tiny .input {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.05);
}

.ngslc-status {
  min-height: 1.2em;
  margin-top: 8px;
}

.ngslc-scroll-hint {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(11, 87, 208, 0.2);
  background: rgba(11, 87, 208, 0.06);
}

@media (max-width: 820px) {
  .ngslc-scroll-hint {
    display: block;
  }
}

.input.is-invalid {
  border-color: rgba(220, 38, 38, 0.6);
  background: rgba(220, 38, 38, 0.06);
}

.ngslc-message {
  margin-top: 10px;
}

.ngslc-bars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

.ngslc-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 90px;
  gap: 10px;
  align-items: center;
}

@media (max-width: 520px) {
  .ngslc-bar-row {
    grid-template-columns: 1fr;
  }
}

.ngslc-bar-name {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ngslc-bar-track {
  height: 12px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.ngslc-bar-fill {
  height: 100%;
  width: 0;
  background: rgba(11, 87, 208, 0.72);
  border-radius: 999px;
  transition: width 220ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .ngslc-bar-fill {
    transition: none;
  }
}

.ngslc-bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
