/* TableRead Admin Console — layout & components */

.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

/* ── Header ── */
.admin-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.admin-header .admin-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 52rem;
}

.admin-header .admin-lead code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(79, 140, 255, 0.12);
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
}

/* ── Auth bar ── */
.admin-auth-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.admin-auth-bar .admin-field {
  flex: 1 1 240px;
  min-width: 0;
}

.admin-auth-bar .admin-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* ── Tabs ── */
.admin-tabs {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.admin-tabs button {
  padding: 0.55rem 1.15rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.admin-tabs button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.admin-tabs button[aria-selected="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(79, 140, 255, 0.35);
}

.admin-panel[hidden] {
  display: none !important;
}

/* ── Grid layout ── */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-detail-column {
  min-width: 0;
}

/* ── Cards ── */
.admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.admin-card-header {
  padding: 1rem 1.15rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}

.admin-card-header--split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-card-header--split .admin-card-header-text {
  min-width: 0;
  flex: 1;
}

.admin-card-header--split > .admin-btn,
.admin-card-header--split > .admin-card-header-actions {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.admin-card-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: flex-start;
}

.admin-card-header h2,
.admin-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.admin-card-header p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.admin-card-body {
  padding: 1rem 1.15rem 1.15rem;
}

.admin-card-section + .admin-card-section {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.admin-card-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.admin-card-empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.admin-card-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
  color: var(--text);
}

.admin-card-empty p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── Form fields ── */
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-field > span,
.admin-field > label > span:first-child {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.admin-field input[type="text"],
.admin-field input[type="email"],
.admin-field input[type="password"],
.admin-field input[type="search"],
.admin-field input[type="number"],
.admin-field textarea,
.admin-field select,
.admin-form-grid input[type="text"],
.admin-form-grid input[type="email"],
.admin-form-grid input[type="password"],
.admin-form-grid input[type="search"],
.admin-form-grid input[type="number"],
.admin-form-grid textarea,
.admin-form-grid select {
  width: 100%;
  padding: 0.58rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-field select,
.admin-form-grid select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b9cb3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  cursor: pointer;
  color-scheme: dark;
}

[data-theme="light"] .admin-field select,
[data-theme="light"] .admin-form-grid select {
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.admin-field select option,
.admin-form-grid select option {
  background-color: var(--panel);
  color: var(--text);
}

.admin-field input:hover,
.admin-field textarea:hover,
.admin-field select:hover,
.admin-form-grid input:hover,
.admin-form-grid textarea:hover,
.admin-form-grid select:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.admin-form-grid input:focus,
.admin-form-grid textarea:focus,
.admin-form-grid select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.22);
}

.admin-field textarea {
  resize: vertical;
  min-height: 5rem;
}

.admin-form-grid {
  display: grid;
  gap: 0.85rem;
}

.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.admin-form-grid + .admin-form-grid {
  margin-top: 0.85rem;
}

.admin-checkbox-row input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Buttons ── */
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.58rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.admin-btn-secondary {
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  color: var(--text);
  border-color: var(--border);
}

.admin-btn-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--text);
}

.admin-btn-danger {
  background: rgba(255, 107, 107, 0.12);
  color: #ffb4b4;
  border-color: rgba(255, 107, 107, 0.45);
}

.admin-btn-danger:hover:not(:disabled) {
  background: rgba(255, 107, 107, 0.22);
  border-color: rgba(255, 107, 107, 0.65);
  color: #ffd0d0;
}

.admin-btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.admin-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.admin-btn-block {
  width: 100%;
}

.admin-btn-sm {
  padding: 0.42rem 0.75rem;
  font-size: 0.84rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

/* ── User list ── */
.admin-user-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.admin-user-list li button {
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-user-list li button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.admin-user-list li button[aria-current="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--bg));
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.25);
}

.admin-user-list .user-email {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.admin-user-list .user-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-user-list .user-meta code {
  font-size: 0.76rem;
  word-break: break-all;
}

.admin-plan-badge {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-plan-badge.trial {
  background: rgba(79, 140, 255, 0.18);
  color: #9ec0ff;
}

.admin-plan-badge.standard {
  background: rgba(61, 214, 140, 0.18);
  color: #7dffb0;
}

.admin-plan-badge.pro {
  background: rgba(240, 200, 120, 0.2);
  color: #ffd27a;
}

.admin-plan-badge.expired {
  background: rgba(255, 107, 107, 0.18);
  color: #ff9a9a;
}

/* ── User detail ── */
.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(7rem, 9rem) minmax(0, 1fr);
  gap: 0.55rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}

.admin-detail-grid dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-detail-grid dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
  line-height: 1.45;
}

.admin-detail-grid dd code {
  font-size: 0.85em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
}

/* ── Status bar ── */
.admin-status-bar {
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.15);
  color: var(--muted);
}

