:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172128;
  background: #f3f6f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #172128;
  --muted: #728087;
  --line: #e3e9e7;
  --green: #147d68;
  --green-dark: #0f6655;
  --paper: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.topbar { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; background: var(--green); font-size: 22px; font-weight: 800; }
.topbar strong, .topbar span { display: block; }
.topbar strong { font-size: 15px; }
.topbar span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.topbar #logout-button { margin-left: auto; }
.container { width: min(1240px, calc(100% - 48px)); margin: 44px auto 72px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.025em; }
.eyebrow { margin-bottom: 9px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.muted { margin-bottom: 0; color: var(--muted); line-height: 1.55; }
.panel { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgb(23 33 40 / 3%); }
.login-panel { width: min(440px, 100%); margin: 8vh auto 0; padding: 36px; }
.stack { display: grid; gap: 12px; margin-top: 25px; }
label { color: #35434a; font-size: 13px; font-weight: 650; }
input, select { width: 100%; min-height: 44px; margin-top: 7px; padding: 10px 12px; border: 1px solid #dce4e1; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgb(20 125 104 / 12%); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 9px 13px; border: 0; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-quiet { color: #286456; background: #eaf5f1; }
.button-quiet:hover { background: #dcefe8; }
.button-danger { color: #a33e36; background: #fff0ee; }
.button-danger:hover { background: #ffe2de; }
.page-heading { margin-bottom: 28px; }
.integration-note { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #efdca9; border-radius: 11px; color: #755c21; background: #fff9e9; font-size: 12px; line-height: 1.55; }
.integration-note strong { margin-right: 4px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { display: flex; flex-direction: column; gap: 12px; padding: 21px 23px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 650; }
.stat-card strong { font-size: 28px; letter-spacing: -.04em; }
.issue-panel { display: grid; grid-template-columns: minmax(180px, .7fr) 2fr; align-items: end; gap: 28px; margin-bottom: 18px; }
.issue-form { display: grid; grid-template-columns: 1.3fr 1fr auto; align-items: end; gap: 12px; }
.issue-form .button { height: 44px; white-space: nowrap; }
.list-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.search-label { width: min(260px, 42%); color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 13px; color: #7c898e; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
td { padding: 14px 13px; border-top: 1px solid #edf0ef; font-size: 13px; vertical-align: middle; }
td strong, td small { display: block; }
td strong { overflow-wrap: anywhere; }
td small { max-width: 190px; overflow: hidden; margin-top: 5px; color: #98a2a5; font-size: 10px; text-overflow: ellipsis; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-active { color: #147d68; background: #e6f5ef; }
.badge-expired { color: #8b6a24; background: #fbf3dd; }
.badge-revoked { color: #a33e36; background: #fff0ee; }
.notice { margin-bottom: 18px; padding: 12px 15px; border-radius: 10px; background: #e6f5ef; color: #175d4f; font-size: 13px; }
.notice.error { background: #fff0ee; color: #963b35; }
.empty-state { padding: 28px 0 6px; color: var(--muted); text-align: center; }
.footnote { margin: 16px 4px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.hidden { display: none !important; }
@media (max-width: 850px) {
  .issue-panel { grid-template-columns: 1fr; gap: 18px; }
  .issue-form { grid-template-columns: 1fr 1fr; }
  .issue-form .button { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .container { width: calc(100% - 28px); margin-top: 26px; }
  .topbar { padding: 0 14px; }
  .panel { padding: 19px; border-radius: 14px; }
  .login-panel { margin-top: 5vh; padding: 26px; }
  .stats { gap: 8px; }
  .stat-card { padding: 14px 12px; gap: 8px; }
  .stat-card span { font-size: 10px; }
  .stat-card strong { font-size: 23px; }
  .issue-form { grid-template-columns: 1fr; }
  .issue-form .button { grid-column: auto; }
  .list-heading { align-items: stretch; flex-direction: column; }
  .search-label { width: 100%; }
  th, td { padding: 11px 9px; }
  .actions { min-width: 150px; }
}
