:root {
  --ink: #071427;
  --navy: #061d38;
  --deep: #030815;
  --blue: #1688ff;
  --cyan: #58d4ff;
  --chrome: #dceeff;
  --mint: #30d5a3;
  --muted: #668096;
  --line: rgba(124, 199, 255, .2);
  --panel: rgba(255, 255, 255, .97);
  --shadow: 0 24px 70px rgba(3, 8, 21, .2);
  --font-display: "Space Age Orion", Arial, Helvetica, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
}

@font-face {
  font-family: "Space Age Orion";
  src: url("assets/fonts/space-age.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(88, 212, 255, .04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 136, 255, .035) 1px, transparent 1px),
    linear-gradient(145deg, #030815 0, #061d38 42%, #0a3561 68%, #f5f9fd 68%, #f9fcff 100%);
  background-size: 44px 44px, 44px 44px, auto;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.login-page {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.login-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(220, 238, 255, .18);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(22, 136, 255, .16), rgba(220, 238, 255, .07) 18%, transparent 34%),
    linear-gradient(90deg, rgba(3, 8, 21, .96), rgba(6, 29, 56, .94) 52%, rgba(8, 46, 78, .9));
  box-shadow: 0 18px 42px rgba(3, 8, 21, .24);
  padding: 10px 14px;
  backdrop-filter: blur(12px);
}

.brand-lockup,
.login-topbar nav,
.panel-kicker,
.signin-links,
.product-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup {
  min-width: 0;
}

.brand-lockup img {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(220, 238, 255, .38);
  border-radius: 8px;
  background: #030815;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(22, 136, 255, .16), 0 12px 28px rgba(0, 0, 0, .24);
}

.brand-lockup span {
  display: grid;
  min-width: 0;
}

.brand-lockup small,
.eyebrow {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-lockup strong {
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
}

.login-topbar nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.login-topbar nav a,
.signin-links a {
  min-height: 34px;
  border: 1px solid rgba(220, 238, 255, .18);
  border-radius: 999px;
  color: #e8f6ff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}

.login-hero {
  display: grid;
  grid-template-columns: minmax(320px, .78fr) minmax(0, 1.22fr);
  gap: clamp(16px, 2.5vw, 34px);
  align-items: stretch;
  padding: clamp(26px, 5vw, 76px) 0 28px;
}

.signin-panel,
.product-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.signin-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .99), rgba(246, 251, 255, .94)),
    #ffffff;
  padding: clamp(20px, 3vw, 34px);
}

.panel-kicker {
  justify-content: space-between;
  flex-wrap: wrap;
}

.status-dot {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(48, 213, 163, .32);
  border-radius: 999px;
  background: rgba(48, 213, 163, .12);
  color: #0b6d55;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

.signin-panel h1 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}

.signin-panel p,
.chrome-card p,
.signal-grid span {
  color: var(--muted);
  line-height: 1.55;
}

.signin-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #244660;
  font-size: 13px;
  font-weight: 900;
}

.field input,
.field select {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(102, 128, 150, .32);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(3, 8, 21, .04);
}

.field input:focus,
.field select:focus {
  border-color: rgba(22, 136, 255, .78);
  box-shadow: 0 0 0 4px rgba(22, 136, 255, .12);
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 147, 170, .36);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f5f9fd);
  color: #0d4f8f;
  padding: 11px 15px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(6, 29, 56, .075);
}

.btn.primary {
  border-color: rgba(88, 212, 255, .55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 24%),
    linear-gradient(135deg, #075bb3, #1688ff 58%, #58d4ff);
  color: #ffffff;
}

.btn:disabled {
  cursor: wait;
  opacity: .72;
}

.signin-links {
  flex-wrap: wrap;
}

.signin-links a {
  border-color: rgba(22, 136, 255, .16);
  color: #0d4f8f;
}

.login-status {
  border: 1px solid rgba(22, 136, 255, .24);
  border-radius: 8px;
  background: rgba(22, 136, 255, .08);
  color: #0d4f8f;
  padding: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.login-status.error {
  border-color: rgba(203, 58, 58, .22);
  background: rgba(203, 58, 58, .08);
  color: #8d2222;
}

.login-status.good {
  border-color: rgba(48, 213, 163, .28);
  background: rgba(48, 213, 163, .1);
  color: #0b6d55;
}

.owner-login-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(22, 136, 255, .24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(22, 136, 255, .12), rgba(88, 212, 255, .08)),
    #f8fbff;
  padding: 14px;
}

.owner-login-panel[hidden] {
  display: none;
}

.owner-login-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.2;
}