.admin-status-bar:empty {
  display: none;
}

.admin-status-bar.is-ok {
  color: var(--success);
  background: rgba(61, 214, 140, 0.1);
  border-color: rgba(61, 214, 140, 0.3);
}

.admin-status-bar.is-error {
  color: var(--error);
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.35);
}

/* ── Announcement preview ── */
.admin-live-preview {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.admin-live-preview.level-info {
  border-color: rgba(79, 140, 255, 0.4);
  background: rgba(79, 140, 255, 0.1);
}

.admin-live-preview.level-warning {
  border-color: rgba(240, 180, 60, 0.45);
  background: rgba(240, 180, 60, 0.12);
  color: #ffe4a8;
}

.admin-live-preview.level-error {
  border-color: rgba(255, 107, 107, 0.45);
  background: rgba(255, 107, 107, 0.12);
  color: #ffb4b4;
}

/* ── Bulk import drop zone ── */
.bulk-import-dropzone {
  margin-bottom: 1rem;
  padding: 1.35rem 1.25rem;
  border: 2px dashed rgba(79, 140, 255, 0.45);
  border-radius: 12px;
  background: rgba(79, 140, 255, 0.06);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.bulk-import-dropzone:hover,
.bulk-import-dropzone.is-dragover {
  border-color: rgba(79, 140, 255, 0.85);
  background: rgba(79, 140, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}

.bulk-import-dropzone.is-busy {
  pointer-events: none;
  opacity: 0.65;
}

.bulk-import-dropzone-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.bulk-import-dropzone-hint {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--muted, #9aa3b2);
  line-height: 1.45;
}

.bulk-import-dropzone-action {
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
  color: rgba(79, 140, 255, 0.95);
}

.bulk-import-file-input {
  display: none;
}

.bulk-import-file-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
  font-size: 0.84rem;
  color: var(--muted, #9aa3b2);
}

.bulk-import-file-list li {
  padding: 0.2rem 0;
}

.bulk-import-progress-panel {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.bulk-import-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
  font-size: 0.88rem;
}

.bulk-import-current-file {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-import-progress-pct {
  font-variant-numeric: tabular-nums;
  color: var(--muted, #9aa3b2);
}

.bulk-import-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bulk-import-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8cff, #6aa8ff);
  transition: width 0.35s ease;
}

.resolve-cast-progress {
  margin: 0.85rem 0 0.35rem;
  max-width: 52rem;
}

.resolve-cast-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.resolve-cast-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8cff, #6aa8ff);
  transition: width 0.25s ease;
}

.resolve-cast-progress-log {
  margin: 0.5rem 0 0;
  max-height: 14rem;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
  color: var(--muted, #c5cbd6);
}

.pack-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.pack-admin-search {
  flex: 1 1 16rem;
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.pack-admin-search-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.pack-admin-search input[type="search"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
}

.pack-admin-search input[type="search"]:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.pack-admin-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.22);
}

.pack-admin-filter-status {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.82rem;
  white-space: nowrap;
}

.pack-admin-list-wrap {
  max-height: min(70vh, 42rem);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

#admin-packs-table tbody td {
  vertical-align: middle;
}

#admin-packs-table th[data-pack-sort] {
  padding: 0;
}

.pack-list-title-link {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}

.pack-list-title-link:hover,
.pack-list-title-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.pack-list-title-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pack-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}

.pack-sort-btn:hover {
  color: var(--accent);
}

.pack-sort-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.pack-sort-caret::before {
  content: "\2195";
  opacity: 0.35;
  font-size: 0.85em;
}

#admin-packs-table th.is-sorted .pack-sort-btn {
  color: var(--accent);
}

#admin-packs-table th.is-sorted-asc .pack-sort-caret::before {
  content: "\25B4";
  opacity: 1;
}

