:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-soft: #edf4f3;
  --surface-blue: #eef4ff;
  --ink: #10212b;
  --ink-soft: #263a44;
  --muted: #66757d;
  --muted-light: #5f7078;
  --line: rgba(16, 33, 43, 0.12);
  --line-strong: rgba(16, 33, 43, 0.2);
  --primary: #2e70e8;
  --primary-strong: #1f58bf;
  --primary-soft: #dfeaff;
  --teal: #15afa8;
  --teal-soft: #dff5f2;
  --navy: #0d2730;
  --navy-soft: #173942;
  --danger: #b4424b;
  --danger-soft: #fff0f0;
  --success: #16816f;
  --shadow-sm: 0 8px 24px rgba(17, 35, 44, 0.06);
  --shadow-lg: 0 28px 70px rgba(17, 35, 44, 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --shell-canvas: #f5f6f2;
  --shell-line: #d7dfde;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1d24;
  --surface: #102830;
  --surface-soft: #17363d;
  --surface-blue: #142d43;
  --ink: #f3f8f7;
  --ink-soft: #d6e4e1;
  --muted: #adbdc1;
  --muted-light: #adbdc1;
  --line: rgba(212, 231, 229, 0.14);
  --line-strong: rgba(212, 231, 229, 0.26);
  --primary: #6b9dff;
  --primary-strong: #8db3ff;
  --primary-soft: #1c3b66;
  --teal: #46cec2;
  --teal-soft: #153c37;
  --navy: #07161b;
  --navy-soft: #b8cccf;
  --danger: #ff9ba4;
  --danger-soft: #48242a;
  --success: #66d9c3;
  --shadow-sm: 0 9px 28px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.3);
  --shell-canvas: #0a1d24;
  --shell-line: #29464d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 2%, rgba(46, 112, 232, 0.08), transparent 30rem),
    radial-gradient(circle at 7% 95%, rgba(46, 112, 232, 0.06), transparent 28rem),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #fff;
  background: var(--primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--navy);
  border-radius: 10px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.login-page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

