:root {
  color-scheme: light;
  --bg: #eef3f7;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --surface-warm: #fbfcf8;
  --text: #17202a;
  --muted: #64748b;
  --line: #d7e1ea;
  --primary: #087f83;
  --primary-dark: #066468;
  --primary-soft: #e5f7f4;
  --blue: #2674c8;
  --blue-soft: #e8f2ff;
  --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, #dfeaf2 0, #f7fafc 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,
.action-card {
  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-logo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 38px;
  max-width: 150px;
  object-fit: contain;
  padding: 4px 7px;
  width: auto;
}

.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 {
  border-top: 3px solid rgba(8, 127, 131, .7);
  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;
}

.hero-status-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-width: 168px;
  padding: 10px 12px;
}

.hero-status-card span:first-child {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-status-card strong {
  overflow-wrap: anywhere;
}

.quick-nav {
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px;
  position: sticky;
  top: 10px;
  z-index: 5;
}

.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: 1040px;
}

.login-intro {
  align-content: start;
  background: linear-gradient(135deg, #ffffff 0, #f1fbf8 58%, #eef6ff 100%);
  display: grid;
  gap: 18px;
  min-height: 360px;
  padding: 34px;
}

.login-brand-row,
.login-card-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.login-brand-row {
  justify-content: flex-start;
}

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

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

.login-value-grid div {
  background: rgba(255, 255, 255, .72);
  border: 1px solid #d6e6ef;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 13px;
}

.login-value-grid strong {
  font-size: .94rem;
}

.login-value-grid span,
.login-footnote {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}

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

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

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

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

.login-card-head {
  margin-bottom: 16px;
}

.login-footnote {
  margin: 14px 0 0;
  text-align: center;
}

.support-link {
  color: var(--primary);
  display: inline-flex;
  font-size: .86rem;
  font-weight: 800;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

.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: 14px;
}

.metric {
  border-top: 3px solid #b9c7d6;
  min-height: 132px;
  padding: 18px;
}

.metric.is-success {
  border-top-color: var(--success);
}

.metric.is-warning {
  border-top-color: var(--amber);
}

.metric.is-danger {
  border-top-color: var(--danger);
}

.metric.is-neutral {
  border-top-color: #64748b;
}

.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%;
}

.metric.is-danger .bar span {
  background: var(--danger);
}

.metric.is-warning .bar span {
  background: var(--amber);
}

.metric.is-success .bar span {
  background: var(--success);
}

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

.action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.action-card {
  display: grid;
  gap: 8px;
  min-height: 152px;
  padding: 16px;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.action-card:hover {
  border-color: rgba(8, 127, 131, .45);
  box-shadow: 0 18px 42px rgba(30, 47, 64, .13);
  transform: translateY(-2px);
}

.action-card strong {
  font-size: .98rem;
}

.action-card span:last-child {
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.4;
}

.action-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;
}

.action-icon.green {
  background: var(--success);
}

.action-icon.blue {
  background: var(--blue);
}

.action-icon.teal {
  background: var(--primary);
}

.action-icon.amber {
  background: var(--amber);
}

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

.panel {
  padding: 20px;
}

.panel:hover {
  border-color: rgba(8, 127, 131, .28);
}

.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;
}

.security-list {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.security-list div {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr);
}

.security-list span {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: var(--primary);
  display: inline-flex;
  font-size: .7rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.security-list strong {
  font-size: .83rem;
}

.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;
}

.support-callout {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 13px;
}

.support-callout div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.support-callout strong {
  font-size: .94rem;
}

.support-callout span {
  color: var(--muted);
  font-size: .83rem;
  line-height: 1.35;
}

.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;
  border-top: 3px solid rgba(38, 116, 200, .68);
  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;
}

.dav-panel {
  background: linear-gradient(135deg, #f8fbfd 0, #eefbf7 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  padding: 15px;
}

.dav-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dav-head h3 {
  margin: 2px 0 6px;
}

.dav-head p:last-child {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.45;
  margin: 0;
  max-width: 680px;
}

.dav-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(260px, .8fr);
}

.dav-action-card {
  align-content: start;
}

.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);
}

.download-strip {
  align-items: center;
  background: linear-gradient(135deg, #f8fbff 0, #f3fbf8 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 15px;
}

.download-strip h3 {
  margin: 2px 0 4px;
}

.download-strip p:last-child {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.4;
  margin: 0;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.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-card:hover,
.server-card:hover {
  border-color: rgba(38, 116, 200, .38);
}

.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;
}

.portal-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .84rem;
  gap: 8px;
  justify-content: space-between;
  padding: 18px 4px 0;
}

.portal-footer span:first-child {
  color: #243244;
  font-weight: 900;
}

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

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

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

  .action-card {
    min-height: auto;
  }
}

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

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

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

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

  .login-card-head,
  .login-brand-row,
  .dav-head {
    align-items: flex-start;
  }

  .login-card-head,
  .dav-head {
    display: grid;
  }

  .hero-status-card {
    min-width: 0;
  }

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

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

  .download-actions {
    justify-content: stretch;
  }

  .download-actions .btn,
  .support-callout .btn {
    width: 100%;
  }

  .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;
  }
}