#admin-packs-table th.is-sorted-desc .pack-sort-caret::before {
  content: "\25BE";
  opacity: 1;
}

.pack-list-cover-col {
  width: 3.25rem;
  text-align: center;
}

.pack-list-cover-cell {
  text-align: center;
  vertical-align: middle;
}

.pack-list-cover-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 3.35rem;
  border-radius: 4px;
  overflow: visible;
  cursor: default;
}

.pack-list-cover-thumb {
  display: block;
  width: 2.5rem;
  height: 3.35rem;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel-elevated, var(--panel));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.pack-list-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 3.35rem;
  border-radius: 4px;
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--panel) 88%, var(--muted) 12%);
  color: var(--muted);
}

.pack-list-cover-placeholder svg {
  width: 1.35rem;
  height: auto;
}

.pack-list-cover-zoom {
  position: absolute;
  right: calc(100% + 0.5rem);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease;
  z-index: 40;
  padding: 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.12);
}

.pack-list-cover-zoom img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(14rem, 38vw);
  max-height: min(20rem, 52vh);
  object-fit: contain;
  border-radius: 4px;
}

.pack-list-cover-wrap:not(:hover):not(:focus-within) .pack-list-cover-zoom {
  display: none;
}

.pack-list-cover-wrap:hover .pack-list-cover-zoom,
.pack-list-cover-wrap:focus-within .pack-list-cover-zoom {
  display: block;
  opacity: 1;
  visibility: visible;
}

.admin-deployment-toolbar {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.admin-deployment-group-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #9aa3b2);
}

