/* ============================================================================
   RUS ZIP License Issuer — Stripe-inspired design system (issue #29)

   Shared palette for the app (and the future landing site, per the storefront
   design spec): RUS white / blue / dark / gold exposed as CSS custom
   properties. Components: translucent sticky navbar, rounded soft-shadow
   cards, generous whitespace. Presentation layer only — no behavior here.
   ========================================================================= */

:root {
  /* RUS palette — the landing site (#30) reuses these same names. */
  --rus-white: #ffffff;
  --rus-blue: #0057b8;          /* primary action blue, from the logo blues */
  --rus-blue-hover: #00469a;
  --rus-blue-active: #00387c;
  --rus-blue-soft: #eaf2fb;     /* selected / hover wash */
  --rus-dark: #0a1e3f;          /* headings, navbar wordmark */
  --rus-gold: #c9a227;          /* accent hairlines, highlights */
  --rus-gold-soft: #fdf5df;     /* warm notice wash */
  --rus-gold-border: #eeda9a;
  --rus-surface: #f6f9fc;       /* page background behind white cards */
  --rus-border: #e3e9f0;
  --rus-text: #1d2b3a;
  --rus-muted: #5f6f80;

  --rus-radius-lg: 0.875rem;    /* cards, modals */
  --rus-radius: 0.5rem;         /* inputs, buttons, alerts */

  --rus-shadow-sm: 0 1px 2px rgba(9, 30, 66, 0.06);
  --rus-shadow: 0 2px 5px rgba(9, 30, 66, 0.05), 0 10px 24px rgba(9, 30, 66, 0.08);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: var(--rus-surface);
  color: var(--rus-text);
}

/* ------------------------------------------------------------------ brand */

.navbar-brand {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.rus-brand-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.rus-brand-logo-lg {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
}

.rus-brand-wordmark {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--rus-dark);
}

.rus-brand-divider {
  width: 1px;
  height: 1.25rem;
  background-color: var(--rus-border);
}

.rus-brand-sub {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--rus-muted);
}

/* ----------------------------------------------------------------- navbar */

.rus-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
  border-bottom: 1px solid var(--rus-border);
}

.rus-navbar .nav-link {
  color: var(--rus-muted);
  font-weight: 500;
  border-radius: var(--rus-radius);
  padding: 0.375rem 0.75rem;
}

.rus-navbar .nav-link:hover,
.rus-navbar .nav-link:focus {
  color: var(--rus-blue);
}

/* Gold accent on the active section link. */
.rus-navbar .nav-link.active,
.rus-navbar .nav-link[aria-current="page"] {
  color: var(--rus-dark);
  box-shadow: inset 0 -2px 0 var(--rus-gold);
}

/* ------------------------------------------------------------------- type */

h1, h2, h3, h4, h5, h6 {
  color: var(--rus-dark);
}

/* Gold tick under every page heading (h1 on each page). */
.rus-page-title {
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--rus-gold);
  display: inline-block;
}

/* ---------------------------------------------------------------- cards */

.card {
  border: 1px solid var(--rus-border);
  border-radius: var(--rus-radius-lg);
  box-shadow: var(--rus-shadow);
}

.modal-content {
  border: 1px solid var(--rus-border);
  border-radius: var(--rus-radius-lg);
}

.card-header {
  background-color: var(--rus-white);
  border-bottom: 1px solid var(--rus-border);
  border-radius: var(--rus-radius-lg) var(--rus-radius-lg) 0 0;
  font-weight: 600;
  color: var(--rus-dark);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  border-radius: var(--rus-radius);
  font-weight: 500;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--rus-white), 0 0 0 0.25rem var(--rus-blue);
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--rus-blue);
  --bs-btn-border-color: var(--rus-blue);
  --bs-btn-hover-bg: var(--rus-blue-hover);
  --bs-btn-hover-border-color: var(--rus-blue-hover);
  --bs-btn-active-bg: var(--rus-blue-active);
  --bs-btn-active-border-color: var(--rus-blue-active);
  --bs-btn-disabled-bg: #7ea6cf;
  --bs-btn-disabled-border-color: #7ea6cf;
}

.btn-outline-primary {
  --bs-btn-color: var(--rus-blue);
  --bs-btn-border-color: var(--rus-blue);
  --bs-btn-hover-bg: var(--rus-blue);
  --bs-btn-hover-border-color: var(--rus-blue);
  --bs-btn-active-bg: var(--rus-blue-active);
  --bs-btn-active-border-color: var(--rus-blue-active);
}

/* ------------------------------------------------------------------ forms */

.form-control,
.form-select {
  border-radius: var(--rus-radius);
  border-color: #cfd9e4;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--rus-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 87, 184, 0.15);
}

.form-control::placeholder {
  color: #9aa8b6;
}

/* ----------------------------------------------------------------- tables */

.table {
  --bs-table-hover-bg: var(--rus-blue-soft);
  margin-bottom: 0;
}

.table > thead > tr > th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rus-muted);
  border-bottom: 1px solid var(--rus-border);
}

/* ----------------------------------------------------------------- alerts */

.alert {
  border-radius: var(--rus-radius);
}

/* Gold-tinted warning alerts — the palette's accent voice. */
.alert-warning {
  --bs-alert-color: #6d5610;
  --bs-alert-bg: var(--rus-gold-soft);
  --bs-alert-border-color: var(--rus-gold-border);
  --bs-alert-link-color: #4d3d0a;
}

/* ------------------------------------------------------------------ badges */

.badge {
  border-radius: 9999px;
  padding: 0.35em 0.75em;
  font-weight: 600;
}

/* Gold "Perpetual" badge: bg-info markup stays (test-pinned classes are
   avoided in assertions), restyled into the palette. */
.badge.bg-info {
  background-color: var(--rus-gold-soft) !important;
  color: #6d5610 !important;
  border: 1px solid var(--rus-gold-border);
}

/* ------------------------------------------------------------------ links */

a {
  color: var(--rus-blue);
}

a:hover {
  color: var(--rus-blue-hover);
}

/* --------------------------------------------------------------- snippets */

pre.rus-code {
  background-color: #0e2038;
  color: #dce7f5;
  border: 1px solid #1e3a5f;
  border-radius: var(--rus-radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* ----------------------------------------------------------------- footer */

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  background-color: var(--rus-white);
  border-top: 1px solid var(--rus-border);
  box-shadow: inset 0 2px 0 var(--rus-gold);
  color: var(--rus-muted);
}

/* Legacy form-floating tweaks from the template, kept intact. */
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
