:root {
  color-scheme: dark;
  --page: #080d17;
  --surface: #111a2a;
  --field: #0b1422;
  --border: #304057;
  --text: #f4f7ff;
  --muted: #a8b7ca;
  --accent: #9cb5ff;
  --accent-ink: #0b1b39;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: radial-gradient(ellipse 65% 52% at 50% 1%, #1a2a48 0%, transparent 85%), var(--page);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app-shell {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.login-card, .workspace-panel {
  background: linear-gradient(145deg, #152036, var(--surface) 52%);
  border: 1px solid rgba(151, 174, 209, .23);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}
.login-card {
  width: min(100%, 760px);
  border-radius: 24px;
  padding: 30px;
}
.brand-line {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #a9bcff, #6c87cf);
  color: #102244;
  font-weight: 800;
  font-size: 18px;
}
.eyebrow {
  font-weight: 750;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #c0cde1;
}
.host-tag {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid #435470;
  border-radius: 8px;
  color: #c5d4ec;
  font-size: 12px;
  font-weight: 700;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 8px;
  font-size: clamp(29px, 4.5vw, 36px);
  line-height: 1.15;
  font-weight: 760;
  letter-spacing: -.035em;
}
.subtitle {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}
.status-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  margin-bottom: 22px;
  border: 1px solid #3a5175;
  border-radius: 12px;
  background: #172945;
  color: #dce8ff;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.status-banner p { margin: 0; }
.status-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #9eb7ff;
  box-shadow: 0 0 0 4px rgba(158, 183, 255, .11);
}
.status-banner[data-tone="error"] {
  background: #321b26;
  border-color: #ad586c;
  color: #ffdce3;
}
.status-banner[data-tone="error"] .status-dot {
  background: #ff91aa;
  box-shadow: 0 0 0 4px rgba(255, 145, 170, .12);
}
.status-banner[data-tone="success"] {
  background: #122e29;
  border-color: #417c70;
  color: #d7fff0;
}
.status-banner[data-tone="success"] .status-dot {
  background: #80e6bc;
  box-shadow: 0 0 0 4px rgba(128, 230, 188, .12);
}
.card-body {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}
/* Clear, no-secret instructions: 1Password sign-in is the primary route. */
.sign-in-help {
  margin: 0;
  padding: 18px 19px;
  align-self: stretch;
  border-radius: 11px;
  border: 1px solid rgba(155, 177, 207, .18);
  background: rgba(139, 166, 215, .065);
}
.sign-in-help h2, .pairing-intro h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 730;
  letter-spacing: -.01em;
}
.sign-in-help p, .pairing-intro p, .pair-help p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.sign-in-help strong, .pairing-intro strong, .pair-help strong { color: #e8f0ff; font-weight: 700; }
.pairing-intro { display: grid; gap: 3px; }
.pair-help {
  padding: 12px 13px;
  border-radius: 10px;
  background: #0b1422;
  border: 1px solid var(--border);
  font-size: 12px;
}
.pair-help summary {
  color: #bed0ff;
  font-weight: 700;
  cursor: pointer;
}
.pair-help[open] summary { margin-bottom: 11px; }
.pair-help p + p, .pair-help .pair-command + p { margin-top: 10px; }
.pair-command {
  display: block;
  overflow-wrap: anywhere;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #435470;
  border-radius: 8px;
  color: #e8edff;
  background: #101d32;
  user-select: all;
}
.login-fields { display: grid; gap: 17px; }
.field { display: grid; gap: 7px; color: #dce5f3; font-size: 13px; font-weight: 650; }
.field input, .field select, .fleet-label select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 13px;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}
.field input:hover, .field select:hover, .fleet-label select:hover { border-color: #657895; }
.field input:focus-visible, .field select:focus-visible, .fleet-label select:focus-visible,
button:focus-visible, a:focus-visible { outline: 3px solid #b0c4ff; outline-offset: 2px; }
button {
  min-height: 46px;
  padding: 10px 15px;
  border-radius: 11px;
  font: 700 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, filter 120ms ease;
}
button:disabled { opacity: .47; cursor: not-allowed; }
.primary-button {
  width: 100%;
  margin-top: 5px;
  border: 1px solid #b5c7ff;
  background: var(--accent);
  color: var(--accent-ink);
}
.primary-button:hover:not(:disabled) { filter: brightness(1.08); }
.secondary-button {
  border: 1px solid #526681;
  background: #202d41;
  color: #e5edff;
}
.secondary-button:hover:not(:disabled) { background: #2a3a52; border-color: #7b94b7; }
.card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 20px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(151, 174, 209, .17);
}
.card-footer .pairing-intro, .card-footer .privacy-note { grid-column: 1 / -1; }
.card-footer .pair-help { align-self: start; }
#pair { align-self: start; min-height: 46px; }
.privacy-note, .workspace-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.workspace-panel {
  width: min(100%, 1050px);
  border-radius: 20px;
  padding: 26px;
}
.workspace-header, .workspace-links, .screen-toolbar, .input-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.workspace-header { justify-content: space-between; margin-bottom: 22px; }
.workspace-header h2 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.02em; }
.workspace-links { flex-wrap: wrap; justify-content: flex-end; }
.workspace-links a {
  padding: 9px 12px;
  border: 1px solid #526681;
  border-radius: 10px;
  color: #c1d2ff;
  font-size: 13px;
  text-decoration: none;
}
.workspace-links a:hover { background: #263750; }
.fleet-label { display: block; margin-bottom: 19px; color: var(--muted); font-size: 13px; }
.fleet-label select { width: min(100%, 280px); margin: 8px 0; }
.screen-toolbar { justify-content: space-between; margin-bottom: 12px; color: #dce5f3; font-size: 14px; font-weight: 650; }
.screen-frame {
  min-height: 120px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #080d16;
}
#screen { display: block; width: 100%; height: auto; cursor: crosshair; }
.pair-help ol { padding-left:20px;color:var(--muted);font-size:12px;line-height:1.65; }
.pair-help li+li { margin-top:8px; }
.pair-command { display:block;overflow-wrap:anywhere;user-select:all; }
.screen-frame { min-height:120px; }
.input-controls { margin-top: 18px; align-items: end; flex-wrap: wrap; }
.input-controls .text-field { flex: 1 1 260px; }
.input-controls .key-field { flex: 0 1 170px; }
.workspace-note { margin-top: 14px; }
body:has(#workspace:not([hidden])) .app-shell { justify-content: flex-start; }
body:has(#workspace:not([hidden])) .card-body { display: none; }
body:has(#workspace:not([hidden])) .pairing-intro,
body:has(#workspace:not([hidden])) .pair-help { display: none; }
body:has(#workspace:not([hidden])) .login-card { width: min(100%, 1050px); padding: 24px 28px; }
body:has(#workspace:not([hidden])) .brand-line { margin-bottom: 12px; }
body:has(#workspace:not([hidden])) .card-header .subtitle { margin-bottom: 14px; }
body:has(#workspace:not([hidden])) .status-banner { margin-bottom: 0; }
body:has(#workspace:not([hidden])) .card-footer { margin-top: 12px; padding-top: 12px; }
@media (max-width: 700px) {
  .login-card { width: min(100%, 480px); }
  .card-body, .card-footer { grid-template-columns: 1fr; }
  .card-footer .pairing-intro, .card-footer .privacy-note { grid-column: auto; }
}
@media (max-width: 600px) {
  .app-shell { padding: 20px 14px; justify-content: center; }
  .login-card { padding: 25px 21px; border-radius: 19px; }
  .brand-line { gap: 9px; margin-bottom: 25px; }
  .brand-mark { width: 36px; height: 36px; }
  .eyebrow { font-size: 10px; letter-spacing: .11em; }
  h1 { font-size: 30px; }
  .workspace-panel { padding: 20px 15px; }
  .workspace-header { align-items: flex-start; flex-direction: column; }
  .workspace-links { justify-content: flex-start; }
  .screen-toolbar { flex-wrap: wrap; }
  .input-controls { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .input-controls > * { width: 100%; }
  body:has(#workspace:not([hidden])) .login-card { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
