/* Mainstep — design system
 *
 * Shared CSS variables, base reset, top-nav, and sidebar shell. Page-specific
 * styles (post cards, profile layout, etc.) live in their own files or inline
 * within page templates.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:         #1A2F5C;
  --navy-mid:     #2E4574;
  --text:         #1A2F5C;
  --text-body:    #4A5874;
  --text-muted:   #8A93A6;
  --text-faint:   #B5BAC7;
  --bg:           #FFFFFF;
  --bg-soft:      #FBFBFD;
  --border:       #ECECF2;
  --border-soft:  #F4F4F7;
  --yellow:       #F2B233;
  --yellow-hover: #E0A21F;
  --sky-soft:     #DCE8F5;
  --sky-pale:     #EEF2FA;
  --sage:         #4F8867;
  --sage-pale:    #E4EFE7;
  --burgundy:     #8E3838;
  --burgundy-pale:#F4E5E5;
  --elder-gold:   #B5871F;
  --elder-bg:     #FFF4D8;
  --elder-border: #E8C77A;
  --error:        #D93025;
  --error-bg:     #FDE8E6;
  --success:      #0D9E6C;
  --success-bg:   #E1F5EC;
  --warning:      #856404;
  --warning-bg:   #FFF3CD;
}

html, body {
  height: 100%;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ════════════ TOPNAV ════════════ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.022em;
  color: var(--yellow);
}
.nav-items {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-item {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-body);
  padding: 20px 0;
  position: relative;
}
.nav-item:hover { color: var(--navy); }
.nav-item.active { color: var(--navy); font-weight: 600; }
.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: -8px; right: -8px;
  height: 3px;
  background: var(--yellow);
  border-radius: 3px 3px 0 0;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.bell {
  width: 22px; height: 22px;
  color: var(--text-body);
  cursor: pointer;
}
.bell:hover { color: var(--navy); }

.user-menu { position: relative; }
.avatar-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
  border-radius: 999px;
  transition: background 0.15s;
}
.avatar-wrap:hover { background: var(--sky-pale); }
.avatar-circ {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}
.avatar-circ.sage { background: var(--sage); }
.avatar-circ.burgundy { background: var(--burgundy); }
.chev { width: 14px; height: 14px; color: var(--text-body); }
.user-menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(20, 39, 78, 0.12);
  min-width: 200px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 1px;
}
.user-menu.open .user-menu-pop { display: flex; }
.user-menu-pop a, .user-menu-pop button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-body);
  border-radius: 6px;
  font-weight: 500;
  text-align: left;
}
.user-menu-pop a:hover, .user-menu-pop button:hover {
  background: var(--sky-pale);
  color: var(--navy);
}
.user-menu-pop hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 4px 0;
}

/* ════════════ LAYOUT ════════════ */
.page {
  padding: 64px 0 0 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 64px;
  align-self: start;
  padding: 24px 20px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.main {
  min-width: 0;
  max-width: 1080px;
  padding: 32px 32px 96px 0;
}

/* ════════════ SIDEBAR ════════════ */
.biz-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px 12px;
  margin-bottom: 2px;
}
.biz-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.biz-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.biz-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--navy-mid);
  font-size: 12.5px;
  font-weight: 600;
}
.biz-link:hover { color: var(--navy); }

.side-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* group list */
.group-list { display: flex; flex-direction: column; gap: 1px; }
.group-item {
  display: flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-body);
  font-weight: 500;
  gap: 8px;
}
.group-item:hover { background: var(--sky-pale); color: var(--navy); }
.group-item.active {
  background: var(--sky-soft);
  color: var(--navy);
  font-weight: 600;
}
.group-item .name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-item .count {
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  min-width: 24px;
  text-align: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* discover list */
.discover-list { display: flex; flex-direction: column; gap: 1px; }
.discover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-body);
  font-weight: 500;
}
.discover-item:hover { background: var(--sky-pale); color: var(--navy); }
.discover-item svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex: 0 0 14px;
}

/* ════════════ BUTTONS ════════════ */
.btn-yellow {
  background: var(--yellow);
  color: var(--navy);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(20, 39, 78, 0.10);
  transition: background 0.15s, box-shadow 0.18s;
}
.btn-yellow:hover {
  background: var(--yellow-hover);
  box-shadow: 0 4px 12px rgba(242, 178, 51, 0.30);
}
.btn-yellow .plus { font-size: 16px; line-height: 1; margin-top: -1px; }

