/*
 * The working screens: lists, filters, forms in a panel, the tree of components, empty states. They use the palette
 * of app.css (loaded first). No inline style anywhere (Content-Security-Policy).
 */

.rx-nav-title {
  margin: 1rem .8rem .3rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(185, 195, 227, .55);
}
.rx-nav-title:first-child { margin-top: 0; }

.rx-page-sub { margin: .25rem 0 0; color: var(--rx-muted); max-width: 46rem; }
.rx-section-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.rx-asset-title { font-size: 1.5rem; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0 0 .3rem; }

.rx-card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .75rem; }
.rx-card-head .rx-card-title { margin-bottom: 0; }
.rx-card-danger { border-color: rgba(220, 53, 69, .35); }

.rx-count {
  background: var(--rx-surface-2);
  color: var(--rx-muted);
  border: 1px solid var(--rx-border);
  font-weight: 600;
  border-radius: 2rem;
}
.rx-own { background: var(--rx-primary-soft); color: var(--rx-primary); font-weight: 600; border-radius: 2rem; }
.rx-type { background: var(--rx-surface-2); color: var(--rx-text); border: 1px solid var(--rx-border); font-weight: 600; border-radius: 2rem; }
.rx-ver { background: var(--rx-accent-soft); color: var(--rx-accent); font-weight: 600; }
.rx-ver-sw { background: var(--rx-primary-soft); color: var(--rx-primary); }
.rx-step {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rx-primary), var(--rx-accent));
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
}

/* a form that opens above a list */
.rx-collapse { margin-bottom: 1rem; }
.rx-collapse > form,
.rx-collapse > p { padding: 1rem; border: 1px dashed var(--rx-border); border-radius: .8rem; background: var(--rx-surface-2); }
.rx-collapse > p { margin-bottom: .6rem; }
.rx-collapse-card > form { background: var(--rx-surface); border: 1px solid var(--rx-border); box-shadow: var(--rx-shadow); }
.rx-collapse-card { margin-bottom: 1.2rem; }

/* filters above a list */
.rx-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.1rem; }
.rx-filter { flex: 0 1 16rem; }
.rx-filter-grow { flex: 1 1 18rem; }

.rx-table-hover tbody tr:hover { background: var(--rx-surface-2); }
.rx-table td, .rx-table th { background: transparent; border-bottom-color: var(--rx-border); }
.rx-tag { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; text-decoration: none; }
.rx-pager { display: flex; justify-content: center; margin-top: 1.2rem; }

/* nothing to list */
.rx-empty { text-align: center; padding: 2.4rem 1rem; }
.rx-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: .8rem;
  border-radius: 1rem;
  background: var(--rx-primary-soft);
  color: var(--rx-primary);
  font-size: 1.3rem;
}
.rx-empty-title { font-weight: 700; margin-bottom: .2rem; }
.rx-empty-text { color: var(--rx-muted); margin: 0 auto; max-width: 30rem; }

.rx-plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rx-plain-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--rx-border); }
.rx-plain-list li:last-child { border-bottom: 0; }

/* versions of a product */
.rx-versions { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.rx-version { padding: .55rem .7rem; border: 1px solid var(--rx-border); border-radius: .7rem; background: var(--rx-surface-2); }
.rx-version-new { padding-top: 1rem; border-top: 1px solid var(--rx-border); }

.rx-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1rem; }

/* the components of an asset */
.rx-tree { list-style: none; margin: 0; padding: 0; }
.rx-tree .rx-tree { margin-left: 1.1rem; padding-left: 1rem; border-left: 2px solid var(--rx-border); }
.rx-tree li { margin-top: .5rem; }
.rx-tree > li:first-child { margin-top: 0; }
.rx-node {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .7rem;
  border: 1px solid var(--rx-border);
  border-radius: .8rem;
  background: var(--rx-surface-2);
}
.rx-node:hover { border-color: var(--rx-primary); }
.rx-node-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  background: var(--rx-primary-soft);
  color: var(--rx-primary);
}
.rx-node-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.rx-node-name { font-weight: 600; }
.rx-node-serial { font-size: .8rem; color: var(--rx-muted); }
.rx-node-actions { flex: 0 0 auto; display: flex; gap: .3rem; }

/* Second factor (METIER-0073): the sign-in step, the QR code, the recovery codes. */
.rx-steps { padding-left: 1.2rem; margin-bottom: 1.4rem; }
.rx-steps > li { margin-bottom: .8rem; }
.rx-qr {
  display: inline-block;
  margin: .7rem 0 .3rem;
  padding: .4rem;
  background: #fff; /* a QR code is read dark on light, in the dark theme too */
  border: 1px solid var(--rx-border);
  border-radius: .8rem;
  line-height: 0;
}
.rx-qr svg { display: block; max-width: 100%; height: auto; }
.rx-secret { margin-top: .4rem; color: var(--rx-muted); font-size: .9rem; }
.rx-secret summary { cursor: pointer; }
.rx-secret-key { display: block; padding: .5rem .7rem; font-size: 1rem; letter-spacing: .08em; word-break: break-all; background: var(--rx-surface-2); border-radius: .5rem; color: var(--rx-text, inherit); }
.rx-code-input { letter-spacing: .15em; font-variant-numeric: tabular-nums; }
.rx-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .5rem; list-style: none; padding: 0; margin: 1rem 0; }
.rx-codes li { padding: .5rem .7rem; text-align: center; background: var(--rx-surface-2); border: 1px solid var(--rx-border); border-radius: .6rem; }
.rx-codes code { font-size: 1.05rem; letter-spacing: .08em; color: inherit; }
