:root {
  --canvas: #f4f6f5;
  --surface: #ffffff;
  --text: #1c2520;
  --muted: #647069;
  --line: #dce2de;
  --accent: #18764b;
  --accent-dark: #105735;
  --success-bg: #e9f6ee;
  --danger: #a72b36;
  --danger-bg: #fff0f1;
  --radius: 6px;
  --space: 8px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
a { color: var(--accent); text-decoration: none; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button, .button, .icon-button { transition: transform 120ms ease-out, opacity 120ms ease-out; }
button:active, .button:active, .icon-button:active { transform: scale(.97); }
:focus-visible { outline: 3px solid #78b99a; outline-offset: 3px; }
svg, [data-lucide] { width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
form { margin: 0; }
h1 { font-size: 26px; line-height: 1.4; font-weight: 650; margin: 4px 0 0; text-wrap: balance; }
p { margin: 0; }
code { font: 13px/1.6 Consolas, "SFMono-Regular", monospace; }
.topbar { background: #19251e; color: #f0f4f1; }
.topbar-inner, .tabs-inner, .workspace { max-width: 1208px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.topbar-inner { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { color: #f0f4f1; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand strong { font-size: 22px; font-weight: 650; }
.brand > span:last-child { color: #b1c3b8; font-size: 14px; padding-left: 10px; border-left: 1px solid #4a5d50; }
.brand-mark { color: #92d6ad; display: inline-flex; }
.brand-mark svg { width: 25px; height: 25px; }
.account { display: flex; align-items: center; gap: 12px; color: #d0ddd5; }
.tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs-inner { display: flex; gap: 30px; }
.tabs a { min-height: 56px; display: inline-flex; gap: 9px; align-items: center; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.workspace { padding-top: 32px; padding-bottom: 64px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.section-label { font-size: 12px; color: var(--muted); font-weight: 550; }
.count { display: inline-block; font-size: 14px; font-weight: 500; color: var(--muted); vertical-align: middle; margin-left: 6px; font-variant-numeric: tabular-nums; }
.domain { color: var(--muted); font: 13px Consolas, monospace; }
.button { min-height: 40px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-weight: 550; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.subtle { padding: 6px 10px; }
.icon-button { width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.icon-button.inverse { color: #c5d5cc; }
input:not([type=checkbox]) { width: 100%; min-height: 42px; background: var(--surface); border: 1px solid #bbc8c0; border-radius: var(--radius); color: var(--text); padding: 9px 12px; min-width: 0; }
input::placeholder { color: #7c8981; }
label { font-weight: 550; }
.create-key { display: grid; grid-template-columns: auto minmax(160px, 360px) auto; align-items: center; gap: 12px; justify-content: start; margin-bottom: 24px; }
.notice { display: flex; gap: 9px; align-items: center; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 20px; overflow-wrap: anywhere; }
.notice.success { color: #155d3b; background: var(--success-bg); }
.notice.error { color: var(--danger); background: var(--danger-bg); }
.new-key { background: #edf8f0; padding: 18px 20px; margin-bottom: 24px; border-radius: var(--radius); }
.new-key p { color: #477455; font-size: 12px; margin-top: 2px; }
.key-value { margin-top: 10px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.key-value code { overflow-wrap: anywhere; color: #154f31; }
.table-region { width: 100%; overflow-x: auto; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
th { font-size: 12px; font-weight: 550; color: var(--muted); background: #eef1ef; padding: 13px 18px; white-space: nowrap; }
td { padding: 16px 18px; border-top: 1px solid #e8ede9; vertical-align: middle; }
.keys-table { min-width: 810px; }
.keys-table th:nth-child(1) { width: 25%; }
.keys-table th:nth-child(2) { width: 12%; }
.keys-table th:nth-child(3) { width: 12%; }
.keys-table th:nth-child(4), .keys-table th:nth-child(5) { width: 21%; }
.keys-table th:nth-child(6) { width: 9%; }
.record-name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.numeric, .date { font-variant-numeric: tabular-nums; }
.date { white-space: nowrap; font-size: 12px; }
.align-right { text-align: right; }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; }
.status > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.enabled { color: var(--accent); }
.status.disabled { color: #87928b; }
.switch { position: relative; display: inline-flex; align-items: center; justify-content: flex-end; min-width: 40px; min-height: 40px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch > span { display: block; width: 34px; height: 20px; border-radius: 20px; background: #c5cec8; position: relative; }
.switch > span::after { content: ""; position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 50%; left: 3px; top: 3px; transition: transform 120ms ease-out; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 3px solid #78b99a; outline-offset: 3px; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; padding: 12px 0; }
.pagination { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.empty { text-align: center; height: 220px; color: var(--muted); }
.empty > span { display: block; margin-bottom: 12px; color: #a9b9ae; }
.empty svg { width: 28px; height: 28px; }
.empty strong { font-weight: 500; }
.search-form { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.search-field { display: flex; align-items: center; position: relative; width: min(100%, 420px); }
.search-field > svg { position: absolute; left: 12px; color: var(--muted); }
.search-field input { padding-left: 38px; }
.links-table { min-width: 820px; }
.links-table th:nth-child(1) { width: 19%; }
.links-table th:nth-child(2) { width: 42%; }
.links-table th:nth-child(3) { width: 19%; }
.links-table th:nth-child(4) { width: 20%; }
.short-link { display: flex; align-items: center; gap: 6px; }
.short-link > a { display: inline-flex; align-items: center; gap: 3px; }
.short-link > a > svg { width: 14px; height: 14px; }
.short-link .icon-button { width: 32px; flex-basis: 32px; }
.target-url, .key-name { overflow-wrap: anywhere; }
.target-url a { font-size: 12px; line-height: 1.7; color: #3c5b73; }
.login-main { max-width: 408px; margin: 0 auto; padding: 80px 24px 48px; }
.login-form h1 { margin-bottom: 28px; }
.stack { display: grid; gap: 20px; }
.stack label { display: grid; gap: 7px; }
.stack .button { justify-self: start; margin-top: 6px; min-width: 100px; }
.error-page { padding: 64px 0; max-width: 640px; }
.error-code { font-size: 64px; color: #8fa198; line-height: 1; font-variant-numeric: tabular-nums; }
.error-page h1 { margin: 24px 0; font-size: 22px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); background: #1f3026; color: #f0f4f1; border-radius: var(--radius); padding: 10px 18px; box-shadow: 0 4px 18px #0002; font-size: 13px; z-index: 10; text-align: center; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 20; padding: 8px 12px; background: #fff; }
.skip-link:focus { top: 12px; }
@media (hover: hover) {
  .button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
  .icon-button:hover { background: #e5ece7; color: var(--accent); }
  .icon-button.inverse:hover { background: #314b3b; color: #eff8f2; }
  .target-url a:hover, .short-link > a:hover { text-decoration: underline; }
}
@media (max-width: 640px) {
  .topbar-inner, .tabs-inner, .workspace { padding-left: 18px; padding-right: 18px; }
  .topbar-inner { min-height: 60px; }
  .workspace { padding-top: 24px; }
  .page-heading { margin-bottom: 20px; align-items: flex-start; }
  .domain { margin-top: 5px; font-size: 12px; }
  h1 { font-size: 23px; }
  .create-key { grid-template-columns: 1fr; justify-items: start; gap: 8px; }
  .create-key input { width: 100%; }
  .create-key .button { margin-top: 4px; }
  .new-key { padding: 16px; }
  .key-value { align-items: flex-start; }
  .search-form { gap: 8px; }
  .search-field { flex: 1; min-width: 0; }
  .search-form .button { padding-left: 12px; padding-right: 12px; }
  .login-main { padding-top: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