.admin-deployment-select {
  max-width: 28rem;
  width: 100%;
  padding: 0.58rem 2.1rem 0.58rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b9cb3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  cursor: pointer;
  color-scheme: dark;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

[data-theme="light"] .admin-deployment-select {
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.admin-deployment-select:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.admin-deployment-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

.admin-deployment-select option {
  background-color: var(--panel);
  color: var(--text);
}

.admin-deployment-group-hint {
  margin: 0;
}

.admin-deployment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.admin-deployment-actions .admin-btn-danger {
  margin-left: auto;
}

.admin-deployment-help {
  margin: 0 0 1rem;
  max-width: 48rem;
  line-height: 1.5;
}

.admin-deployment-progress {
  margin-bottom: 0.85rem;
}

.admin-deployment-progress-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.admin-deployment-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4f8cff, #6ea8ff);
  transition: width 0.25s ease;
}

.admin-deployment-progress-label {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  color: var(--text-muted, #9aa3b2);
}

.admin-deployment-story-progress {
  margin: -0.35rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.admin-deployment-story-progress-heading {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #9aa3b2);
}

.admin-deployment-story-progress-track {
  height: 0.55rem;
}

.admin-deployment-story-progress-fill {
  background: linear-gradient(90deg, #3ecf8e, #6ee7a8);
}

.admin-deployment-story-progress-label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.admin-deployment-log {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.admin-deployment-log:empty {
  display: none;
}

.admin-deployment-log li + li {
  margin-top: 0.35rem;
}

.admin-deployment-log .is-ok {
  color: #7dcea0;
}

.admin-deployment-log .is-warn {
  color: #f5c542;
}

.admin-deployment-log .is-error {
  color: #ff8a8a;
}

.admin-deployment-status.is-ok {
  color: #7dcea0;
}

.admin-production-users-grid {
  margin-top: 0;
}

.admin-production-user-detail-empty {
  border: 1px dashed var(--border);
  background: transparent;
  box-shadow: none;
}

#admin-production-user-detail-body dt {
  min-width: 9rem;
}

.admin-production-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-production-admin-badge.is-on {
  color: #0d5f2d;
  background: color-mix(in srgb, #22c55e 18%, transparent);
}

.admin-production-admin-badge.is-off {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 14%, transparent);
}

.admin-production-settings-form {
  max-width: 36rem;
  margin-top: 0.75rem;
}

.admin-production-settings-help {
  margin: 0;
}

.admin-production-path-checks {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.admin-production-path-checks li.is-ok {
  color: #7dcea0;
}

.admin-production-path-checks li.is-bad {
  color: #ff8a8a;
}

.admin-production-path-checks li + li {
  margin-top: 0.35rem;
}

.admin-production-target-grid dd {
  margin: 0;
  word-break: break-word;
}

.admin-production-backup-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.admin-production-backup-list li + li {
  margin-top: 0.35rem;
}

.admin-production-backup-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.admin-resource-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.admin-resource-control-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-resource-control-field select {
  min-width: 10rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
}

.admin-resource-controls .admin-status-bar {
  flex: 1 1 12rem;
  margin: 0;
  min-height: 1.25rem;
}

.admin-resource-gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-resource-gauge {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.7rem 0.4rem;
  background: var(--panel);
  color: var(--text);
}

.admin-resource-gauge-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.admin-resource-gauge-label {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-resource-gauge-value {
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
}

.admin-resource-spark {
  width: 100%;
  height: 28px;
  display: block;
  color: var(--accent);
}

.admin-resource-spark polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0.9;
}

.is-level-ok {
  --admin-sev: #3ecf8e;
}

.is-level-warn {
  --admin-sev: #e8c34a;
}

.is-level-high {
  --admin-sev: #f0912d;
}

.is-level-crit {
  --admin-sev: #ef4444;
}

.admin-resource-gauge.is-level-ok .admin-resource-gauge-value,
.admin-resource-gauge.is-level-warn .admin-resource-gauge-value,
.admin-resource-gauge.is-level-high .admin-resource-gauge-value,
.admin-resource-gauge.is-level-crit .admin-resource-gauge-value {
  color: var(--admin-sev);
  font-weight: 600;
}

.admin-resource-gauge.is-level-warn,
.admin-resource-gauge.is-level-high,
.admin-resource-gauge.is-level-crit {
  border-color: color-mix(in srgb, var(--admin-sev) 55%, var(--border));
  background: color-mix(in srgb, var(--admin-sev) 9%, var(--panel));
  box-shadow: inset 3px 0 0 var(--admin-sev);
}

.admin-resource-gauge.is-level-ok .admin-resource-spark,
.admin-resource-gauge.is-level-warn .admin-resource-spark,
.admin-resource-gauge.is-level-high .admin-resource-spark,
.admin-resource-gauge.is-level-crit .admin-resource-spark {
  color: var(--admin-sev);
}

.admin-resource-level {
  color: var(--admin-sev, inherit);
  font-weight: 600;
}

.admin-resource-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: -0.5rem 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-resource-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-resource-legend span::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--admin-sev, var(--muted));
}

.admin-resource-meta {
  margin-bottom: 1rem;
  color: var(--text);
}

.admin-resource-meta-grid {
  margin-bottom: 0.5rem;
}

.admin-resource-containers {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}

.admin-resource-containers li + li {
  margin-top: 0.25rem;
}

.admin-resource-containers code {
  color: var(--text);
}

.admin-resource-clients-wrap {
  color: var(--text);
}

.admin-resource-table-scroll {
  overflow-x: auto;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.admin-resource-clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
}

.admin-resource-clients-table th,
.admin-resource-clients-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
}

.admin-resource-clients-table th {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--panel) 88%, var(--text) 12%);
  color: var(--muted);
  font-weight: 600;
  z-index: 1;
}

.admin-resource-clients-table code {
  font-size: 0.8em;
  color: var(--text);
}

.admin-resource-device {
  text-transform: capitalize;
}

.admin-resource-device.is-ipad,
.admin-resource-device.is-iphone {
  font-weight: 600;
}

.admin-resource-recent-logs {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  max-height: 14rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

#admin-resource-app-note {
  margin: 0 0 0.55rem;
  color: var(--muted);
}

#admin-resource-app-note.is-warn {
  color: #f5c542;
}

.admin-load-tests {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.admin-reclaim-space {
  margin-bottom: 0.85rem;
}

.admin-reclaim-space-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
}

.admin-reclaim-space-actions .admin-btn[hidden] {
  display: none !important;
}

.admin-reclaim-space-actions .admin-status-bar {
  flex: 1 1 18rem;
  margin: 0;
}

.admin-reclaim-space-log {
  max-height: 14rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, var(--bg));
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.admin-load-tests-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
}

.admin-load-tests-actions .admin-btn[hidden] {
  display: none !important;
}

.admin-load-tests-summary-dialog .admin-btn[hidden] {
  display: none !important;
}

.admin-load-tests-actions .admin-status-bar {
  flex: 1 1 18rem;
  margin: 0;
}

.admin-load-tests-progress {
  margin-bottom: 0.85rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 82%, var(--bg));
}