.owner-login-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

.owner-credential-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(124, 199, 255, .22);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.owner-credential-row span {
  color: #244660;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-credential-row code {
  color: #0d4f8f;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.owner-access-link {
  border-color: rgba(88, 212, 255, .4) !important;
  background: rgba(88, 212, 255, .1);
}

.product-panel {
  display: grid;
  align-content: stretch;
  gap: 16px;
  background:
    linear-gradient(140deg, rgba(88, 212, 255, .15), rgba(22, 136, 255, .1) 38%, rgba(3, 8, 21, .82)),
    linear-gradient(90deg, rgba(3, 8, 21, .95), rgba(6, 29, 56, .88));
  padding: clamp(18px, 2.8vw, 34px);
  color: #ffffff;
}

.chrome-card {
  display: grid;
  gap: 14px;
  align-content: center;
  min-height: 280px;
}

.chrome-card img {
  width: min(170px, 62%);
  height: auto;
  object-fit: contain;
}

.chrome-card h2 {
  max-width: 840px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 68px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
}

.chrome-card p {
  max-width: 760px;
  color: #cfe4f8;
  font-size: clamp(16px, 1.4vw, 20px);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signal-grid article {
  display: grid;
  gap: 6px;
  min-height: 132px;
  border: 1px solid rgba(220, 238, 255, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  padding: 14px;
}

.signal-grid strong {
  color: #ffffff;
  font-size: 18px;
}

.signal-grid span {
  color: #cfe4f8;
}

.product-actions {
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .login-topbar,
  .login-hero {
    grid-template-columns: 1fr;
  }

  .login-topbar {
    align-items: flex-start;
  }

  .login-topbar nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .login-page {
    padding: 10px;
  }

  .login-topbar {
    position: static;
  }

  .brand-lockup img {
    width: 46px;
    height: 46px;
  }

  .brand-lockup strong {
    font-size: 20px;
  }

  .login-hero {
    padding-top: 16px;
  }

  .signal-grid,
  .product-actions,
  .signin-links {
    grid-template-columns: 1fr;
    display: grid;
  }

  .product-actions .btn,
  .signin-links a {
    width: 100%;
  }
}

/* OrionOS login mobile polish: larger mark, stacked controls, no text collisions. */
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .login-page {
    padding: 10px;
  }

  .login-topbar {
    position: sticky;
    top: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-height: 0;
    padding: 12px;
    border-radius: 10px;
  }

  .brand-lockup {
    width: 100%;
    gap: 12px;
  }

  .brand-lockup img {
    width: 66px;
    height: 66px;
    min-width: 66px;
    border-radius: 10px;
  }

  .brand-lockup small {
    font-size: 11px;
    line-height: 1.1;
  }

  .brand-lockup strong {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1;
  }

  .login-topbar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    justify-content: stretch;
  }

  .login-topbar nav a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 10px;
    text-align: center;
    white-space: normal;
    line-height: 1.14;
  }

  .login-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 0 24px;
  }

  .signin-panel,
  .product-panel {
    min-width: 0;
    overflow: hidden;
    padding: 16px;
  }

  .chrome-card {
    min-height: 0;
    gap: 12px;
  }

  .chrome-card img {
    width: min(170px, 68%);
  }

  .chrome-card h2 {
    font-size: clamp(31px, 8.8vw, 42px);
    line-height: 1.08;
    overflow-wrap: normal;
    text-wrap: balance;
  }

  .chrome-card p,
  .login-status,
  .signal-grid span {
    font-size: 15.5px;
    line-height: 1.42;
  }

  .signal-grid,
  .product-actions,
  .signin-links {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 9px;
  }

  .product-actions .btn,
  .signin-links a,
  .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.15;
  }

  .field input,
  .field select {
    min-height: 48px;
  }

  .signin-panel p,
  .chrome-card p,
  .signal-grid span,
  .login-status {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 360px) {
  .login-topbar nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .chrome-card h2 {
    font-size: 30px;
    line-height: 1.1;
  }
}
