:root {
  color-scheme: light;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --text: #17202a;
  --muted: #64748b;
  --line: #d7e1ea;
  --primary: #087f83;
  --primary-dark: #066468;
  --blue: #2674c8;
  --amber: #b7791f;
  --amber-bg: #fff8e6;
  --success: #15803d;
  --success-bg: #e8f7ef;
  --danger: #dc3545;
  --danger-bg: #fde9ec;
  --shadow: 0 14px 38px rgba(30, 47, 64, .09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, #e7eef6 0, #f5f8fb 280px, #eef3f7 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

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

.shell {
  margin: 0 auto;
  max-width: 1220px;
  padding: 24px 18px 52px;
}

.topbar,
.hero,
.login-card,
.login-intro,
.panel,
.metric {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.brand,
.identity,
.top-actions,
.hero-status,
.panel-head,
.preview-head,
.activity-item {
  align-items: center;
  display: flex;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-lock {
  align-items: center;
  background: #12323c;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  letter-spacing: .04em;
  width: 54px;
}

.brand-lock.small {
  font-size: .78rem;
  height: 34px;
  width: 34px;
}

.top-actions {
  gap: 8px;
}

.hero {
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 22px;
}

.identity {
  gap: 16px;
  min-width: 0;
}

.avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.hero h1,
.login-intro h1 {
  font-size: 1.65rem;
  line-height: 1.15;
  margin: 3px 0 4px;
  overflow-wrap: anywhere;
}

.hero-status {
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.quick-nav {
  background: rgba(255, 255, 255, .76);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
}

.quick-nav a {
  border-radius: 6px;
  color: #334155;
  font-size: .92rem;
  font-weight: 700;
  padding: 8px 11px;
}

.quick-nav a:hover {
  background: #e8f1f8;
}

.login-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  margin: 72px auto 0;
  max-width: 980px;
}

.login-intro {
  align-content: center;
  display: grid;
  min-height: 360px;
  padding: 34px;
}

.lead {
  color: #405168;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 8px 0 24px;
  max-width: 440px;
}

.login-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-points span,
.chip,
.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1;
  padding: 7px 10px;
}

.login-points span,
.chip {
  background: #e8f1f8;
  color: #2c5b86;
}

.login-card {
  align-self: center;
  padding: 26px;
}

.login-card h2,
.panel h2 {
  font-size: 1.18rem;
  margin: 0;
}

.eyebrow {
  color: var(--primary);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  margin: 0;
  text-transform: uppercase;
}

.muted,
.metric-detail,
.field-note,
.activity-item span,
.account-list span {
  color: var(--muted);
}

.notice {
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.notice.success {
  background: var(--success-bg);
  border: 1px solid #9bd7b5;
}

.notice.danger {
  background: var(--danger-bg);
  border: 1px solid #ef9ba7;
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  min-height: 132px;
  padding: 18px;
}

.metric-label {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 1.65rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.metric-value.compact {
  font-size: 1.12rem;
  line-height: 1.25;
}

.bar,
.strength {
  background: #e8edf2;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.bar {
  margin-top: 14px;
}

.bar span,
.strength span {
  background: linear-gradient(90deg, #0f9f8f, #2775c8);
  display: block;
  height: 100%;
}

.strength span {
  background: var(--danger);
  transition: width .18s ease, background .18s ease;
  width: 0;
}

.workspace-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 20px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-head {
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head > * {
  min-width: 0;
}

.stack {
  display: grid;
  gap: 13px;
}

.three {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  color: #243244;
  display: grid;
  font-size: .9rem;
  font-weight: 800;
  gap: 6px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 9px 10px;
  width: 100%;
}

textarea {
  line-height: 1.45;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 131, .16);
  outline: none;
}

.field-note {
  font-size: .82rem;
  margin: -4px 0 0;
}

.switch {
  align-items: center;
  display: flex;
  gap: 10px;
}

.switch input {
  min-height: auto;
  width: auto;
}

.btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

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

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  background: #fff;
  border-color: #9db0c2;
  color: #243244;
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: #475569;
}

.btn.danger {
  background: var(--danger);
  color: #fff;
}

.btn.full {
  width: 100%;
}

.btn[disabled] {
  cursor: wait;
  opacity: .75;
  transform: none;
}

.status-pill.neutral {
  background: #e9eef4;
  color: #475569;
}

.status-pill.success {
  background: var(--success-bg);
  color: var(--success);
}

.status-pill.warning {
  background: var(--amber-bg);
  color: var(--amber);
}

.status-pill.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.account-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.account-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
}

.account-list strong {
  overflow-wrap: anywhere;
}

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

.server-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.server-card h3 {
  margin: 0 0 6px;
}

.copy-row {
  align-items: center;
  border-bottom: 1px solid #dfe7ef;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(86px, .7fr) minmax(0, 1.3fr) auto;
  min-height: 34px;
  padding-bottom: 7px;
}

.copy-row:last-of-type {
  border-bottom: 0;
}

.copy-row span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.copy-row strong {
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.copy-btn {
  background: #fff;
  border: 1px solid #b9c7d6;
  border-radius: 6px;
  color: #25445f;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  min-height: 30px;
  padding: 5px 8px;
}

.copy-btn.copied,
.btn.copied {
  background: var(--success-bg);
  border-color: #92cfa7;
  color: var(--success);
}

.guide-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
}

.section-mini-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-mini-head h3 {
  margin: 2px 0 0;
}

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

.guide-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 176px;
  padding: 13px;
}

.guide-icon {
  align-items: center;
  background: #12323c;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  letter-spacing: .03em;
  width: 42px;
}

.guide-card h4 {
  font-size: .94rem;
  margin: 0 0 8px;
}

.guide-card ol {
  color: #526275;
  display: grid;
  font-size: .84rem;
  gap: 6px;
  line-height: 1.35;
  margin: 0;
  padding-left: 18px;
}

h3 {
  font-size: 1rem;
  margin: 10px 0 10px;
}

.activity-list {
  display: grid;
  gap: 8px;
}

.activity-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.activity-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-item strong {
  font-size: .92rem;
}

.activity-item span {
  font-size: .8rem;
}

.empty-state {
  background: var(--surface-soft);
  border: 1px dashed #b9c7d6;
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
  text-align: center;
}

.inline-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.inline-form label {
  min-width: 230px;
}

.preview {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.preview-head {
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.preview-head div {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.preview-head strong {
  font-size: 1.35rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 640px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f4f7fa;
  font-size: .86rem;
}

.danger-box {
  background: var(--amber-bg);
  border: 1px solid #f0d28a;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
}

@media (max-width: 980px) {
  .login-layout,
  .summary-grid,
  .workspace-grid,
  .setup-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .login-layout {
    margin-top: 24px;
  }

  .login-intro {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 14px 10px 36px;
  }

  .topbar,
  .hero,
  .inline-form {
    align-items: stretch;
    display: grid;
  }

  .top-actions,
  .hero-status {
    justify-content: stretch;
  }

  .top-actions,
  .three {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .section-mini-head {
    align-items: stretch;
    display: grid;
  }

  .copy-row {
    grid-template-columns: minmax(74px, .8fr) minmax(0, 1.2fr);
  }

  .copy-row .copy-btn {
    grid-column: 2;
    justify-self: start;
  }

  .panel.wide {
    grid-column: auto;
  }
}
