/* Platform login surface: intentionally scoped so the authenticated workspace keeps its existing vocabulary. */
:root {
  --login-ink: #15244d;
  --login-ink-deep: #0d1836;
  --login-ink-soft: #5d687e;
  --login-gold: #b6945b;
  --login-gold-light: #e6c990;
  --login-line: #e1e6ef;
  --login-canvas: #f5f7fb;
}

body:has(#login-view:not(.hidden)) {
  min-width: 0;
  background: var(--login-canvas);
}

body:has(#app-view:not(.hidden)) {
  min-width: 1080px;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(214, 224, 241, .58), transparent 28%),
    radial-gradient(circle at 92% 84%, rgba(231, 216, 188, .32), transparent 24%),
    var(--login-canvas);
}

.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  width: min(1180px, 100%);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(21, 36, 77, .08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(21, 36, 77, .14), 0 4px 12px rgba(21, 36, 77, .04);
}

.login-showcase {
  position: relative;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  overflow: hidden;
  padding: 46px 52px 30px;
  color: #fff;
  isolation: isolate;
  background:
    radial-gradient(circle at 76% 16%, rgba(66, 91, 151, .44), transparent 33%),
    radial-gradient(circle at 6% 92%, rgba(182, 148, 91, .18), transparent 34%),
    var(--login-ink);
}

.login-showcase::before,
.login-showcase::after {
  position: absolute;
  z-index: -1;
  display: block;
  border: 1px solid rgba(230, 201, 144, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.login-showcase::before {
  top: -250px;
  right: -210px;
  width: 540px;
  height: 540px;
}

.login-showcase::after {
  right: -54px;
  bottom: -180px;
  width: 340px;
  height: 340px;
  border-color: rgba(255, 255, 255, .08);
}

.showcase-topline,
.showcase-footer,
.login-welcome,
.login-trust,
.login-panel-footer {
  display: flex;
  align-items: center;
}

.showcase-topline {
  gap: 12px;
}

.showcase-brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--login-gold);
  color: var(--login-ink);
  font-weight: 900;
}

.showcase-brand-mark::after {
  position: absolute;
  right: -8px;
  bottom: -12px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(21, 36, 77, .26);
  border-radius: 50%;
  content: "";
}

.showcase-brand-mark span {
  position: relative;
  z-index: 1;
  font-size: 18px;
  line-height: 1;
}

.showcase-brand-name {
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}

.showcase-brand-rule {
  width: 1px;
  height: 17px;
  margin-left: 4px;
  background: rgba(255, 255, 255, .22);
}

.showcase-brand-label,
.showcase-footer,
.login-panel-footer {
  color: rgba(196, 207, 229, .68);
  font-size: 10px;
  letter-spacing: .16em;
}

.showcase-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
  margin-top: auto;
  padding-bottom: 22px;
}

.showcase-copy .eyebrow {
  color: var(--login-gold-light);
}

.showcase-copy h2 {
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(36px, 4vw, 54px);
  font-weight: 760;
  letter-spacing: -.04em;
  line-height: 1.1;
  text-wrap: balance;
}

.showcase-copy h2 span {
  color: var(--login-gold-light);
}

.showcase-copy p {
  max-width: 30ch;
  margin: 0;
  color: rgba(226, 232, 243, .72);
  font-size: 14px;
  line-height: 1.8;
}

.showcase-features {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 29px;
  color: rgba(238, 241, 247, .82);
  font-size: 12px;
}

.showcase-features span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.showcase-features i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--login-gold-light);
  border-radius: 50%;
  background: rgba(230, 201, 144, .3);
}

.control-map {
  position: absolute;
  top: 50%;
  right: 4%;
  width: 300px;
  height: 300px;
  transform: translateY(-58%);
  opacity: .92;
}

.map-orbit,
.map-line,
.map-node,
.map-core {
  position: absolute;
}

.map-orbit {
  top: 50%;
  left: 50%;
  border: 1px solid rgba(230, 201, 144, .28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-orbit--outer {
  width: 256px;
  height: 256px;
}

.map-orbit--inner {
  width: 166px;
  height: 166px;
  border-color: rgba(255, 255, 255, .18);
}

.map-line {
  top: 50%;
  left: 50%;
  width: 256px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 201, 144, .26), transparent);
  transform: translate(-50%, -50%);
}

.map-line--diagonal {
  transform: translate(-50%, -50%) rotate(45deg);
}

