.mini-bar-wrap {
  position: relative;
  width: 100%;
  height: 16px;
  background-color: #e9eff4;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #d1dae3;
}
.mini-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.quota-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82em;
  table-layout: fixed;
}
.quota-table td {
  padding: 3px 8px 3px 0;
  vertical-align: middle;
  white-space: nowrap;
}
.quota-table-wrap {
  width: 100%;
}
.quota-table td.quota-path {
  color: #6b7280;
  font-family: monospace;
  font-size: 0.95em;
  padding-right: 12px;
  width: 20%;
  white-space: normal;
  word-break: break-all;
  overflow: visible;
}
.quota-table td.quota-bar-cell {
  width: 13%;
}
.quota-table td.quota-bar-label {
  color: #374151;
  padding-left: 6px;
  width: 24%;
  min-width: 0;
}
.quota-table tr + tr td {
  border-top: 1px solid #eef1f4;
}

.quota-table-site {
  font-size: 1.05em;
}

.quota-table-site td.quota-path-site {
  font-size: 1em;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas, "Liberation Mono", Menlo, monospace;
  color: #1f2937;
  font-weight: 500;
}

.quota-th-path {
  width: 26%;
}

.quota-th-row-label {
  width: 14%;
}

.quota-table td.quota-row-label {
  font-size: 0.82em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  padding-right: 12px;
  white-space: nowrap;
}

.quota-th-header {
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  padding-bottom: 4px;
  border-bottom: 1px solid #dce4eb;
}

.quota-safe     { background: linear-gradient(90deg, #10b981 0%, #34d399 100%); }
.quota-warning  { background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); }
.quota-danger   { background: linear-gradient(90deg, #ef4444 0%, #f87171 100%); }
.quota-datasets { background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%); }
.quota-nolimit  { background: #d1d5db; }

/* --- sites/<site> detail page --- */

.replicas-wrapper {
  max-width: 1600px;
  margin: 2em auto;
  padding: 0 2em;
}

.replicas-title {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--text-dark, #1f2937);
  margin-bottom: 0.3em;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.replicas-subtitle {
  font-size: 1em;
  color: #6b7280;
  margin-bottom: 2em;
}

.back-link {
  font-size: 0.9em;
  color: #6b7280;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  margin-bottom: 1em;
}
.back-link:hover { color: #374151; }

.replicas-section {
  margin-bottom: 2.5em;
}



table.replicas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05em;
}

table.replicas-table th {
  text-align: left;
  padding: 10px 16px;
  background: #f0f4f7;
  border-bottom: 2px solid #dce4eb;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

table.replicas-table th.right { text-align: right; }

table.replicas-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #4b5563;
}

table.replicas-table td.right {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.replicas-table td.location-cell {
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1em;
  white-space: nowrap;
}

table.replicas-table tr:hover { background: #f9fafb; }

.site-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.92em;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.quota-section {
  padding: 0;
  width: 100%;
}

.quota-section-spacer {
  margin-top: 0.5em;
}

.quota-label {
  font-size: 0.8em;
  color: #6b7280;
  margin-bottom: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quota-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #4b5563;
}

.quota-stats strong {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1.05em;
}

.quota-percent {
  color: var(--ecmwf-blue);
}

.site-card {
  margin-top: 1.5em;
  padding: 1em 1.2em 1.2em 1.2em;
  background: #f8fafc;
  border: 1px solid #dce4eb;
  border-radius: 10px;
}

.res-card-path {
  display: inline-block;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
  font-weight: 600;
  color: #1e3a5f;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 3px 12px;
  margin-bottom: 0.9em;
}

.site-card-clickable {
  position: relative;
  cursor: pointer;
}

.site-card-clickable:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.site-card-stretched-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
}

.site-card-clickable .quota-table-wrap {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.site-card-title {
  font-size: 1.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.6em;
}

.runtime-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1em;
}

.runtime-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f0f4f7;
  border-radius: 6px;
  border: 1px solid #dce4eb;
  transition: all 0.2s ease;
}

.runtime-tag:hover {
  background: #e8eef3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.runtime-name {
  font-weight: 600;
  font-size: 0.9em;
}

.runtime-count {
  color: #6b7280;
  font-size: 0.85em;
}

/* --- Responsive quota table --- */

@media (max-width: 600px) {
  /* Stack each resource as block rows on very small screens */
  .quota-table,
  .quota-table tbody,
  .quota-table tr,
  .quota-table td {
    display: block;
    width: 100%;
  }
  .quota-table tr {
    margin-bottom: 0.5em;
    border-top: 1px solid #eef1f4;
    padding-top: 0.3em;
  }
  .quota-table tr + tr td {
    border-top: none;
  }
  .quota-table td.quota-path {
    font-weight: 600;
    padding-bottom: 2px;
  }
  .quota-table td.quota-bar-cell {
    padding-right: 0;
  }
  .quota-table td.quota-bar-label {
    padding-left: 0;
    padding-top: 1px;
    padding-bottom: 4px;
    white-space: normal;
  }
}
