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

html, body {
  background: #e9e9e9;
}

html {
  overflow-y: scroll;
}

body {
  font-family: -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Logo + nav (sit inside the card, at the top) ---- */
.logo-row {
  text-align: center;
  margin: 4px 0 16px 0;
}

.site-logo {
  display: inline-block;
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eee;
  font-size: 17px;
}
.site-nav a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 600;
}
.site-nav .nav-sep {
  color: #ccc;
}

/* ---- Night Mode ---- */
body.night-mode {
  background: #1a1d23;
  color: #d0d4dc;
}

.night-mode .card {
  background: #23272f;
  border-color: #383d47;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.night-mode .site-nav {
  border-bottom-color: #383d47;
}
.night-mode .site-nav a {
  color: #3d9bd4;
}
.night-mode .site-nav .nav-sep {
  color: #444a55;
}

.night-mode h1 {
  color: #e8eaed;
}
.night-mode p.sub {
  color: #b0b8c4;
}
.night-mode label {
  color: #a0a8b4;
}
.night-mode .field-label {
  color: #a0a8b4;
}

.night-mode select,
.night-mode input[type="text"],
.night-mode input[type="tel"],
.night-mode input[type="email"],
.night-mode input[type="password"],
.night-mode input[type="date"],
.night-mode input[type="time"] {
  background: #1e2228;
  border-color: #383d47;
  color: #d0d4dc;
}

.night-mode .list-title-lg,
.night-mode .list-title {
  color: #e8eaed;
}
.night-mode .step-list {
  color: #b0b8c4;
}
.night-mode .checkbox-row {
  color: #a0a8b4;
}
.night-mode .list-item,
.night-mode .empty,
.night-mode .result-row {
  background: #1e2228;
}
.night-mode .empty {
  border-color: #383d47;
}
.night-mode .list-item .info .primary,
.night-mode .result-row .value {
  color: #e8eaed;
}
.night-mode .list-item .info .secondary,
.night-mode .result-row .label {
  color: #8a92a0;
}
.night-mode .nav-links {
  border-top-color: #383d47;
}
.night-mode .nav-links a {
  color: #3d9bd4;
}
.night-mode #loading {
  color: #b0b8c4;
}

/* ---- Night Mode Toggle ---- */
.night-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #555;
  cursor: pointer;
}
.night-mode .night-toggle {
  color: #b0b8c4;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.3s;
}
.toggle-slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}
input:checked + .toggle-slider {
  background-color: #3d9bd4;
}
input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ---- Main bordered/shaded content container ---- */
.page-wrap {
  width: 100%;
  max-width: 1024px;
  margin: 50px auto 40px auto;
  padding: 0 16px;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  padding: 24px 40px 36px 40px;
}

h1 {
  font-size: 24px;
  color: #111;
  margin-bottom: 8px;
}

p.sub {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---- Plain content links (e.g. "Click Here To..." links inside p.sub) ---- */
a {
  color: #1a73e8;
}
.night-mode a {
  color: #3d9bd4;
}

label {
  display: block;
  font-size: 17px;
  color: #555;
  margin-bottom: 4px;
  margin-top: 14px;
}

/* ---- Reusable form field-group pattern ----
   Use these instead of one-off inline styles, so spacing/weight changes
   happen once here rather than being repeated across every page. */
.field-label {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #555;
  margin-bottom: 4px;
  margin-top: 14px;
}
.field-group {
  margin-top: 48px;
}
.field-group:first-of-type {
  margin-top: 0;
}

select,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"] {
  width: 100%;
  font-size: 18px;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.row-2 {
  display: flex;
  gap: 10px;
}
.row-2 > div {
  flex: 1;
}

button {
  width: 80%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: #1a73e8;
  border: none;
  border-radius: 6px;
  padding: 14px;
  margin-top: 20px;
  cursor: pointer;
}
button:disabled {
  background: #99b8e8;
}

/* ---- Red variant button (e.g. "Your Big Red Button link.") ---- */
.btn-red {
  background: #d32f2f;
}
.btn-red:hover {
  background: #b71c1c;
}

#msg {
  margin-top: 14px;
  font-size: 18px;
  display: none;
  padding: 10px 12px;
  border-radius: 6px;
}
#msg.ok { background: #eafaf1; color: #1e8449; }
#msg.err { background: #fdecea; color: #c0392b; }

