/* The Segora sign-in page (login.html), in one file: the general rules first, then the current design
   (body.sg-login-page). Loaded before shared/brand.css. */

:root {
  --ink: #0d1b2a;
  --ink-2: #1b2b45;
  --teal: #19c3b1;
  --teal-dark: #0e8f82;
  --amber: #ffb547;
  --paper: #f6f8fb;
  --card: #ffffff;
  --text: #14213d;
  --dim: #5d6b82;
  --line: #dde3ec;
  --err: #c0392b;
  --ok: #1f9d6b;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* ---------- form side ---------- */
.step.active {
  animation: rise .25s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink-2);
}

.field {
  margin-bottom: 16px;
}

input[type=text],
input[type=password],
input[type=email] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(25, 195, 177, .18);
}

.pw button {
  padding: 6px;
}

.btn {
  padding: 13px 16px;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: .55;
  cursor: default;
}

.btn.ghost {
  background: none;
  color: var(--teal-dark);
  border: 1.5px solid var(--line);
  font-weight: 600;
}

.row {
  margin-top: 18px;
  font-size: 14px;
  color: var(--dim);
}

.row.stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

a.link {
  text-decoration: none;
}

.msg {
  min-height: 20px;
  font-size: 14px;
  margin: 12px 0 0;
}

.msg.err {
  color: var(--err);
}

.msg.ok {
  color: var(--ok);
}

/* otp boxes */
.otp input {
  min-width: 0;
  font-weight: 700;
  padding: 12px 0;
  outline: none;
}

.otp input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(25, 195, 177, .18);
}

.hint {
  margin-top: 8px;
}

@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step.active {
    animation: none;
  }
}

/* authenticator steps */
.qr {
  min-height: 120px;
}

.qr canvas,
.qr img {
  max-width: 100%;
}

.keybox {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  margin-bottom: 14px;
}

/* ---- Former inline styles (moved out of the HTML) ----
   Each class name is doubled (.u-x.u-x) so it wins over general rules, exactly as the old inline style did. */
.u-margin-0-0-6px.u-margin-0-0-6px {
  margin: 0 0 6px;
}

.u-margin-top-16px.u-margin-top-16px {
  margin-top: 16px;
}

.row.forgot {
  margin: 6px 0 22px;
}

/* Demo mode: the confirmation shown on Continue */
.demo-dialog {
  background: #FFF4EB;
}

.demo-dialog h2 {
  padding: 9px 22px;
  background: #FF8A3D;
  color: #101D30;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.demo-dialog p {
  margin: 8px 22px 14px;
}

.demo-dialog .demo-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 22px 18px;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.demo-dialog .demo-check input {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: #FF8A3D;
}

.demo-dialog .demo-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 22px 20px;
}

.demo-dialog .demo-actions .btn {
  width: auto;
  padding: 10px 20px;
}

/* ======================================================================
   The sign-in page's current design (until now its own file, login-visual.css). Its rules are scoped to
   body.sg-login-page, so they win over the general rules above, which apply only where these say nothing.
   ====================================================================== */

/* Segora sign-in visual refresh.
   Existing authentication behaviour and JavaScript hooks remain in login.html. */
.sg-login-page {
  display: block !important;
  grid-template-columns: none !important;
  --sg-ink: #102b45;
  --sg-muted: #64758b;
  --sg-teal: #13d5c7;
  --sg-teal-dark: #009e98;
  --sg-orange: #ffad24;
  min-height: 100vh;
  background: #f5f9fd;
  color: var(--sg-ink);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.sg-login-page * {
  box-sizing: border-box;
}

.sg-login-page .login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(390px, .92fr);
  overflow: hidden;
}

.sg-login-page .brand-panel {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 27px clamp(28px, 4vw, 66px) 22px;
  color: #fff;
  background: radial-gradient(ellipse at 76% 38%, rgba(0, 180, 190, .34), transparent 33%), radial-gradient(ellipse at 10% 90%, rgba(0, 130, 158, .25), transparent 34%), linear-gradient(125deg, #05283d 0%, #063d56 53%, #006b78 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sg-login-page .brand-panel:before,
.sg-login-page .brand-panel:after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
}

.sg-login-page .brand-panel:before {
  width: 560px;
  height: 560px;
  right: -250px;
  top: 80px;
  border: 1px solid rgba(55, 239, 222, .12);
  box-shadow: 0 0 0 34px rgba(55, 239, 222, .025), 0 0 0 75px rgba(55, 239, 222, .02);
}

.sg-login-page .brand-panel:after {
  width: 540px;
  height: 180px;
  right: -80px;
  bottom: -100px;
  border-radius: 50% 0 0 0;
  background: linear-gradient(135deg, rgba(0, 202, 189, .05), rgba(0, 228, 211, .48));
  transform: rotate(-12deg);
}

.sg-login-page .brand-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.sg-login-page .brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: #fff;
  flex: none;
}

