/* ===== Pearset Admin — styles layered on top of styles.css ===== */

.admin-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 3px 7px;
  border-radius: 6px;
  margin-left: 2px;
}
.auth-logo .admin-badge { background: var(--text); }

/* stat grids a touch tighter */
.admin-stats .ds-v { font-size: 23px; }

/* ----- Panels & tables ----- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.atable tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.atable tbody tr:last-child td { border-bottom: none; }
.atable tbody tr[onclick] { cursor: pointer; }
.atable tbody tr[onclick]:hover { background: #fafafa; }
.t-dim { color: var(--faint); font-size: 12px; font-weight: 400; margin-top: 2px; }
.empty-cell { text-align: center; color: var(--faint); padding: 30px; }

.mini-bar {
  display: inline-block;
  width: 90px; height: 6px;
  background: #e9e9ee;
  border-radius: 999px;
  overflow: hidden;
  vertical-align: middle;
  margin-right: 8px;
}
.mini-bar > div { height: 100%; background: var(--text); }

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f0f0f3;
  color: var(--muted);
}
.pill-ok { background: #eef2ee; color: var(--green); }

.row-actions { white-space: nowrap; }
.link-action, .link-danger {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}
.link-action { color: var(--text); font-weight: 500; margin-right: 14px; }
.link-action:hover { text-decoration: underline; }
.link-danger { color: #d70015; }
.link-danger:hover { text-decoration: underline; }

/* ----- Add asset form ----- */
.add-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: start;
}
.add-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 24px 24px;
}
.form-section { padding: 20px 0; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: none; }
.fs-title { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.fs-hint { font-size: 12.5px; color: var(--faint); margin: 0 0 14px; line-height: 1.4; }

.af-field { margin-bottom: 14px; }
.af-field:last-child { margin-bottom: 0; }
.af-field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
textarea.auth-input { resize: vertical; line-height: 1.5; font-size: 15px; }
select.auth-input { appearance: none; background: var(--surface); cursor: pointer; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.form-actions .btn { width: auto; }

/* ----- Live preview ----- */
.add-preview { position: sticky; top: 0; }
.preview-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 12px;
}
.preview-note { font-size: 12px; color: var(--faint); margin-top: 14px; line-height: 1.5; }

@media (max-width: 900px) {
  .add-layout { grid-template-columns: 1fr; }
  .add-preview { position: static; }
  .atable { font-size: 13px; }
  .atable thead th, .atable tbody td { padding: 11px 12px; }
}
