:root {
  --ink: #14213d;
  --ink-soft: #58647a;
  --ink-faint: #7a8598;
  --navy: #172a4a;
  --navy-deep: #10203a;
  --teal: #0a8577;
  --teal-dark: #087064;
  --teal-soft: #e7f5f2;
  --blue-soft: #eef3fb;
  --paper: #ffffff;
  --surface: #f5f7fb;
  --surface-strong: #edf1f7;
  --line: #dfe5ee;
  --line-strong: #cad3e0;
  --danger: #b84040;
  --danger-soft: #fff0ef;
  --warning: #9b6613;
  --warning-soft: #fff7e7;
  --success: #12715f;
  --success-soft: #e8f7f1;
  --shadow-sm: 0 1px 2px rgba(17, 33, 61, 0.05), 0 8px 24px rgba(17, 33, 61, 0.04);
  --shadow-md: 0 18px 55px rgba(17, 33, 61, 0.1);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --content: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(10, 133, 119, 0.07), transparent 23rem),
    var(--surface);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
strong {
  text-wrap: balance;
}

input::placeholder {
  color: #9ba5b5;
}

input:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(10, 133, 119, 0.25);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 14px;
  color: #fff;
  background: var(--navy-deep);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(202, 211, 224, 0.76);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand__mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 11px 4px 11px 4px;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset -5px -5px 0 rgba(10, 133, 119, 0.38);
}

.brand__copy {
  display: grid;
  line-height: 1.15;
}

.brand__copy strong {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brand__copy small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 16px;
}

.header-actions form {
  display: flex;
  margin: 0;
}

.main-content {
  width: min(var(--content), calc(100% - 40px));
  flex: 1;
  margin: 0 auto;
  padding: 56px 0 72px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 28px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-size: 12px;
  gap: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button--primary {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 9px 22px rgba(10, 133, 119, 0.2);
}

.button--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  box-shadow: 0 11px 26px rgba(10, 133, 119, 0.25);
}

.button--ghost {
  color: var(--navy);
  background: #fff;
  border-color: var(--line-strong);
}

.button--ghost:hover,
.button--ghost-dark:hover {
  border-color: var(--navy);
}

.button--ghost-dark {
  color: var(--navy);
  background: transparent;
  border-color: var(--line);
}

.button--soft {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #cce9e3;
}

.button--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #eedbb6;
}

.button--danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 9px 22px rgba(184, 64, 64, 0.18);
}

.button--danger:hover {
  background: #9f3333;
  border-color: #9f3333;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
  transform: none;
}

.button--small {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
}

.button--wide {
  width: 100%;
}

.confirm-dialog {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 90px rgba(16, 32, 58, 0.28);
}

.confirm-dialog::backdrop {
  background: rgba(16, 32, 58, 0.62);
  backdrop-filter: blur(3px);
}

.confirm-dialog__panel {
  display: grid;
  padding: 28px;
  gap: 17px;
}

.confirm-dialog__mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f1caca;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
}

.confirm-dialog__heading h2 {
  margin: 3px 0 0;
  font-size: 24px;
  line-height: 1.25;
}

.confirm-dialog__panel > p {
  margin: 0;
  color: var(--ink-soft);
}

.confirm-dialog__target {
  padding: 11px 13px;
  background: var(--danger-soft);
  border-radius: var(--radius-sm);
}

.confirm-dialog__target strong {
  color: var(--danger);
  word-break: break-all;
}

.confirm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 3px;
}

.text-link {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  transition: color 150ms ease;
}

.text-link:hover {
  color: var(--teal);
}

.text-link--button {
  padding: 0;
  cursor: pointer;
  background: transparent;
}

.eyebrow {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.eyebrow > span {
  width: 24px;
  height: 2px;
  margin-right: 10px;
  background: var(--teal);
}

.section-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.quiet-note {
  color: var(--ink-faint);
  font-size: 12px;
}

.flash-stack {
  display: grid;
  margin-bottom: 24px;
  gap: 9px;
}

.flash {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  gap: 10px;
  font-size: 13px;
}

.flash__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #6684ad;
  border-radius: 50%;
}

.flash--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #c7e9de;
}

.flash--success .flash__dot {
  background: var(--success);
}

.flash--error,
.flash--danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f1ceca;
}

.flash--error .flash__dot,
.flash--danger .flash__dot {
  background: var(--danger);
}