.admin-load-tests-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  color: var(--text);
  font-size: 0.88rem;
}

.admin-load-tests-progress-head p {
  margin: 0;
  font-weight: 600;
}

.admin-load-tests-clock {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
  text-align: right;
}

#admin-load-tests-elapsed,
#admin-load-tests-countdown {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#admin-load-tests-countdown {
  font-size: 0.76rem;
}

.admin-load-tests-progress-track {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-load-tests-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8cff, #6ea8ff);
  transition: width 0.25s ease;
}

.admin-load-tests-counters {
  display: grid;
  grid-template-columns: repeat(4, minmax(5rem, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.admin-load-tests-counters div {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.admin-load-tests-counters dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-load-tests-counters dd {
  margin: 0.1rem 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-load-tests-log {
  box-sizing: border-box;
  width: 100%;
  min-height: 4rem;
  max-height: 12rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-load-tests-summary-dialog .app-modal-panel {
  width: min(38rem, 100%);
  max-height: min(90vh, 46rem);
  overflow-y: auto;
}

.admin-load-tests-summary-dialog .app-modal-lead {
  margin-bottom: 0.9rem;
}

.admin-load-tests-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.admin-load-tests-summary-grid div,
.admin-load-tests-highlights {
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 85%, var(--bg));
}

.admin-load-tests-summary-grid dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.admin-load-tests-summary-grid dd {
  margin: 0.2rem 0 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.admin-load-tests-highlights {
  margin-bottom: 1rem;
}

.admin-load-tests-highlights h4 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 0.88rem;
}

.admin-load-tests-highlights ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .admin-load-tests-counters,
  .admin-load-tests-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-deployment-status.is-error {
  color: #ff8a8a;
}

.admin-deploy-conflict-dialog .app-modal-lead {
  margin-bottom: 0.85rem;
}

.admin-deploy-conflict-options {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.admin-deploy-conflict-option {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.admin-deploy-conflict-option input {
  margin-top: 0.15rem;
}

.admin-deploy-conflict-option span {
  line-height: 1.4;
}

.admin-cache-overwrite-dialog .app-modal-lead {
  margin-bottom: 0.65rem;
}

.admin-cache-overwrite-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
}

.admin-cache-overwrite-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-height: min(50vh, 22rem);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--text) 8%);
}

.admin-cache-overwrite-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.admin-cache-overwrite-item:last-child {
  border-bottom: 0;
}

.admin-cache-overwrite-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.admin-cache-overwrite-item input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.admin-cache-overwrite-item-body {
  min-width: 0;
  flex: 1;
}

.admin-cache-overwrite-item-title {
  font-weight: 600;
  line-height: 1.35;
}

.admin-cache-overwrite-item-meta {
  margin-top: 0.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-cache-overwrite-item-meta.is-missing {
  color: #e0b36a;
}

.admin-cache-overwrite-item-meta.is-ready {
  color: #7dcea0;
}

.pack-cache-timing-note {
  margin-top: 0.75rem;
  line-height: 1.45;
}

.admin-cache-status-table-wrap .admin-resource-table-scroll,
#panel-cache-status .admin-resource-table-scroll {
  max-height: min(70vh, 36rem);
}

.admin-cache-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  color: var(--text);
}

.admin-cache-table th,
.admin-cache-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-cache-table th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.admin-cache-empty {
  color: var(--muted);
  text-align: center;
  padding: 1.5rem 0.75rem !important;
}

.admin-cache-title {
  font-weight: 600;
  line-height: 1.3;
}

.admin-cache-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-cache-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 80%, var(--border));
}

