:root {
  color-scheme: dark;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: #101714;
  color: #f1f3ed;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #8d9991;
  --line: #28332d;
  --green: #c2f277;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(116, 149, 83, .11), transparent 46%),
    #101714;
}

button, input { font: inherit; }
button { color: inherit; }

.shell {
  width: min(100% - 40px, 480px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(164, 183, 166, .13);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f1f3ed;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #465447;
  border-radius: 9px;
  color: var(--green);
}

.brand-mark svg { width: 17px; height: 17px; }
.brand-light { color: var(--green); padding: 0 2px; }

.local-badge, .online-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a7b3a9;
  font: 10px "DM Mono", monospace;
  letter-spacing: .1em;
}

.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(194, 242, 119, .48);
}

.eyebrow {
  margin: 0 0 10px;
  color: #9ca99e;
  font: 10px "DM Mono", monospace;
  letter-spacing: .15em;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 12vw, 58px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -.06em;
}

h1 span { color: var(--green); }
.intro-copy {
  max-width: 340px;
  margin: 16px 0 0;
  color: #a1aca4;
  font-size: 14px;
  line-height: 1.7;
}

.panel {
  padding: 25px;
  border: 1px solid #2b3730;
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(28, 38, 32, .94), rgba(21, 29, 25, .97));
  box-shadow: 0 20px 60px rgba(0, 0, 0, .17);
}

.login-panel { margin: auto 0; }
.login-title { margin: 0 0 22px; font-size: 20px; }
.login-form { display: grid; gap: 8px; }
.login-form label:not(:first-child) { margin-top: 8px; }
.login-form .button-primary { margin-top: 8px; }
.icon-box, .device-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #3b4b3b;
  border-radius: 12px;
  color: var(--green);
  background: rgba(194, 242, 119, .05);
}

.icon-box svg, .device-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
label { display: block; margin-bottom: 8px; color: #a8b1aa; font: 10px "DM Mono", monospace; letter-spacing: .1em; }

.input-wrap { position: relative; }
input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid #39463d;
  border-radius: 9px;
  outline: none;
  color: #f1f3ed;
  background: #131b16;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
}

input::placeholder { color: #68756c; }
input:focus { border-color: #9dc85e; box-shadow: 0 0 0 3px rgba(194, 242, 119, .1); }

.button {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform .18s, filter .18s, opacity .18s;
}

.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); }
.button:disabled { opacity: .58; cursor: wait; }
.button-primary { color: #182014; background: var(--green); }
.full-button { width: 100%; }
.button-primary span:last-child { font-size: 18px; font-weight: 400; }
.power-actions { display: grid; gap: 10px; }
.secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.secondary-actions .button { min-width: 0; padding: 0 8px; }
.secondary-actions svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.button-secondary { border: 1px solid #465447; color: #dce5d8; background: #202b23; }
.button-secondary:hover:not(:disabled) { border-color: #83966d; }
.message { min-height: 16px; margin: 9px 0 0; color: #ff9a8f; font-size: 12px; line-height: 1.5; }

.device-row { display: flex; align-items: center; gap: 12px; }
.device-icon { width: 47px; height: 47px; }
.device-info { min-width: 0; flex: 1; }
.device-info .eyebrow { margin-bottom: 5px; font-size: 9px; }
.device-info h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-status { color: #b7c5b7; font-size: 9px; }
.online-status .dot { width: 6px; height: 6px; }
.online-status.offline { color: #ffaaa0; }
.online-status.offline .dot { background: #ff8c80; box-shadow: none; }
.divider { height: 1px; margin: 23px 0; background: var(--line); }
.action-copy { margin-bottom: 20px; }
.action-copy .eyebrow { margin-bottom: 9px; }
.action-copy h3 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.action-copy > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.button-danger { color: #fff0ed; background: #963d34; }
.button-danger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button-cancel { color: #f1f3ed; border: 1px solid #59664d; background: #273122; }
.logout-button { display: block; margin: 9px auto 0; padding: 8px 10px; border: 0; color: #89968c; background: transparent; cursor: pointer; font-size: 11px; }
.logout-button:hover { color: #f1f3ed; }
.hidden { display: none !important; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: auto;
  padding: 26px 0 22px;
  color: #68756c;
  font: 9px "DM Mono", monospace;
  letter-spacing: .08em;
}

.footer-separator { padding: 0 4px; color: #9ab76f; }

@media (max-width: 420px) {
  .shell { width: min(100% - 32px, 480px); }
  .topbar { height: 70px; }
  .panel { padding: 21px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #222;
  --muted: #666;
  --line: #ddd;
  --green: #126be3;
}

body {
  background: #fff;
  color: #222;
}

.shell { width: min(100% - 32px, 420px); }
.topbar { height: 64px; border-bottom-color: #eee; }
.brand { color: #222; font-size: 15px; letter-spacing: 0; }
.dot { background: #888; box-shadow: none; }
.panel {
  padding: 22px;
  border-color: #ddd;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
}
.login-panel { padding: 0; border: 0; }
.login-title { margin-bottom: 20px; font-size: 20px; font-weight: 600; }
.login-form { gap: 8px; }
.login-form label:not(:first-child) { margin-top: 6px; }
label { margin-bottom: 0; color: #444; font: 13px Arial, Helvetica, sans-serif; letter-spacing: 0; }
input {
  height: 44px;
  padding: 0 11px;
  border-color: #ccc;
  border-radius: 4px;
  color: #222;
  background: #fff;
  font-size: 14px;
  transition: none;
}
input::placeholder { color: #777; }
input:focus { border-color: #888; box-shadow: none; }
.button {
  min-height: 44px;
  border: 1px solid #ccc;
  border-radius: 4px;
  color: #222;
  background: #f5f5f5;
  font-size: 14px;
  font-weight: 600;
  transition: none;
}
.button:hover:not(:disabled) { transform: none; filter: none; background: #eee; }
.button-primary {
  margin-top: 8px;
  border-color: #126be3;
  color: #fff;
  background: #126be3;
}
.button-primary:hover:not(:disabled) { background: #0e5fc9; }
.button-danger, .button-secondary, .button-cancel {
  border: 1px solid #ccc;
  color: #222;
  background: #f5f5f5;
}
.button-secondary:hover:not(:disabled) { border-color: #999; }
.icon-box, .device-icon {
  border-color: #ddd;
  border-radius: 4px;
  color: #444;
  background: #fff;
}
.online-status, .online-status.offline { color: #555; }
.online-status .dot, .online-status.offline .dot { background: #888; box-shadow: none; }
.divider { background: #ddd; }
.action-copy > p:last-child { color: #555; }
.message { color: #555; }
.logout-button { color: #555; }
.logout-button:hover { color: #222; }
button:focus-visible { outline: 2px solid #555; outline-offset: 2px; }
