:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050b16;
  color: #f4f7fb;
  --rm-bg: #050b16;
  --rm-surface: rgba(10, 23, 42, 0.96);
  --rm-surface-soft: rgba(23, 43, 70, 0.72);
  --rm-border: rgba(151, 175, 211, 0.2);
  --rm-text: #f4f7fb;
  --rm-muted: #9fb0c8;
  --rm-blue: #2f80ff;
  --rm-green: #27d39a;
  --rm-red: #ff6872;
  --rm-yellow: #ffbf55;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  min-height: 100%;
  background: var(--rm-bg);
}

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(47, 128, 255, 0.24), transparent 34rem),
    radial-gradient(circle at 88% 92%, rgba(39, 211, 154, 0.14), transparent 30rem),
    var(--rm-bg);
  color: var(--rm-text);
}

button,
input {
  font: inherit;
}

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

.rm-auth-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding:
    max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.rm-auth-card {
  width: min(100%, 530px);
  padding: clamp(24px, 6vw, 42px);
  overflow: hidden;
  border: 1px solid var(--rm-border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(13, 29, 52, 0.98), var(--rm-surface));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.rm-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: var(--rm-text);
  text-decoration: none;
}

.rm-auth-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--rm-blue), var(--rm-green));
  box-shadow: 0 10px 26px rgba(47, 128, 255, 0.25);
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.rm-auth-brand > span:last-child {
  display: grid;
  gap: 1px;
}

.rm-auth-brand strong {
  font-size: 1rem;
}

.rm-auth-brand small {
  color: var(--rm-muted);
  font-size: 0.72rem;
}

.rm-auth-credit {
  color: inherit;
  text-decoration: none;
}

.rm-auth-credit:hover {
  color: #dce8f8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rm-auth-header {
  margin-bottom: 15px;
}

.rm-auth-eyebrow {
  margin: 0 0 7px;
  color: #6ee7c2;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.rm-auth-header h1 {
  margin: 0;
  font-size: clamp(1.65rem, 6vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.rm-auth-header p:last-child {
  margin: 14px 0 0;
  color: var(--rm-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.rm-auth-form {
  display: grid;
  gap: 10px;
}

.rm-auth-gate {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(88, 152, 255, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(47, 128, 255, 0.12), transparent 62%),
    rgba(7, 17, 31, 0.62);
}

.rm-auth-gate__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.rm-auth-gate__fieldset legend {
  width: 100%;
  margin: 0 0 13px;
  color: #dbe7f6;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.rm-auth-form .rm-auth-gate__digits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rm-auth-form .rm-auth-gate__digit {
  min-width: 0;
  min-height: 64px;
  padding: 0;
  border-radius: 15px;
  font-size: clamp(1.45rem, 7vw, 1.8rem);
  font-weight: 850;
  line-height: 1;
  text-align: center;
}

.rm-auth-form > div:not(.rm-auth-password) {
  display: grid;
  gap: 10px;
}

.rm-auth-form label {
  margin-top: 7px;
  color: #dbe7f6;
  font-size: 0.9rem;
  font-weight: 750;
}

.rm-auth-form input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #354a68;
  border-radius: 13px;
  outline: none;
  background: #07111f;
  color: #f7faff;
  caret-color: #78aaff;
}

.rm-auth-form input:hover {
  border-color: #49617f;
}

.rm-auth-form input:focus-visible,
.rm-auth-password:focus-within {
  border-color: #5898ff;
  box-shadow: 0 0 0 4px rgba(47, 128, 255, 0.18);
}

.rm-auth-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #354a68;
  border-radius: 13px;
  background: #07111f;
}

.rm-auth-password input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
}

.rm-auth-password button {
  min-width: 70px;
  min-height: 44px;
  margin-right: 3px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8ebaff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.rm-auth-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 8px 0 2px !important;
  color: var(--rm-muted) !important;
  cursor: pointer;
}

.rm-auth-check input {
  flex: 0 0 19px;
  width: 19px;
  min-height: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--rm-blue);
}

.rm-auth-primary,
.rm-auth-secondary {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 12px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--rm-blue), #1a58c5);
  box-shadow: 0 10px 24px rgba(47, 128, 255, 0.2);
  color: #fff;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.rm-auth-secondary {
  border: 1px solid var(--rm-border);
  background: #172842;
  box-shadow: none;
}

.rm-auth-primary:disabled,
.rm-auth-secondary:disabled,
.rm-auth-link:disabled,
.rm-auth-inline-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.rm-auth-link {
  display: block;
  min-height: 44px;
  margin: 14px auto 0;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #8ebaff;
  font-weight: 750;
  cursor: pointer;
}

.rm-auth-link:hover {
  color: #b7d1ff;
}

