/* ============================================================
   INDIVIDUATION — accounts: sign-in modal, account chrome, journal bits
   Built on the "Carbon & Flame" tokens from style.css.
   ============================================================ */

/* ---- header account button ---- */
.icon-btn.is-member { border-color: var(--accent); color: var(--accent); }
.icon-btn.is-member:hover { background: var(--accent); color: var(--accent-ink); }

/* ---- account dropdown (header) ---- */
.acct-wrap { position: relative; display: inline-flex; }
.acct-menu {
  position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 120;
  min-width: 12.5rem; padding: 0.5rem;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  animation: acctIn 0.16s var(--ease-out);
}
@keyframes acctIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.acct-mail {
  margin: 0 0 0.4rem; padding: 0.35rem 0.55rem;
  color: var(--muted); font-size: 0.76rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-bottom: 1px solid var(--line);
}
.acct-action {
  display: flex; align-items: center; gap: 0.55rem; width: 100%;
  padding: 0.55rem; border: none; border-radius: 8px;
  background: transparent; color: var(--text-soft); cursor: pointer;
  font-family: var(--font-body); font-size: 0.9rem; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.acct-action:hover { background: var(--accent-soft); color: var(--accent); }

/* ---- auth modal ---- */
.auth-card { max-width: 26rem; }
.auth-card h3 { margin: 0.5rem 0 0.4rem; }
.auth-sub { color: var(--text-soft); font-size: 0.92rem; margin-bottom: 1.5rem; }

.auth-form { display: grid; gap: 0.9rem; }
.auth-label { display: grid; gap: 0.35rem; }
.auth-label > span {
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.auth-label input {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  font-family: var(--font-body); font-size: 0.98rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-label input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-label input:disabled { opacity: 0.6; }

.auth-submit { width: 100%; justify-content: center; margin-top: 0.3rem; }

.auth-forgot {
  justify-self: start; margin: -0.3rem 0 0; padding: 0;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--font-body); font-size: 0.82rem;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.15s;
}
.auth-forgot:hover { color: var(--accent); }

.auth-error {
  color: var(--accent); font-size: 0.86rem; margin: 0;
  border-left: 2px solid var(--accent); padding-left: 0.7rem;
}
.auth-notice { color: var(--text-soft); font-size: 0.86rem; margin: 0; }

.auth-switch {
  display: block; width: 100%; margin-top: 1.1rem; padding: 0.5rem;
  background: none; border: none; cursor: pointer;
  color: var(--text-soft); font-family: var(--font-body); font-size: 0.88rem;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.15s;
}
.auth-switch:hover { color: var(--accent); }

.auth-fineprint {
  margin: 0.9rem 0 0; text-align: center;
  color: var(--muted); font-size: 0.74rem; line-height: 1.5;
}

/* ---- sidebar: history rows now carry a delete action ---- */
.rr-hist-item { justify-content: space-between; min-width: 0; }
/* the title flexes and truncates; it never widens the panel */
.rr-hist-item > span { flex: 1 1 auto; min-width: 0; }
.rr-hist-del {
  flex-shrink: 0; width: 24px; height: 24px; display: grid; place-items: center;
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  border-radius: 6px; opacity: 0; transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.rr-hist-item:hover .rr-hist-del,
.rr-hist-item.active .rr-hist-del { opacity: 1; }
.rr-hist-del:hover { color: var(--accent); background: var(--accent-soft); }

/* ---- sidebar account footer ---- */
.rr-free.member { color: var(--accent); }
.rr-account-mail {
  margin: 0 0 0.6rem; color: var(--muted); font-size: 0.76rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rr-signin.active {
  cursor: pointer; border-style: solid; color: var(--text);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.rr-signin.active:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
