* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: #183036;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(17, 107, 87, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 107, 87, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(101, 218, 200, 0.26), transparent 18rem),
    radial-gradient(circle at 82% 12%, rgba(216, 77, 130, 0.1), transparent 21rem),
    linear-gradient(135deg, #f4fbfc 0%, #fbfefe 54%, #ffffff 100%);
  background-size: 76px 76px, 76px 76px, auto, auto, auto;
  background-attachment: fixed;
}

button,
input {
  font: inherit;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.login-screen::before {
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 34%, rgba(31, 138, 112, 0.1) 34.1% 34.35%, transparent 34.45% 100%),
    linear-gradient(300deg, transparent 0 58%, rgba(24, 48, 54, 0.07) 58.1% 58.3%, transparent 58.4% 100%);
  opacity: 0.58;
}

.login-screen::after {
  width: 420px;
  height: 420px;
  right: 10%;
  top: 16%;
  border: 1px solid rgba(17, 107, 87, 0.12);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 42px rgba(255, 255, 255, 0.38),
    0 0 80px rgba(101, 218, 200, 0.14);
  opacity: 0.72;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(450px, 100%);
  padding: 34px 36px 42px;
  border-radius: 10px;
  border: 1px solid #183036;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 253, 254, 0.92));
  box-shadow: 0 24px 70px rgba(22, 52, 58, 0.14);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.brand-logo {
  width: 56px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(31, 138, 112, 0.14));
}

.brand-name {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.login-subtitle {
  margin: 10px 0 28px;
  color: #526970;
  text-align: center;
}

.auth-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #183036;
  color: #8c284c;
  background: #fff0f4;
  font-size: 14px;
  line-height: 1.35;
}

.auth-message.notice {
  border-color: #183036;
  color: #21424a;
  background: #eefbfc;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: #183036;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #183036;
  border-radius: 6px;
  color: #183036;
  background: #ffffff;
  outline: none;
}

.field input:focus {
  border-color: #116b57;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.14);
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 24px;
  color: #61767d;
  font-size: 14px;
}

.login-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link {
  border: 0;
  padding: 0;
  color: #146d58;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.primary-btn,
.soft-btn {
  border: 1px solid #183036;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.primary-btn {
  min-height: 42px;
  color: #fff;
  background: linear-gradient(180deg, #26977d, #1f806a);
  box-shadow: 0 8px 18px rgba(31, 138, 112, 0.22);
}

.primary-btn:hover,
.soft-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.soft-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.full {
  width: 100%;
}

.signup-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #183036;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(17, 107, 87, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 107, 87, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(233, 247, 244, 0.92) 0%, rgba(255, 255, 255, 0.96) 72%);
  background-size: 32px 32px, 32px 32px, auto;
  color: #526970;
  font-size: 13px;
  line-height: 1.3;
}

.signup-callout strong,
.signup-callout span {
  display: block;
}

.signup-callout strong {
  margin-bottom: 6px;
  color: #183036;
}

.soft-btn {
  max-width: 90px;
  padding: 12px 14px;
  color: #116b57;
  background: #dff6ef;
}

@media (max-width: 520px) {
  .login-panel {
    padding: 28px 20px 32px;
  }

  .signup-callout {
    grid-template-columns: 1fr;
  }

  .soft-btn {
    max-width: none;
  }
}

/* Minimal workspace boot screen */
.auth-boot-screen.login-screen {
  isolation: isolate;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 44%, rgba(93, 224, 207, 0.12), transparent 22rem),
    linear-gradient(180deg, #fbfdfd 0%, #f4f8f8 100%);
}

.auth-boot-screen.login-screen::before {
  inset: 0;
  z-index: -2;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(25, 87, 82, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 87, 82, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
}

.auth-boot-screen.login-screen::after {
  width: 360px;
  height: 1px;
  top: 50%;
  right: auto;
  left: 50%;
  z-index: -1;
  border: 0;
  border-radius: 0;
  opacity: 0.7;
  background: linear-gradient(90deg, transparent, rgba(38, 181, 166, 0.28), transparent);
  box-shadow: 0 0 36px rgba(75, 215, 199, 0.18);
  transform: translate(-50%, 74px);
}

.auth-boot-panel.login-panel {
  width: min(320px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #173d3b;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-boot-panel .auth-boot-brand {
  justify-content: center;
  gap: 12px;
  margin: 0 0 26px;
}

.auth-boot-panel .auth-boot-brand .brand-logo {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 8px 18px rgba(36, 178, 164, 0.16));
}

.auth-boot-panel .auth-boot-brand .brand-name {
  color: #173d3b;
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.auth-boot-track {
  position: relative;
  width: 156px;
  height: 2px;
  margin: 0 auto 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 92, 86, 0.1);
}

.auth-boot-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #32c7b8 36%, #8ce7de 72%, transparent);
  animation: auth-boot-scan 1.35s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.auth-boot-panel .auth-boot-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: #68817f;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.auth-boot-status > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #35c6b8;
  box-shadow: 0 0 0 0 rgba(53, 198, 184, 0.36);
  animation: auth-boot-pulse 1.35s ease-out infinite;
}

@keyframes auth-boot-scan {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(350%); }
}

@keyframes auth-boot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 198, 184, 0.38); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(53, 198, 184, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-boot-track span,
  .auth-boot-status > span {
    animation: none;
  }
}