.btn-outline {
  background: var(--bg);
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
}
.btn-outline:hover { border-color: var(--text-muted); }

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
}
.icon-btn:hover { border-color: var(--text-muted); color: var(--navy); }
.icon-btn svg { width: 16px; height: 16px; }

/* ════════════ MESSAGES (Django) ════════════ */
.messages { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.msg {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}
.msg.info { background: var(--sky-pale); color: var(--navy); border: 1px solid var(--sky-soft); }
.msg.success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.msg.error, .msg.danger { background: var(--error-bg); color: var(--error); border: 1px solid var(--error); }
.msg.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }

/* ════════════ IMPERSONATION BANNER ════════════ */
.impersonation-banner {
  background: var(--warning-bg);
  color: var(--warning);
  padding: 8px 32px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--elder-border);
  position: fixed;
  top: 64px;
  left: 0; right: 0;
  z-index: 150;
}
.impersonation-banner a {
  background: var(--warning);
  color: #fff;
  padding: 3px 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
}
body.impersonating .page { padding-top: 104px; }
body.impersonating .sidebar { top: 104px; }

/* ════════════ FORMS ════════════ */
.form-field { margin-bottom: 16px; }
.form-field label,
.form-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="url"],
.form-field input[type="number"],
.form-field input[type="tel"],
.form-field input[type="file"],
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--navy-mid); }
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field .help, .form-field .helptext {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-field .errorlist {
  list-style: none;
  margin-top: 6px;
}
.form-field .errorlist li {
  color: var(--error);
  font-size: 12.5px;
}
.form-field .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
}
.form-field .checkbox-row input { width: auto; }

.page-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 28px 24px;
  max-width: 600px;
}
.page-card h1, .page-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.018em;
  margin-bottom: 8px;
}
.page-card .lead {
  color: var(--text-body);
  font-size: 14px;
  margin-bottom: 20px;
}
.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
}
.muted-link { color: var(--navy-mid); font-weight: 600; font-size: 13px; }
.muted-link:hover { color: var(--navy); }

/* ════════════ THREAD PAGE HEADER ════════════ */
.main-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.main-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.022em;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.12;
}
.title-chev { width: 18px; height: 18px; color: var(--text-muted); margin-top: 4px; }
.main-sub {
  font-size: 14px;
  color: var(--text-body);
  margin-top: 6px;
}
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ════════════ FILTER TABS ════════════ */
.tab-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.tab:hover { border-color: var(--text-muted); color: var(--navy); }
.tab.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  font-weight: 600;
}
.filters-btn {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.filters-btn:hover { border-color: var(--text-muted); color: var(--navy); }
.filters-btn svg { width: 14px; height: 14px; }

/* ════════════ POSTS / THREAD CARDS ════════════ */
.feed { display: flex; flex-direction: column; gap: 14px; }
.post {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px 16px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.post:hover {
  border-color: #DCD9E3;
  box-shadow: 0 4px 14px rgba(20, 39, 78, 0.05);
}
.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.av.navy     { background: var(--navy); }
.av.sage     { background: var(--sage); }
.av.burgundy { background: var(--burgundy); }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.author {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--navy);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
.author-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}
.post-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
}
.post-actions button {
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
}
.post-actions button:hover { background: var(--sky-pale); color: var(--navy); }
.post-actions svg { width: 16px; height: 16px; }

.post-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.post-title a { color: inherit; }
.post-title a:hover { color: var(--navy-mid); }
.post-body {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 14px;
}
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tag.vendors     { background: var(--sky-soft);      color: var(--navy); }
.tag.operations  { background: var(--sage-pale);     color: var(--sage); }
.tag.real-estate, .tag.real_estate { background: var(--burgundy-pale); color: var(--burgundy); }

.elder-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--elder-bg);
  color: var(--elder-gold);
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--elder-border);
  margin-left: 8px;
}

