/* ------------------------------------------------------------------
   App-specific styles on top of Bootstrap 5. Bootstrap covers buttons,
   forms, tables, modals, alerts, etc. — this file only adds what's
   specific to the OpenVPN admin (online LED, tab styling, code/cert
   widgets, table density tweaks).
   ------------------------------------------------------------------ */

/* Online status LED in user lists. */
.led {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  vertical-align: middle;
}
.led-on  { background: #198754; box-shadow: 0 0 4px #198754; }
.led-off { background: #6c757d; opacity: 0.5; }

/* Tighter table density for admin lists with many rows. */
.table > :not(caption) > * > * {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}

/* Cert/key fingerprints + IDs render as code. */
code.cert-id,
code {
  color: var(--bs-emphasis-color);
  font-size: 0.85em;
}

/* Inline edit affordance: dotted underline + pointer. */
.inline-edit-trigger {
  cursor: pointer;
  border-bottom: 1px dotted var(--bs-secondary-color);
}

/* Page-section toolbar above each table (search + filter + buttons). */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.toolbar > .toolbar-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}

/* Bootstrap form-check default stacks vertically in narrow containers;
   force inline alignment for our compact admin forms. */
.form-check-inline { margin-right: 1rem; }

/* Action column cells: right-align + tight spacing. */
table td.actions,
table th.actions {
  text-align: right;
  white-space: nowrap;
}
table td.actions form { display: inline-block; margin: 0 0 0 0.25rem; }
table td.actions .btn { margin-left: 0.25rem; }

/* Member chips in group detail. */
.member-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.member-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.25rem;
  padding: 0.2rem 0.4rem 0.2rem 0.6rem;
  font-size: 0.85rem;
}

/* Compact pre blocks for cert/log dumps. */
pre.dump {
  background: var(--bs-tertiary-bg);
  padding: 0.5rem;
  border-radius: 0.25rem;
  max-height: 30rem;
  overflow: auto;
  font-size: 0.8rem;
}

/* Long passcodes / pubkeys — single-click select. */
.select-all {
  user-select: all;
  word-break: break-all;
}

/* Tabs row directly under the navbar. */
.nav-tabs .nav-link {
  font-size: 0.95rem;
}
.nav-tabs .nav-link.active {
  font-weight: 600;
}
