.workspace {
  width: 100%;
  max-width: none;
  padding: clamp(.75rem, 1.2vw, 1.5rem);
}

.table-wrap table {
  min-width: 1950px;
}

.table-wrap td.gps-date-cell {
  min-width: 310px;
  max-width: 360px;
  white-space: normal;
  overflow: visible;
}

.gps-date-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.gps-date-controls .inline-date-editor {
  flex: 0 0 auto;
}

.protrack-sync-action:empty {
  display: none;
}

.protrack-sync-action .button {
  white-space: nowrap;
  padding: .4rem .65rem;
  font-size: .75rem;
}

.gps-date-cell .protrack-sync-status {
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  min-width: 280px;
  max-width: 360px;
}

.renewal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.65rem;
}

.renewal-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid #dce5e1;
  border-radius: 10px;
  background: #f8faf9;
}

.renewal-date-input {
  min-width: 0;
  width: 100%;
  border: 1px solid #cbd8d3;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.renewal-date-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(20,129,95,.12);
  outline: none;
}

.renewal-delete {
  border: 1px solid #e7b4b4;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #fff;
  color: #a52222;
  font-size: 0.78rem;
  font-weight: 800;
}

.renewal-delete:hover {
  background: #ffeded;
}

.button.danger-outline {
  border-color: #e7b4b4;
  background: #fff;
  color: #a52222;
}

.button.danger-outline:hover {
  background: #ffeded;
}

.sim-section-heading {
  align-items: flex-start;
  margin-bottom: 0.9rem;
}

.sim-section-heading h3,
.sim-history-block h3 {
  margin-bottom: 0.25rem;
}

.sim-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sim-history-block {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed #d7e2de;
}

.sim-history-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.sim-history-item {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(110px, .8fr) minmax(110px, .8fr) minmax(210px, 1.2fr);
  gap: 0.55rem 0.85rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf9;
  font-size: 0.8rem;
}

.sim-history-item.current {
  border-color: #9bd7c3;
  background: #eff9f5;
}

.sim-history-value {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.sim-history-value span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.sim-history-value strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-history-status,
.previous-sim-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: .24rem .5rem;
  font-size: .68rem;
  font-weight: 800;
}

.sim-history-status.current {
  background: var(--mint);
  color: #176e50;
}

.sim-history-status.previous,
.previous-sim-count {
  background: #eef2f0;
  color: #52635d;
}

.sim-number-stack {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.previous-sim-count {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.previous-sim-count:hover {
  background: #dfe9e5;
}

.replace-sim-dialog {
  width: min(720px, calc(100% - 2rem));
}

.replacement-current {
  display: grid;
  gap: .2rem;
  margin-bottom: 1rem;
  padding: .8rem .9rem;
  border-radius: 12px;
  background: #eef4f1;
}

.replacement-current span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.replacement-note {
  margin: 1rem 0 .4rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .sim-section-heading {
    display: grid;
  }
  .sim-history-item {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .workspace {
    padding: 1rem;
  }
}
