/* ==========================================================================
   Pawsitive Salon — portal.css
   The signed-in client portal: a top bar + sidebar shell with dashboard,
   pet profiles, appointments, and payments. Builds on tokens.css.
   ========================================================================== */

body.portal { background: var(--paper); }

/* --- Top bar ------------------------------------------------------------- */
.portal-top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.portal-top__inner { max-width: var(--container); margin-inline: auto; padding: 0 var(--space-m); height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); }
.uchip { display: flex; align-items: center; gap: var(--space-2xs); min-width: 0; }
.uchip__name { font-weight: 700; font-size: var(--step--1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.uchip__signout { flex: none; background: none; border: 0; color: var(--ink-faint); font: inherit; font-size: var(--step--1); cursor: pointer; padding: 0.3rem 0.5rem; border-radius: var(--radius-s); }
@media (max-width: 460px) { .uchip__name { display: none; } }
.uchip__signout:hover { color: var(--tang-deep); background: var(--cream); }

/* --- Avatars ------------------------------------------------------------- */
.avatar { width: 36px; height: 36px; border-radius: var(--radius-pill); display: grid; place-items: center; font-weight: 800; font-size: 0.8rem; flex: none; }
.avatar--client { background: #cfe4df; color: #0e5c5b; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar--pet { background: var(--gold); color: var(--ink); }

/* --- Shell --------------------------------------------------------------- */
.portal-shell { max-width: var(--container); margin-inline: auto; padding: var(--space-l) var(--space-m) var(--space-2xl); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-l); align-items: start; }
@media (min-width: 900px) { .portal-shell { grid-template-columns: 220px minmax(0, 1fr); } }

/* --- Sidebar ------------------------------------------------------------- */
.portal-side { display: flex; flex-direction: column; gap: var(--space-2xs); min-width: 0; }
@media (min-width: 900px) { .portal-side { position: sticky; top: calc(var(--header-h) + var(--space-l)); } }
.pnav { display: flex; flex-wrap: wrap; gap: var(--space-3xs); padding-bottom: 2px; }
@media (min-width: 900px) { .pnav { flex-direction: column; overflow: visible; } }
.pnav__item { display: flex; align-items: center; gap: var(--space-2xs); padding: 0.6rem 0.8rem; border-radius: var(--radius-s); color: var(--ink-soft); font-weight: 700; font-size: var(--step--1); text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: background var(--dur) var(--ease); }
.pnav__item:hover { background: var(--cream); }
.pnav__item[aria-current="page"] { background: var(--gold-soft); color: var(--tang-deep); }
.pnav__icon { font-size: 1.05rem; line-height: 1; }
.pnav__soon { margin-left: auto; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em; background: var(--cream); color: var(--ink-faint); border-radius: var(--radius-pill); padding: 1px 6px; }
.portal-side .btn { margin-top: var(--space-2xs); }

/* --- Main + headings ----------------------------------------------------- */
.portal-main { min-width: 0; }
.phead { margin-bottom: var(--space-m); }
.phead h1 { font-size: var(--step-3); }
.phead p { color: var(--ink-soft); margin-top: var(--space-3xs); }

.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-m); box-shadow: var(--shadow-s); }
.pcard + .pcard, .pgrid + .pcard, .pcard + .pgrid { margin-top: var(--space-m); }
.pcard__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); margin-bottom: var(--space-s); }
.pcard__head h2, .pcard__head h3 { font-size: var(--step-1); }
.pcard__link { font-size: var(--step--1); font-weight: 700; color: var(--tang-deep); text-decoration: none; }
.pgrid { display: grid; gap: var(--space-m); }
@media (min-width: 720px) { .pgrid--2 { grid-template-columns: 1fr 1fr; } }

