.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
#admin-email {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.admin-account-link {
  color: var(--muted);
  font-size: 12px;
}
.admin-account-link:hover {
  color: var(--ink);
}
.admin-page:has(#login-view:not(.hidden)) .site-header {
  border-bottom: 0;
}
.login-view {
  display: grid;
  min-height: calc(100dvh - var(--header-height));
  grid-template-rows: 1fr auto;
  padding: 48px 24px 24px;
}
#login-form {
  align-self: center;
  width: min(420px, 100%);
  margin: 0 auto;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 6px 20px #23273003;
}
.login-heading {
  margin-bottom: 10px;
}
.login-heading .section-icon {
  margin-bottom: 20px;
  width: 36px;
  height: 36px;
  background: var(--subtle);
  border-color: var(--line);
  color: var(--muted);
}
.login-heading h1 {
  margin-bottom: 7px;
  font-size: 28px;
  line-height: 1.4;
}
.login-heading .muted {
  font-size: 13px;
}
.login-back {
  justify-self: center;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.login-footer {
  padding-top: 56px;
  color: #9298a2;
  text-align: center;
  font-size: 11px;
}
.page-heading .ghost {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}
.page-heading .ghost .icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--panel);
}
.metric {
  min-width: 0;
  border-left: 1px solid var(--line);
  padding: 22px 24px;
}
.metric:first-child {
  border-left: 0;
}
.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.tab-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 24px;
  background: var(--panel);
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar strong {
  font-size: 14px;
  font-weight: 600;
}
.toolbar .muted {
  font-size: 12px;
}
.toolbar input {
  width: min(280px, 55%);
  min-height: 38px;
  padding: 9px 12px;
  background: #fcfcfd;
  font-size: 12px;
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  scrollbar-width: thin;
}
.data-table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 16px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.8;
}
.data-table th {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #89909b;
  background: #f8f9fb;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.data-table td {
  overflow-wrap: anywhere;
}
.data-table td:last-child {
  min-width: 145px;
}
.data-table .muted {
  font-size: 11px;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #fdfbf5;
}
.data-table td b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
}
#panel-users .data-table td:nth-child(2) {
  white-space: nowrap;
}
.data-table .edit-input {
  min-width: 86px;
  min-height: 36px;
  padding: 8px 9px;
  font-size: 12px;
}
.data-table .plan-name {
  min-width: 125px;
}
.data-table td .small-button {
  margin: 3px 0;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--success);
  background: #edf5ee;
  font-size: 11px;
  white-space: nowrap;
}
.status.off {
  color: #737a86;
  background: var(--subtle);
}
.pagination {
  justify-content: flex-end;
  margin-top: 20px;
  margin-bottom: 0;
}
.pagination > span {
  margin-right: auto;
}
#panel-releases {
  border: 0;
  padding: 0;
}
.release-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
}
.release-grid .panel {
  padding: 28px;
}
.release-grid h2 {
  margin-bottom: 24px;
  font-size: 18px;
}
.release-form {
  display: grid;
  gap: 18px;
}
.release-form .field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.release-form textarea {
  min-height: 120px;
}
.release-form .platform-fields {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.release-form .platform-fields h3 {
  font-size: 13px;
  font-weight: 600;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  font-weight: 400 !important;
}
.check-options {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.release-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 13px;
  padding: 20px;
  background: var(--panel);
}
.release-card h3 {
  margin-bottom: 6px;
  font-size: 15px;
}
.release-card p {
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.release-meta {
  color: #7a818e;
  font-size: 11px;
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 40px 20px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
  font-size: 13px;
}
.panel-note {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1100px) {
  .metric {
    padding: 20px 16px;
  }
  .metric strong {
    font-size: 26px;
  }
  .release-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metric:nth-child(4) {
    border-left: 0;
  }
  .metric:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
  .metrics .metric:last-child {
    grid-column: 2 / -1;
  }
}
@media (max-width: 480px) {
  .top-actions {
    gap: 9px;
  }
  .admin-account-link {
    display: none;
  }
  #admin-email {
    max-width: 86px;
    font-size: 11px;
  }
  .top-actions .ghost {
    padding: 7px 10px;
    min-height: 33px;
    font-size: 11px;
  }
  #login-form {
    padding: 28px;
  }
  .login-view {
    padding: 35px 20px 20px;
  }
  .page-heading .ghost {
    min-height: 35px;
    padding: 8px 10px;
    font-size: 11px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric {
    padding: 18px;
  }
  .metric:nth-child(odd) {
    border-left: 0;
  }
  .metric:nth-child(even) {
    border-left: 1px solid var(--line);
  }
  .metric:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .metrics .metric:last-child {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .metrics .metric:last-child strong {
    margin: 0;
  }
  .tab-panel {
    padding: 20px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input {
    width: 100%;
  }
  .pagination {
    gap: 8px;
    flex-wrap: wrap;
  }
  .pagination > span {
    flex-basis: 100%;
    font-size: 11px;
  }
  .release-grid .panel {
    padding: 24px;
  }
  .release-form .field-pair {
    grid-template-columns: 1fr;
  }
}
