:root {
  --bg: #f5f7fa;
  --surface: #fff;
  --ink: #172335;
  --muted: #5d6a7b;
  --line: #e2e7ee;
  --primary: #245fe5;
  --primary-dark: #184ac0;
  --soft: #edf3ff;
  --navy: #12223b;
  --danger: #b52a38;
  --danger-bg: #fff1f2;
  --success: #147750;
  --success-bg: #ebf7f1;
  --warning: #976014;
  --warning-bg: #fff6e4;
  --radius: 14px;
  --shadow: 0 16px 56px #10234012;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 15px;
  font-weight: 600;
  background: transparent;
  color: var(--ink);
  transition:
    background 0.16s,
    border-color 0.16s,
    color 0.16s;
}
button:hover {
  background: #eaf0f8;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #86acf8;
  outline-offset: 3px;
}
button svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.primary {
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}
.secondary {
  background: var(--surface);
  border-color: #d4dce7;
}
.secondary:hover:not(:disabled) {
  background: #f1f5fa;
  border-color: #b6c3d5;
}
.quiet {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 500;
}
.danger {
  background: var(--danger);
  color: #fff;
}
.danger:hover:not(:disabled) {
  background: #94212d;
}
.danger-text {
  color: var(--danger);
}
.wide {
  width: 100%;
}
.icon-button {
  font-size: 25px;
  line-height: 1;
  min-width: 42px;
  padding: 7px;
  color: var(--muted);
}
svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  padding: 10px;
}
.skip:focus {
  top: 12px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 650;
}
h3 {
  font-size: 15px;
}
code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
  margin-top: 8px;
}
.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.eyebrow {
  display: block;
  letter-spacing: 1.6px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  vertical-align: middle;
  flex-shrink: 0;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
input:not([type='checkbox']),
textarea,
select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cdd6e2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #778497;
}
textarea {
  resize: vertical;
  min-height: 82px;
}
input[readonly] {
  background: #f6f8fb;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin: 3px 0 0;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 20px 0;
}
.check-row label {
  font-weight: 500;
  margin: 0;
  line-height: 1.6;
}
.error {
  color: #9e2330;
  background: var(--danger-bg);
  border: 1px solid #f1c9ce;
  border-radius: 8px;
  padding: 11px 13px;
  margin-top: 16px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.notice {
  background: var(--soft);
  border: 1px solid #ccdcff;
  padding: 12px 16px;
  color: #19498e;
  border-radius: 9px;
  margin-bottom: 22px;
}
.inset {
  margin: 14px 20px;
}
.loading {
  color: var(--muted);
  font-size: 13px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  letter-spacing: -0.3px;
  font-weight: 650;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 500;
  margin-top: 1px;
  opacity: 0.66;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 38px;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 23px;
  height: 23px;
}
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 208px;
  background: var(--navy);
  color: #fff;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  margin: 0 6px 50px;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a3b3cb;
  margin: 0 14px 12px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 4px 0;
  font-size: 13px;
  color: #becbe0;
  min-height: 46px;
}
.nav-link.active {
  color: white;
  background: #294369;
}
.nav-link:hover {
  color: white;
  background: #243c5c;
}
.nav-arrow {
  margin-left: auto;
  color: #9ab7e9;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #ffffff18;
  padding: 22px 12px 0;
}
.provider-label {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  gap: 7px;
  align-items: center;
}
.sidebar-bottom .dot {
  background: #60d9a3;
}
.sidebar-bottom p {
  font-size: 11px;
  line-height: 1.9;
  color: #b8c5d9;
  margin: 10px 0 18px;
}
.version-label {
  font-size: 8px;
  letter-spacing: 1.25px;
  color: #8fa2c0;
}
.main-shell {
  margin-left: 208px;
  min-width: 0;
}
.topbar {
  height: 72px;
  background: #ffffffd9;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 12px;
  color: #b9c1ce;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.session {
  display: flex;
  gap: 14px;
  align-items: center;
}
.session-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}
.session button {
  font-size: 12px;
  min-height: 36px;
  padding: 7px 10px;
}
main {
  padding: 34px 36px 18px;
  max-width: 1720px;
  margin: auto;
  outline: none;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}