/* --- Appointment cards / rows -------------------------------------------- */
.appt { display: flex; align-items: center; gap: var(--space-s); }
.appt__icon { width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--gold-soft); color: var(--tang-deep); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.appt__body { flex: 1; min-width: 0; }
.appt__title { font-weight: 700; }
.appt__when { color: var(--ink-soft); font-size: var(--step--1); }
.appt__price { font-family: var(--font-display); color: var(--tang-deep); font-weight: 600; }
.appt__actions { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-s); }
.appt--feature { background: var(--gold-soft); border-color: transparent; }
.appt-list { display: grid; gap: var(--space-s); }
.appt-row { display: flex; align-items: center; gap: var(--space-s); padding: var(--space-s) 0; border-bottom: 1px solid var(--line); }
.appt-row:last-child { border-bottom: 0; }

.statetag { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; border-radius: var(--radius-pill); padding: 2px 9px; }
.statetag--upcoming { background: var(--tang-soft); color: var(--tang-deep); }
.statetag--completed { background: #d9efe4; color: #0e5c5b; }
.statetag--cancelled { background: var(--cream); color: var(--ink-faint); }

/* --- Pets ---------------------------------------------------------------- */
.pet-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-bottom: var(--space-m); }
.pet-tab { display: inline-flex; align-items: center; gap: var(--space-2xs); border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius-pill); padding: 0.4rem 0.9rem; font: inherit; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.pet-tab[aria-pressed="true"] { border-color: var(--tang); background: var(--tang-soft); color: var(--tang-deep); }
.pet-tab--add { color: var(--tang-deep); border-style: dashed; }
.pet-hero { display: flex; align-items: center; gap: var(--space-s); margin-bottom: var(--space-m); }
.pet-hero h2 { font-size: var(--step-2); }
.pet-hero p { color: var(--ink-soft); font-size: var(--step--1); }

.detail-list { display: grid; gap: 0; }
.detail-row { display: flex; justify-content: space-between; gap: var(--space-s); padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--ink-faint); font-size: var(--step--1); }
.detail-row b { text-align: right; }
.ok { color: #0e7c54; font-weight: 700; }

/* --- Payments ------------------------------------------------------------ */
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-s); padding: var(--space-s) 0; border-bottom: 1px solid var(--line); }
.pay-row:last-child { border-bottom: 0; }
.pay-row small { color: var(--ink-faint); }

