:root {
  color-scheme: dark;
  --background: #071014;
  --panel: rgba(15, 28, 34, 0.88);
  --panel-light: #13242b;
  --border: rgba(148, 183, 194, 0.18);
  --text: #f3f7f8;
  --muted: #91a7af;
  --accent: #39d9a0;
  --accent-dark: #092d24;
  --danger: #ff7a7a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, #10342f 0, transparent 34%),
    radial-gradient(circle at 90% 85%, #142b3b 0, transparent 32%),
    var(--background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  color: #04120e;
  background: var(--accent);
  font-weight: 750;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.secondary {
  min-height: 40px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #04120e;
  background: var(--accent);
  border-radius: 11px;
  letter-spacing: 0;
}

.intro h1,
.dashboard-heading h1 {
  max-width: 780px;
  margin: 14px 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.card,
.summary-card {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.card {
  padding: 32px;
  border-radius: 18px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 27px;
}

.login-card,
form {
  display: grid;
  gap: 20px;
}

label {
  display: grid;
  gap: 8px;
  color: #c6d3d7;
  font-size: 14px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: var(--text);
  background: #09161b;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57, 217, 160, 0.12);
}

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.account {
  display: flex;
  align-items: center;
  gap: 20px;
}

.account div {
  display: grid;
  gap: 3px;
  text-align: right;
}

.account span,
.muted {
  color: var(--muted);
}

.dashboard-heading {
  padding: 64px 0 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-heading h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
}

.badge,
.status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.badge,
.online {
  color: var(--accent);
  background: var(--accent-dark);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.summary-card {
  min-height: 145px;
  padding: 22px;
  display: grid;
  align-content: space-between;
  border-radius: 15px;
}

.summary-card strong {
  font-size: 20px;
}

.summary-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.content-grid {
  padding: 28px 0 80px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.info-card {
  align-content: start;
}

.steps {
  margin: 28px 0;
  padding: 0;
  display: grid;
  gap: 18px;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 14px;
}

.steps span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: var(--accent);
  background: var(--accent-dark);
  border-radius: 50%;
  font-weight: 800;
}

.notice {
  padding: 16px;
  color: #d7cda7;
  background: rgba(179, 147, 58, 0.1);
  border: 1px solid rgba(222, 185, 79, 0.2);
  border-radius: 10px;
  line-height: 1.5;
}

.message {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-dark);
}

.message.error {
  color: var(--danger);
  background: rgba(255, 76, 76, 0.1);
}

code {
  color: var(--accent);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .login-layout,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .login-layout {
    padding: 60px 0;
    gap: 40px;
  }

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

  .topbar,
  .dashboard-heading {
    align-items: flex-start;
  }

  .account {
    align-items: flex-end;
    flex-direction: column;
  }
}

.clients-card {
  margin-bottom: 80px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin-bottom: 8px;
}

.section-heading p {
  margin-bottom: 0;
}

.clients-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.client-row {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  background: rgba(5, 17, 21, 0.65);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.client-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.client-main strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  color: var(--muted);
  font-size: 13px;
}

.client-state-block {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.client-state {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.client-state.active {
  color: var(--accent);
  background: var(--accent-dark);
}

.client-state.pending {
  color: #e3c66f;
  background: rgba(227, 198, 111, 0.12);
}

.client-state.offline {
  color: #bac6ca;
  background: rgba(186, 198, 202, 0.1);
}

.client-state.revoked,
.client-state.disabled {
  color: var(--danger);
  background: rgba(255, 76, 76, 0.1);
}

.client-last-seen,
.revoked-text {
  color: var(--muted);
  font-size: 12px;
}

.client-actions {
  display: flex;
  justify-content: flex-end;
}

button.danger-button {
  min-height: 40px;
  padding: 0 16px;
  color: var(--danger);
  background: transparent;
  border: 1px solid rgba(255, 122, 122, 0.35);
}

button.danger-button:hover {
  background: rgba(255, 76, 76, 0.1);
}

.empty-state {
  margin: 24px 0 0;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(5, 17, 21, 0.45);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

@media (max-width: 820px) {
  .section-heading {
    flex-direction: column;
  }

  .client-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .client-actions {
    justify-content: flex-start;
  }
}

