*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: #0F172A;
  background: #F8FAFC;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
}
.brand { font-weight: 700; text-decoration: none; color: #0F172A; }
.area-label { color: #64748B; font-size: 13px; }
.spacer { flex: 1; }

button {
  font: inherit;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #fff;
  cursor: pointer;
}
button:hover { background: #F1F5F9; }
button.btn-secondary { background: #fff; }
#btn-signin, #btn-signin-main, #btn-confirm-assign, #btn-request-access {
  background: #0F172A;
  color: #fff;
  border-color: #0F172A;
}
#btn-signin:hover, #btn-signin-main:hover, #btn-confirm-assign:hover, #btn-request-access:hover { background: #1E293B; }

.centered {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 24px;
  text-align: center;
}
.centered h1 { font-size: 22px; margin-bottom: 12px; }
.centered p { color: #475569; margin-bottom: 20px; line-height: 1.5; }
.centered label { display: block; text-align: left; font-size: 13px; margin-bottom: 6px; color: #475569; }
.centered input { width: 100%; padding: 10px; border: 1px solid #CBD5E1; border-radius: 6px; margin-bottom: 16px; font: inherit; }

.muted { color: #94A3B8; font-size: 13px; }

main.panel, #devices-screen .panel { max-width: 900px; margin: 32px auto; padding: 0 24px; }
#devices-screen h1 { font-size: 20px; margin-bottom: 16px; }

table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid #E2E8F0; font-size: 13px; }
th { background: #F1F5F9; font-weight: 600; color: #475569; }
tr:last-child td { border-bottom: none; }

.backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center;
}
/* An author-stylesheet rule always wins over the UA stylesheet's
   [hidden]{display:none}, even at equal specificity -- without this, the
   backdrop above renders visible (and covers the whole screen, blocking
   everything including sign-in) regardless of the hidden attribute. */
.backdrop[hidden] { display: none; }
.dialog { background: #fff; border-radius: 10px; padding: 24px; width: 360px; }
.dialog h2 { font-size: 16px; margin-bottom: 16px; }
.dialog label { display: block; font-size: 13px; margin-bottom: 6px; color: #475569; }
.dialog select { width: 100%; padding: 8px; border: 1px solid #CBD5E1; border-radius: 6px; margin-bottom: 20px; font: inherit; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
