:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15263b;
  background: #f2f5f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% -10%, #b4ecff 0, transparent 38%),
    #f2f5f8;
}

.shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px
    max(28px, env(safe-area-inset-bottom));
}
.shell--install {
  display: grid;
  min-height: 100vh;
  align-items: center;
}

.hero { padding: 22px 4px 14px; }
.badge {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  color: #006f8e;
  background: #dff7ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(30px, 9vw, 46px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

h2 { margin: 0 0 12px; font-size: 17px; }
p { color: #647489; line-height: 1.55; }

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
}
.status__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #99a6b5;
  box-shadow: 0 0 0 5px #e2e7eb;
}
.status--ok .status__dot {
  background: #2fc6a4;
  box-shadow: 0 0 0 5px #d9f6ef;
}

.card {
  margin: 14px 0;
  padding: 20px;
  border: 1px solid rgba(25, 51, 78, .06);
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(41, 62, 89, .06);
}
.card p { margin: 0 0 8px; font-size: 14px; }
.card strong { font-size: 24px; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.stats .card { margin: 0; }
.stat span {
  display: block;
  margin-bottom: 8px;
  color: #718095;
  font-size: 12px;
}
.stat strong { font-size: 17px; overflow-wrap: anywhere; }
.install-card { padding: 30px; }
.install-card h1 { font-size: clamp(28px, 8vw, 42px); }
.install-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 18px;
  color: white;
  font-size: 28px;
  font-weight: 800;
}
.install-icon--ok { background: #2fc6a4; }
.install-icon--error { background: #ee6c6c; }

dl, dl div { margin: 0; }
dl div {
  display: grid;
  grid-template-columns: minmax(90px, .5fr) 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0f3;
}
dl div:last-child { border-bottom: 0; }
dt { color: #718095; font-size: 12px; overflow-wrap: anywhere; }
dd { font-size: 13px; overflow-wrap: anywhere; }

button {
  width: 100%;
  margin-top: 8px;
  padding: 15px 20px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: #16a6cf;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(22, 166, 207, .25);
}
button:active { transform: translateY(1px); }
.setup-shell { padding-bottom: 50px; }
.setup-hero { max-width: 600px; }
.setup-card form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; }
label > span {
  color: #52647a;
  font-size: 13px;
  font-weight: 700;
}
input {
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  outline: none;
  color: #15263b;
  background: #fbfcfd;
  font: inherit;
}
input:focus {
  border-color: #16a6cf;
  box-shadow: 0 0 0 3px rgba(22, 166, 207, .12);
}
.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #dce3e9;
  border-radius: 12px;
  background: #fbfcfd;
  overflow: hidden;
}
.input-prefix:focus-within {
  border-color: #16a6cf;
  box-shadow: 0 0 0 3px rgba(22, 166, 207, .12);
}
.input-prefix b {
  padding-left: 15px;
  color: #7b8999;
  font-size: 14px;
}
.input-prefix input {
  border: 0;
  box-shadow: none;
}
.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #9f3030;
  background: #fff0f0;
  font-size: 14px;
}
code {
  color: #174861;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.hint { margin: 14px 0 0; font-size: 13px; }
.portal-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.portal-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.portal-list .status__dot {
  background: #2fc6a4;
  box-shadow: 0 0 0 4px #d9f6ef;
}
.button-link {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 15px 20px;
  border-radius: 14px;
  color: white;
  background: #16a6cf;
  box-shadow: 0 8px 20px rgba(22, 166, 207, .25);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.button-link--muted {
  color: #40546a;
  background: #e9eef2;
  box-shadow: none;
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}