/* --- Quick actions ------------------------------------------------------- */
.quick { display: grid; gap: var(--space-s); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.quick a { display: flex; align-items: center; gap: var(--space-2xs); padding: var(--space-s); border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-weight: 700; background: var(--surface); }
.quick a:hover { border-color: var(--gold); background: var(--cream); }

/* --- Empty / soon -------------------------------------------------------- */
.empty { color: var(--ink-faint); }
.soon-wrap { text-align: center; padding: var(--space-xl) var(--space-m); }
.soon-wrap .card__icon { margin-inline: auto; }

/* --- Toasts (stand-in for push notifications) ---------------------------- */
.toast-host { position: fixed; left: 50%; bottom: calc(var(--space-l) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: var(--space-2xs); width: min(420px, 94vw); pointer-events: none; }
.toast { display: flex; gap: var(--space-2xs); align-items: flex-start; background: var(--ink); color: #fff; border-radius: var(--radius); padding: var(--space-s) var(--space-m); box-shadow: var(--shadow-l); opacity: 0; transform: translateY(14px); transition: opacity .26s var(--ease), transform .26s var(--ease); }
.toast.is-in { opacity: 1; transform: none; }
.toast__icon { font-size: 1.2rem; line-height: 1.25; }
.toast__body { display: grid; gap: 1px; font-size: var(--step--1); }
.toast__body b { font-weight: 800; }
.toast__body span { color: rgba(255,255,255,.85); }
.toast--good { background: #0e7c54; }

/* --- Client live pipeline ------------------------------------------------- */
.live { margin-top: var(--space-m); padding-top: var(--space-m); border-top: 1px dashed var(--line); }
.pstepper { display: flex; justify-content: space-between; gap: 4px; margin-bottom: var(--space-m); }
.pstep { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.pstep::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.pstep:first-child::before { display: none; }
.pstep__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); z-index: 1; }
.pstep__lbl { font-size: 0.66rem; font-weight: 700; color: var(--ink-faint); text-align: center; }
.pstep--done .pstep__dot { background: var(--gold); border-color: var(--gold); }
.pstep--done::before { background: var(--gold); }
.pstep--active .pstep__dot { background: var(--tang); border-color: var(--tang); box-shadow: 0 0 0 4px var(--tang-soft); }
.pstep--active::before { background: var(--gold); }
.pstep--active .pstep__lbl { color: var(--tang-deep); }
.live__status { display: flex; align-items: center; gap: var(--space-2xs); margin-bottom: var(--space-s); }
.live__label { font-weight: 700; color: var(--ink-soft); font-size: var(--step--1); }
.live-note { color: var(--ink-soft); font-size: var(--step--1); margin: 0 0 var(--space-s); }
.btn--block { display: flex; width: 100%; justify-content: center; }
.live-btn[disabled] { opacity: .6; }

/* --- Mobile header trims (avoid horizontal overflow on small phones) ------ */
@media (max-width: 460px) {
  .portal-top__inner { padding: 0 var(--space-s); gap: var(--space-2xs); }
  .brand .tag { display: none; }
}

/* --- Community ----------------------------------------------------------- */
.feed { display: grid; gap: var(--space-m); }
.formrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); }
@media (max-width: 520px) { .formrow2 { grid-template-columns: 1fr; } }
.post { display: grid; grid-template-columns: 130px 1fr; gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
@media (max-width: 560px) { .post { grid-template-columns: 1fr; } }
.post__media { background: var(--gold-soft); display: grid; place-items: center; min-height: 130px; }
.post__media img { width: 100%; height: 100%; object-fit: cover; }
.post__glyph { font-size: 3.2rem; }
.post__body { padding: var(--space-m); min-width: 0; }
.post__head { display: flex; align-items: center; gap: .6rem; }
.post__who b { display: block; line-height: 1.1; }
.post__who small { color: var(--ink-faint); }
.post__stars { color: var(--gold-deep); letter-spacing: 1px; font-size: .85rem; }
.post__caption { margin: var(--space-s) 0; }
.likebtn { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-pill); padding: .3rem .75rem; cursor: pointer; font: inherit; color: var(--ink-soft); }
.likebtn.is-liked { color: #d23b6a; border-color: #f3c6d4; background: #fdecf1; }
.post__comments { margin-top: var(--space-s); display: grid; gap: .4rem; }
.pcomment { background: var(--cream); border-radius: var(--radius-s); padding: .4rem .65rem; font-size: .9rem; }
.pcomment__role { font-size: .62rem; text-transform: capitalize; background: var(--gold-soft); color: var(--gold-deep); padding: 1px 7px; border-radius: var(--radius-pill); margin-left: .3rem; }
.pcomment p { margin: .1rem 0 0; }
.post__addc { display: flex; gap: .4rem; margin-top: var(--space-s); }
.post__cin { flex: 1; min-width: 0; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-s); font: inherit; }
.starpick { display: flex; gap: .15rem; }
.starpick__s { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--gold-deep); padding: 0; line-height: 1; }
.toggle { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; cursor: pointer; }
.modrow { display: flex; gap: var(--space-s); align-items: center; padding: var(--space-s) 0; border-bottom: 1px solid var(--line); }
.modrow:last-child { border-bottom: 0; }
.modrow__media { width: 64px; height: 64px; border-radius: var(--radius-m); background: var(--gold-soft); display: grid; place-items: center; font-size: 1.8rem; overflow: hidden; flex-shrink: 0; }
.modrow__media img { width: 100%; height: 100%; object-fit: cover; }
.modrow__body { flex: 1; min-width: 0; }
.modrow__body p { margin: .2rem 0 0; }
.modrow__act { display: flex; flex-direction: column; gap: .3rem; flex-shrink: 0; }

