/* ==========================================================================
   SoulSpeak Circle — Account dashboard (protected)
   ========================================================================== */

.account-body { background: var(--cream); min-height: 100vh; }

/* account.html doesn't load main.js (which drives .reveal), so keep content visible */
.js .reveal { opacity: 1; transform: none; }

.acct-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(247, 242, 233, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.acct-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.acct-top-nav { display: flex; align-items: center; gap: 22px; }
.acct-top-nav a { font-size: .92rem; font-weight: 600; color: var(--ink-soft); transition: color .25s var(--ease); }
.acct-top-nav a:hover { color: var(--primary); }
.acct-actions { display: flex; align-items: center; gap: 12px; }

/* Notifications bell + dropdown */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--primary);
  display: grid;
  place-items: center;
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.notif-bell:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.notif-bell svg { width: 20px; height: 20px; }
.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary-deep);
  font-size: .72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px var(--cream);
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(340px, 78vw);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 950;
  animation: dropdown-in .3s var(--ease);
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.notif-head strong { font-size: .95rem; color: var(--ink); }
.notif-head button { font-size: .78rem; font-weight: 700; color: var(--primary); }
.notif-head button:hover { color: var(--accent-dark); }
.notif-list, .notif-dropdown ul { max-height: 340px; overflow-y: auto; }
.notif-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background .25s var(--ease);
}
.notif-item:hover { background: var(--cream); }
.notif-item:not(.read) { background: var(--accent-tint); }
.notif-item:not(.read):hover { background: var(--accent-tint); }
.notif-title { font-weight: 700; font-size: .9rem; color: var(--ink); }
.notif-body { font-size: .82rem; color: var(--muted); }
.notif-item small { font-size: .74rem; color: var(--muted); }
.notif-empty {
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  padding: 26px 18px;
}

.account-main { padding: 56px 0 90px; }

.acct-hero {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.acct-avatar-lg {
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary-deep);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 14px 34px rgba(150, 125, 47, .35);
  border: 4px solid var(--white);
}
.acct-hero .section-title { margin-bottom: 4px; }
.acct-hero .section-title em { color: var(--primary); }
.acct-email { color: var(--muted); font-size: .95rem; }
.acct-badge {
  margin-left: auto;
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.acct-badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, .22);
}

.acct-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 26px;
  align-items: start;
}
.acct-grid-second { margin-top: 26px; grid-template-columns: 1fr 1.4fr; }
.acct-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 30px 30px 26px;
}
.acct-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.acct-card h2 svg { width: 20px; height: 20px; color: var(--primary); }

.profile-rows { display: flex; flex-direction: column; }
.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .92rem;
}
.profile-row:last-child { border-bottom: 0; }
.profile-row span { color: var(--muted); }
.profile-row strong { color: var(--ink); text-align: right; word-break: break-word; }

.session-list { display: flex; flex-direction: column; gap: 12px; }
.session-group {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}
.session-group:first-child { margin-top: 0; }
.session-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.session-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.session-date {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  flex-shrink: 0;
  font-weight: 800;
  line-height: 1.15;
  font-size: .72rem;
  text-transform: uppercase;
}
.session-info { flex: 1; min-width: 0; }
.session-info strong { display: block; color: var(--ink); font-size: .95rem; }
.session-info small { color: var(--muted); font-size: .82rem; }
.session-del {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.session-del:hover { background: #FBEAE7; color: #A93226; border-color: rgba(192, 57, 43, .35); }
.session-del svg { width: 17px; height: 17px; }

.empty-state {
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
}
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--accent); }
.empty-state strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 4px; }
.empty-state p { font-size: .9rem; }

.acct-card .btn { width: 100%; margin-top: 20px; }
.acct-wide { grid-column: 1 / -1; }

/* Profile edit */
.profile-edit {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}
.profile-edit-actions { display: flex; gap: 10px; margin-top: 4px; }
#pe-open { margin-top: 16px; width: 100%; }
#pe-open:hover { background: var(--primary); color: #fff; }

/* Mood chart */
.mood-chart { margin: 18px 0 4px; }
.mood-chart svg { width: 100%; height: auto; display: block; }
.mood-chart .bar { fill: var(--primary); opacity: .75; transition: opacity .2s var(--ease); }
.mood-chart .bar.today { fill: var(--accent); opacity: 1; }
.mood-chart .grid-line { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 3 4; }