.sg-login-page .brand-mark {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(29, 237, 218, .2));
}

.sg-login-page .brand-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.sg-login-page .brand-name {
  font-size: clamp(27px, 2.35vw, 39px);
  font-weight: 800;
  letter-spacing: -1.7px;
}

.sg-login-page .brand-name sup {
  font-size: .38em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
  margin-left: .12em;
  letter-spacing: 0;
}

.sg-login-page .brand-by {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 3px;
  color: #20e5d7;
  margin-top: 8px;
}

.sg-login-page .top-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.45vw, 25px);
  white-space: nowrap;
}

.sg-login-page .top-links a {
  font-size: clamp(10px, .82vw, 13px);
  font-weight: 600;
  color: #e4f2f7;
  text-decoration: none;
  transition: color .2s;
}

.sg-login-page .top-links a:hover {
  color: #35f0df;
}

.sg-login-page .top-links a:not(:last-child) {
  position: relative;
}

.sg-login-page .brand-content {
  display: grid;
  grid-template-columns: minmax(300px, .94fr) minmax(300px, 1.06fr);
  align-items: center;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 36px 0 15px;
}

.sg-login-page .brand-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.sg-login-page .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #45e9de;
  font-size: 15px;
  
  letter-spacing: 2px;
  margin: 0 0 19px;
}

.sg-login-page .brand-copy h1 {
  font-size: clamp(38px, 4.1vw, 65px);
  line-height: .99;
  letter-spacing: -2.7px;
  font-weight: 800;
  margin: 0 0 23px;
  color: #fff;
}

.eyebrow span {
  color: var(--sg-orange);
}

.sg-login-page .brand-copy h2 {
  font-size: clamp(19px, 1.8vw, 27px);
  line-height: 1.2;
  letter-spacing: -.75px;
  color: #fff;
  margin: 0 0 17px;
  font-weight: 600;
}

.sg-login-page .brand-copy h2 span {
  color: #45e9de;
}

.sg-login-page .brand-description {
  max-width: 495px;
  color: #d4e5ee;
  font-size: clamp(12px, .95vw, 15px);
  line-height: 1.62;
  margin: 0;
}

.sg-login-page .action-primary {
  background: linear-gradient(110deg, #ffb32f, #ff9717);
  box-shadow: 0 8px 24px rgba(255, 163, 32, .18);
  padding: 12px 20px;
  border-radius: 999px;
  color: #102b3d !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.sg-login-page .action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 163, 32, .28);
}

.sg-login-page .network-art {
  min-width: 0;
  align-self: center;
  position: relative;
  margin: -3px -24px 0 -18px;
}

.sg-login-page .network-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 510px;
  overflow: visible;
}

.sg-login-page .system-node rect {
  fill: url(#nodeFill);
}

.sg-login-page .system-node>text:not(.node-label) {
  fill: #fff;
  font-size: 31px;
  font-weight: 700;
  text-anchor: middle;
}

.sg-login-page .system-node .node-label {
  fill: #fff;
  font-size: 12px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #06425a;
  stroke-width: 4px;
  stroke-linejoin: round;
}

@keyframes sg-flow {
  to {
    stroke-dashoffset: -180
  }
}

.sg-login-page .brand-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 2.1px;
  padding-top: 10px;
}

.sg-login-page .brand-foot span {
  height: 1px;
  flex: 1;
  max-width: 170px;
  background: linear-gradient(90deg, transparent, #16d8cf);
}

.sg-login-page .brand-foot span:last-child {
  transform: scaleX(-1);
}

/* Authentication surface */
.sg-login-page .auth-panel {
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 88px) clamp(28px, 5vw, 78px) 24px;
  background: radial-gradient(ellipse at 100% 0%, rgba(39, 202, 205, .09), transparent 35%), radial-gradient(ellipse at 0% 100%, rgba(39, 202, 205, .07), transparent 35%), #f7faff;
}

.sg-login-page .auth-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image: radial-gradient(#cbdce9 .7px, transparent .7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(135deg, transparent 15%, #000 100%);
}

.sg-login-page .card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  margin: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sg-login-page .auth-eyebrow {
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.8px;
  color: #0aa99e;
  margin: 0 0 12px;
}

.sg-login-page .card h2 {
  font-size: clamp(30px, 2.6vw, 39px);
  line-height: 1.1;
  letter-spacing: -1.3px;
  font-weight: 800;
  color: #122b49;
  margin: 0 0 8px;
}

.sg-login-page .card .sub {
  font-size: 14px;
  line-height: 1.55;
  color: #60738d;
  margin: 0 0 31px;
}