.rm-auth-switch {
  margin: 18px 0 0;
  color: var(--rm-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: center;
}

.rm-auth-switch a {
  color: #a9c9ff;
  font-weight: 800;
  text-decoration: none;
}

.rm-auth-switch a:hover {
  color: #d2e2ff;
}

.rm-auth-status,
.rm-auth-summary,
.rm-auth-notice {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(255, 191, 85, 0.26);
  border-radius: 15px;
  background: rgba(255, 174, 54, 0.08);
  color: #eaf1fb;
  line-height: 1.48;
}

.rm-auth-status[data-kind="success"],
.rm-auth-notice--success {
  border-color: rgba(39, 211, 154, 0.3);
  background: rgba(39, 211, 154, 0.09);
}

.rm-auth-status[data-kind="error"] {
  border-color: rgba(255, 104, 114, 0.3);
  background: rgba(255, 104, 114, 0.09);
}

.rm-auth-status {
  margin: 12px 0;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.36;
}

.rm-auth-notice--error {
  border-color: rgba(255, 104, 114, 0.3);
  background: rgba(255, 104, 114, 0.09);
}

.rm-auth-notice--account {
  border-color: rgba(88, 152, 255, 0.32);
  background: rgba(47, 128, 255, 0.09);
}

.rm-auth-notice h2,
.rm-auth-reset h2 {
  margin: 0 0 7px;
  font-size: 1.05rem;
}

.rm-auth-notice p,
.rm-auth-reset p {
  margin: 0;
  color: var(--rm-muted);
  line-height: 1.5;
}

.rm-auth-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: var(--rm-border);
  background: var(--rm-surface-soft);
}

.rm-auth-summary span {
  color: var(--rm-muted);
  font-size: 0.82rem;
}

.rm-auth-summary strong {
  min-width: 0;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.rm-auth-summary--editable {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.rm-auth-summary--editable strong {
  text-align: right;
}

.rm-auth-inline-action {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(88, 152, 255, 0.3);
  border-radius: 10px;
  background: rgba(47, 128, 255, 0.08);
  color: #9dc3ff;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.rm-auth-account-actions {
  display: grid;
  justify-items: center;
  margin-top: 8px;
}

.rm-auth-account-actions .rm-auth-link {
  margin-top: 2px;
}

.rm-auth-help,
.rm-auth-security {
  margin: 0;
  color: var(--rm-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.rm-auth-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.rm-auth-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  text-align: center;
}

.rm-auth-security__icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1px solid rgba(50, 135, 255, 0.56);
  border-radius: 7px;
  color: #56a7ff;
}

.rm-auth-security__icon svg {
  width: 13px;
  height: 13px;
}

.rm-auth-dialog {
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  margin: 0;
  padding:
    max(20px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  border: 0;
  background: rgba(2, 8, 18, 0.72);
  color: var(--rm-text);
}

.rm-auth-dialog[open] {
  display: grid;
  place-items: center;
}

.rm-auth-dialog::backdrop {
  background: rgba(2, 8, 18, 0.72);
}

.rm-auth-dialog__surface {
  position: relative;
  width: min(100%, 440px);
  padding: clamp(24px, 6vw, 34px);
  border: 1px solid rgba(82, 133, 205, 0.46);
  border-radius: 23px;
  background: linear-gradient(180deg, rgba(15, 34, 61, 0.99), rgba(7, 19, 35, 0.99));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.56);
}

.rm-auth-dialog__surface h2 {
  margin: 0 42px 8px 0;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  letter-spacing: -0.035em;
}

.rm-auth-dialog__surface > p {
  margin: 0;
  color: var(--rm-muted);
  line-height: 1.5;
}

.rm-auth-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rm-border);
  border-radius: 12px;
  background: rgba(7, 17, 31, 0.74);
  color: #b9cdf0;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.rm-auth-dialog__close:hover {
  border-color: rgba(91, 151, 255, 0.66);
  color: #fff;
}

.rm-auth-dialog .rm-auth-form {
  margin-top: 20px;
}

.rm-auth-status--dialog {
  margin: 12px 0 0;
}

.rm-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 8px;
  color: #7e91ab;
  font-size: 0.75rem;
}

.rm-auth-divider::before,
.rm-auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--rm-border);
  content: "";
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(110, 231, 194, 0.75);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 420px) {
  .rm-auth-card {
    padding: 24px 20px;
    border-radius: 21px;
  }

  .rm-auth-gate {
    padding: 15px;
  }

  .rm-auth-form .rm-auth-gate__digits {
    gap: 8px;
  }

  .rm-auth-brand {
    margin-bottom: 25px;
  }

  .rm-auth-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .rm-auth-summary--editable {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .rm-auth-summary--editable span {
    grid-column: 1 / -1;
  }

  .rm-auth-summary--editable strong {
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rm-auth-card {
    animation: rm-auth-enter 260ms ease-out both;
  }

  @keyframes rm-auth-enter {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}

.rm-auth-header h1.rm-auth-login-title {font-size:clamp(calc(1.65rem - 2px),calc(6vw - 2px),calc(2.25rem - 2px))}
#rm-login-submit {font-size:calc(1rem - 2px)}
.rm-auth-login-links {display:flex;align-items:center;justify-content:center;gap:10px}
.rm-auth-login-links .rm-auth-link {display:inline-flex;align-items:center;margin:0;padding:10px 0;font:inherit;font-weight:800;color:#a9c9ff}
.rm-auth-login-links a {display:inline-flex;align-items:center;min-height:44px}
