/* =====================================================================
   Mindsight — accounts UI
   (header account control · auth modal)
   Loaded on every public page alongside styles.css.
   ===================================================================== */

/* ---------- header account control ---------------------------------- */
.acct-slot { position: relative; display: flex; align-items: center; }
.acct-login { white-space: nowrap; }
.acct-login svg { width: 17px; height: 17px; }
.acct-btn {
  width: 42px; height: 42px; border-radius: 50%; padding: 0;
  display: grid; place-items: center; background: transparent; border: none; cursor: pointer;
}
.acct-av {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #042b1f;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  background: linear-gradient(140deg, var(--mint), var(--mint-deep));
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mint-soft); transition: transform .15s;
}
.acct-btn:hover .acct-av { transform: translateY(-1px); }
.acct-av.lg { width: 50px; height: 50px; font-size: 18px; }

.acct-menu {
  position: absolute; top: calc(100% + 12px); right: 0; width: 268px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 8px; overflow: hidden;
  animation: acct-pop .16s ease;
}
@keyframes acct-pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.acct-id { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; }
.acct-id-txt { min-width: 0; }
.acct-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-tier { font-size: 12.5px; color: var(--t3); margin-top: 2px; }
.acct-links { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; border-top: 1px solid var(--line); }
.acct-link {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: 10px; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 14.5px; color: var(--t2); text-align: left; transition: background .12s, color .12s;
}
.acct-link svg { width: 18px; height: 18px; color: var(--t3); flex: none; }
.acct-link:hover { background: var(--paper-2); color: var(--t1); }
.acct-link:hover svg { color: var(--mint-deep); }
.acct-out { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--pink); }
.acct-out svg { color: var(--pink); }
.acct-out:hover { background: var(--pink-soft); color: var(--pink); }

/* drawer (mobile) account block */
.acct-drawer { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.drawer-acct-id { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--paper-2); }
.drawer-acct-id .da-name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--t1); }
.drawer-acct-id .da-tier { display: block; font-size: 12.5px; color: var(--t3); margin-top: 2px; }

/* ---------- auth modal ---------------------------------------------- */
.auth-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.auth-modal.open { display: flex; align-items: center; justify-content: center; }
.auth-modal [hidden] { display: none !important; }
.auth-scrim { position: absolute; inset: 0; background: rgba(11,14,38,.55); backdrop-filter: blur(4px); }
.auth-box {
  position: relative; z-index: 1;
  width: min(440px, calc(100vw - 36px)); max-height: calc(100vh - 40px); overflow: auto;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 34px 34px 28px; animation: auth-pop .22s ease both;
}
@keyframes auth-pop { from { transform: translateY(12px); } to { transform: none; } }
.auth-close { position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--paper-2); color: var(--t2); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.auth-close:hover { background: var(--ink); color: #fff; }
.auth-close svg { width: 18px; height: 18px; }
.auth-brand { margin-bottom: 18px; }
.auth-brand .brand-mark { width: 46px; height: 46px; }
.auth-head h2 { font-size: 26px; letter-spacing: -0.01em; }
.auth-head p { color: var(--t3); font-size: 15px; margin-top: 6px; }
.auth-note { display: flex; gap: 10px; align-items: flex-start; background: var(--pink-soft); color: var(--pink); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; font-weight: 500; margin: 18px 0 4px; }
.auth-note-ic svg { width: 18px; height: 18px; }
.auth-modal form { margin-top: 20px; }
.auth-error { background: #FEECEC; color: #D33; border-radius: 10px; padding: 10px 13px; font-size: 13.5px; margin-bottom: 14px; }
.auth-switch { margin-top: 18px; text-align: center; font-size: 14px; color: var(--t3); }
.auth-switch button { background: none; border: none; cursor: pointer; color: var(--mint-deep); font-family: var(--font-display); font-weight: 700; font-size: 14px; padding: 0 0 0 4px; }
.auth-switch button:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .auth-box { padding: 28px 22px 22px; }
}