/* --- Top toolbar (staff + client app shell) ------------------------------ */
.toolbar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(23,29,37,.04); }
.toolbar__inner { max-width: 1180px; margin-inline: auto; display: flex; align-items: center; gap: var(--space-m); padding: .55rem var(--space-l); flex-wrap: wrap; }
.toolbar__brand { flex-shrink: 0; }
.toolbar__badge { margin-left: .5rem; }
.toolbar__nav { display: flex; align-items: center; gap: .25rem; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.toolbar__nav::-webkit-scrollbar { height: 0; }
.tnav__item { display: inline-flex; align-items: center; gap: .45rem; padding: .46rem .8rem; line-height: 1; border-radius: var(--radius-pill); color: var(--ink-soft); font-weight: 600; white-space: nowrap; position: relative; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.tnav__item:hover { background: var(--cream); color: var(--ink); }
.tnav__item:focus-visible { outline: 2px solid var(--tang); outline-offset: 2px; }
.tnav__item[aria-current="page"] { background: var(--gold-soft); color: var(--gold-deep); font-weight: 700; }
.tnav__icon { display: inline-flex; flex: none; }
.tnav__icon .glyph { width: 18px; height: 18px; display: block; }
.pnav__soon { font-size: .58rem; background: var(--line); color: var(--ink-faint); border-radius: var(--radius-pill); padding: 1px 6px; margin-left: .25rem; }
.toolbar__actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; margin-left: auto; }
.toolbar-main { max-width: 1180px; margin-inline: auto; padding: var(--space-l); }

/* Account menu — replaces the always-visible sign-out chip. The avatar opens a
   small popover holding identity + sign out, so the bar reads calmer. */
.acct { position: relative; flex: none; }
.acct__btn { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 0; padding: .25rem .4rem .25rem .25rem; border-radius: var(--radius-pill); cursor: pointer; font: inherit; color: var(--ink); transition: background var(--dur) var(--ease); }
.acct__btn:hover { background: var(--cream); }
.acct__btn:focus-visible { outline: 2px solid var(--tang); outline-offset: 2px; }
.acct__name { font-weight: 700; font-size: var(--step--1); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__chev .glyph { width: 15px; height: 15px; display: block; color: var(--ink-faint); transition: transform var(--dur) var(--ease); }
.acct__btn[aria-expanded="true"] .acct__chev .glyph { transform: rotate(180deg); }
.acct__menu { position: absolute; right: 0; top: calc(100% + 8px); width: 216px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); padding: 6px; z-index: 60; }
.acct__menu[hidden] { display: none; }
.acct__hd { display: flex; align-items: center; gap: .55rem; padding: .55rem .55rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct__hd b { display: block; font-size: var(--step--1); line-height: 1.2; }
.acct__hd .role { color: var(--ink-faint); font-size: .76rem; text-transform: capitalize; }
.acct__item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem; border-radius: var(--radius-s); color: var(--ink-soft); font: inherit; font-weight: 600; font-size: var(--step--1); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.acct__item .glyph { width: 17px; height: 17px; flex: none; }
.acct__item:hover { background: var(--cream); color: var(--ink); }
.acct__item--danger { color: var(--tang-deep); }
.acct__item--danger:hover { background: #fbeae2; color: var(--tang-deep); }

/* Staff avatar — neutral silhouette per the brand convention (never initials). */
.avatar--staff { background: var(--gold-soft); color: var(--ink-faint); }
.avatar--staff .glyph { width: 64%; height: 64%; }

/* Staff bar runs a touch denser, with a hairline divider before the tools. */
.toolbar--staff .toolbar__nav { gap: .25rem; }
.toolbar--staff .tnav__item { padding: .46rem .72rem; }
.toolbar--staff .toolbar__actions { padding-left: .7rem; border-left: 1px solid var(--line); }

/* Notification bell */
.bell { position: relative; }
.bell__btn { position: relative; background: var(--cream); border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.bell__btn:hover { background: var(--gold-soft); }
.bell__badge { position: absolute; top: -3px; right: -3px; background: #ec6a2e; color: #fff; font-size: .62rem; font-weight: 800; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.bell__badge[hidden] { display: none; }
.bell__panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(344px, 92vw); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-l); z-index: 60; overflow: hidden; }
.bell__head { display: flex; align-items: center; justify-content: space-between; padding: .65rem var(--space-s); border-bottom: 1px solid var(--line); }
.bell__clear { background: none; border: 0; color: var(--gold-deep); font: inherit; font-weight: 700; cursor: pointer; font-size: .8rem; }
.bell__list { max-height: 60vh; overflow-y: auto; }
.notif { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem var(--space-s); border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--cream); }
.notif.is-unread { background: var(--gold-soft); }
.notif__ic { font-size: 1.1rem; line-height: 1.3; }
.notif__body { display: grid; gap: 1px; flex: 1; min-width: 0; }
.notif__body b { font-size: .86rem; }
.notif__body span { color: var(--ink-soft); font-size: .82rem; }
.notif__body small { color: var(--ink-faint); font-size: .72rem; }
.notif__dot { width: 8px; height: 8px; border-radius: 50%; background: #ec6a2e; margin-top: 6px; flex-shrink: 0; }
.bell__empty { padding: var(--space-m); text-align: center; color: var(--ink-faint); }

@media (max-width: 640px) {
  .bell__panel { position: fixed; top: 58px; right: 8px; left: auto; width: min(344px, calc(100vw - 16px)); }
}
@media (max-width: 860px) {
  .toolbar__nav { order: 3; flex-basis: 100%; gap: .4rem; padding-block: .25rem; }
  .toolbar--staff .toolbar__nav { gap: .4rem; }
  .toolbar--staff .tnav__item { padding: .44rem .7rem; }
  .toolbar__actions { order: 2; }
  .tnav__item { padding: .42rem .72rem; }
}
@media (max-width: 560px) {
  .toolbar__site, .acct__name, .toolbar__badge { display: none; }
  .toolbar--staff .toolbar__actions { border-left: 0; padding-left: 0; }
  .toolbar-main { padding: var(--space-m); }
  .toolbar__inner { padding: .5rem var(--space-m); }
}
@media (prefers-reduced-motion: reduce) {
  .tnav__item, .acct__btn, .acct__chev .glyph { transition: none; }
}

/* Toolbar "+ New" menu */
.tbmenu { position: relative; }
.tbmenu__panel { position: absolute; right: 0; top: calc(100% + 8px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-l); z-index: 60; min-width: 192px; padding: 4px; display: grid; gap: 2px; }
.tbmenu__panel[hidden] { display: none; }
.tbmenu__panel button { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-weight: 700; padding: .55rem .7rem; border-radius: var(--radius-s); cursor: pointer; color: var(--ink); }
.tbmenu__panel button:hover { background: var(--cream); }
@media (max-width: 640px) {
  .tbmenu__panel { position: fixed; top: 58px; right: 8px; left: auto; }
}

/* --- Messaging ----------------------------------------------------------- */
.msg-layout { display: grid; grid-template-columns: 300px 1fr; gap: var(--space-m); height: min(70vh, 640px); }
.msg-threads { border: 1px solid var(--line); border-radius: var(--radius-l); overflow-y: auto; background: var(--paper); }
.thread { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .7rem var(--space-s); cursor: pointer; font: inherit; }
.thread:hover { background: var(--cream); }
.thread.is-active { background: var(--gold-soft); }
.thread__main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.thread__top { display: flex; justify-content: space-between; gap: .4rem; align-items: baseline; }
.thread__top small { color: var(--ink-faint); font-size: .7rem; flex-shrink: 0; }
.thread__prev { color: var(--ink-soft); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread__unread { background: #ec6a2e; color: #fff; font-size: .66rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; flex-shrink: 0; }
.msg-convo { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--paper); overflow: hidden; }
.msg-convo__head { display: flex; align-items: center; gap: .6rem; padding: .6rem var(--space-s); border-bottom: 1px solid var(--line); font-family: var(--font-display); }
.msg-back { display: none; background: none; border: 0; font-size: 1.2rem; cursor: pointer; }
.chat { flex: 1; overflow-y: auto; padding: var(--space-m); display: flex; flex-direction: column; gap: .5rem; }
.msg-card { display: flex; flex-direction: column; height: min(68vh, 600px); padding: 0; overflow: hidden; }
.bubble { max-width: 78%; padding: .5rem .75rem; border-radius: var(--radius-m); display: grid; gap: 2px; }
.bubble__who { font-size: .66rem; font-weight: 800; color: var(--gold-deep); }
.bubble__body { line-height: 1.35; overflow-wrap: anywhere; }
.bubble__time { font-size: .62rem; color: var(--ink-faint); justify-self: end; }
.bubble--them { background: var(--cream); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble--me { background: var(--gold-soft); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble--me .bubble__time { color: var(--gold-deep); }
.msg-composer { display: flex; gap: .4rem; padding: var(--space-s); border-top: 1px solid var(--line); }
.msg-composer input { flex: 1; min-width: 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-pill); font: inherit; }
@media (max-width: 720px) {
  .msg-layout { grid-template-columns: 1fr; height: auto; }
  .msg-layout .msg-convo { display: none; }
  .msg-layout.show-convo .msg-threads { display: none; }
  .msg-layout.show-convo .msg-convo { display: flex; height: min(70vh, 560px); }
  .msg-back { display: inline; }
  .msg-threads { max-height: 70vh; }
}

/* Email-verification banner + locked feature cards (v1.1.0) */
.verify-bar { display:flex; align-items:center; gap:var(--space-s); flex-wrap:wrap;
  background:var(--gold-soft, #f7eddc); border-bottom:1px solid var(--line);
  padding:var(--space-s) var(--space-m); }
.verify-bar__msg { font-weight:700; color:var(--ink-soft); font-size:var(--step--1); }
.lockcard { text-align:center; }
.lockcard__icon { font-size:2rem; margin-bottom:var(--space-2xs); }
.is-locked { position:relative; opacity:.55; pointer-events:none; filter:grayscale(.3); }

/* Multi-pet visit card (v1.9.0) — one arrival control, per-pet progress rows. */
.vpets{ display:flex; flex-direction:column; gap:.5rem; }
.vpet{ display:flex; align-items:center; gap:.6rem; padding:.5rem .65rem; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.vpet__icon{ font-size:1.1rem; flex:0 0 auto; }
.vpet__main{ flex:1; min-width:0; }
.vpet__name{ font-weight:800; line-height:1.1; }
.vpet__svc{ color:var(--ink-soft); font-size:.8rem; }
.visit .live-note{ margin-top:.55rem; }
.visit .btn--block{ margin-top:.65rem; }

/* ===== Modern notification bell + itemized manager (v1.24.0) ===== */
.bell__btn { display: grid; place-items: center; color: var(--ink); }
.bell__btn svg { width: 21px; height: 21px; }
.notif__ic { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft);
  color: var(--gold-deep); display: grid; place-items: center; flex: 0 0 auto; }
.notif__ic svg { width: 17px; height: 17px; }

.nmgr { padding: 0 !important; overflow: hidden; }
.nmgr__bar { width: 100%; display: flex; align-items: center; gap: .6rem; background: none; border: 0;
  cursor: pointer; padding: 12px 14px; text-align: left; color: var(--ink); }
.nmgr__icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--gold-soft);
  color: var(--gold-deep); display: grid; place-items: center; }
.nmgr__icon svg { width: 19px; height: 19px; }
.nmgr__sum { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.25; }
.nmgr__sum b { font-weight: 800; font-size: .95rem; }
.nmgr__sum small { color: var(--ink-faint); font-size: .76rem; font-weight: 700; }
.nmgr__chev { color: var(--ink-faint); display: grid; place-items: center; transition: transform .2s ease; }
.nmgr__chev svg { width: 18px; height: 18px; display: block; }
.nmgr__chev.is-open { transform: rotate(180deg); }
.nmgr__body { padding: 2px 14px 12px; border-top: 1px solid var(--line); }
.nmgr__device { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  font-size: .85rem; font-weight: 700; color: var(--ink-soft); padding: 12px 0; }
.nmgr__on { display: inline-flex; align-items: center; gap: .45rem; }
.nmgr__acts { display: inline-flex; gap: .9rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-deep); font: inherit; font-weight: 800;
  font-size: .82rem; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.nmgr__note { font-size: .8rem; color: var(--ink-faint); padding: 10px 0; margin: 0; }
.nmgr__list { display: flex; flex-direction: column; }
.nrow { display: flex; align-items: center; gap: .8rem; padding: 11px 0; border-top: 1px solid var(--line); cursor: pointer; margin: 0; }
.nrow__txt { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.2; }
.nrow__txt b { font-weight: 700; font-size: .9rem; color: var(--ink); }
.nrow__txt small { color: var(--ink-faint); font-size: .76rem; }
.nswitch { position: relative; flex: 0 0 auto; width: 44px; height: 26px; }
.nswitch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.nswitch__t { position: absolute; inset: 0; border-radius: 999px; background: #d6d3cb; transition: background .18s ease; }
.nswitch__t::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s ease; }
.nswitch input:checked + .nswitch__t { background: var(--tang); }
.nswitch input:checked + .nswitch__t::after { transform: translateX(18px); }
.nswitch input:focus-visible + .nswitch__t { outline: 2px solid var(--tang); outline-offset: 2px; }

/* "Share the glow-up" — bold dashboard card teeing up a one-tap community repost */
.glow { display: grid; grid-template-columns: 176px 1fr; padding: 0; overflow: hidden; border: 1px solid var(--gold); }
.glow__media { background: var(--cream); }
.glow__media img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; display: block; }
.glow__body { padding: var(--space-l); }
.glow__body h2 { font-size: var(--step-2); margin: var(--space-2xs) 0; }
.glow__body p { color: var(--ink-soft); font-size: var(--step--1); margin-bottom: var(--space-s); }
.glow__body textarea { width: 100%; margin: var(--space-s) 0; }
.glow__acts { display: flex; gap: var(--space-s); flex-wrap: wrap; }
@media (max-width: 560px) { .glow { grid-template-columns: 1fr; } .glow__media img { min-height: 160px; max-height: 240px; } }

/* Photo thumbnail in a notification (e.g. the completion glow shot) */
.notif__ic--img { width: 40px; height: 40px; flex: none; padding: 0; }
.notif__ic--img img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; display: block; }

/* Disabled buttons (e.g. reschedule/cancel once a pet is checked in) */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.appt__locknote { margin: var(--space-s) 0 0; font-size: var(--step--1); color: var(--ink-faint); }

/* Notifications manager opened from the avatar chevron menu */
.nmodal { position: fixed; inset: 0; z-index: 210; background: rgba(23,29,37,.5); display: grid; place-items: start center; padding: clamp(12px, 6vh, 64px) var(--space-m); overflow-y: auto; }
.nmodal__card { background: var(--surface); border-radius: var(--radius-l); width: min(440px, 100%); box-shadow: var(--shadow-l); border: 1px solid var(--line); }
.nmodal__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-m) var(--space-l); border-bottom: 1px solid var(--line); }
.nmodal__head b { font-family: var(--font-display); font-size: var(--step-1); }
.nmodal__x { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.nmodal__body { padding: var(--space-m) var(--space-l) var(--space-l); }
/* Embedded manager (inside the modal): drop the card chrome, it's already framed */
.nmgr--embedded { border: 0; padding: 0; background: none; box-shadow: none; }
.nmgr--embedded .nmgr__body { display: block; }

/* Slim "notifications are off" reminder (dashboard / appointments / community) */
.notifoff { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; cursor: pointer;
  background: rgba(236,106,46,.12); color: var(--tang-deep); font: inherit; font-weight: 700; font-size: var(--step--1);
  padding: .4rem var(--space-l); border-bottom: 1px solid rgba(236,106,46,.35); text-align: left; }
.notifoff:hover { background: rgba(236,106,46,.18); }
.notifoff__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tang); flex: none; }
.notifoff b { text-decoration: underline; }

