:root {
  --bg: #e9eff6;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #687487;
  --line: #d7e0ea;
  --primary: #2457d6;
  --primary-dark: #1d45aa;
  --ok: #16834a;
  --danger: #bf2c2c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(36, 87, 214, 0.1), rgba(22, 131, 74, 0.05)),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[hidden] {
  display: none !important;
}

button,
input {
  letter-spacing: 0;
}

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

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(32px, 7vw, 92px);
  min-height: 100vh;
  align-content: center;
  align-items: center;
  padding: 48px 0;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.auth-shell .hero {
  display: block;
  width: auto;
  margin: 0;
}

.brand-copy {
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.subcopy {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.trust-list span {
  border: 1px solid rgba(36, 87, 214, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #31405a;
  font-size: 0.9rem;
  font-weight: 700;
}

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

.session-box span,
.count {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  background: #dfe6ef;
  color: #243147;
  font-size: 0.84rem;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 24px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.login-panel {
  width: min(580px, 100%);
  justify-self: center;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
}

.auth-shell .session-box {
  display: none;
}

.login-head {
  margin: 0 0 22px;
}

.login-head h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.auth-stack {
  display: grid;
  gap: 18px;
  width: min(680px, 100%);
  justify-self: stretch;
}

.login-logo-wrap {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
}

.login-logo {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  filter: drop-shadow(0 16px 30px rgba(17, 24, 39, 0.16));
}

.official-logo {
  margin: -70px 0 -86px;
}

.dashboard-shell {
  display: block;
  align-content: start;
  min-height: auto;
  width: min(1180px, calc(100% - 48px));
  padding: 28px 0;
}

.dashboard-shell .hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.dashboard-shell .brand-copy {
  max-width: none;
}

.dashboard-shell .eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.dashboard-shell h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.1;
}

.dashboard-shell .subcopy {
  max-width: none;
  margin-top: 6px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.dashboard-shell .trust-list,
.dashboard-shell .auth-stack {
  display: none;
}

.dashboard-shell .session-box {
  display: flex;
}

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

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

.account-panel {
  grid-column: span 7;
}

.security-panel {
  grid-column: span 5;
}

.license-panel,
.device-panel {
  grid-column: span 6;
}

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

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

.form-grid {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
}

button {
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 13px 16px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

button:disabled {
  border-color: #b8c2cf;
  background: #b8c2cf;
  cursor: not-allowed;
}

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

.metric {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.metric span,
.item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.metric strong,
.item strong {
  overflow-wrap: anywhere;
}

.list {
  display: grid;
  gap: 10px;
}

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

.item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.ok {
  color: var(--ok);
}

.danger {
  color: var(--danger);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(420px, calc(100vw - 40px));
  border-radius: 8px;
  padding: 12px 14px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.18);
}

@media (max-width: 780px) {
  .shell,
  .auth-shell {
    width: min(100% - 24px, 480px);
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: start;
    padding-top: 32px;
  }

  h1 {
    font-size: 2.6rem;
  }

  .hero,
  .session-box {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-shell {
    width: min(100% - 24px, 640px);
    padding-top: 18px;
  }

  .dashboard-shell .hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-shell h1 {
    font-size: 1.45rem;
  }

  .dashboard,
  .metric-grid,
  .grid-list {
    grid-template-columns: 1fr;
  }

  .account-panel,
  .security-panel,
  .license-panel,
  .device-panel,
  .sessions-panel {
    grid-column: 1 / -1;
  }

  .official-logo {
    margin: -44px 0 -52px;
  }
}
