:root {
      --font-sans: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      --ink: #10233f;
      --muted: #4c5f78;
      --line: #d1dceb;
      --blue: #0075d5;
      --blue-hover: #0075d5;
      --panel: rgba(255,255,255,.94);
      --shadow: 0 22px 54px rgba(16, 35, 63, .1);
      --pill: 999px;
      --radius: 22px;
    }

    * { box-sizing: border-box; }
    body {
      min-height: 100vh;
      margin: 0;
      font-family: var(--font-sans);
      color: var(--ink);
      background:
        radial-gradient(circle, rgba(16, 35, 63, .13) 1px, transparent 1.5px),
        #f5f8fc;
      background-size: 22px 22px, auto;
    }
    a { color: inherit; text-decoration: none; }
    button, input { font: inherit; }

    .auth-shell {
      min-height: 100vh;
      display: grid;
      grid-template-rows: auto 1fr;
    }
    header {
      position: sticky;
      top: 0;
      left: 0;
      right: 0;
      width: 100%;
      z-index: 100;
      height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 40px;
      border-bottom: 1px solid rgba(185,201,222,.62);
      background: rgba(248,251,255,.86);
      backdrop-filter: blur(14px);
    }
    .brand-logo {
      width: 214px;
      height: auto;
      display: block;
    }
    .header-actions {
      display: flex;
      align-items: center;
      gap: 24px;
    }
    .back-link {
      color: var(--muted);
      font-weight: 700;
      font-size: 14px;
    }
    .back-link:hover { color: var(--ink); }
    .switch-live-btn {
      display: inline-flex;
      align-items: center;
      height: 38px;
      padding: 0 18px;
      border-radius: var(--pill);
      background: #008AFB;
      color: #fff;
      font-weight: 700;
      font-size: 14px;
    }
    .switch-live-btn:hover { background: #0075d5; }

    main {
      display: grid;
      place-items: center;
      padding: 64px 24px;
    }
    .auth-card {
      width: min(100%, 480px);
      padding: 34px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
      box-shadow: var(--shadow);
    }
    .eyebrow {
      display: block;
      margin-bottom: 12px;
      color: #10233f;
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .1em;
      text-transform: uppercase;
    }
    h1 {
      margin: 0;
      color: var(--ink);
      font-size: clamp(32px, 5vw, 42px);
      line-height: 1.04;
      letter-spacing: -.04em;
    }
    .lead {
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 17px;
      line-height: 1.55;
    }

    .auth-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin: 28px 0 22px;
      padding: 5px;
      border: 1px solid var(--line);
      border-radius: var(--pill);
      background: #eef3f8;
    }
    .auth-tab {
      min-height: 42px;
      border: 0;
      border-radius: var(--pill);
      background: transparent;
      color: var(--muted);
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .06em;
      text-transform: uppercase;
      cursor: pointer;
    }
    .auth-tab.active {
      background: #fff;
      color: var(--ink);
      box-shadow: 0 8px 20px rgba(16,35,63,.08);
    }

    .sso-block {
      display: grid;
      gap: 14px;
      margin: 0 0 18px;
    }
    .sso-btn {
      min-height: 52px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--pill);
      background: #fff;
      color: var(--ink);
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(16,35,63,.05);
      transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    }
    .sso-btn:hover {
      border-color: #b7c6d8;
      box-shadow: 0 12px 26px rgba(16,35,63,.08);
      transform: translateY(-1px);
    }
    .sso-icon {
      width: 20px;
      height: 20px;
      flex: 0 0 auto;
    }
    .divider {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 12px;
      align-items: center;
      margin-bottom: 18px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }
    .divider::before,
    .divider::after {
      content: "";
      height: 1px;
      background: var(--line);
    }

    .auth-form {
      display: grid;
      gap: 14px;
    }
    .field-group { display: grid; gap: 7px; }
    .field-label {
      color: var(--ink);
      font-size: 13px;
      font-weight: 700;
    }
    .input-wrap {
      display: grid;
      grid-template-columns: 24px 1fr auto;
      gap: 12px;
      align-items: center;
      min-height: 56px;
      padding: 0 14px;
      border: 1px solid transparent;
      border-radius: 18px;
      background: #f4f6fb;
    }
    .input-wrap:focus-within {
      border-color: var(--blue);
      box-shadow: 0 0 0 4px rgba(0,118,190,.11);
      background: #fff;
    }
    .field-icon {
      width: 22px;
      height: 22px;
      color: #20232a;
    }
    input {
      width: 100%;
      min-height: 54px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--ink);
      font-weight: 600;
      outline: none;
    }
    input::placeholder { color: #aeb3bf; }
    .password-toggle {
      width: 32px;
      height: 32px;
      display: grid;
      place-items: center;
      border: 0;
      background: transparent;
      color: #20232a;
      cursor: pointer;
    }
    .password-toggle svg { width: 22px; height: 22px; }
    .terms-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      color: var(--ink);
      font-size: 14px;
      line-height: 1.45;
    }
    .terms-row input {
      width: 20px;
      min-height: 20px;
      height: 20px;
      margin-top: 1px;
      accent-color: var(--blue);
    }
    .terms-row a,
    .mode-link,
    .forgot-link {
      color: var(--ink);
      text-decoration: underline;
      text-underline-offset: 3px;
    }
    .forgot-link {
      color: #6255ff;
      font-size: 14px;
      text-decoration: none;
    }
    .live-login-link {
      color: var(--blue);
      font-weight: 700;
      text-decoration: none;
      white-space: nowrap;
    }
    .btn {
      min-height: 46px;
      margin-top: 8px;
      border: 1px solid transparent;
      border-radius: var(--pill);
      background: var(--blue);
      color: #fff;
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 700;
      letter-spacing: .06em;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow: 0 10px 22px rgba(0,138,251,.24);
    }
    .btn:hover { background: var(--blue-hover); }
    .btn:disabled {
      background: #e1e3e9;
      color: #b8bdc8;
      box-shadow: none;
      cursor: not-allowed;
    }
    .mode-switch {
      margin: 18px 0 0;
      color: var(--ink);
      font-size: 15px;
      text-align: center;
    }
    .fine-print {
      margin: 16px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }
    .status {
      display: none;
      margin-top: 16px;
      padding: 12px 14px;
      border: 1px solid #b7d8c8;
      border-radius: 14px;
      background: #eef7f3;
      color: #0e7a58;
      font-weight: 700;
    }
    .status.show { display: block; }
    .status.error {
      border-color: #e7b7b7;
      background: #fdf0f0;
      color: #b42318;
    }
    .hidden { display: none; }

    .verify-note {
      margin: 0 0 18px;
      padding: 12px 14px;
      border: 1px solid #c9ddf4;
      border-radius: 14px;
      background: #eef5fc;
      color: #24527d;
      font-size: 14px;
      line-height: 1.5;
    }
    .verify-code-wrap {
      display: grid;
      grid-template-columns: 1fr;
      padding: 0 18px;
    }
    .verify-code-wrap input {
      width: 100%;
      min-width: 0;
      text-align: center;
      letter-spacing: 0.35em;
      font-size: 24px;
      font-family: var(--font-mono);
      padding-right: 0.35em;
    }
    .btn-secondary {
      background: #fff;
      color: var(--blue);
      border: 1px solid var(--blue);
      box-shadow: none;
    }
    .btn-secondary:hover { background: #eef5fc; }
    .btn-secondary:disabled {
      background: #f4f6f9;
      color: #9aa6b8;
      border-color: #d7dee9;
    }

    @media (max-width: 640px) {
      header { padding: 0 24px; }
      .brand-logo { width: 178px; }
      /* header { padding: 0 16px; }
      .brand-logo { width: clamp(110px, 35vw, 178px); }
      .header-actions { gap: 8px; }
      .header-actions a { font-size: 11px; } */
      .header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
      }
      .header-actions a { font-size: 11px; }
      .auth-card { padding: 26px; }
    }