.page-heading .muted {
  font-size: 13px;
}
.page-heading .primary {
  flex-shrink: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.metrics > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 18px 20px;
}
.metrics > div > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.metrics strong {
  display: block;
  font-size: 31px;
  line-height: 1.4;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  margin: 4px 0 8px;
}
.metrics small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 22px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 14px;
}
.panel-title h2 {
  font-size: 16px;
}
.panel-title .hint {
  margin-top: 4px;
}
.panel-title .quiet {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 9px;
}
.filters {
  padding: 4px 20px 14px;
  display: flex;
  gap: 9px;
}
.search-field {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1;
  min-width: 0;
}
.search-field svg {
  position: absolute;
  left: 12px;
  width: 16px;
  color: #687991;
  pointer-events: none;
}
.search-field input {
  padding-left: 36px;
  font-size: 12px;
  background: #f8fafc;
  min-height: 40px;
}
.filters .secondary {
  font-size: 11px;
  min-height: 40px;
  padding: 8px 10px;
  white-space: nowrap;
}
.filter-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px 14px;
}
.filter-tabs button {
  font-size: 12px;
  min-height: 33px;
  padding: 5px 12px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
}
.filter-tabs .selected {
  background: var(--soft);
  color: var(--primary);
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  table-layout: fixed;
}
thead {
  background: #f8fafc;
  color: var(--muted);
}
th {
  font-size: 10px;
  font-weight: 500;
  padding: 13px 8px;
  line-height: 1.4;
}
th:first-child,
td:first-child {
  padding-left: 22px;
}
th:first-child {
  width: 33%;
}
th:nth-child(2) {
  width: 18%;
}
th:nth-child(3) {
  width: 29%;
}
th:nth-child(4) {
  width: 9%;
}
th:last-child {
  width: 11%;
  padding-right: 16px;
}
th button {
  padding: 0;
  min-height: 28px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
th button span {
  opacity: 0.6;
}
td {
  border-top: 1px solid #edf0f5;
  padding: 17px 8px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
td:last-child {
  padding-right: 14px;
  text-align: right;
}
.customer-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}
.customer-id {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.row-action {
  padding: 5px 7px;
  min-width: 34px;
  min-height: 36px;
  color: var(--primary);
  font-size: 12px;
}
.row-action:hover {
  background: var(--soft);
}
tr.selected-row td {
  background: #f5f8ff;
}
tbody tr:hover td {
  background: #f8faff;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.status .dot {
  width: 5px;
  height: 5px;
}
.status-active {
  color: var(--success);
  background: var(--success-bg);
}
.status-suspended {
  color: var(--warning);
  background: var(--warning-bg);
}
.status-suspended .dot {
  background: var(--warning);
}
.status-expired {
  color: #ad3540;
  background: var(--danger-bg);
}
.status-expired .dot {
  background: #ad3540;
}
.status-unknown {
  background: #edf0f5;
  color: var(--muted);
}
.expiry-date {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.expiry-relative {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.soon {
  color: var(--warning);
}
.list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 21px;
  border-top: 1px solid var(--line);
  gap: 15px;
}
.list-footer button {
  font-size: 12px;
}
.empty {
  text-align: center;
  padding: 54px 24px;
  color: var(--muted);
}
.empty > svg {
  width: 36px;
  height: 36px;
  color: #9cabc0;
  margin-bottom: 14px;
}
.empty h2,
.empty h3 {
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 7px;
}
.empty p {
  font-size: 12px;
  max-width: 240px;
  margin: auto;
  line-height: 1.8;
}
.detail-empty {
  padding: 80px 28px;
}
.detail-panel {
  position: sticky;
  top: 22px;
  scroll-margin-top: 20px;
}
.detail-header {
  padding: 23px 22px 18px;
  border-bottom: 1px solid var(--line);
}
.detail-header h2 {
  font-size: 18px;
  overflow-wrap: anywhere;
  outline: none;
}
.detail-header .code {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.detail-header-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.detail-header .eyebrow {
  margin: 0;
}
.detail-header .quiet {
  font-size: 11px;
  min-height: 32px;
  padding: 5px;
}
.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 4px;
}
.detail-meta strong {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.detail-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}
.detail-actions button {
  flex: 1;
  min-height: 36px;
  font-size: 12px;
  padding: 7px 10px;
}
.detail-tabs {
  display: flex;
  gap: 20px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}
.detail-tabs button {
  padding: 12px 0;
  border-radius: 0;
  min-height: 44px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.detail-tabs .active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}
.detail-body {
  padding: 20px 22px;
}
.key-card + .key-card {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 22px;
}
.key-title {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 4px;
  font-weight: 600;
}
.key-title svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.key-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
}
.key-id {
  font-size: 11px;
  color: #40516b;
  display: block;
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #f4f6fa;
  overflow-wrap: anywhere;
}
.key-state {
  padding: 11px 12px;
  background: #f6f8fc;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--muted);
}
.key-state strong {
  display: block;
  font-size: 11px;
  color: var(--ink);
  margin-bottom: 3px;
}
.key-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.key-controls button {
  font-size: 11px;
  padding: 7px 10px;
  min-height: 36px;
}
.detail-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.audit-entry {
  position: relative;
  padding: 0 0 22px 17px;
  border-left: 1px solid var(--line);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.audit-entry:last-child {
  padding-bottom: 0;
}
.audit-entry::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #9bb2d5;
  border: 2px solid #fff;
  position: absolute;
  left: -6px;
  top: 4px;
  border-radius: 50%;
}
.audit-entry h3 {
  font-size: 12px;
}
.audit-entry time {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 3px 0 8px;
}
.audit-reason {
  background: #f5f7fa;
  padding: 8px 10px;
  border-radius: 6px;
  margin: 7px 0;
  color: #3e4e66;
  white-space: pre-wrap;
}
.audit-diff {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.audit-more {
  width: 100%;
  font-size: 12px;
  margin-top: 18px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
}
.guide-card {
  padding: 26px;
}
.guide-card .step {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 18px;
}
.guide-card p {
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.9;
  font-size: 13px;
}
.page-footer {
  max-width: 1720px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  padding: 23px 36px 25px;
  color: #718097;
  font-size: 10px;
}
.page-footer span {
  letter-spacing: 0.5px;
}
.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
  background: white;
}
.login-story {
  padding: 50px 64px;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: white;
  min-height: 100vh;
}
.login-story .brand {
  font-size: 18px;
}
.login-story .brand-mark {
  width: 40px;
  height: 44px;
}
.login-intro {
  margin: auto 0;
  padding: 70px 0;
  max-width: 460px;
}
.login-intro .eyebrow {
  color: #a0bbdf;
  letter-spacing: 3px;
  font-size: 11px;
  margin-bottom: 24px;
}
.login-intro h1 {
  font-size: 48px;
  line-height: 1.4;
  letter-spacing: -1px;
}
.login-intro > p {
  margin-top: 25px;
  line-height: 1.9;
  color: #bfcee2;
  font-size: 15px;
  max-width: 360px;
}
.login-points {
  display: flex;
  gap: 19px;
  font-size: 11px;
  color: #cad7e8;
  border-top: 1px solid #ffffff20;
  padding-top: 25px;
  margin-top: 45px;
}
.login-points span::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7ba9ff;
  margin-right: 7px;
  vertical-align: middle;
}
.login-footer {
  font-size: 11px;
  color: #a4b6d0;
}
.login-card {
  align-self: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
}
.login-card .eyebrow {
  color: var(--primary);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.login-card h2 {
  font-size: 28px;
  letter-spacing: -0.7px;
}
.login-card .muted {
  font-size: 13px;
  margin-top: 10px;
}
.login-card form {
  margin-top: 32px;
}
.login-card input {
  min-height: 48px;
}
.login-card .hint {
  margin-top: 10px;
}
.login-card .primary {
  margin-top: 22px;
  min-height: 46px;
}
.login-card .primary svg {
  margin-left: auto;
}
.login-card .primary {
  justify-content: flex-start;
  padding: 11px 17px;
}
.login-endpoint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 35px;
  padding-top: 20px;
}
.login-endpoint code {
  display: block;
  width: 100%;
  font-size: 10px;
  padding-left: 14px;
  color: #72819a;
}
dialog {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
  width: min(600px, calc(100% - 32px));
  max-height: 90dvh;
  overflow-y: auto;
}
dialog::backdrop {
  background: #10213c80;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dialog-heading h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
}
.dialog-heading .eyebrow {
  margin-bottom: 6px;
}
.dialog-heading + .muted {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 14px;
  margin-bottom: 21px;
}
.context-box {
  border: 1px solid var(--line);
  background: #f7f9fc;
  border-radius: 8px;
  padding: 13px;
  margin: 16px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.context-box strong {
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
}
.context-box span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin: 20px 0;
}
.form-field {
  margin-bottom: 17px;
}
.form-field .hint {
  margin-top: 7px;
}
.form-grid .form-field {
  margin: 0;
}
.form-advanced {
  border: 1px solid var(--line);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 12px;
}
.form-advanced summary {
  cursor: pointer;
  min-height: 28px;
  line-height: 28px;
  font-weight: 600;
}
.form-advanced .hint {
  margin: 8px 0 14px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.receipt-key {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin: 16px 0;
}
.receipt-key h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.receipt-key .hint {
  margin: 8px 0;
}
.receipt-secret {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.receipt-secret input {
  min-width: 0;
  font-size: 12px;
}
.receipt-secret button {
  font-size: 11px;
  white-space: nowrap;
}
.receipt-key .secondary {
  font-size: 12px;
}
.receipt-warning {
  background: var(--warning-bg);
  color: #7b521c;
  font-size: 12px;
  padding: 12px;
  border-radius: 8px;
  line-height: 1.8;
  margin: 12px 0;
}
.receipt-old {
  margin-top: 18px;
}
.receipt-old input {
  font-size: 12px;
}
.receipt-old .hint {
  margin-top: 6px;
}
@media (min-width: 1600px) {
  .work-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
  main {
    padding-top: 42px;
  }
  .detail-panel {
    top: 26px;
  }
}
@media (max-width: 1250px) {
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-panel {
    position: static;
  }
  .detail-body {
    padding: 22px;
  }
  .key-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .key-card + .key-card {
    border: 0;
    padding: 0;
    margin: 0;
  }
  .detail-empty {
    padding: 35px;
  }
  .metrics {
    gap: 12px;
  }
  .metrics > div {
    padding: 17px 15px;
  }
  th:first-child {
    width: 35%;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    gap: 20px;
  }
  .sidebar .brand {
    margin: 0;
  }
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 6px;
  }
  .nav-link {
    margin: 0;
    padding: 10px 12px;
    font-size: 12px;
  }
  .nav-arrow {
    display: none;
  }
  .main-shell {
    margin-left: 0;
  }
  .topbar {
    height: 57px;
    padding: 0 24px;
  }
  main {
    padding: 27px 24px 12px;
  }
  .page-footer {
    padding: 22px 24px;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .login-story {
    padding: 40px;
  }
  .login-intro h1 {
    font-size: 38px;
  }
  .login-points {
    flex-wrap: wrap;
    gap: 10px 18px;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }
  .sidebar {
    padding: 14px 16px;
    gap: 8px;
  }
  .sidebar .brand {
    font-size: 14px;
    gap: 8px;
  }
  .brand-mark {
    width: 29px;
    height: 34px;
  }
  .brand small {
    font-size: 7px;
  }
  .nav-link {
    padding: 9px;
    min-height: 42px;
  }
  .nav-link svg {
    display: none;
  }
  .nav-link {
    font-size: 11px;
  }
  .topbar {
    padding: 0 16px;
  }
  .session-label {
    display: none;
  }
  .breadcrumb {
    font-size: 11px;
  }
  main {
    padding: 25px 16px 10px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 17px;
    flex-direction: column;
  }
  h1 {
    font-size: 27px;
  }
  .page-heading .primary {
    min-height: 44px;
    width: 100%;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  .metrics > div {
    padding: 14px 15px;
  }
  .metrics strong {
    font-size: 27px;
  }
  .metrics > div > span {
    font-size: 11px;
  }
  .metrics small {
    font-size: 9px;
  }
  .work-grid {
    gap: 18px;
  }
  .panel-title {
    padding: 19px 16px 12px;
  }
  .filters {
    padding: 4px 15px 12px;
    flex-direction: column;
  }
  .filters .secondary {
    min-height: 40px;
  }
  .search-field input {
    min-height: 44px;
  }
  .filter-tabs {
    padding: 0 14px 12px;
    gap: 2px;
  }
  .filter-tabs button {
    min-height: 38px;
    flex: 1;
    padding: 7px 4px;
    font-size: 11px;
  }
  .revision-column {
    display: none;
  }
  thead {
    display: none;
  }
  table,
  tbody {
    display: block;
  }
  tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  tbody td {
    display: block;
    border: 0;
    padding: 0 !important;
    grid-column: auto;
    align-self: center;
  }
  .customer-name {
    font-size: 13px;
  }
  .customer-id {
    font-size: 11px;
  }
  tbody td:nth-child(3) {
    grid-row: 2;
    grid-column: 1;
  }
  .expiry-date {
    display: inline;
    font-size: 11px;
  }
  .expiry-relative {
    display: inline;
    margin-left: 8px;
  }
  .status {
    font-size: 10px;
  }
  tbody td:last-child {
    grid-column: 2;
    grid-row: 2;
  }
  .list-footer {
    padding: 15px;
  }
  .list-footer button {
    min-height: 42px;
  }
  .detail-header {
    padding: 21px 18px;
  }
  .detail-body {
    padding: 20px 18px;
  }
  .detail-tabs {
    padding: 0 18px;
  }
  .detail-tabs button {
    min-height: 47px;
  }
  .key-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .key-card + .key-card {
    border-top: 1px solid var(--line);
    padding-top: 22px;
  }
  .key-controls button {
    min-height: 42px;
  }
  .detail-actions button {
    min-height: 42px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .guide-card {
    padding: 22px;
  }
  .page-footer {
    padding: 20px 16px;
    font-size: 9px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .login-screen {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }
  .login-story {
    min-height: 0;
    padding: 27px 25px;
  }
  .login-story .brand {
    font-size: 17px;
  }
  .login-intro {
    padding: 35px 0 10px;
    margin: 0;
    max-width: 100%;
  }
  .login-intro .eyebrow {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .login-intro h1 {
    font-size: 32px;
    line-height: 1.4;
  }
  .login-intro > p {
    font-size: 12px;
    margin-top: 15px;
    max-width: 330px;
  }
  .login-points,
  .login-footer {
    display: none;
  }
  .login-card {
    padding: 30px 25px 35px;
    max-width: 440px;
  }
  .login-card h2 {
    font-size: 23px;
  }
  .login-card form {
    margin-top: 24px;
  }
  dialog {
    padding: 22px 18px;
    max-height: 92dvh;
  }
  .dialog-heading h2 {
    font-size: 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .dialog-actions button {
    flex: 1;
    min-height: 44px;
    white-space: nowrap;
  }
  .receipt-secret {
    flex-wrap: wrap;
  }
  .receipt-secret input {
    flex-basis: 100%;
  }
  .receipt-key {
    padding: 13px;
  }
  .receipt-key button {
    min-height: 42px;
  }
  .receipt-old label {
    font-size: 12px;
  }
}
.table-scroll {
  max-height: 620px;
  overflow: auto;
  overscroll-behavior: contain;
}
.table-scroll thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.table-scroll:focus-visible {
  outline: 3px solid #86acf8;
  outline-offset: -3px;
}
.customer-name {
  font-size: 14px;
}
.customer-id,
.expiry-date {
  font-size: 12px;
}
.expiry-relative {
  font-size: 11px;
}
.status {
  font-size: 11px;
}
th,
th button {
  font-size: 11px;
}
.key-label,
.detail-meta span,
.audit-diff,
.detail-foot {
  font-size: 11px;
}
.key-id,
.key-state,
.key-state strong,
.key-controls button,
.audit-entry,
.audit-entry h3 {
  font-size: 12px;
}
.detail-meta strong {
  font-size: 13px;
}
.sidebar-bottom p {
  font-size: 12px;
}
.guide-card p {
  font-size: 14px;
}
.filter-tabs button,
.search-field input {
  font-size: 13px;
}
.metrics small {
  font-size: 11px;
}
.panel-title > .quiet {
  white-space: nowrap;
  flex-shrink: 0;
}
.skip {
  visibility: hidden;
}
.skip:focus {
  visibility: visible;
}
.detail-meta .status {
  display: inline-flex;
  margin: 0;
}
.detail-meta .status span {
  display: inline;
  color: inherit;
  margin: 0;
  font-size: inherit;
}
.detail-meta .status .dot {
  display: inline-block;
}
@media (max-width: 600px) {
  .table-scroll {
    max-height: 480px;
  }
  .customer-name {
    font-size: 14px;
  }
  .customer-id,
  .expiry-date {
    font-size: 12px;
  }
  .status {
    font-size: 11px;
  }
  .metrics small {
    font-size: 10px;
  }
}
.audit-body {
  max-height: 650px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.audit-body:focus-visible {
  outline: 3px solid #86acf8;
  outline-offset: -3px;
}
@media (max-width: 600px) {
  .audit-body {
    max-height: 480px;
  }
  button,
  .filter-tabs button,
  .key-controls button,
  .detail-actions button,
  .row-action,
  .panel-title .quiet,
  .nav-link,
  .session button,
  .filters .secondary,
  .receipt-key button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