.post-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--text-body);
}
.stat {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stat svg { width: 15px; height: 15px; color: var(--text-muted); }
.stat-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 4px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
}
.stat-btn:hover { background: var(--sky-pale); color: var(--navy); }
.stat-btn svg { width: 15px; height: 15px; }
.last-comment {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.empty-state {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.empty-state strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 4px; }

/* ════════════ POST DETAIL ════════════ */
.post-detail {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.post-detail .post-title {
  font-size: 22px;
  margin-bottom: 14px;
}
.post-detail .post-body {
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 18px;
}
.post-context {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.post-context a { color: var(--navy-mid); font-weight: 600; }
.post-context a:hover { color: var(--navy); }

.reactions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.reaction-btn:hover { border-color: var(--text-muted); color: var(--navy); }
.reaction-btn.active.insightful { background: var(--sky-soft); color: var(--navy); border-color: var(--sky-soft); }
.reaction-btn.active.funny { background: var(--sage-pale); color: var(--sage); border-color: var(--sage-pale); }
.reaction-btn.active.downvote { background: var(--burgundy-pale); color: var(--burgundy); border-color: var(--burgundy-pale); }

.comments-section { margin-top: 8px; }
.comments-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}
.comment {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}
.comment:first-child { border-top: none; padding-top: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.comment-author { font-weight: 600; color: var(--navy); }
.comment-author.is-elder::after {
  content: "★ Elder";
  display: inline-block;
  margin-left: 6px;
  background: var(--elder-bg);
  color: var(--elder-gold);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--elder-border);
}
.comment-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
  white-space: pre-wrap;
}
.comment-replies {
  margin-top: 12px;
  padding-left: 18px;
  border-left: 2px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reply-form-toggle {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
  cursor: pointer;
}
.reply-form-toggle:hover { color: var(--navy); }

/* ════════════ PROFILE PAGE ════════════ */
.profile-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.profile-card .av {
  width: 64px;
  height: 64px;
  font-size: 20px;
}
.profile-card .profile-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}
.profile-card .profile-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-tile .label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-tile .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat-tile .delta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 24px 0 12px;
}

/* ════════════ MEMBER DIRECTORY ════════════ */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.member-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.member-card:hover { border-color: var(--text-muted); }
.member-card .name { font-weight: 700; color: var(--navy); font-size: 14px; }
.member-card .byline { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ════════════ GROUP LIST ════════════ */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.group-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.group-card:hover { border-color: var(--text-muted); }
.group-card .name {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.group-card .description {
  font-size: 13px;
  color: var(--text-body);
  margin-top: 6px;
  line-height: 1.45;
}
.group-card .stats {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ════════════ SEARCH RESULTS ════════════ */
.search-summary {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.search-section { margin-bottom: 24px; }

/* ════════════ REPORT BUTTON + MODAL ════════════ */
.report-btn {
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.report-btn:hover { color: var(--error); background: var(--error-bg); }

.report-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 39, 78, 0.40);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.report-overlay.active { display: flex; }
.report-modal {
  background: var(--bg);
  border-radius: 12px;
  width: 440px;
  max-width: 94vw;
  box-shadow: 0 12px 40px rgba(20, 39, 78, 0.20);
  overflow: hidden;
}
.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.report-modal-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.report-modal-close {
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1;
}
.report-modal-close:hover { color: var(--navy); }
.report-modal-body { padding: 18px 20px; }
.report-modal-body label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.report-modal-body select,
.report-modal-body textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.report-modal-body select:focus,
.report-modal-body textarea:focus { border-color: var(--navy-mid); }
.report-modal-body textarea {
  resize: vertical;
  min-height: 80px;
  margin-top: 12px;
}
.report-modal-msg {
  font-size: 13px;
  padding: 8px 0;
  text-align: center;
  min-height: 30px;
}
.report-modal-msg.success { color: var(--success); }
.report-modal-msg.error { color: var(--error); }
.report-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.report-modal-footer button {
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.report-cancel {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-body);
}
.report-cancel:hover { border-color: var(--text-muted); }
.report-submit {
  background: var(--error);
  color: #fff;
}
.report-submit:hover:not(:disabled) { background: #B82618; }
.report-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ════════════ RESPONSIVE ════════════ */
@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
    padding-left: 16px;
    padding-right: 16px;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding-left: 0;
  }
  .main {
    padding-right: 0;
    max-width: 100%;
  }
  .nav-items {
    position: static;
    transform: none;
    margin: 0 auto;
    gap: 24px;
  }
  .topnav { padding: 0 16px; }
}

@media (max-width: 640px) {
  .nav-items { gap: 16px; }
  .nav-item { font-size: 13px; }
  .brand { font-size: 18px; }
}