.flash--warning {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #efdfbf;
}

.landing-page .main-content {
  display: flex;
  align-items: center;
  padding-top: 70px;
  padding-bottom: 86px;
}

.landing {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  gap: clamp(48px, 8vw, 108px);
}

.landing__copy h1 {
  margin-bottom: 24px;
  color: var(--navy-deep);
  font-size: clamp(42px, 5.2vw, 70px);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.landing__lead {
  max-width: 520px;
  margin-bottom: 32px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

.landing__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.landing__panel {
  position: relative;
}

.landing__panel::before {
  position: absolute;
  z-index: -1;
  right: -30px;
  bottom: -30px;
  width: 72%;
  height: 72%;
  content: "";
  background: repeating-linear-gradient(135deg, rgba(10, 133, 119, 0.08) 0 1px, transparent 1px 10px);
  border-radius: var(--radius-lg);
}

.signal-card {
  padding: clamp(28px, 4vw, 48px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 45%),
    var(--navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 70px rgba(16, 32, 58, 0.23);
}

.signal-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 42px;
}

.signal-card__index {
  color: rgba(255, 255, 255, 0.3);
  font-family: Georgia, serif;
  font-size: 15px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  gap: 7px;
}

.status-pill > span {
  width: 6px;
  height: 6px;
  background: #64dfc6;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(100, 223, 198, 0.12);
}

.signal-card h2 {
  max-width: 380px;
  margin-bottom: 15px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.28;
}

.signal-card > p {
  margin-bottom: 36px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.feature-list {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.feature-list > div {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: 14px;
}

.feature-list > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: #76dfcc;
  background: rgba(100, 223, 198, 0.09);
  border-radius: 7px;
  font-family: Georgia, serif;
  font-size: 11px;
}

.feature-list p {
  display: grid;
  margin: 0;
  line-height: 1.35;
}

.feature-list strong {
  font-size: 13px;
}

.feature-list small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
}

.auth-page .main-content {
  display: flex;
  align-items: center;
}

.auth-layout {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(56px, 10vw, 140px);
}

.auth-intro {
  max-width: 530px;
}

.auth-intro h1 {
  margin-bottom: 22px;
  color: var(--navy-deep);
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.05em;
  line-height: 1.15;
}

.auth-intro > p:not(.eyebrow) {
  max-width: 470px;
  color: var(--ink-soft);
  font-size: 15px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  max-width: 470px;
  margin-top: 34px;
  padding-top: 22px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-size: 12px;
  gap: 10px;
}

.security-note__mark {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
  font-size: 19px;
  line-height: 0;
}

.auth-card {
  padding: 38px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.auth-card__heading {
  margin-bottom: 28px;
}

.auth-card__heading h2 {
  margin-bottom: 7px;
  font-size: 24px;
}

.auth-card__heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.stack-form {
  display: grid;
  gap: 19px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
}

.field__label b {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 600;
}

.field input,
.secret-field input,
.copy-row input {
  min-width: 0;
  width: 100%;
  height: 45px;
  padding: 0 13px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input:hover,
.field input:focus,
.secret-field input:focus,
.copy-row input:focus {
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(10, 133, 119, 0.08);
}

.field > small {
  color: var(--ink-faint);
  font-size: 10px;
}

.form-footnote {
  margin: 22px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.dashboard-page .main-content {
  padding-top: 42px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 30px;
}

.dashboard-heading h1 {
  margin-bottom: 7px;
  color: var(--navy-deep);
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.dashboard-heading p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.domain-chip {
  display: grid;
  min-width: 230px;
  padding: 12px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  line-height: 1.35;
}

.domain-chip span {
  margin-bottom: 3px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.domain-chip strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  margin-bottom: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat-card__label {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.stat-card strong {
  margin-bottom: 5px;
  color: var(--navy-deep);
  font-size: 30px;
  line-height: 1.1;
}

.stat-card strong em {
  color: var(--ink-soft);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.stat-card small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card--accent {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.stat-card--accent::after {
  position: absolute;
  right: -30px;
  bottom: -46px;
  width: 110px;
  height: 110px;
  content: "";
  border: 20px solid rgba(99, 220, 199, 0.1);
  border-radius: 50%;
}

.stat-card--accent .stat-card__label,
.stat-card--accent small,
.stat-card--accent strong em {
  color: rgba(255, 255, 255, 0.58);
}

.stat-card--accent strong {
  color: #fff;
}

.create-panel {
  margin-bottom: 42px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.create-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
  gap: 20px;
}

.create-panel summary::-webkit-details-marker {
  display: none;
}

.create-panel summary > span:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.create-panel summary > span:first-child > span:last-child {
  display: grid;
  line-height: 1.35;
}

.create-panel summary strong {
  font-size: 13px;
}

.create-panel summary small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.summary-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 9px;
  font-size: 21px;
  font-weight: 300;
  transition: transform 180ms ease;
}

.create-panel[open] .summary-icon {
  transform: rotate(45deg);
}

.summary-action {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 700;
}

.create-panel[open] .summary-action {
  font-size: 0;
}

.create-panel[open] .summary-action::after {
  content: "收起设置";
  font-size: 10px;
}

.create-form {
  display: grid;
  padding: 20px;
  background: #fafbfd;
  border-top: 1px solid var(--line);
  grid-template-columns: 1.2fr 0.8fr 1fr auto;
  align-items: end;
  gap: 15px;
}

.create-form .button {
  margin-bottom: 1px;
  white-space: nowrap;
}

.users-section {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
}

.record-count {
  color: var(--ink-faint);
  font-size: 10px;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.user-card {
  min-width: 0;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.user-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 35px rgba(17, 33, 61, 0.07);
}

.user-card__header {
  display: flex;
  align-items: center;
  margin-bottom: 21px;
  gap: 11px;
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #cceae4;
  border-radius: 11px;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.user-identity {
  min-width: 0;
  flex: 1;
}

.user-identity h3 {
  margin: 0 0 1px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity span {
  color: var(--ink-faint);
  font-size: 9px;
}

.badge-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  gap: 5px;
}

.badge--success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cce8df;
}

.badge--muted {
  color: #7d8797;
  background: #f1f3f6;
  border-color: #e0e4ea;
}

.badge--online {
  color: var(--teal-dark);
  background: #fff;
  border-color: #cce8e3;
}

.badge--recent {
  color: #9a6818;
  background: #fffaf0;
  border-color: #ead6ad;
}

.badge--warning {
  color: #9a6818;
  background: #fff7e8;
  border-color: #ecd7ab;
}

.badge--danger {
  color: #a34141;
  background: #fff1f1;
  border-color: #efcaca;
}

.badge--unknown {
  color: #6f7785;
  background: #f6f7f9;
  border-color: #d9dde4;
}

.badge--outline {
  color: var(--ink-faint);
  background: #fff;
  border-color: var(--line);
}

.badge .badge__dot {
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
}

.badge--recent .badge__dot {
  background: #d79b35;
}

.badge--outline .badge__dot {
  background: #aeb6c3;
}

.badge--unknown .badge__dot {
  background: #858d99;
}

.badge .badge__label {
  display: inline;
}

.usage-block {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
}

.usage-block__line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 15px;
}

.usage-block__line > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.usage-block__line strong {
  font-size: 12px;
}

.usage-block__line strong small {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 500;
}

.usage-block__line--compact {
  margin-top: -3px;
  margin-bottom: 10px;
}

.usage-block__line--compact strong {
  color: var(--teal-dark);
}

.usage-block progress {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 99px;
}

.usage-block progress::-webkit-progress-bar {
  background: #e4e9ef;
  border-radius: 99px;
}

.usage-block progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--teal), #52bcae);
  border-radius: 99px;
}

.usage-block progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--teal), #52bcae);
  border-radius: 99px;
}

.user-traffic-chart {
  margin: 13px 0;
  overflow: hidden;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.user-traffic-chart > summary {
  display: flex;
  min-height: 43px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
  gap: 12px;
}

.user-traffic-chart > summary::-webkit-details-marker {
  display: none;
}

.user-traffic-chart > summary span,
.user-traffic-chart > summary strong,
.user-traffic-chart > summary small {
  display: block;
}

.user-traffic-chart > summary strong {
  color: var(--navy);
  font-size: 11px;
}

.user-traffic-chart > summary small,
.user-traffic-chart__summary-action {
  color: var(--ink-faint);
  font-size: 9px;
}

.user-traffic-chart__summary-action::after {
  margin-left: 6px;
  content: "+";
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.user-traffic-chart[open] > summary {
  border-bottom: 1px solid var(--line);
}

.user-traffic-chart[open] .user-traffic-chart__summary-action::after {
  content: "−";
}

.user-traffic-chart__body {
  padding: 12px;
}

.traffic-chart__toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 9px;
  gap: 6px;
}

.traffic-chart__tab {
  min-height: 29px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: var(--surface-strong);
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.traffic-chart__tab.is-active {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #cce9e3;
}

.traffic-chart__total {
  margin-left: auto;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}

.traffic-chart__canvas {
  min-height: 185px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.traffic-chart__svg {
  display: block;
  width: 100%;
  height: auto;
}

.traffic-chart__grid-line {
  stroke: #e5eaf1;
  stroke-width: 1;
}

.traffic-chart__axis-label {
  fill: var(--ink-faint);
  font-family: inherit;
  font-size: 9px;
}

.traffic-chart__axis-label--x {
  font-size: 8px;
}

.traffic-chart__area {
  fill: rgba(10, 133, 119, 0.12);
}

.traffic-chart__line {
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.traffic-chart__point {
  fill: var(--paper);
  stroke: var(--teal);
  stroke-width: 2;
}

.traffic-chart__state {
  display: grid;
  min-height: 183px;
  margin: 0;
  place-items: center;
  color: var(--ink-faint);
  font-size: 10px;
}

.traffic-chart__state--error {
  color: var(--danger);
}

.traffic-chart__note {
  margin: 8px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.unlimited-bar {
  height: 5px;
  overflow: hidden;
  background: #e4e9ef;
  border-radius: 99px;
}

.unlimited-bar span {
  display: block;
  width: 42%;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--teal) 0 6px, #70cabe 6px 10px);
  border-radius: inherit;
}

.user-meta {
  display: grid;
  margin: 17px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.user-meta > div {
  min-width: 0;
}

.user-meta dt {
  margin-bottom: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.user-meta dd {
  margin: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-block {
  margin-bottom: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.subscription-block--summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subscription-block--summary > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.subscription-block--summary strong {
  color: var(--navy-deep);
  font-size: 11px;
}

.subscription-block--summary small {
  color: var(--ink-faint);
  font-size: 9px;
}

.subscription-block--summary .button {
  flex: 0 0 auto;
}

.subscription-block > label,
.subscription-item > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
}

.copy-row {
  display: flex;
  min-width: 0;
  align-items: stretch;
  gap: 7px;
}

.copy-row input {
  height: 36px;
  color: #3d526b;
  background: #f7f9fc;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
}

.missing-value {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.user-actions form {
  display: flex;
  flex: 1 1 auto;
}

.user-actions .button {
  width: 100%;
  padding-right: 10px;
  padding-left: 10px;
}

.dashboard-health {
  display: grid;
  min-width: min(100%, 360px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.dashboard-health > div {
  min-width: 0;
  padding: 13px 15px;
}

.dashboard-health > div + div {
  border-left: 1px solid var(--line);
}

.dashboard-health span,
.dashboard-health small {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.dashboard-health strong {
  display: block;
  margin: 2px 0;
  color: var(--navy);
  font-size: 12px;
}

.sync-state--healthy strong {
  color: var(--success);
}

.sync-state--error strong,
.sync-state--stale strong {
  color: #a56b14;
}

.user-editor {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.user-editor > summary {
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  list-style-position: inside;
}

.user-editor[open] > summary {
  border-bottom: 1px solid var(--line);
}

.account-edit-form {
  display: grid;
  padding: 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.account-edit-form .field {
  gap: 4px;
}

.account-edit-form .field input {
  height: 38px;
}

.check-field {
  display: flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 9px;
  color: var(--ink-soft);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  gap: 7px;
}

.check-field input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal);
}

.check-field--warning {
  color: #8d621d;
  background: #fffbf3;
  border-color: #ead9b7;
}

.account-edit-form .button {
  grid-column: 1 / -1;
}

.audit-section {
  margin-top: 46px;
}

.audit-list {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.audit-entry {
  display: grid;
  align-items: center;
  padding: 13px 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
}

.audit-entry + .audit-entry {
  border-top: 1px solid var(--line);
}

.audit-entry__mark {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.audit-entry__main,
.audit-entry__meta {
  min-width: 0;
}

.audit-entry__main strong,
.audit-entry__main span,
.audit-entry__main small,
.audit-entry__meta time,
.audit-entry__meta span {
  display: block;
}

.audit-entry__main strong {
  color: var(--navy);
  font-size: 11px;
}

.audit-entry__main span,
.audit-entry__main small,
.audit-entry__meta {
  color: var(--ink-faint);
  font-size: 9px;
}

.audit-entry__main small {
  overflow: hidden;
  margin-top: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-entry__meta {
  text-align: right;
}

.audit-entry__meta time {
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-weight: 700;
}

.audit-empty {
  padding: 30px;
  color: var(--ink-faint);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 11px;
  text-align: center;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  padding: 40px;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state__mark {
  display: grid;
  width: 50px;
  height: 50px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 19px;
}

.empty-state h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.empty-state p {
  max-width: 420px;
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.result-page .main-content {
  max-width: 880px;
}

.result-wrap {
  display: grid;
  gap: 16px;
}

.result-heading {
  position: relative;
  padding: 8px 4px 24px 78px;
}

.result-heading .eyebrow {
  margin-bottom: 11px;
}

.result-heading h1 {
  margin-bottom: 9px;
  color: var(--navy-deep);
  font-size: clamp(29px, 4vw, 42px);
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.result-heading > p:last-child {
  max-width: 670px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.success-mark {
  position: absolute;
  top: 9px;
  left: 4px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border: 8px solid #dff1ed;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

.credential-card {
  padding: 25px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.credential-card--important {
  border-top: 3px solid var(--teal);
}

.credential-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 20px;
}

.credential-card__heading h2 {
  margin: 0;
  font-size: 19px;
}

.once-badge,
.safe-badge {
  display: inline-flex;
  padding: 4px 8px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f0cecb;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.safe-badge {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cce8df;
}

.secret-field {
  display: grid;
  margin-bottom: 13px;
  gap: 6px;
}

.secret-field > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.secret-field input {
  color: var(--navy-deep);
  background: #f7f9fc;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
}

.secret-field .secret-value {
  color: var(--teal-dark);
  background: #f1fbf8;
  border-color: #bfe2da;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.credential-warning {
  margin: 18px 0 0;
  padding: 11px 13px;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid #eeddbd;
  border-radius: 8px;
  font-size: 11px;
}

.subscription-list {
  display: grid;
  gap: 14px;
}

.subscription-item {
  display: grid;
  padding: 16px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 10px;
  gap: 12px;
}

.subscription-item__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.subscription-item__heading > div {
  display: grid;
  gap: 2px;
}

.subscription-item__heading strong {
  color: var(--navy-deep);
  font-size: 12px;
}

.subscription-item__heading small {
  color: var(--ink-faint);
  font-size: 9px;
}

.format-badge {
  padding: 3px 7px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 99px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 8px;
  font-weight: 700;
}

.subscription-qr {
  border-top: 1px solid var(--line);
}

.subscription-qr summary {
  padding-top: 11px;
  color: var(--teal-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.subscription-qr__body {
  display: grid;
  align-items: center;
  padding-top: 14px;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 22px;
}

.subscription-qr__body img {
  display: block;
  width: 100%;
  height: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.subscription-qr__body > div {
  display: grid;
  align-content: center;
  gap: 7px;
}

.subscription-qr__body strong {
  color: var(--navy-deep);
  font-size: 12px;
}

.subscription-qr__body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.copy-feedback {
  min-height: 16px;
  margin: 0;
  color: var(--success);
  font-size: 10px;
  text-align: center;
}

.copy-feedback.is-error {
  color: var(--danger);
}

.success-mark--qr {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  font-weight: 800;
}

.subscription-alert {
  display: grid;
  padding: 13px 15px;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid #eeddbd;
  border-radius: 9px;
  gap: 3px;
  font-size: 11px;
}

.subscription-alert span {
  color: var(--ink-soft);
}

.result-actions {
  display: grid;
  justify-items: center;
  padding-top: 12px;
  gap: 10px;
}

.result-actions p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.error-page .main-content {
  display: grid;
  place-items: center;
}

.error-state {
  width: min(100%, 600px);
  padding: clamp(34px, 6vw, 64px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-code {
  margin-bottom: 17px;
  color: #dbe2ec;
  font-family: Georgia, serif;
  font-size: clamp(70px, 12vw, 112px);
  font-weight: 700;
  line-height: 0.9;
}

.error-state .eyebrow {
  justify-content: center;
}

.error-state h1 {
  margin-bottom: 10px;
  color: var(--navy-deep);
  font-size: clamp(28px, 4vw, 38px);
}

.error-state > p:not(.eyebrow) {
  max-width: 430px;
  margin-right: auto;
  margin-bottom: 27px;
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 13px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 980px) {
  .landing {
    gap: 48px;
  }

  .landing__copy h1 {
    font-size: 46px;
  }

  .auth-layout {
    gap: 54px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .create-form .button {
    align-self: end;
  }

  .user-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-content {
    padding-top: 40px;
  }

  .landing-page .main-content,
  .auth-page .main-content {
    display: block;
    padding-top: 48px;
  }

  .landing,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .landing__copy {
    max-width: 600px;
  }

  .landing__copy h1 {
    font-size: clamp(38px, 10vw, 54px);
  }

  .landing__panel {
    width: min(100%, 560px);
  }

  .auth-intro {
    max-width: 620px;
  }

  .auth-intro h1 {
    font-size: 42px;
  }

  .auth-card {
    width: min(100%, 500px);
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .domain-chip {
    width: 100%;
  }

  .dashboard-health {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .site-header__inner,
  .main-content,
  .site-footer {
    width: min(100% - 28px, var(--content));
  }

  .site-header__inner {
    min-height: 64px;
  }

  .brand__copy small {
    display: none;
  }

  .header-actions {
    gap: 9px;
  }

  .header-actions > .text-link {
    display: none;
  }

  .main-content {
    padding-bottom: 50px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .landing-page .main-content {
    padding-top: 42px;
  }

  .landing {
    gap: 42px;
  }

  .landing__copy h1 {
    font-size: 38px;
  }

  .landing__lead {
    font-size: 14px;
  }

  .landing__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .landing__actions .quiet-note {
    text-align: center;
  }

  .signal-card {
    padding: 27px 22px;
  }

  .landing__panel::before {
    right: 0;
  }

  .signal-card__topline {
    margin-bottom: 32px;
  }

  .auth-layout {
    gap: 38px;
  }

  .auth-intro h1 {
    font-size: 36px;
  }

  .auth-intro > p:not(.eyebrow),
  .security-note {
    font-size: 12px;
  }

  .auth-card {
    padding: 27px 20px;
  }

  .dashboard-page .main-content {
    padding-top: 32px;
  }

  .dashboard-heading {
    margin-bottom: 22px;
  }

  .dashboard-heading h1 {
    font-size: 34px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card strong {
    font-size: 25px;
  }

  .create-panel summary {
    padding: 15px;
  }

  .summary-action {
    display: none;
  }

  .create-form {
    padding: 16px;
    grid-template-columns: 1fr;
  }

  .create-form .button {
    width: 100%;
    margin-top: 4px;
  }

  .user-card {
    padding: 16px;
  }

  .user-card__header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .badge-stack {
    width: 100%;
    justify-content: flex-start;
    padding-left: 51px;
    margin-top: -7px;
  }

  .usage-block__line {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .traffic-chart__toolbar {
    flex-wrap: wrap;
  }

  .traffic-chart__total {
    width: 100%;
    margin: 3px 0 0;
  }

  .traffic-chart__canvas {
    overflow-x: auto;
  }

  .traffic-chart__svg {
    min-width: 520px;
  }

  .user-meta {
    grid-template-columns: 1fr;
  }

  .copy-row {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-row .button {
    width: 100%;
  }

  .subscription-block--summary {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-block--summary .button {
    width: 100%;
  }

  .user-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-actions form:first-child {
    grid-column: 1 / -1;
  }

  .dashboard-health {
    grid-template-columns: 1fr;
  }

  .dashboard-health > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .account-edit-form {
    grid-template-columns: 1fr;
  }

  .audit-entry {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audit-entry__meta {
    grid-column: 2;
    text-align: left;
  }

  .result-heading {
    padding: 70px 0 20px;
  }

  .success-mark {
    left: 0;
  }

  .credential-card {
    padding: 20px 16px;
  }

  .credential-card__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .subscription-item {
    padding: 14px 12px;
  }

  .subscription-qr__body {
    grid-template-columns: 1fr;
  }

  .subscription-qr__body img {
    max-width: 280px;
    margin: 0 auto;
  }

  .result-actions .button,
  .error-actions .button {
    width: 100%;
  }

  .confirm-dialog__panel {
    padding: 21px 17px;
  }

  .confirm-dialog__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .confirm-dialog__actions .button {
    width: 100%;
  }

  .error-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .error-state {
    padding: 35px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