.admin-cache-status-pill.is-running {
  border-color: color-mix(in srgb, #4ea1ff 55%, var(--border));
  color: #9cc9ff;
}

.admin-cache-status-pill.is-queued,
.admin-cache-status-pill.is-pausing {
  border-color: color-mix(in srgb, #e0b36a 55%, var(--border));
  color: #e8c58a;
}

.admin-cache-status-pill.is-paused {
  border-color: color-mix(in srgb, #a0a8b8 55%, var(--border));
  color: #c5ccd8;
}

.admin-cache-status-pill.is-failed {
  border-color: color-mix(in srgb, #e57373 55%, var(--border));
  color: #f0a0a0;
}

.admin-cache-status-pill.is-completed {
  border-color: color-mix(in srgb, #7dcea0 55%, var(--border));
  color: #9ddbb5;
}

.pack-cache-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.pack-table th.pack-push-col {
  width: 6rem;
  white-space: nowrap;
}

.pack-push-cell {
  white-space: nowrap;
  vertical-align: middle;
}

.pack-push-progress {
  height: 0.3rem;
  margin-top: 0.32rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  overflow: hidden;
}

.pack-push-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8cff, #7dcea0);
  transition: width 0.3s ease;
}

.pack-push-progress.is-indeterminate .pack-push-progress-fill {
  width: 40%;
  animation: pack-push-progress-slide 1.4s ease-in-out infinite;
}

@keyframes pack-push-progress-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

.pack-push-progress-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.66rem;
  color: var(--muted);
}

.pack-push-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #4f8cff 45%, var(--border));
  background: color-mix(in srgb, #4f8cff 16%, transparent);
  color: #9ec1ff;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.pack-push-btn:hover:not(:disabled),
.pack-push-btn:focus-visible {
  background: color-mix(in srgb, #4f8cff 28%, transparent);
  border-color: color-mix(in srgb, #4f8cff 70%, var(--border));
  color: #cfe0ff;
}

.pack-push-btn:disabled {
  border-color: var(--border);
  background: transparent;
  color: var(--muted);
  opacity: 0.55;
  cursor: not-allowed;
}

.pack-push-btn.is-busy {
  opacity: 0.85;
  cursor: progress;
}

.pack-cache-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 80%, var(--border));
  color: var(--muted);
}

.pack-cache-pill.is-loading {
  opacity: 0.7;
}

.pack-cache-pill.is-missing {
  border-color: color-mix(in srgb, #a0a8b8 50%, var(--border));
  color: #b8c0cc;
  background: color-mix(in srgb, #8a93a3 12%, transparent);
}

.pack-cache-pill.is-stale {
  border-color: color-mix(in srgb, #e0b36a 55%, var(--border));
  color: #e8c58a;
  background: color-mix(in srgb, #e0b36a 14%, transparent);
}

.pack-cache-pill.is-ready {
  border-color: color-mix(in srgb, #7dcea0 55%, var(--border));
  color: #9ddbb5;
  background: color-mix(in srgb, #7dcea0 14%, transparent);
}

.pack-deploy-cell {
  white-space: nowrap;
}

.pack-deploy-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 80%, var(--border));
  color: var(--muted);
}

.pack-deploy-pill.is-loading {
  opacity: 0.7;
}

/* "not pushed" stays dim; "in sync" is a calm green chip; "stale" matches
   local cache stale so the column reads as "needs push" at a glance. */
.pack-deploy-pill.is-missing {
  border-color: color-mix(in srgb, #6b7382 55%, var(--border));
  color: #858d9b;
  background: transparent;
  font-weight: 600;
}

.pack-deploy-pill.is-partial {
  border-color: color-mix(in srgb, #e0b36a 70%, var(--border));
  color: #f0cf96;
  background: color-mix(in srgb, #e0b36a 22%, transparent);
}

.pack-deploy-pill.is-stale {
  border-color: color-mix(in srgb, #e0b36a 70%, var(--border));
  color: #f0cf96;
  background: color-mix(in srgb, #e0b36a 22%, transparent);
}

.pack-deploy-pill.is-match,
.pack-deploy-pill.is-pushed {
  border-color: color-mix(in srgb, #5fbf8a 62%, var(--border));
  color: #b7e6cb;
  background: color-mix(in srgb, #5fbf8a 18%, transparent);
}

.pack-deploy-pill.is-unknown {
  opacity: 0.75;
  border-style: dashed;
}

.admin-cache-bar {
  display: grid;
  gap: 0.25rem;
  min-width: 7.5rem;
}

.admin-cache-bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  overflow: hidden;
}

.admin-cache-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d7dde, #6eb0ff);
}

.admin-cache-bar-fill.is-book {
  background: linear-gradient(90deg, #2f8f6a, #7dcea0);
}

.admin-cache-bar-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.admin-cache-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-cache-exclusive {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, #e0b36a 50%, var(--border));
  background: color-mix(in srgb, #e0b36a 12%, var(--panel));
  color: var(--text);
  line-height: 1.4;
}

.admin-cache-footnote {
  margin-top: 0.75rem;
}
