/* Zimac auth panel — service-specific styles.
 *
 * The design system (tokens, app shell, buttons, cards, the toast) now lives
 * once in the shared internal UI kit — zimac_common::ui, served at
 * /zimac-ui.css and linked *before* this file. What remains here is unique to
 * the auth admin panel: the two-column sidebar layout, the token table, the
 * create form (whose inputs are deliberately unclassed), the one-time secret
 * reveal, and the small status pills. All of it leans on the kit's tokens so
 * colours stay in lockstep with the rest of the family. */

/* The admin panel is a fixed sidebar + content grid. */
body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.who {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

/* Full-screen sign-in, shown until authenticated. Fixed + opaque so it covers
   the console chrome. Leans entirely on the kit's tokens (.card, .btn, the
   gradient ink, the aurora, the shadow/glow scale) so it stays in lockstep
   with the rest of the family. */
.login {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px;
  /* Base canvas + the family's signature aurora glow on top. */
  background: var(--zui-aurora), var(--bg);
  animation: zui-fade 0.45s ease;
}
/* A faint dot grid, masked toward the top — quiet texture behind the card. */
.login::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.45) 0.6px, transparent 0.6px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(110rem 70rem at 50% -10%, #000, transparent 70%);
  mask-image: radial-gradient(110rem 70rem at 50% -10%, #000, transparent 70%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 38px 36px 30px;
  border-radius: var(--zui-radius-lg);
  /* Deepen the kit's card shadow with its strongest elevation token. */
  box-shadow: var(--zui-shadow-3), 0 30px 80px -28px rgba(0, 0, 0, 0.8);
}

/* The kit's .brand is sized for the 240px sidebar; give it room to breathe
   here and bump the mark up a touch for the hero treatment. */
.login-brand {
  margin-bottom: 28px;
}
.login-brand .brand-mark {
  width: 40px;
  height: 40px;
  font-size: 22px;
  border-radius: 12px;
}
.login-brand .brand-name {
  font-size: 17px;
}

.login-title {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.login-lede {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0 0 26px;
}

/* Full-width sign-in. Colour, gradient, and glow all come from the kit's .btn
   — we only stretch it and animate the trailing arrow. */
.login-btn {
  width: 100%;
  gap: 10px;
  padding: 13px 20px;
  font-size: 15px;
}
.login-arrow {
  transition: transform 0.2s ease;
}
.login-btn:hover .login-arrow {
  transform: translateX(3px);
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--muted);
}
.login-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

.login-legal {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--zui-text-faint);
  margin: 0;
}

/* Create-token form — the inputs here carry no class, so they're styled here
   rather than by the kit's .input. */
.create .row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}
.create label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  flex: 1;
}
.create input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
.create input:focus {
  outline: none;
  border-color: var(--accent);
}

/* One-time secret reveal. */
.reveal {
  border-color: var(--accent);
}
.secret {
  display: block;
  background: #000;
  color: var(--accent-2);
  padding: 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 12px;
}

/* Token table. */
table.tokens {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tokens th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}
.tokens td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.tokens code {
  font-family: var(--mono);
  color: var(--muted);
}

/* Status pills in the table — small inline badges. (Distinct from the kit's
   .pill, which is a larger count chip; this rule intentionally overrides it.) */
.pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}
.pill.active {
  background: rgba(54, 201, 143, 0.15);
  color: var(--ok);
}
.pill.revoked {
  background: rgba(229, 88, 107, 0.15);
  color: var(--danger);
}

/* The revoke action is a destructive link button. */
.btn.link {
  color: var(--danger);
}
