/* Auth modal + user chip */
.auth-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;
  background:rgba(16,18,27,.62);backdrop-filter:blur(6px);padding:20px;}
.auth-card{width:100%;max-width:420px;background:#fff;border-radius:18px;padding:30px 30px 26px;
  box-shadow:0 24px 70px rgba(10,12,20,.35);border:1px solid #ececf2;animation:authPop .18s ease;}
@keyframes authPop{from{transform:translateY(8px) scale(.985);opacity:0}to{transform:none;opacity:1}}
.auth-card{position:relative}
.auth-close{position:absolute;top:12px;right:14px;width:30px;height:30px;border:0;border-radius:8px;
  background:transparent;color:#9aa0ad;font-size:24px;line-height:1;cursor:pointer;display:flex;
  align-items:center;justify-content:center;transition:.15s;padding:0}
.auth-close:hover{background:#f3f4f7;color:#1a1a2e}
.auth-brand{text-align:center;margin-bottom:18px}
.auth-logo{font-size:20px;font-weight:700;color:#1a1a2e;letter-spacing:.2px}
.auth-logo strong{color:#FF4800}
.auth-tabs{display:flex;background:#f3f4f7;border-radius:11px;padding:4px;margin-bottom:22px}
.auth-tab{flex:1;border:0;background:transparent;padding:9px 0;border-radius:8px;font-size:14px;font-weight:600;
  color:#6b7280;cursor:pointer;transition:.15s}
.auth-tab.active{background:#fff;color:#1a1a2e;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.auth-h{font-size:21px;font-weight:700;color:#1a1a2e;margin:0 0 6px}
.auth-sub{font-size:13.5px;color:#6b7280;margin:0 0 18px;line-height:1.5}
.auth-sub strong{color:#1a1a2e}
.auth-label{display:block;font-size:12.5px;font-weight:600;color:#41454f;margin:12px 0 6px}
.auth-input{width:100%;box-sizing:border-box;padding:12px 14px;border:1.5px solid #e2e4ea;border-radius:10px;
  font-size:15px;color:#1a1a2e;outline:none;transition:.15s;font-family:inherit}
.auth-input:focus{border-color:#FF4800;box-shadow:0 0 0 3px rgba(255,72,0,.12)}
.auth-code{text-align:center;letter-spacing:14px;font-size:26px;font-weight:700;padding:14px 0}
.auth-btn{width:100%;margin-top:18px;padding:13px 0;border:0;border-radius:10px;background:#FF4800;color:#fff;
  font-size:15px;font-weight:700;cursor:pointer;transition:.15s}
.auth-btn:hover{background:#e83f00}
.auth-btn:disabled{opacity:.6;cursor:default}
.auth-link{display:block;width:100%;margin-top:12px;background:none;border:0;color:#FF4800;font-size:13px;
  font-weight:600;cursor:pointer}
.auth-link:hover{text-decoration:underline}
.auth-back{color:#9aa0ad;font-weight:500}
.auth-error{margin-top:16px;padding:11px 14px;border-radius:9px;background:#fef0ec;border:1px solid #f8c7b9;
  color:#c0392b;font-size:13px;line-height:1.45}
.auth-error.auth-ok{background:#edf9f0;border-color:#bfe6c8;color:#1d8a44}

/* User chip (bottom-right) */
/* Header slot the user menu mounts into (landing / workspace / chat navs). */
.nav-user-slot{display:flex;align-items:center}
.app-nav-inner .app-brand{margin-right:auto}
.auth-userchip{position:relative;z-index:9000;display:flex;align-items:center;gap:10px}

/* Subscription generation credits pill (left of the user menu button).
   Hidden entirely when the user has no active subscription. */
.auth-credits-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:30px;
  background:#fff0ea;border:1px solid #ffd2bf;color:#c43c00;font-size:12.5px;font-weight:700;
  font-family:inherit;white-space:nowrap;cursor:default}
.auth-credits-pill svg{width:13px;height:13px;flex-shrink:0}
.auth-credits-pill .auth-credits-label{font-weight:500;color:#9a5c3e}
.auth-credits-pill.low{background:#fff7e6;border-color:#f5d58a;color:#9a6b00}
.auth-credits-pill.low .auth-credits-label{color:#9a7b3e}
.auth-credits-pill.empty{background:#fdf0f0;border-color:#f2bcbc;color:#b91c1c}
.auth-credits-pill.empty .auth-credits-label{color:#a85e5e}
@media (max-width:600px){.auth-credits-pill .auth-credits-label{display:none}}
.auth-userchip.auth-userchip-float{position:fixed;top:14px;right:18px}
.auth-chip-btn{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e6e8ee;border-radius:30px;
  padding:6px 12px 6px 6px;cursor:pointer;box-shadow:0 2px 8px rgba(10,12,20,.08);font-family:inherit}
.auth-chip-av{width:26px;height:26px;border-radius:50%;background:#FF4800;color:#fff;display:flex;align-items:center;
  justify-content:center;font-weight:700;font-size:13px}
.auth-chip-name{font-size:13.5px;font-weight:600;color:#1a1a2e}
.auth-chip-menu{position:absolute;right:0;top:calc(100% + 8px);background:#fff;border:1px solid #e6e8ee;border-radius:12px;
  min-width:210px;box-shadow:0 12px 40px rgba(10,12,20,.18);overflow:hidden}
.auth-chip-head{padding:14px 16px;border-bottom:1px solid #f0f1f4;display:flex;flex-direction:column;gap:2px}
.auth-chip-head strong{font-size:14px;color:#1a1a2e}
.auth-chip-head span{font-size:12px;color:#8a909c}
.auth-chip-link{display:block;width:100%;padding:12px 16px;border:0;border-bottom:1px solid #f0f1f4;background:#fff;
  color:#1a1a2e;font-size:13.5px;font-weight:600;cursor:pointer;text-align:left;font-family:inherit;text-decoration:none}
.auth-chip-link:hover{background:#f7f8fa}
.auth-chip-logout{width:100%;padding:12px 16px;border:0;background:#fff;color:#c0392b;font-size:13.5px;font-weight:600;
  cursor:pointer;text-align:left;font-family:inherit}
.auth-chip-logout:hover{background:#fbf2f0}
/* Prevent iOS Safari auto-zoom on focus (font-size must be >=16px on mobile) */
@media (max-width:640px){.auth-input{font-size:16px}}
