:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #1f4f82;
  --accent-2: #12314f;
  --danger: #9f1239;
  --ok-bg: #e8f5e9;
  --draft-bg: #fff7ed;
  --revoked-bg: #f3f4f6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; gap: 24px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand a { font-weight: 700; color: var(--text); }
nav { display: flex; gap: 14px; flex: 1; }
.logout-form { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-pill { color: var(--muted); font-size: 13px; }
.container { max-width: 1280px; margin: 28px auto; padding: 0 24px; }
h1 { margin: 0 0 18px; font-size: 28px; }
h2 { margin: 0 0 14px; font-size: 20px; }
h3 { margin: 24px 0 12px; font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.narrow { max-width: 760px; }
.login-card { max-width: 520px; margin: 70px auto; }
.form-grid { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, textarea, select { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px; font: inherit; background: white; }
textarea { resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: var(--accent); color: white; padding: 10px 14px; font-weight: 700; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--accent-2); text-decoration: none; }
button.danger { background: var(--danger); }
.link-button { background: transparent; color: var(--accent); padding: 0; font-weight: 600; }
.link-button:hover { background: transparent; text-decoration: underline; }
.button.small { padding: 7px 10px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.info { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); }
.two-cols, .grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.section-header, .page-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.badge.draft { background: var(--draft-bg); color: #9a3412; }
.badge.published { background: var(--ok-bg); color: #166534; }
.badge.revoked { background: var(--revoked-bg); color: #374151; }
.details { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.details dt { color: var(--muted); font-weight: 700; }
.details dd { margin: 0; }
.customer-hero { background: linear-gradient(135deg, #12314f, #1f4f82); color: white; border-radius: 14px; padding: 28px; margin-bottom: 20px; }
.customer-hero h1 { margin-bottom: 8px; }
.customer-hero p { margin: 0; opacity: .9; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; opacity: .8; margin-bottom: 6px; }
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; }
  nav { order: 3; width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-cols, .grid-2 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}