.sg-login-page .field {
  margin: 0 0 17px;
}

.sg-login-page .field label {
  display: block;
  font-size: 12px;
  font-weight: 750;
  color: #18334f;
  margin: 0 0 7px;
}

.sg-login-page .field input[type=text],
.sg-login-page .field input[type=password],
.sg-login-page .field input[type=email] {
  display: block;
  width: 100%;
  height: 51px;
  padding: 0 15px;
  border: 1px solid #d5e0eb;
  border-radius: 12px;
  background: rgba(255, 255, 255, .93);
  color: #132d49;
  font-size: 14px;
  outline: none;
  box-shadow: 0 2px 8px rgba(20, 52, 82, .025);
  transition: border-color .18s, box-shadow .18s;
}

.sg-login-page .field input::placeholder {
  color: #9aabc0;
}

.sg-login-page .field input:focus {
  border-color: #17cfc2;
  box-shadow: 0 0 0 4px rgba(23, 207, 194, .12);
}

.sg-login-page .pw {
  position: relative;
}

.sg-login-page .pw input {
  padding-right: 68px !important;
}

.sg-login-page .pw button {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #5f7189;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.sg-login-page .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sg-login-page .forgot {
  margin: -5px 0 23px;
}

.sg-login-page .link {
  padding: 0;
  border: 0;
  background: none;
  color: #009f96;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.sg-login-page .link:hover {
  text-decoration: underline;
  color: #007e79;
}

.sg-login-page .btn {
  width: 100%;
  min-height: 53px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(105deg, #16cbbb, #43e9d9);
  color: #063441;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(15, 195, 183, .16);
  cursor: pointer;
  transition: filter .2s, transform .2s, box-shadow .2s;
}

.sg-login-page .btn:hover {
  filter: saturate(1.12);
  transform: translateY(-1px);
  box-shadow: 0 11px 26px rgba(15, 195, 183, .22);
}

.sg-login-page .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.sg-login-page .btn span {
  margin-left: 9px;
  font-size: 18px;
}

.sg-login-page .new-account {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-top: 28px;
  padding-top: 21px;
  border-top: 1px solid #dce6ef;
}

.sg-login-page .new-account>span {
  font-size: 13px;
  color: #526783;
  margin-bottom: 0;
}

.sg-login-page .new-account .link {
  font-size: 14px;
}

.sg-login-page .auth-footer {
  position: relative;
  z-index: 1;
  margin-top: 38px;
  text-align: center;
  color: #71839a;
  font-size: 10px;
  line-height: 1.7;
}

.sg-login-page .auth-footer a {
  color: #008e88;
}

.sg-login-page .step {
  display: none;
}

.sg-login-page .step.active {
  display: block;
}

.sg-login-page .stepno {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 14px 0;
  color: #51657e;
  font-size: 12px;
  line-height: 1.5;
}

.sg-login-page .stepno i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: #dff9f6;
  color: #008f88;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.sg-login-page .qr {
  display: flex;
  justify-content: center;
  margin: 20px auto;
  padding: 14px;
  width: max-content;
  background: #fff;
  border: 1px solid #e0e8ef;
  border-radius: 12px;
}

.sg-login-page .keybox {
  padding: 12px;
  border: 1px dashed #b7c8d8;
  border-radius: 9px;
  background: #fff;
  color: #18334f;
  text-align: center;
  font-size: 13px;
  letter-spacing: 1.5px;
}

.sg-login-page .hint {
  font-size: 11px;
  color: #61758d;
}

.sg-login-page .otp {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0;
}

.sg-login-page .otp input {
  width: 43px;
  height: 49px;
  border: 1px solid #d4e0eb;
  border-radius: 9px;
  background: #fff;
  text-align: center;
  font-size: 19px;
  color: #15314d;
}

.sg-login-page .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sg-login-page .two .field {
  min-width: 0;
}

.sg-login-page .demo-dialog {
  width: min(470px, calc(100% - 32px));
  padding: 27px;
  border: 1px solid #dce6ef;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(9, 34, 57, .25);
  color: #18334f;
}

.sg-login-page .demo-dialog::backdrop {
  background: rgba(5, 24, 42, .58);
  backdrop-filter: blur(3px);
}

.sg-login-page .demo-dialog h2 {
  font-size: 23px;
  margin: 0 0 8px;
}

.sg-login-page .demo-dialog h3 {
  font-size: 14px;
  margin: 0 0 12px;
}

.sg-login-page .demo-dialog p {
  font-size: 13px;
  line-height: 1.55;
  color: #596d83;
}

.sg-login-page .demo-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  margin: 18px 0;
}

.sg-login-page .demo-actions {
  display: flex;
  gap: 10px;
}

.sg-login-page .demo-actions .btn {
  flex: 1;
}