.login-header {
  position: sticky;
  z-index: 30;
  top: 0;
  width: 100%;
  border-bottom: 1px solid color-mix(in srgb, var(--shell-line) 82%, transparent);
  background: color-mix(in srgb, var(--shell-canvas) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-header-inner {
  display: flex;
  width: min(1240px, calc(100% - 48px));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-inline: auto;
}

.login-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.login-brand .brand-badge.brand-logo {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.login-brand .brand-badge.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-brand .brand-badge.brand-logo img.is-custom-logo {
  padding: 3px;
}

.login-brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.login-brand-copy strong,
.login-brand-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-brand-copy strong {
  max-width: 340px;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
}

.login-brand-copy small {
  color: var(--muted-light);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

.login-header-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-header-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.login-header-links a:hover {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.login-theme-toggle {
  display: inline-flex;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.login-theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.login-theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-theme-moon,
html[data-theme="dark"] .login-theme-sun {
  display: none;
}

html[data-theme="dark"] .login-theme-moon {
  display: block;
}

.login-nav-short {
  display: none;
}

.public-only {
  display: none !important;
}

.tenant-only {
  display: inline-flex;
}

.login-main {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  padding: 34px 24px 54px;
}

.portal-view {
  width: 100%;
}

.public-portal {
  display: none;
}

.tenant-portal {
  display: block;
}

html.mode-public .public-portal,
body.is-public .public-portal {
  display: block;
}

html.mode-public .tenant-portal,
body.is-public .tenant-portal {
  display: none;
}

html.mode-public .public-only,
body.is-public .public-only {
  display: inline-flex !important;
}

html.mode-public .tenant-only,
body.is-public .tenant-only {
  display: none;
}

.public-layout,
.tenant-layout {
  display: grid;
  width: min(1120px, 100%);
  align-items: stretch;
  margin-inline: auto;
}

.public-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 26px;
}

.tenant-layout {
  grid-template-columns: minmax(390px, 0.86fr) minmax(0, 1.14fr);
  gap: 28px;
}

.public-story,
.tenant-story {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f5faf9;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.public-story {
  display: flex;
  min-height: 610px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 6vw, 72px);
}

.tenant-story {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 5vw, 62px);
}

.story-glow {
  position: absolute;
  z-index: -1;
  top: -180px;
  right: -180px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(107, 157, 255, 0.22), transparent 66%);
  pointer-events: none;
}

.story-glow-tenant {
  top: auto;
  right: -130px;
  bottom: -210px;
  background: radial-gradient(circle, rgba(46, 112, 232, 0.28), transparent 66%);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #8db3ff;
}

.public-story h1,
.tenant-story h2 {
  max-width: 670px;
  margin-bottom: 20px;
  font-size: clamp(2.65rem, 5vw, 4.7rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.052em;
}

.tenant-story h2 {
  font-size: clamp(2.35rem, 4vw, 3.75rem);
}

.public-lead,
.tenant-story-lead {
  max-width: 590px;
  margin-bottom: 34px;
  color: rgba(232, 242, 242, 0.72);
  font-size: 1rem;
  line-height: 1.75;
}

.public-points {
  display: grid;
  gap: 12px;
  max-width: 600px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-point {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

.point-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #8db3ff;
  background: rgba(107, 157, 255, 0.12);
  border: 1px solid rgba(141, 179, 255, 0.2);
  border-radius: 13px;
}

.point-icon svg {
  width: 21px;
  height: 21px;
}

.public-point div {
  display: grid;
  gap: 2px;
}

.public-point strong {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 750;
}

.public-point div span {
  color: rgba(232, 242, 242, 0.66);
  font-size: 0.76rem;
  line-height: 1.5;
}

.public-assurance {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 0;
  color: rgba(232, 242, 242, 0.64);
  font-size: 0.72rem;
  font-weight: 650;
}

.public-assurance > span {
  width: 7px;
  height: 7px;
  background: #7ca7fa;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(124, 167, 250, 0.1);
}

.public-access-card,
.login-card {
  align-self: center;
  padding: clamp(32px, 5vw, 52px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.public-access-card {
  min-height: 500px;
  align-content: center;
}

.public-access-card h2,
.login-card-heading h1 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.card-intro,
.login-card-heading > p:last-child {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.login-card {
  width: 100%;
}

.login-card-heading {
  margin-bottom: 28px;
}

form {
  display: grid;
  gap: 20px;
}

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

.field label,
.field-label {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.input-wrap,
.domain-input-wrap {
  position: relative;
}

.input-icon,
.domain-prefix {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--muted-light);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-icon svg,
.domain-prefix svg {
  width: 19px;
  height: 19px;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 0.86rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.input-wrap input,
.domain-input-wrap input {
  padding-left: 47px;
}

.password-wrap input {
  padding-right: 106px;
}

input::placeholder {
  color: #99a4aa;
}

input:hover {
  border-color: rgba(16, 33, 43, 0.3);
}

input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(46, 112, 232, 0.11);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(180, 66, 75, 0.1);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: var(--surface-blue);
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.55;
}

.field-help strong {
  color: var(--ink-soft);
  font-weight: 750;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(46, 112, 232, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 13px 30px rgba(46, 112, 232, 0.25);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button-wide {
  width: 100%;
}

.button:focus-visible,
.password-toggle:focus-visible,
.captcha-refresh:focus-visible,
.login-header-links a:focus-visible,
.login-theme-toggle:focus-visible,
.login-brand:focus-visible,
.login-footer a:focus-visible {
  outline: 3px solid rgba(46, 112, 232, 0.28);
  outline-offset: 3px;
}

.public-error {
  margin: 0 0 18px;
  padding: 11px 13px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(180, 66, 75, 0.18);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 650;
}

.public-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 25px;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
}

.public-card-footer a {
  color: var(--primary);
  font-weight: 800;
}

.public-card-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.captcha-block {
  padding: 15px;
  background: var(--surface-blue);
  border: 1px solid rgba(46, 112, 232, 0.13);
  border-radius: var(--radius-md);
}

.captcha-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.captcha-heading > div {
  display: grid;
  gap: 2px;
}

.captcha-heading > div > span:last-child {
  color: var(--muted);
  font-size: 0.68rem;
}

.captcha-refresh {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(46, 112, 232, 0.16);
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
}

.captcha-refresh:hover {
  background: #fff;
}

.captcha-refresh svg {
  width: 15px;
  height: 15px;
}

.captcha-controls {
  display: grid;
  grid-template-columns: minmax(112px, 0.72fr) minmax(110px, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.captcha-question {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.captcha-answer input {
  min-height: 48px;
  text-align: center;
}

.login-submit {
  margin-top: 2px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.security-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--primary);
  margin-top: 1px;
}

.workspace-preview {
  max-width: 540px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
}

.workspace-preview-head {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 3px 3px 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.preview-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 800;
}

.preview-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-mark img.is-custom-logo {
  padding: 2px;
}

.workspace-preview-head > div {
  display: grid;
  gap: 1px;
}

.workspace-preview-head strong {
  font-size: 0.76rem;
  font-weight: 800;
}

.workspace-preview-head div span {
  color: var(--muted);
  font-size: 0.64rem;
}

.workspace-list {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.workspace-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 11px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.workspace-item-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
}

.workspace-item-icon svg {
  width: 20px;
  height: 20px;
}

.icon-blue {
  color: var(--primary);
  background: var(--surface-blue);
}

.icon-teal {
  color: var(--primary);
  background: var(--surface-blue);
}

.icon-navy {
  color: var(--navy-soft);
  background: #e9eff1;
}

.workspace-item > div {
  display: grid;
  gap: 2px;
}

.workspace-item strong {
  font-size: 0.75rem;
  font-weight: 800;
}

.workspace-item div span {
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.4;
}

.tenant-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.tenant-assurance span {
  padding: 6px 10px;
  color: rgba(236, 246, 245, 0.72);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.login-footer {
  display: grid;
  width: min(1240px, calc(100% - 48px));
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-inline: auto;
  padding: 30px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--shell-line);
}

.login-footer-tenant {
  display: grid;
  gap: 2px;
}

.login-footer-tenant > span,
.login-powered-by strong {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
}

.login-footer-tenant small,
.login-powered-by > span {
  font-size: 0.7rem;
}

.login-powered-by {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.login-powered-by img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.login-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-self: end;
  justify-content: flex-end;
  gap: 18px;
}

.login-footer-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.login-footer-links a:hover {
  color: var(--primary);
}

.toast {
  position: fixed;
  z-index: 400;
  right: 22px;
  bottom: 22px;
  display: none;
  width: min(370px, calc(100% - 32px));
  padding: 15px 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  display: block;
  animation: toast-in 180ms ease both;
}

.toast[data-type="err"],
.toast[data-type="error"] {
  border-left-color: var(--danger);
}

.toast[data-type="ok"],
.toast[data-type="success"] {
  border-left-color: var(--success);
}

.toast .title {
  margin-bottom: 3px;
  font-size: 0.78rem;
  font-weight: 800;
}

.toast .desc {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 88% 2%, rgba(107, 157, 255, 0.08), transparent 30rem),
    radial-gradient(circle at 7% 95%, rgba(107, 157, 255, 0.07), transparent 28rem),
    var(--bg);
}

html[data-theme="dark"] .login-brand .brand-badge.brand-logo {
  background: #fff;
}

html[data-theme="dark"] .public-access-card,
html[data-theme="dark"] .login-card {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

html[data-theme="dark"] input,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] .captcha-question,
html[data-theme="dark"] .captcha-refresh,
html[data-theme="dark"] .workspace-preview,
html[data-theme="dark"] .workspace-item,
html[data-theme="dark"] .toast {
  background: var(--surface);
}

html[data-theme="dark"] input::placeholder {
  color: #91a3a7;
  opacity: 1;
}

html[data-theme="dark"] input:hover {
  border-color: var(--line-strong);
}

html[data-theme="dark"] .captcha-refresh:hover,
html[data-theme="dark"] .password-toggle:hover {
  background: var(--surface-blue);
}

html[data-theme="dark"] .icon-navy {
  color: #d8e8e7;
  background: #203a43;
}

html[data-theme="dark"] .button-primary {
  color: #07161b;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .login-main {
    padding-top: 24px;
  }

  .public-layout,
  .tenant-layout {
    grid-template-columns: 1fr;
    width: min(720px, 100%);
  }

  .public-story,
  .tenant-story {
    min-height: auto;
    padding: 44px;
  }

  .public-story h1,
  .tenant-story h2 {
    max-width: 620px;
    font-size: clamp(2.4rem, 7vw, 4rem);
  }

  .public-access-card,
  .login-card {
    align-self: stretch;
  }

  .public-access-card {
    order: -1;
  }

  .workspace-preview {
    max-width: none;
  }
}

@media (max-width: 780px) {
  .login-header-inner,
  .login-footer {
    width: calc(100% - 40px);
  }
}

@media (max-width: 720px) {
  .login-header {
    position: relative;
    background: var(--shell-canvas);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .login-header-inner {
    min-height: 70px;
    gap: 12px;
  }

  .login-brand .brand-badge.brand-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
  }

  .login-brand-copy strong {
    max-width: 190px;
    font-size: 0.86rem;
  }

  .login-brand-copy small {
    font-size: 0.61rem;
  }

  .login-header-links .login-home-link {
    display: none !important;
  }

  .login-header-links a {
    min-height: 44px;
    padding-inline: 11px;
  }

  .login-footer {
    grid-template-columns: 1fr auto;
    padding-bottom: 30px;
  }

  .login-powered-by {
    justify-self: end;
  }

  .login-footer-links {
    grid-column: 1 / -1;
    justify-self: start;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .login-brand-copy small {
    display: none;
  }

  .login-header-links a {
    font-size: 0.72rem;
  }

  .login-main {
    padding: 18px 20px 38px;
  }

  .public-layout,
  .tenant-layout {
    gap: 16px;
  }

  .public-story,
  .tenant-story,
  .public-access-card,
  .login-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .public-story h1,
  .tenant-story h2 {
    margin-bottom: 16px;
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .public-lead,
  .tenant-story-lead {
    margin-bottom: 26px;
    font-size: 0.88rem;
  }

  .public-point {
    grid-template-columns: 38px 1fr;
    padding: 11px;
  }

  .point-icon {
    width: 38px;
    height: 38px;
  }

  .public-access-card {
    min-height: 0;
  }

  .public-access-card h2,
  .login-card-heading h1 {
    font-size: 2rem;
  }

  .captcha-heading {
    align-items: center;
  }

  .captcha-refresh {
    width: 34px;
    flex: 0 0 34px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .captcha-refresh svg {
    width: 17px;
    height: 17px;
  }

  .public-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 420px) {
  .login-header-inner {
    gap: 6px;
  }

  .login-brand {
    gap: 7px;
  }

  .login-brand-copy strong {
    max-width: 128px;
  }

  .login-header-links {
    gap: 2px;
  }

  .login-header-links a {
    padding-inline: 4px;
    font-size: 0.68rem;
  }

  .login-nav-full {
    display: none;
  }

  .login-nav-short {
    display: inline;
  }

  .password-wrap input {
    padding-right: 93px;
  }

  .password-toggle {
    right: 5px;
    padding-inline: 8px;
    font-size: 0.64rem;
  }

  .captcha-controls {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
