.login-modal[hidden] { display: none; }
.login-modal { position: fixed; z-index: 400; inset: 0; display: grid; place-items: center; padding: 24px; }
.login-modal-backdrop { position: absolute; inset: 0; background: var(--modal-backdrop); backdrop-filter: blur(10px); }
.login-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-xl);
  background: var(--page-dark-soft);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-product);
}
.login-modal-close { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius-sm); background: transparent; color: var(--text-on-dark-muted); cursor: pointer; }
.login-modal-close:hover { background: var(--page-dark-raised); color: var(--text-on-dark); }
.login-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.login-modal-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-family: var(--font-display); font-weight: 700; }
.login-modal-brand img { width: 34px; height: 34px; }
.login-modal-head { margin-bottom: 24px; }
.login-modal-head p { margin-bottom: 8px; color: var(--accent); font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.login-modal-head h2 { margin-bottom: 10px; font-size: 1.8rem; }
.login-modal-head span { display: block; color: var(--text-on-dark-muted); font-size: 0.84rem; }
.login-modal-form { display: grid; gap: 10px; }
.login-modal-form label { margin-top: 5px; color: var(--text-on-dark-muted); font-size: 0.74rem; font-weight: 700; }
.login-modal-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-sm);
  background: var(--page-dark);
  color: var(--text-on-dark);
  outline: 0;
}
.login-modal-form input::placeholder { color: var(--text-on-dark-muted); }
.login-modal-form input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-shadow); }
.login-modal-password { position: relative; }
.login-modal-password input { padding-right: 52px; }
.login-modal-password button { position: absolute; top: 3px; right: 3px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--radius-sm); background: transparent; color: var(--text-on-dark-muted); cursor: pointer; }
.login-modal-password svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-modal-submit { width: 100%; margin-top: 10px; }
.login-modal-submit:disabled { cursor: wait; opacity: 0.7; }
.login-modal-error { margin: 4px 0 0; padding: 10px 12px; border: 1px solid var(--danger); border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 0.75rem; }
.login-modal-tenants > p:first-child { margin-bottom: 14px; font-family: var(--font-display); font-weight: 700; }
.login-modal-tenant { width: 100%; display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding: 13px 14px; border: 1px solid var(--line-dark); border-radius: var(--radius-sm); background: var(--page-dark); color: var(--text-on-dark); text-align: left; cursor: pointer; }
.login-modal-tenant:hover { border-color: var(--accent); }
.login-modal-tenant strong, .login-modal-tenant span { display: block; }
.login-modal-tenant span { color: var(--text-on-dark-muted); font-size: 0.68rem; }
.login-modal-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-dark); text-align: center; }
.login-modal-foot a { color: var(--accent); font-size: 0.78rem; font-weight: 700; }