.map-core {
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(230, 201, 144, .78);
  border-radius: 50%;
  background: rgba(21, 36, 77, .72);
  box-shadow: 0 0 0 10px rgba(230, 201, 144, .045), 0 0 40px rgba(230, 201, 144, .16);
  transform: translate(-50%, -50%);
}

.map-core::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
}

.map-core small,
.map-core strong {
  position: relative;
  z-index: 1;
  display: block;
}

.map-core small {
  margin-top: 2px;
  color: rgba(226, 232, 243, .66);
  font-size: 8px;
  letter-spacing: .2em;
}

.map-core strong {
  margin-top: -3px;
  color: #fff;
  font-size: 18px;
  letter-spacing: .06em;
}

.map-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(238, 241, 247, .84);
  font-size: 11px;
  letter-spacing: .04em;
}

.map-node i {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid var(--login-gold-light);
  border-radius: 50%;
  background: var(--login-gold);
  box-shadow: 0 0 0 5px rgba(230, 201, 144, .08);
}

.map-node--top {
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.map-node--right {
  top: 50%;
  right: -1px;
  transform: translateY(-50%);
}

.map-node--bottom {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.map-node--left {
  top: 50%;
  left: -1px;
  transform: translateY(-50%);
}

.showcase-footer {
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.login-panel {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px 72px 30px;
  background: #fff;
}

.login-panel-inner {
  width: min(100%, 352px);
  margin: auto;
}

.login-logo {
  display: block;
  width: 122px;
  height: auto;
  margin-bottom: 25px;
}

.login-welcome {
  gap: 12px;
  margin-bottom: 30px;
  color: var(--login-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
}

.login-welcome i {
  width: 54px;
  height: 1px;
  background: var(--login-line);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.login-heading h1 {
  margin: 8px 0 0;
  color: var(--login-ink);
  font-size: 30px;
  font-weight: 760;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.login-heading .eyebrow {
  color: var(--login-gold);
  font-size: 9px;
  letter-spacing: .16em;
}

.login-description {
  margin: 22px 0 0;
  color: var(--login-ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.login-field {
  display: grid;
  gap: 9px;
  color: var(--login-ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.login-field input {
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid var(--login-line);
  border-radius: 11px;
  outline: 0;
  background: #fbfcfe;
  color: var(--login-ink);
  font-size: 13px;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.login-field input::placeholder {
  color: #8e98a9;
}

.login-field input:hover {
  border-color: #c8d1df;
  background: #fff;
}

.login-field input:focus {
  border-color: var(--login-gold);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(182, 148, 91, .14);
}

.login-submit {
  min-height: 54px;
  margin-top: 3px;
  border-radius: 11px;
  background: var(--login-ink);
  box-shadow: 0 8px 18px rgba(21, 36, 77, .16);
  font-size: 14px;
  letter-spacing: .02em;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.login-submit:hover {
  background: #22376d;
  box-shadow: 0 10px 22px rgba(21, 36, 77, .2);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:focus-visible,
.login-field input:focus-visible {
  outline: 3px solid rgba(182, 148, 91, .28);
  outline-offset: 2px;
}

.login-submit:disabled,
.login-submit:disabled:hover {
  background: var(--login-ink);
  box-shadow: none;
  cursor: wait;
  opacity: .72;
  transform: none;
}

.login-form .form-message {
  min-height: 20px;
  margin: -3px 0 0;
  color: #a14f49;
  font-size: 12px;
  line-height: 1.6;
}

.login-trust {
  gap: 8px;
  margin-top: 28px;
  color: #7a8494;
  font-size: 11px;
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ea382;
  box-shadow: 0 0 0 4px rgba(110, 163, 130, .12);
}

.login-trust i {
  width: 1px;
  height: 12px;
  margin: 0 3px;
  background: #d9dee7;
}

.login-panel-footer {
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid #edf0f5;
  color: #a0a8b5;
  letter-spacing: .08em;
}

@media (max-width: 980px) {
  .login-view {
    width: 100vw;
    min-width: 0;
    overflow: auto;
    padding: 20px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
    width: 100%;
    min-width: 0;
    max-width: calc(100vw - 40px);
  }

  .login-showcase {
    min-height: 330px;
    padding: 32px 34px 24px;
  }

  .showcase-copy {
    margin-top: 58px;
    padding-bottom: 0;
  }

  .showcase-copy h2 {
    margin: 12px 0 10px;
    font-size: 36px;
  }

  .showcase-copy p {
    max-width: 38ch;
  }

  .showcase-features {
    margin-top: 20px;
  }

  .control-map {
    top: 51px;
    right: 28px;
    width: 160px;
    height: 160px;
    transform: none;
  }

  .map-orbit--outer {
    width: 140px;
    height: 140px;
  }

  .map-orbit--inner {
    width: 94px;
    height: 94px;
  }

  .map-line {
    width: 140px;
  }

  .map-core {
    width: 66px;
    height: 66px;
  }

  .map-core small {
    font-size: 5px;
  }

  .map-core strong {
    font-size: 11px;
  }

  .map-node {
    font-size: 9px;
  }

  .map-node i {
    width: 5px;
    height: 5px;
  }

  .login-panel {
    min-height: 0;
    min-width: 0;
    padding: 42px 44px 28px;
  }

  .login-panel-inner {
    width: 100%;
    min-width: 0;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .login-view {
    width: 100vw;
    max-width: 100vw;
    display: block;
    padding: 12px;
  }

  .login-shell {
    max-width: calc(100vw - 24px);
    border-radius: 18px;
  }

  .login-showcase {
    min-height: 312px;
    padding: 24px 24px 20px;
  }

  .showcase-brand-name {
    font-size: 12px;
  }

  .showcase-brand-label {
    display: none;
  }

  .showcase-copy {
    margin-top: 52px;
    max-width: 230px;
  }

  .showcase-copy h2 {
    font-size: 32px;
  }

  .showcase-copy p {
    max-width: 24ch;
    font-size: 12px;
  }

  .showcase-features {
    gap: 12px;
    margin-top: 16px;
    font-size: 11px;
  }

  .control-map {
    top: 48px;
    right: 14px;
    width: 130px;
    height: 130px;
    opacity: .7;
  }

  .map-orbit--outer {
    width: 116px;
    height: 116px;
  }

  .map-orbit--inner {
    width: 78px;
    height: 78px;
  }

  .map-line {
    width: 116px;
  }

  .map-core {
    width: 56px;
    height: 56px;
  }

  .map-node {
    font-size: 8px;
  }

  .showcase-footer {
    padding-top: 16px;
    font-size: 8px;
  }

  .login-panel {
    padding: 32px 24px 24px;
  }

  .login-logo {
    width: 112px;
  }

  .login-welcome {
    margin-bottom: 24px;
  }

  .login-heading h1 {
    font-size: 26px;
  }

  .login-description {
    margin-top: 18px;
    font-size: 12px;
  }

  .login-form {
    gap: 16px;
    margin-top: 28px;
  }

  .login-panel-footer {
    flex-wrap: wrap;
    margin-top: 38px;
    padding-top: 18px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-field input,
  .login-submit {
    transition-duration: 0s;
  }
}

/* Quiet composition: fewer labels, more breathing room, stronger type hierarchy. */
.showcase-brand-rule,
.showcase-brand-label,
.showcase-features,
.control-map,
.login-welcome,
.login-panel-footer {
  display: none;
}

.showcase-brand-name {
  color: rgba(255, 255, 255, .86);
  font-size: 11px;
  letter-spacing: .2em;
}

.showcase-copy {
  max-width: 480px;
  padding-bottom: 70px;
}

.showcase-copy h2 {
  margin: 22px 0 20px;
  font-size: clamp(46px, 5vw, 64px);
  line-height: 1.08;
}

.showcase-copy p {
  font-size: 15px;
}

.showcase-footer {
  justify-content: flex-start;
  margin-top: 0;
}

.login-panel {
  justify-content: center;
  padding: 64px 72px;
}

.login-panel-inner {
  margin: 0 auto;
}

.login-logo {
  width: 116px;
  margin-bottom: 36px;
}

.login-heading .eyebrow {
  display: none;
}

.login-heading h1 {
  margin-top: 0;
  font-size: 34px;
}

.login-description {
  margin-top: 18px;
}

.login-form {
  margin-top: 38px;
}

.login-trust {
  margin-top: 24px;
}

@media (max-width: 980px) {
  .showcase-copy {
    max-width: 420px;
    padding-bottom: 0;
  }

  .login-panel {
    padding: 48px 44px 50px;
  }
}

@media (max-width: 560px) {
  .showcase-copy {
    max-width: 250px;
  }

  .showcase-copy h2 {
    margin: 18px 0 14px;
    font-size: 38px;
  }

  .showcase-copy p {
    font-size: 13px;
  }

  .login-panel {
    padding: 38px 24px 42px;
  }

  .login-logo {
    margin-bottom: 30px;
  }

  .login-heading h1 {
    font-size: 29px;
  }
}
