

    /* begin: login gate with initial bluring background during stealth-mode-login */

    /* --- Login overlay gate --- */

    .login-overlay {
      position: fixed;
      inset: 0;
      z-index: 9998;
      display: flex;
      /*display: none; Alternatively, Hidden by default, shown when .login-blocked is added to body */
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
      background: rgba(5, 7, 17, 0.65);
      backdrop-filter: blur(18px);
    }

    /* Blur the underlying page when overlay is visible */
    body.login-blocked main,
    body.login-blocked header,
    body.login-blocked footer {
      filter: blur(6px);
      pointer-events: none;
      user-select: none;
      overflow: hidden; /* Prevent scrolling, so js can add/remove classes */
    }

    /* Only shows when JS adds the class */
    /* Alternatively, you can keep the overlay always in the DOM and just toggle its visibility with JS */
    /*
        body.login-blocked #loginOverlay {
        display: flex; 
        }
    */

    /* Panel */
    .login-panel {
      width: 100%;
      max-width: 380px;
      border-radius: 1.1rem;
      background: var(--bg-elevated);
      border: 1px solid var(--border-subtle);
      box-shadow: 0 22px 60px rgba(0, 0, 0, 0.75);
      padding: 1.4rem 1.5rem 1.35rem;
      color: var(--text-main);
      font-size: 0.9rem;
    }

    [data-theme="light"] .login-panel {
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
    }

    .login-logo {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      margin-bottom: 0.7rem;
    }

    .login-logo-mark {
      width: 30px;
      height: 30px;
      border-radius: 0.85rem;
      background: radial-gradient(circle at 0% 0%, var(--accent-strong), var(--accent));
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.82rem;
      font-weight: 650;
      color: #f9fafb;
    }

    .login-logo-text {
      font-weight: 600;
      font-size: 0.98rem;
      letter-spacing: 0.03em;
    }

    .login-title {
      margin: 0 0 0.25rem 0;
      font-size: 1.05rem;
      font-weight: 580;
    }

    .login-subtitle {
      margin: 0 0 0.9rem 0;
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    .login-form {
      display: flex;
      flex-direction: column;
      gap: 0.7rem;
    }

    .login-field {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      font-size: 0.8rem;
    }

    .login-field label {
      color: var(--text-muted);
    }

    .login-field input {
      border-radius: 0.6rem;
      border: 1px solid rgba(148, 163, 184, 0.5);
      background: rgba(15, 23, 42, 0.8);
      color: var(--text-main);
      padding: 0.5rem 0.65rem;
      font-size: 0.85rem;
      outline: none;
      transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out, background 0.16s ease-out;
    }

    [data-theme="light"] .login-field input {
      background: rgba(255, 255, 255, 0.97);
    }

    .login-field input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px rgba(30, 95, 255, 0.35);
    }

    .login-error {
      min-height: 1.1em;
      font-size: 0.78rem;
      color: #f97373;
    }

    .login-btn-primary {
      margin-top: 0.3rem;
      border-radius: 999px;
      border: none;
      background: linear-gradient(135deg, var(--accent), var(--accent-strong));
      color: #f9fafb;
      font-size: 0.86rem;
      padding: 0.55rem 1.3rem;
      cursor: pointer;
      font-weight: 540;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      box-shadow: 0 16px 38px rgba(0, 0, 0, 0.7);
      transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, opacity 0.12s ease-out;
    }

    .login-btn-primary:hover {
      transform: translateY(-1px);
      box-shadow: 0 20px 44px rgba(0, 0, 0, 0.8);
      opacity: 0.98;
    }

    .login-hint {
      margin: 0.55rem 0 0 0;
      font-size: 0.76rem;
      color: var(--text-muted);
    }

    .login-hint code {
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size: 0.74rem;
    }

    /* end: login gate with initial bluring background during stealth-mode-login */