/*
 * The operator's console (/admin). Builds on the design system in
 * application.css; only what the admin pages need on top of it.
 *
 * `stylesheet_link_tag :app` links the files alphabetically, so this one
 * loads BEFORE application.css: a rule here wins on specificity or not at
 * all. Every adjustment below therefore names the design-system class too
 * (.hero.admin-hero, .admin-rows .post-row) instead of trusting source order.
 */

/* An operator's console, not a landing page: less air around the hero and
   between the stacked panels than a public page gets. */
.hero.admin-hero { padding-block: 4.5rem 2.5rem; }
.admin-stack .form-wrap { margin: 1.5rem auto; }
@media (max-width: 600px) {
  .hero.admin-hero { padding-block: 3rem 2rem; }
  .admin-stack .form-wrap { margin: 1rem auto; }
}

/* Users / Groups switch above every admin hero */
.admin-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.admin-nav a { color: var(--c-text-dim); padding-bottom: 0.3rem; }
.admin-nav a:hover { color: var(--c-text); }
.admin-nav a.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
/* A refund still to be made by hand (Payment.refunds_due): the menu says so
   in the danger colour on every admin page, active or not. */
.admin-nav a.admin-nav-due { color: var(--c-danger); }

/* status tags: several side by side in a row's meta column */
.admin-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.post-status-tag.admin-tag-ok   { color: var(--c-success); border-color: var(--c-success-line); }
.post-status-tag.admin-tag-gold { color: var(--c-accent);  border-color: var(--c-accent-line); }

/* row lists inside a form-wrap panel: tighter than the full-width lists */
.admin-rows .post-row { grid-template-columns: 120px 1fr auto; gap: 1.25rem; padding: 1.2rem 0; }
.admin-rows .post-row h3 { font-size: 1.25rem; }
.admin-rows .post-row.admin-row-wide { grid-template-columns: 120px 1fr; }
@media (max-width: 800px) {
  .admin-rows .post-row,
  .admin-rows .post-row.admin-row-wide { grid-template-columns: 1fr; gap: 0.5rem; }
}

.admin-subheading { margin: 2.5rem 0 1.2rem; }
.admin-footnote { margin: 1.2rem 0 0; }
/* a payment that bought nothing, and is to go back */
.admin-refund-due { color: var(--c-danger); }
p.admin-refund-due { margin: 0.4rem 0 0; }

/* Stripe ids run to ~70 characters: let them break rather than widen the page */
.admin-ids {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.2rem 1rem;
  margin: 0.6rem 0 0;
  color: var(--c-text-dim);
}
.admin-ids dt { color: var(--c-text-faint); }
.admin-ids dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 500px) {
  .admin-ids { grid-template-columns: 1fr; }
  .admin-ids dd { margin-bottom: 0.4rem; }
}

/* the complimentary-license form */
.admin-fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.8rem; }
.admin-fieldset legend {
  padding: 0;
  margin-bottom: 0.8rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}
.admin-duration-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.admin-license-form input[type="radio"] { accent-color: var(--c-accent); }
/* The picker's own icon and calendar follow the palette's color-scheme
   (set on :root in application.css). */
.admin-license-form input[type="date"] {
  background: var(--c-field);
  border: 1px solid var(--c-control);
  color: var(--c-text);
  padding: 0.6rem 0.9rem;
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  font-size: 0.95rem;
}
.admin-license-form input[type="date"]:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-tint);
}
.admin-license-form .error-summary p { margin: 0; color: inherit; }