/* ---- Toggle buttons (e.g. device chooser) ---- */
.toggle-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.toggle-row button {
  margin-top: 0;
  background: #e0e0e0;
  color: #333;
}
.toggle-row button.selected {
  background: #d32f2f;
  color: #fff;
}

/* ---- Inline success/confirmation message ---- */
.confirm-msg {
  display: none;
  margin-top: 20px;
  color: #1e8449;
  font-weight: 600;
  font-size: 17px;
}

/* ---- Section heading, larger size (e.g. Test Your System) ---- */
.list-title-lg {
  margin-top: 40px;
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

/* ---- Numbered step-by-step instructions ---- */
.step-list {
  padding-left: 40px;
  color: #666;
  font-size: 18px;
  line-height: 1.5;
}
.step-list li {
  margin-bottom: 12px;
}

/* ---- Inline checkbox with label (e.g. "Show password") ---- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 17px;
  color: #555;
}
.checkbox-row input[type="checkbox"] {
  width: auto;
}

/* ---- Centered link paragraph (e.g. below a form) ---- */
.center-link {
  margin-top: 20px;
  text-align: center;
}

.list-title {
  margin-top: 40px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.list-item {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.list-item .info .primary {
  font-weight: 600;
  color: #111;
  font-size: 18px;
}
.list-item .info .secondary {
  font-size: 17px;
  color: #777;
  margin-top: 2px;
}
.list-item .remove {
  color: #c0392b;
  font-size: 17px;
  cursor: pointer;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  width: auto;
}

.empty {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f8f9fa;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 18px;
  color: #999;
}

/* ---- Lookup page result rows ---- */
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  margin-top: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 18px;
}
.result-row .label {
  color: #888;
}
.result-row .value {
  color: #111;
  font-weight: 600;
  text-align: right;
}

.flag {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 600;
}
.flag.warn {
  background: #fdecea;
  color: #c0392b;
}
.flag.ok {
  background: #eafaf1;
  color: #1e8449;
}

#loading {
  margin-top: 16px;
  color: #666;
  font-size: 18px;
  display: none;
}

.nav-links {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 17px;
}
.nav-links a {
  color: #1a73e8;
  text-decoration: none;
  margin-right: 16px;
}

/* ---- Big red activation button page (overrides the standard layout) ---- */
.activate-body {
  background: #000;
}
.activate-body .page-wrap {
  max-width: none;
  padding: 0;
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.activate-body .card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#helpButton {
  width: 90vw;
  height: 90vw;
  max-width: 400px;
  max-height: 400px;
  border-radius: 50%;
  background: #d32f2f;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  border: none;
  box-shadow: 0 0 0 8px rgba(211,47,47,0.25);
  margin-top: 0;
}
#helpButton:active {
  background: #b71c1c;
}
#helpButton.sent {
  background: #2e7d32;
  box-shadow: 0 0 0 8px rgba(46,125,50,0.25);
  font-size: 24px;
}

#activateStatus {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  color: #888;
  font-size: 17px;
}

/* ---- Narrow container for simple auth forms ---- */
body.auth-page .page-wrap {
  max-width: 644px;
}

/* ---- Feedback modal ---- */
.feedback-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.feedback-modal-overlay.open {
  display: flex;
}
.feedback-modal-box {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 480px;
  width: 90%;
  padding: 24px 28px 28px 28px;
}
.feedback-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #888;
  cursor: pointer;
}
.feedback-modal-close:hover {
  color: #333;
}

.night-mode .feedback-modal-box {
  background: #23272f;
  border-color: #383d47;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.night-mode .feedback-modal-close {
  color: #a0a8b4;
}
.night-mode .feedback-modal-close:hover {
  color: #d0d4dc;
}

.step-img {
  max-width: 220px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
