* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
.auth-shell, .device-shell, .message { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card, .device-card { width: min(100%, 520px); padding: 30px; border: 1px solid var(--nebula-line); border-radius: 12px; background: var(--nebula-panel); box-shadow: var(--nebula-shadow); }
.auth-brand, .id-brand { display: flex; align-items: center; gap: 11px; max-width: 100%; color: var(--nebula-text); text-decoration: none; }
.auth-brand img, .id-brand img { width: 40px; height: 40px; }
.auth-brand span, .id-brand span { display: grid; min-width: 0; }
.auth-brand small, .id-brand small { color: var(--nebula-muted); }
.auth-card > div { margin: 40px 0 24px; }
.auth-card h1, .device-card h1 { margin: 0 0 10px; font-size: clamp(2.2rem, 7vw, 3.5rem); letter-spacing: -.05em; line-height: 1; }
.auth-card p, .device-card p { color: var(--nebula-muted); line-height: 1.6; }
.auth-card form, .device-card form, .id-panel form { display: grid; gap: 16px; }
.auth-card label, .device-card label, .id-panel label { display: grid; gap: 7px; color: var(--nebula-muted); font-size: .8rem; font-weight: 750; }
.auth-card input, .device-card input, .id-panel input {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--nebula-line);
  border-radius: var(--nebula-radius); color: var(--nebula-text); background: var(--nebula-bg);
}
.auth-card button, .device-card button, .id-panel button, .id-content > form button {
  min-height: 44px; padding: 10px 15px; border: 1px solid var(--nebula-accent); border-radius: var(--nebula-radius);
  color: var(--nebula-accent-ink); background: var(--nebula-accent); font-weight: 800; cursor: pointer;
}
.auth-note { margin: 22px 0 0; font-size: .78rem; }
.auth-note a { display: inline-flex; align-items: center; min-height: 28px; }
.auth-error { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--nebula-danger) 38%, var(--nebula-line)); border-radius: var(--nebula-radius); color: var(--nebula-danger) !important; background: color-mix(in srgb, var(--nebula-danger) 8%, var(--nebula-panel)); }
.device-card dl { margin: 20px 0; border: 1px solid var(--nebula-line); border-radius: var(--nebula-radius); }
.device-card dl div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px; border-bottom: 1px solid var(--nebula-line); }
.device-card dl div:last-child { border: 0; }
.device-card dt { color: var(--nebula-muted); } .device-card dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.device-actions { display: flex; justify-content: flex-end; gap: 9px; }
.device-card button.secondary { color: var(--nebula-text); border-color: var(--nebula-line); background: var(--nebula-panel); }
.id-landing { min-height: 100vh; padding: 0 clamp(20px, 6vw, 90px); }
.id-landing header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; border-bottom: 1px solid var(--nebula-line); }
.id-landing header > a:last-child, .id-landing section > a { min-height: 42px; padding: 10px 14px; border-radius: var(--nebula-radius); color: var(--nebula-accent-ink); background: var(--nebula-accent); font-weight: 800; text-decoration: none; }
.id-landing section { display: flex; min-height: calc(100vh - 78px); flex-direction: column; align-items: flex-start; justify-content: center; max-width: 900px; padding: 70px 0; }
.id-landing h1 { max-width: 900px; margin: 14px 0 18px; font-size: clamp(3rem, 8vw, 7rem); line-height: .93; letter-spacing: -.07em; }
.id-landing section > p:not(.mono-label) { max-width: 680px; color: var(--nebula-muted); font-size: 1.1rem; line-height: 1.7; }
.id-landing section > a { margin-top: 24px; }
.mono-label { margin: 0; color: var(--nebula-muted); font: 750 .75rem var(--nebula-mono); letter-spacing: .08em; }
.id-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.id-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; gap: 16px; padding: 16px 14px; border-right: 1px solid var(--nebula-line); background: var(--nebula-panel); }
.id-brand { min-height: 54px; padding: 6px; }
.id-sidebar nav { display: grid; gap: 5px; min-height: 0; overflow: auto; }
.id-sidebar nav a, .go-cloud { min-height: 44px; padding: 11px 12px; border: 1px solid transparent; border-radius: var(--nebula-radius); color: var(--nebula-muted); font-weight: 700; text-decoration: none; }
.id-sidebar nav a:hover, .id-sidebar nav a[aria-current='page'] { color: var(--nebula-accent); border-color: var(--nebula-line); background: var(--nebula-accent-soft); }
.id-account { display: grid; grid-template-columns: 36px minmax(0, 1fr) 38px; align-items: center; gap: 9px; margin-top: auto; padding: 9px; border: 1px solid var(--nebula-line); border-radius: var(--nebula-radius); }
.id-account > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: var(--nebula-accent-ink); background: var(--nebula-accent); font-weight: 800; }
.id-account > div { display: grid; min-width: 0; }
.id-account strong, .id-account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-account small { color: var(--nebula-muted); }
.id-account form { margin: 0; }
.id-account button { width: 36px; height: 36px; border: 1px solid var(--nebula-line); border-radius: 7px; color: var(--nebula-text); background: var(--nebula-bg); cursor: pointer; }
.go-cloud { display: flex; align-items: center; border-color: var(--nebula-line); color: var(--nebula-text); }
.id-content { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 64px 0; }
.id-content > header { margin-bottom: 28px; }
.id-content h1 { margin: 8px 0; font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.055em; }
.id-content > header p:not(.mono-label) { max-width: 640px; color: var(--nebula-muted); }
.id-panel { margin-bottom: 14px; padding: 22px; border: 1px solid var(--nebula-line); border-radius: 11px; background: var(--nebula-panel); }
.id-panel h2 { margin: 0 0 18px; }
.id-panel p { color: var(--nebula-muted); line-height: 1.65; }
.session-list article { display: grid; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--nebula-line); }
.session-list small { color: var(--nebula-muted); }
.id-content button.danger { border-color: var(--nebula-danger); color: white; background: var(--nebula-danger); }
@media (max-width: 720px) {
  .id-shell { display: block; padding-bottom: 72px; }
  .id-sidebar { position: fixed; inset: auto 0 0; z-index: 20; display: block; width: 100%; height: 72px; padding: 7px 8px; border: 0; border-top: 1px solid var(--nebula-line); }
  .id-brand, .id-account, .go-cloud { display: none; }
  .id-sidebar nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; overflow: visible; }
  .id-sidebar nav a { display: grid; min-height: 56px; place-items: center; padding: 3px; text-align: center; font-size: .68rem; }
  .id-content { width: calc(100% - 28px); padding: 34px 0; }
  .device-card dl div { grid-template-columns: 1fr; gap: 5px; }
}