/* Groom photo + "share to community" on an appointment card */
.appt-photo { display: flex; gap: var(--space-m); align-items: center; margin-top: var(--space-s);
  padding: var(--space-s); background: var(--cream); border-radius: var(--radius-m); }
.appt-photo__img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-s); flex: none; }
.appt-photo__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.appt-photo__body b { font-size: var(--step-0); }
.appt-photo__body span { color: var(--ink-soft); font-size: var(--step--1); }
.appt-photo__body .btn { align-self: flex-start; margin-top: .3rem; }
.appt-photo__done { color: var(--ink-faint); font-weight: 700; font-size: var(--step--1); margin-top: .2rem; }
@media (max-width: 460px) {
  .appt-photo { flex-direction: column; align-items: stretch; }
  .appt-photo__img { width: 100%; height: 190px; }
}

/* Owner moderation: delete a post or a comment from the community feed */
.post__actions { display: flex; align-items: center; gap: .6rem; }
.post__del { margin-left: auto; background: none; border: 0; color: var(--tang-deep); font: inherit; font-weight: 700; font-size: var(--step--1); cursor: pointer; padding: .2rem .45rem; border-radius: var(--radius-s); }
.post__del:hover { background: #fbeae2; }
.pcomment__del { background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0 .15rem; vertical-align: middle; }
.pcomment__del:hover { color: var(--tang-deep); }

/* Community: header row + distinctive share button */
.phead--row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-m); flex-wrap: wrap; }
.phead--row > div { min-width: 0; }
.sharebtn { flex-shrink: 0; white-space: nowrap; border: 0; color: #3a2410; font-weight: 800;
  background: linear-gradient(135deg, var(--gold) 0%, var(--tang) 100%);
  box-shadow: 0 6px 18px rgba(231,171,106,.45); }
.sharebtn:hover { filter: brightness(1.04); }
@media (max-width: 560px) { .phead--row .sharebtn { width: 100%; justify-content: center; } }

/* Bottom sheet (share composer) */
.sheet { position: fixed; inset: 0; z-index: 80; }
.sheet[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(23,29,37,.45); opacity: 0; transition: opacity .24s ease; }
.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto;
  background: var(--surface); border-radius: 20px 20px 0 0; overflow-y: auto; max-height: 88vh;
  padding: var(--space-s) var(--space-m) calc(var(--space-l) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(23,29,37,.22);
  transform: translateY(100%); transition: transform .26s cubic-bezier(.22,1,.36,1); }
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__grab { display: block; width: 42px; height: 5px; border: 0; border-radius: 999px; background: var(--line); margin: .2rem auto .6rem; cursor: pointer; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-s); }
.sheet__head b { font-family: var(--font-display); font-size: var(--step-1); }
.sheet__x { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: .1rem .3rem; }