/* Wellness library */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.chip:hover { border-color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.resource-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.resource-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 18px 18px 16px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.resource-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.res-cat {
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--primary-tint);
  padding: 4px 10px;
  border-radius: 999px;
}
.resource-item h4 { font-size: 1rem; color: var(--ink); line-height: 1.35; }
.resource-item p { font-size: .84rem; color: var(--muted); flex: 1; }
.res-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.res-meta > span { font-size: .74rem; color: var(--muted); }
.res-meta a { font-size: .82rem; font-weight: 700; color: var(--primary); margin-left: auto; }
.res-meta a:hover { color: var(--accent-dark); }
.res-save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 6px 12px;
  border-radius: 999px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.res-save:hover { background: var(--primary); color: #fff; }
.res-save.saved { background: var(--primary); color: #fff; border-color: var(--primary); }
.res-save.saved:hover { background: var(--accent); border-color: var(--accent); }

/* Session status + cancel */
.session-status {
  display: inline-block;
  margin-top: 6px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 9px;
  border-radius: 999px;
}
.status-pending { background: var(--accent-tint); color: var(--accent-dark); }
.status-confirmed { background: var(--primary-tint); color: var(--primary-dark); }
.status-completed { background: var(--cream-deep); color: var(--muted); }
.status-cancelled { background: #FBEAE7; color: #A93226; }
.session-cancel {
  flex-shrink: 0;
  font-size: .78rem;
  font-weight: 700;
  color: #A93226;
  border: 1.5px solid rgba(192, 57, 43, .3);
  border-radius: 999px;
  padding: 7px 14px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.session-cancel:hover { background: #A93226; color: #fff; }

/* Widgets: mood + journal */
.widget-sub { font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.widget-subhead {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 12px;
}
.widget-feedback {
  font-size: .86rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-tint);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 14px;
  animation: pop-in .4s var(--ease);
}

.mood-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease-bounce);
}
.mood-btn:hover { border-color: var(--accent); transform: translateY(-3px) scale(1.04); }
.mood-btn small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.mood-emoji { font-size: 1.5rem; line-height: 1; }

.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .9rem;
}
.mini-list li small {
  margin-left: auto;
  color: var(--muted);
  font-size: .76rem;
  flex-shrink: 0;
}
.mini-text { color: var(--ink-soft); line-height: 1.5; }
.mini-text strong { color: var(--ink); }
.mini-muted { color: var(--muted); font-size: .86rem; justify-content: center; }

.journal-list li { align-items: flex-start; }
.journal-del {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  margin-left: auto;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.journal-del:hover { background: #FBEAE7; color: #A93226; border-color: rgba(192, 57, 43, .35); }
.journal-del svg { width: 15px; height: 15px; }
.acct-card textarea { resize: vertical; }

.acct-foot {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}
.acct-foot a { color: rgba(255, 255, 255, .55); }
.acct-foot a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 900px) {
  .acct-grid, .acct-grid-second { grid-template-columns: 1fr; }
  .acct-grid-second { margin-top: 26px; }
  .resource-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .acct-top-nav { display: none; }
  .acct-avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; }
  .mood-row { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .mood-btn { padding: 11px 4px; }
  .mood-emoji { font-size: 1.2rem; }
}

/* ---- Session actions + chat ---- */
.session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.session-msg {
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-tint);
  border: 1.5px solid rgba(48, 88, 88, .28);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.session-msg:hover { background: var(--primary-dark); color: #fff; }
.chat-badge {
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #A93226;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  line-height: 18px;
  display: inline-block;
  text-align: center;
}
.coun-appt .chat-badge { background: var(--accent); color: #fff; }

.chat-modal { position: fixed; inset: 0; z-index: 2000; }
.chat-backdrop {
  position: absolute; inset: 0;
  background: rgba(24, 32, 32, .55);
  backdrop-filter: blur(3px);
  animation: fade-in .25s var(--ease);
}
.chat-dialog {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(430px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(24, 32, 32, .3);
  overflow: hidden;
  animation: pop-in .3s var(--ease);
}
.chat-dialog h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--ink);
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line-soft);
  padding-right: 56px;
}
.chat-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.chat-close:hover { background: var(--primary-tint); color: var(--primary-dark); border-color: rgba(48, 88, 88, .4); }
.chat-close svg { width: 15px; height: 15px; }
.chat-dialog > .widget-feedback { margin: 14px 20px 0; }

.chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cream);
}
.chat-msg {
  max-width: 78%;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 13px;
}
.chat-msg.mine {
  align-self: flex-end;
  background: var(--primary-tint);
  border-color: rgba(48, 88, 88, .25);
  border-radius: 14px 14px 4px 14px;
}
.chat-sender {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.chat-body { font-size: .9rem; line-height: 1.5; color: var(--ink); overflow-wrap: break-word; }
.chat-msg small { font-size: .68rem; color: var(--muted); align-self: flex-end; }
.chat-thread .mini-muted { text-align: center; padding: 20px 10px; }

.chat-form {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  background: #fff;
}
.chat-form input {
  flex: 1;
  font: inherit;
  font-size: .9rem;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  transition: border-color .3s var(--ease);
}
.chat-form input:focus { border-color: var(--accent); }

/* ---- Daily inspiration & recommendations ---- */
.insp-quote {
  font-family: var(--font-head);
  font-size: 1.28rem;
  line-height: 1.55;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 6px 0 14px;
}
#inspAuthor {
  font-style: normal;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
}
.rec-item { align-items: flex-start; }
.rec-emoji {
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  background: var(--primary-tint);
  border-radius: 12px;
}
.rec-item .mini-text { line-height: 1.55; }
.rec-more { justify-content: flex-start; padding: 2px 4px; }
.rec-more a { color: var(--primary-dark); font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(48, 88, 88, .3); }