.auth-wrap {
    max-width: 420px;
    margin: 4rem auto 6rem;
    padding: 0 1rem;
  }
  .auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
  }
  .auth-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.75rem;
  }
  .auth-logo img { width: 24px; height: 24px; object-fit: contain; }
  .auth-card h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 0.35rem;
  }
  .auth-card .auth-sub {
    color: var(--text-2);
    font-size: 0.875rem;
    margin: 0 0 1.75rem;
  }
  .auth-field { margin-bottom: 0.9rem; }
  .auth-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.3rem;
  }
  .auth-field input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
  }
  .auth-field input:focus { border-color: var(--accent); }
  .auth-submit {
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.15s, opacity 0.15s;
  }
  .auth-submit:hover { background: var(--accent-hover); }
  .auth-submit:disabled { opacity: 0.55; cursor: not-allowed; }
  .auth-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: #f87171;
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
  }
  .auth-error.show { display: block; }
  .auth-success {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.2);
    color: #4ade80;
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
  }
  .auth-success.show { display: block; }
  .auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text-3);
  }
  .auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
  }
  .auth-footer a:hover { text-decoration: underline; }
  .auth-back {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.15s;
  }
  .auth-back:hover { color: var(--text-2); }
  .auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0 0.25rem;
  }
  .auth-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
  }
  .auth-remember label {
    font-size: 0.82rem;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
  }
  /* Forgot password link row */
  .auth-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
  }
  .auth-field-row label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-2);
  }
  .forgot-link {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
  }
  .forgot-link:hover { text-decoration: underline; }
  /* Panel switching */
  .auth-panel { display: none; }
  .auth-panel.active { display: block; }
  .back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-3);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    margin-bottom: 1.25rem;
    transition: color 0.15s;
  }
  .back-to-login:hover { color: var(--text-2); }
