/* account.css — notifications bell + dropdown, account button, profile modal.
   Reuses the shared tokens (surface/ink/accent/line/shadow) so it matches the
   «Сота» look in light and dark. */

/* ---------- auth screen additions (code / recovery steps) ---------- */
.auth__notice{
  background:var(--accent-tint);color:var(--accent-ink);border:1px solid var(--accent-tint-2);
  border-radius:var(--radius-sm);padding:9px 12px;font-size:.9rem;
}
.auth__devcode{
  font-size:.85rem;color:var(--muted);
}
.auth__devcode b{font-family:"IBM Plex Mono",monospace;color:var(--ink);letter-spacing:.06em}
.auth__aux{margin:-4px 0 0}
.input--code{
  font-family:"IBM Plex Mono",monospace;letter-spacing:.4em;font-size:1.1rem;text-align:center;
}

/* ---------- topbar: account button ---------- */
.topbar__acct{
  width:34px;height:34px;border-radius:9px;border:1px solid var(--line-2);background:var(--surface);
  padding:0;overflow:hidden;cursor:pointer;flex:none;display:grid;place-items:center;transition:border-color .15s ease;
}
.topbar__acct:hover{border-color:var(--accent)}
.topbar__acctimg{width:100%;height:100%;object-fit:cover;display:block}
.topbar__acctav{
  font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1rem;
  color:var(--accent-ink);background:var(--accent-tint);width:100%;height:100%;display:grid;place-items:center;
}

/* ---------- notifications bell + dropdown ---------- */
.notifbell{position:relative;display:flex}
.notifbell__btn{position:relative}
.notifbell__badge{
  position:absolute;top:-3px;right:-3px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;
  background:var(--bad);color:#fff;font-size:.66rem;font-weight:700;line-height:16px;text-align:center;
  box-shadow:0 0 0 2px var(--bg);
}
.notifbell__backdrop{position:fixed;inset:0;z-index:150}
.notifpop{
  position:absolute;top:calc(100% + 8px);right:0;z-index:151;width:min(360px,92vw);
  background:var(--surface);border:1px solid var(--line-2);border-radius:var(--radius);box-shadow:var(--shadow-pop);
  display:flex;flex-direction:column;max-height:min(70vh,520px);overflow:hidden;
}
.notifpop__head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:12px 14px;border-bottom:1px solid var(--line);font-weight:600;font-size:.92rem;
}
.notifpop__list{overflow-y:auto;flex:1;padding:4px}
.notifpop__empty{color:var(--muted);font-size:.86rem;text-align:center;padding:26px 14px}
.notifpop__foot{padding:10px 14px;border-top:1px solid var(--line);text-align:center}
.notifitem{
  width:100%;display:flex;gap:10px;align-items:flex-start;text-align:left;
  background:none;border:none;cursor:pointer;padding:10px;border-radius:var(--radius-sm);transition:background .12s ease;
}
.notifitem:hover{background:var(--sink)}
.notifitem--unread{background:color-mix(in srgb,var(--accent-tint) 60%,transparent)}
.notifitem--unread:hover{background:var(--accent-tint)}
.notifitem__dot{width:8px;height:8px;border-radius:50%;background:var(--accent);margin-top:6px;flex:none}
.notifitem__dot--mention,.notifitem__dot--membership,.notifitem__dot--security,.notifitem__dot--integration_error{background:var(--bad)}
.notifitem__dot--member_joined,.notifitem__dot--assignment{background:var(--good)}
.notifitem__body{display:flex;flex-direction:column;gap:2px;min-width:0}
.notifitem__title{font-size:.88rem;font-weight:600;color:var(--ink);line-height:1.35}
.notifitem__text{font-size:.82rem;color:var(--ink-2);line-height:1.4;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.notifitem__time{font-size:.74rem;color:var(--muted);margin-top:1px}

/* ---------- profile modal ---------- */
.modal{position:fixed;inset:0;z-index:160;display:grid;place-items:center;padding:24px;background:rgba(20,18,15,.42);backdrop-filter:blur(2px)}
.profilecard{
  width:min(560px,96vw);max-height:min(88vh,760px);background:var(--surface);
  border:1px solid var(--line-2);border-radius:var(--radius);box-shadow:var(--shadow-pop);
  display:flex;flex-direction:column;overflow:hidden;
}
.profilecard__head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}
.profilecard__head h2{margin:0;font-size:1.15rem}
.profiletabs{display:flex;gap:4px;padding:10px 16px 0}
.profiletabs button{
  background:none;border:none;border-bottom:2px solid transparent;padding:8px 12px;cursor:pointer;
  color:var(--ink-2);font-size:.92rem;font-weight:500;
}
.profiletabs button.on{color:var(--ink);border-bottom-color:var(--accent)}
.profilecard__body{overflow-y:auto;padding:16px 20px 22px}
.profilesec{display:flex;flex-direction:column;gap:16px}
.profilemsg{margin:8px 20px 0;background:var(--good-tint);color:var(--good);border-radius:var(--radius-sm);padding:8px 12px;font-size:.86rem}
.profilecard .auth__error{margin:8px 20px 0}

.field-row{display:flex;gap:8px;align-items:center}
.field-row .input{flex:1;min-width:0}
.subcard{background:var(--sink);border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px;display:flex;flex-direction:column;gap:12px}
.hint{color:var(--muted);font-size:.84rem;line-height:1.5;margin:0}
.hidden-file{display:none}

.profile-avatar{display:flex;align-items:center;gap:16px}
.profile-avatar__img{width:64px;height:64px;border-radius:14px;object-fit:cover;border:1px solid var(--line-2)}
.profile-avatar__ph{
  width:64px;height:64px;border-radius:14px;display:grid;place-items:center;
  background:var(--accent-tint);color:var(--accent-ink);font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1.7rem;
}
.profile-avatar__ctl{display:flex;gap:8px;flex-wrap:wrap}

/* notification preference rows */
.notifgroup{display:flex;flex-direction:column;gap:8px}
.notifgroup__title{margin:8px 0 2px;font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.notifrow{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);
}
.notifrow__label{flex:1;min-width:160px;font-size:.9rem;color:var(--ink)}
.notifrow__toggle{display:flex;align-items:center;gap:6px;font-size:.82rem;color:var(--ink-2);cursor:pointer;white-space:nowrap}
.notifrow__toggle.is-forced{opacity:.7;cursor:default}
.notifrow__toggle input{width:16px;height:16px;accent-color:var(--accent)}
.notifrow__na{font-size:.76rem;color:var(--muted);font-style:italic}
.profilesec__foot{display:flex;justify-content:flex-end;padding-top:6px}

@media (max-width:560px){
  .notifrow__label{min-width:100%}
}