.sg-login-page .demo-actions .ghost {
  background: #edf3f8;
  color: #28415a;
  box-shadow: none;
}

@media(max-width:1250px) {
  .sg-login-page .login-shell {
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .9fr);
  }

  .sg-login-page .top-links {
    gap: 11px;
  }

  .sg-login-page .top-links a {
    font-size: 10px;
  }

  .sg-login-page .brand-content {
    grid-template-columns: minmax(260px, .95fr) minmax(260px, 1.05fr);
  }

  .sg-login-page .network-art {
    margin-left: -28px;
    margin-right: -38px;
  }
}

@media(max-width:980px) {
  .sg-login-page .login-shell {
    grid-template-columns: 1fr;
  }

  .sg-login-page .brand-panel {
    min-height: auto;
    padding: 22px 28px 18px;
  }

  .sg-login-page .brand-content {
    grid-template-columns: 1fr 1fr;
    padding: 35px 0 8px;
  }

  .sg-login-page .brand-copy h1 {
    font-size: clamp(37px, 6vw, 58px);
  }

  .sg-login-page .network-art {
    margin: 0 -20px;
  }

  .sg-login-page .brand-foot {
    padding-bottom: 5px;
  }

  .sg-login-page .auth-panel {
    min-height: 650px;
    padding: 85px 28px 26px;
  }

  .sg-login-page .card {
    width: min(440px, 100%);
  }

  .sg-login-page .auth-footer {
    margin-top: 45px;
  }
}

@media(max-width:650px) {
  .sg-login-page .brand-panel {
    padding: 18px 20px 17px;
  }

  .sg-login-page .brand-nav {
    align-items: flex-start;
  }

  .sg-login-page .brand-mark {
    width: 45px;
    height: 45px;
  }

  .sg-login-page .brand-name {
    font-size: 29px;
  }

  .sg-login-page .top-links {
    display: none;
  }

  .sg-login-page .brand-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 32px 0 5px;
  }

  .sg-login-page .brand-copy h1 {
    font-size: clamp(39px, 10vw, 55px);
    letter-spacing: -2px;
  }

  .sg-login-page .brand-copy h2 {
    font-size: 20px;
  }

  .sg-login-page .brand-description {
    font-size: 12px;
  }

  .sg-login-page .network-art {
    width: min(100%, 440px);
    margin: 0 auto -5px;
  }

  .sg-login-page .network-svg {
    max-height: 370px;
  }

  .sg-login-page .brand-foot {
    font-size: 8px;
    letter-spacing: 1.3px;
    gap: 8px;
  }

  .sg-login-page .auth-panel {
    min-height: 620px;
    padding: 78px 22px 22px;
  }

  .sg-login-page .card h2 {
    font-size: 31px;
  }

  .sg-login-page .card .sub {
    margin-bottom: 25px;
  }

  .sg-login-page .two {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sg-login-page .auth-footer {
    font-size: 9px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .sg-login-page * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Dimensional Segora hub: polished glass facets, reflected light and illuminated routes. */
.sg-login-page .network-art:before {
  content: "";
  position: absolute;
  inset: 12% 10%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(21, 236, 221, .15), rgba(7, 113, 145, .08) 42%, transparent 72%);
  filter: blur(22px);
  pointer-events: none;
}

.sg-login-page .network-svg {
  position: relative;
  isolation: isolate;
  filter: drop-shadow(0 18px 24px rgba(0, 10, 24, .22));
}

.sg-login-page .system-node rect {
  filter: url(#nodeShadow);
  stroke: #62fff2;
  stroke-width: 1.7;
}

.sg-login-page .system-node {
  filter: drop-shadow(0 0 8px rgba(31, 231, 220, .16));
}

.sg-login-page .network-lines path:first-child {
  stroke-linejoin: round;
}

.sg-login-page .moving-dashes {
  animation: sg-flow 7s linear infinite;
}

.sg-login-page .hub {
  transform-box: fill-box;
  transform-origin: center;
  animation: sg-hub-breathe 5s ease-in-out infinite;
}

@keyframes sg-hub-breathe {

  0%,
  100% {
    filter: drop-shadow(0 0 13px rgba(25, 239, 222, .42)) drop-shadow(0 12px 14px rgba(0, 0, 0, .32));
  }

  50% {
    filter: drop-shadow(0 0 23px rgba(25, 239, 222, .72)) drop-shadow(0 12px 16px rgba(0, 0, 0, .35));
  }
}

@media(prefers-reduced-motion:reduce) {
  .sg-login-page .hub {
    animation: none !important;
  }
}

.sg-login-page .brand-foot {
  color: white;
}

.sg-login-page .new-account .link,
.sg-login-page .row.forgot .link { font-weight: 400; }