/* Travepro — mobile-first responsive stylesheet.
   Palette: trust blues + neutral greys, amber/red accents for alerts. */

:root {
  --navy: #0b3d66;
  --blue: #1567b3;
  --blue-600: #1069c0;
  --sky: #e8f1fb;
  --ink: #16202b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f6f9;
  --card: #ffffff;
  --amber: #f59e0b;
  --amber-bg: #fff7e6;
  --red: #dc2626;
  --red-bg: #fdecec;
  --green: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16,32,43,.08), 0 1px 2px rgba(16,32,43,.06);
  --maxw: 680px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* ---- Layout ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 1rem .8rem 5.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.stack > * + * { margin-top: .75rem; }
.stack-lg > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; }
.row > .grow { flex: 1 1 140px; }
.row-inline { align-items: center; }
.section-title { margin: 1.2rem .2rem .6rem; }
.page-head { margin-bottom: 1rem; }
.page-head.with-action { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }

/* ---- Topbar ---- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.topbar-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; }
.brand { display: flex; align-items: center; gap: .45rem; color: #fff; font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-mark { background: #fff; color: var(--navy); border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; }
.topsearch { flex: 1; display: none; }
.topsearch input { width: 100%; border: none; border-radius: 999px; padding: .5rem .9rem; background: rgba(255,255,255,.16); color: #fff; }
.topsearch input::placeholder { color: rgba(255,255,255,.75); }
.topnav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.navlink { color: #fff; padding: .4rem .55rem; border-radius: 8px; font-size: .9rem; }
.navlink:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.navlink.muted { color: rgba(255,255,255,.7); }
.notif-link { position: relative; }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: .7rem; font-style: normal; padding: .05rem .4rem; position: absolute; top: -2px; right: -4px; }
.avatar-link { display: inline-flex; }

/* ---- Avatars ---- */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sky); color: var(--navy); font-weight: 700; display: grid; place-items: center; flex: 0 0 auto; }
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; }
.avatar.avatar-lg { width: 76px; height: 76px; font-size: 1.8rem; border: 3px solid #fff; }
.topbar .avatar { background: #fff; }

/* ---- Bottom nav (mobile) ---- */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: .3rem 0 calc(.3rem + env(safe-area-inset-bottom)); }
.bottomnav a { color: var(--muted); font-size: .68rem; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .25rem .5rem; position: relative; }
.bottomnav a span { font-size: 1.2rem; }
.bottomnav a:hover { text-decoration: none; color: var(--blue); }
.bottomnav .badge { top: 0; right: 12px; }

/* ---- Buttons & forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; border-radius: 10px; padding: .55rem 1rem; font-size: .95rem; font-weight: 600; cursor: pointer; background: var(--line); color: var(--ink); }
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-lg { padding: .7rem 1.4rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.following { background: var(--green); color: #fff; }
.icon-btn { background: transparent; border: none; cursor: pointer; font-size: 1.1rem; padding: .3rem; border-radius: 8px; }
.icon-btn:hover { background: var(--bg); }

label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .1rem; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; font: inherit; background: #fff; margin-top: .2rem; }
input[type=checkbox], input[type=radio] { width: auto; margin-top: 0; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--sky); border-color: var(--blue); }
.form-error { background: var(--red-bg); color: var(--red); border: 1px solid #f3c2c2; border-radius: 10px; padding: .55rem .8rem; font-size: .9rem; margin-bottom: .6rem; }

/* ---- Auth ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem .8rem; }
.auth-card { width: 100%; max-width: 420px; margin: 0; }
.auth-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; font-weight: 700; color: var(--navy); justify-content: center; margin-bottom: 1rem; }
.auth-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; background: var(--bg); border-radius: 10px; padding: .25rem; }
.auth-tabs a { flex: 1; text-align: center; padding: .5rem; border-radius: 8px; color: var(--muted); font-weight: 600; }
.auth-tabs a.active { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.auth-tabs a:hover { text-decoration: none; }
.auth-alt { text-align: center; margin: 1rem 0 0; }
.role-picker { display: grid; grid-template-columns: 1fr; gap: .4rem; margin-top: .3rem; }
.role-opt { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-weight: 500; cursor: pointer; }
.role-opt input { margin: 0; }
.role-opt:has(input:checked) { border-color: var(--blue); background: var(--sky); }

/* ---- Landing ---- */
.landing { max-width: 900px; margin: 0 auto; }
.landing-hero { text-align: center; padding: 2rem 0 1rem; }
.landing-mark { font-size: 2.5rem; }
.landing-hero h1 { font-size: 2rem; margin: .5rem 0; }
.landing-hero h1 em { color: var(--blue); font-style: normal; }
.lead { color: var(--muted); max-width: 620px; margin: .5rem auto 1.3rem; font-size: 1.05rem; }
.landing-cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.landing-features { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 2rem 0; }
.feature { text-align: center; margin: 0; }
.feature-icon { font-size: 1.8rem; }
.feature h3 { margin: .4rem 0; }
.landing-roles h2 { text-align: center; }
.roles-grid { display: grid; gap: .8rem; margin-top: .8rem; }
.roles-grid > div { display: flex; flex-direction: column; padding: .8rem; background: var(--bg); border-radius: 10px; }
.roles-grid strong { color: var(--navy); }
.roles-grid span { color: var(--muted); font-size: .9rem; }

/* ---- Composer ---- */
.composer-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.composer-types { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; }
.ptype { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.ptype.active { background: var(--sky); border-color: var(--blue); color: var(--navy); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tagfields { background: var(--bg); border-radius: 10px; padding: .6rem; }

/* ---- Feed filters ---- */
.feed-filters { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem 0 .8rem; }
.chip { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .4rem .9rem; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---- Posts ---- */
.post { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; overflow: hidden; }
.post-head { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem .3rem; }
.post-byline { display: flex; flex-direction: column; line-height: 1.2; }
.post-author { font-weight: 700; color: var(--ink); }
.post-sub { font-size: .8rem; }
.post-content { padding: .3rem .9rem .5rem; white-space: pre-wrap; word-break: break-word; }
.post-tags { padding: 0 .9rem .5rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.hashtag { color: var(--blue); font-weight: 600; font-size: .85rem; }
.post-actions { display: flex; gap: .3rem; border-top: 1px solid var(--line); padding: .3rem .5rem; }
.pa { flex: 1; background: transparent; border: none; cursor: pointer; padding: .5rem; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.pa:hover { background: var(--bg); }
.pa.like.on { color: var(--red); }

/* Alert / promotional banners */
.alert-banner { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .82rem; padding: .45rem .9rem; color: #fff; }
.alert-ico { font-size: 1rem; }
.post-alert { border-left: 4px solid var(--amber); }
.alert-flight { background: var(--amber); }
.alert-airport { background: #b45309; }
.alert-airline { background: var(--blue); }
.alert-country { background: #7c3aed; }
.alert-banner.promo { background: #0f766e; }
.cred { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.cred-verified { background: #dcfce7; color: #166534; }
.cred-unverified { background: #f1f5f9; color: var(--muted); }

/* Comments */
.comments { border-top: 1px solid var(--line); padding: .6rem .9rem; background: #fafbfc; }
.comment { display: flex; gap: .5rem; margin-bottom: .6rem; }
.comment .cname { font-weight: 700; color: var(--ink); }
.comment-form { display: flex; gap: .5rem; }
.comment-form input { flex: 1; }
.verified-badge { background: #dbeafe; color: var(--blue-600); font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; }
.verified-badge.sm { padding: 0 .3rem; font-size: .7rem; }

/* ---- Trips ---- */
.trip { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.trip-route { font-size: 1.05rem; }
.trip-past { opacity: .6; }
.trip-actions { display: flex; align-items: center; gap: .6rem; }
.tag { background: var(--sky); color: var(--navy); border-radius: 6px; padding: .05rem .4rem; font-size: .8rem; font-weight: 700; }
.switch { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.trips-list .empty, .feed .empty { text-align: center; color: var(--muted); }

/* ---- Notifications ---- */
.notif-list { display: flex; flex-direction: column; gap: .5rem; }
.notif { display: flex; gap: .7rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem; color: var(--ink); }
.notif:hover { text-decoration: none; background: var(--bg); }
.notif.unread { border-left: 4px solid var(--blue); background: var(--sky); }
.notif-ico { font-size: 1.3rem; }
.notif-msg { font-weight: 500; }

/* ---- Profile ---- */
.profile-header { padding: 0; overflow: hidden; }
.cover { height: 130px; background: linear-gradient(120deg, var(--navy), var(--blue)); background-size: cover; background-position: center; }
.profile-body { padding: 0 1rem 1rem; margin-top: -38px; }
.profile-meta h1 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.profile-sub { display: flex; align-items: center; gap: .4rem; margin: .2rem 0; }
.role-tag { font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--sky); color: var(--navy); }
.role-agent { background: #ede9fe; color: #6d28d9; }
.role-agency { background: #d1fae5; color: #047857; }
.profile-stats { display: flex; gap: 1.2rem; margin: .5rem 0; }
.profile-bio { margin: .5rem 0 0; }
.profile-actions { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.profile-pro { border-top: 1px solid var(--line); margin-top: 1rem; padding: 1rem; }
.pro-facts { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; font-size: .9rem; }
.pub-trips { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pub-trips li { display: flex; align-items: center; gap: .5rem; }
.pub-trips .route { font-weight: 700; }

/* ---- Search ---- */
.search-box { display: flex; gap: .5rem; align-items: center; }
.search-input { flex: 1; }
.people { display: grid; gap: .5rem; }
.person { display: flex; align-items: center; gap: .6rem; color: var(--ink); padding: .4rem; border-radius: 10px; }
.person:hover { background: var(--bg); text-decoration: none; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Autocomplete ---- */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; margin-top: 2px; }
.ac-item { padding: .5rem .7rem; cursor: pointer; font-size: .9rem; }
.ac-item:hover, .ac-item.active { background: var(--sky); }

/* Visible keyboard focus for accessibility. */
:focus-visible { outline: 3px solid #4c9be8; outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .chip:focus-visible, .ptype:focus-visible { outline-offset: 1px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #4c9be8; }
.usermenu > summary:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 50%; }

.feed-loading { text-align: center; color: var(--muted); padding: .5rem; }

/* ---- Responsive: tablet / desktop ---- */
@media (min-width: 720px) {
  .topsearch { display: block; max-width: 340px; }
  .landing-features { grid-template-columns: repeat(2, 1fr); }
  .roles-grid { grid-template-columns: repeat(3, 1fr); }
  .role-picker { grid-template-columns: repeat(3, 1fr); }
  .bottomnav { display: none; }
  .container { padding-bottom: 2rem; }
}
@media (min-width: 1000px) {
  .landing-features { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================================
   Phase 2 — messaging, groups, leads, verification, admin
   ========================================================================= */

/* Topnav: primary links + an account dropdown to keep it uncluttered. */
.topnav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.topnav .primary { display: none; align-items: center; gap: .2rem; }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; cursor: pointer; display: inline-flex; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary .avatar { background: #fff; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(16,32,43,.16); min-width: 210px; padding: .4rem; z-index: 60; display: flex; flex-direction: column; }
.usermenu-panel a { color: var(--ink); padding: .55rem .7rem; border-radius: 8px; font-weight: 500; }
.usermenu-panel a:hover { background: var(--bg); text-decoration: none; }
.um-head { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; padding-bottom: .6rem !important; }
.um-upgrade { color: var(--blue) !important; font-weight: 700 !important; }
@media (min-width: 720px) {
  .topnav .primary { display: flex; }
  .um-mobile { display: none; }   /* these live in the primary bar on desktop */
}
.pa-report { flex: 0 0 auto; max-width: 46px; }
.ok-text { color: var(--green); }

/* ---- Messenger ---- */
.messenger { display: grid; grid-template-columns: 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 60vh; }
.convo-list { border-right: 1px solid var(--line); max-height: 70vh; overflow-y: auto; }
.convo { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: .7rem .8rem; cursor: pointer; }
.convo:hover { background: var(--bg); }
.convo-meta { display: flex; flex-direction: column; min-width: 0; }
.convo-name { font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.convo-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.convo .badge { position: static; }
.thread, .thread-empty { display: flex; flex-direction: column; min-height: 60vh; }
.thread-empty { align-items: center; justify-content: center; padding: 2rem; text-align: center; }
.thread-head { display: flex; align-items: center; gap: .5rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.thread-who { font-weight: 700; color: var(--ink); }
.thread-back { display: inline-flex; }
.thread-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .4rem; background: #fafbfc; max-height: 60vh; }
.msg { max-width: 78%; padding: .5rem .75rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg span { display: block; white-space: pre-wrap; word-break: break-word; }
.msg i { font-size: .7rem; font-style: normal; }
.msg.mine { align-self: flex-end; background: var(--sky); border-color: #cfe0f3; }
.thread-form { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--line); }
.thread-form input { flex: 1; }
.thread-hint { padding: 1.5rem; text-align: center; }
@media (min-width: 720px) {
  .messenger { grid-template-columns: 300px 1fr; }
  .convo-list { grid-row: 1; }
  .thread, .thread-empty { grid-column: 2; grid-row: 1; }
  .thread-back { display: none; }
}
@media (max-width: 719px) {
  .messenger { grid-template-columns: 1fr; }
  .thread, .thread-empty { grid-column: 1; }
  .messenger:not(.thread-active) .thread { display: none; }
  .messenger.thread-active .convo-list { display: none; }
}

/* ---- Groups ---- */
.groups-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.group-card h3 { margin: 0; }
.group-header { padding: 0; overflow: hidden; }
.group-body { padding: 0 1rem 1rem; }
.group-body h1 { margin-top: .6rem; }
@media (min-width: 720px) { .groups-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Leads ---- */
.leads-list { display: grid; gap: 1rem; }
.lead-head { display: flex; align-items: center; gap: .5rem; }
.lead p { margin: .4rem 0; }
.lead-actions { margin-top: .3rem; }
.lead-new { border-left: 4px solid var(--blue); }
.pill { background: var(--sky); color: var(--navy); font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.pill-new { background: #dbeafe; color: var(--blue-600); }
.pill-contacted { background: #fef3c7; color: #b45309; }
.pill-closed { background: #e2e8f0; color: var(--muted); }

/* ---- Quote card ---- */
.quote-card { border-left: 4px solid var(--blue); }

/* ---- Admin ---- */
.admin-nav { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.admin-nav a { padding: .45rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.admin-nav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.admin-nav a:hover { text-decoration: none; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat { display: flex; flex-direction: column; margin: 0; }
.stat-n { font-size: 1.8rem; font-weight: 800; color: var(--navy); }
.stat-l { font-weight: 600; }
.admin-cols { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.rank li { display: flex; justify-content: space-between; gap: .5rem; }
.queue-item { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.queue-item:last-child { border-bottom: none; }
.queue-actions { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; }
.queue-actions form { margin: 0; }
.report-content { margin-top: .3rem; font-style: italic; }
.table-wrap { overflow-x: auto; padding: .5rem; }
.atable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.atable th, .atable td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.atable select { width: auto; padding: .3rem .4rem; }
.inline-form { display: inline; margin: 0; }
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .admin-cols { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================================
   Phase 3 — visa posts, discover rail, plans, analytics
   ========================================================================= */
.navlink-upgrade { background: var(--amber); color: #3a2a00 !important; font-weight: 700; }
.navlink-upgrade:hover { background: #fbbf24; }
.featured-badge { background: #fef3c7; color: #b45309; font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; }
.alert-banner.boosted { background: linear-gradient(90deg, #d97706, #f59e0b); }
.pa-promote { flex: 0 0 auto; color: #b45309; }

/* ---- Discover rail ---- */
.discover { margin-bottom: 1rem; }
.disc-block { margin-bottom: 1rem; }
.disc-title { margin: 0 0 .5rem; font-size: .95rem; color: var(--navy); }
.disc-featured { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .3rem; }
.disc-agency { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 92px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .5rem; color: var(--ink); box-shadow: var(--shadow); }
.disc-agency:hover { text-decoration: none; border-color: var(--blue); }
.disc-aname { font-size: .78rem; font-weight: 600; line-height: 1.1; }

/* ---- Plans ---- */
.plans { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.plan-card { position: relative; display: flex; flex-direction: column; margin: 0; }
.plan-current { border-color: var(--green); }
.plan-popular { border-color: var(--blue); box-shadow: 0 0 0 2px var(--sky); }
.plan-flag { position: absolute; top: -10px; right: 14px; background: var(--blue); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; }
.plan-price { font-size: 2rem; font-weight: 800; color: var(--navy); margin: .3rem 0; }
.plan-price span { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan-perks { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .35rem; flex: 1; }
.plan-perks li { color: var(--ink); font-size: .9rem; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(3, 1fr); } }

/* ---- Analytics charts ---- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin-top: .5rem; }
.bars .bar { flex: 1; display: flex; align-items: flex-end; height: 100%; background: var(--bg); border-radius: 4px 4px 0 0; }
.bars .bar span { display: block; width: 100%; background: linear-gradient(var(--blue), var(--navy)); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .3s; }
.hbars { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.hbars li { display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: .5rem; font-size: .85rem; }
.hbar { background: var(--bg); border-radius: 999px; height: 12px; overflow: hidden; }
.hbar span { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.hbar-n { text-align: right; font-weight: 700; }

/* =========================================================================
   Phase 4 — avatars-as-photos, friends, rich messaging, auth extras
   ========================================================================= */
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar { overflow: hidden; }
.form-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; border-radius: 10px; padding: .55rem .8rem; font-size: .9rem; margin-bottom: .6rem; }

/* Profile photo settings row */
.photo-row { display: flex; gap: 1rem; align-items: center; }

/* Friends / people cards */
.person-card { display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; margin-bottom: .5rem; }
.person-main { display: flex; align-items: center; gap: .6rem; color: var(--ink); }
.person-main:hover { text-decoration: none; }
.person-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

/* New-message friend search */
.convo-new { padding: .6rem; border-bottom: 1px solid var(--line); }
.newchat { margin-top: .5rem; }
.newchat-input { width: 100%; }
.newchat-results { max-height: 220px; overflow-y: auto; margin-top: .4rem; }
.newchat-item { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; background: none; border: none; padding: .5rem; border-radius: 8px; cursor: pointer; font: inherit; }
.newchat-item:hover { background: var(--bg); }

/* Message attachments */
.msg { display: flex; flex-direction: column; gap: .3rem; }
.msg-img { max-width: 220px; max-height: 240px; border-radius: 10px; display: block; }
.msg-audio { width: 220px; max-width: 60vw; height: 40px; }
.msg-file { display: inline-block; background: rgba(0,0,0,.05); padding: .4rem .6rem; border-radius: 8px; color: var(--ink); font-weight: 600; }
.msg.mine .msg-file { background: rgba(255,255,255,.5); }

/* Thread composer with attach/record */
.thread-form { align-items: center; }
.thread-text { flex: 1; }
.attach-btn, .rec-btn { flex: 0 0 auto; font-size: 1.2rem; cursor: pointer; }
.rec-btn.recording { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.thread-attach { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .8rem; background: var(--sky); border-top: 1px solid var(--line); font-size: .85rem; }
