Key Audit Findings
 * Repeated Component Overwrites: .post-card .post-user, .feed-user-info, and .feed-profile-link were declared three times in separate patch blocks.
 * Duplicate Profile Button Definitions: .nav-profile-btn was declared twice with conflicting border and background rules.
 * Scattered Media Queries: Multiple separate @media (max-width: 600px) blocks were defining overlapping rules.
 * Header Height Discrepancy: :root declared --header: 62px, while .site-header used an explicit 56px height.
Here is the cleaned, consolidated, and fully optimized css/style.css:
/* =========================================================
   RUMEHUNG — CLEAN CONSOLIDATED STYLESHEET
   Mobile-first • Responsive • Light/Dark Mode
========================================================= */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #0ea5e9;
  --accent-2: #0284c7;
  --accent-soft: #e0f2fe;
  --danger: #ef4444;
  --success: #16a34a;
  --header: 56px;
  --content: 1080px;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

img, video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* =========================================================
   STICKY 3-COLUMN GLOBAL HEADER
========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  height: var(--header);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
  width: 100%;
}

.header-col {
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-center {
  justify-content: center;
  text-align: center;
}

.header-right {
  justify-content: flex-end;
  gap: 6px;
}

/* Brand Logo / Text */
.header-brand {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0.6px;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-brand span {
  color: var(--accent);
}

/* Guest "login | signup" */
.guest-auth-links {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.auth-text-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-text-link:hover {
  color: var(--accent);
}

.auth-sep {
  color: var(--muted);
  font-size: 13px;
  user-select: none;
}

/* Header Avatar (Logged-in) */
.header-avatar-btn,
.nav-profile-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--text);
  background: var(--surface);
  box-sizing: border-box;
  padding: 1px;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.header-avatar-btn:hover,
.nav-profile-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.header-avatar-btn:active,
.nav-profile-btn:active {
  transform: scale(0.96);
}

.header-avatar-btn img,
.header-profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* Header Action Buttons (Search & Menu) */
.header-action-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.header-action-btn:hover {
  background: var(--surface-2);
  color: var(--accent-2);
}

/* =========================================================
   POST BAR COMPONENT
========================================================= */
.post-bar-wrapper {
  width: min(100%, var(--content, 650px));
  margin: 12px auto 16px;
  padding: 0 12px;
  box-sizing: border-box;
}

.post-bar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.post-bar-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-bar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
}

.post-bar-input-trigger {
  flex: 1;
  background: var(--surface-2);
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.post-bar-input-trigger:hover {
  background: var(--line);
  color: var(--text);
}

.post-bar-actions {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.post-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.post-action-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.guest-post-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guest-bar-text {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.guest-bar-actions {
  display: flex;
  gap: 8px;
}

.guest-btn {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.guest-btn.login {
  background: var(--surface-2);
  color: var(--text);
}

.guest-btn.signup {
  background: var(--text);
  color: #fff;
}

/* =========================================================
   SIDE DRAWER
========================================================= */
.menu-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.menu-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.menu-drawer {
  position: fixed;
  z-index: 2001;
  top: 0;
  left: 0;
  width: 310px;
  max-width: 88vw;
  height: 100dvh;
  background: var(--surface);
  transform: translateX(-105%);
  transition: transform 0.3s ease;
  box-shadow: 16px 0 45px rgba(15, 23, 42, 0.16);
}

.menu-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  height: var(--header);
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.drawer-title {
  font-weight: 800;
}

.drawer-close-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 27px;
}

.drawer-links {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
}

.drawer-item {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  color: #334155;
}

.drawer-item:hover {
  background: var(--surface-2);
  color: var(--accent-2);
}

.drawer-divider {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.logout-link {
  color: var(--danger) !important;
}

/* =========================================================
   COMMON BUTTONS
========================================================= */
button, .edit-btn, .profile-action, .publish-button, .save-button, .cancel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 750;
  font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

button, .edit-btn, .publish-button, .save-button, .profile-action.primary {
  background: var(--text);
  color: #fff;
}

button:hover, .edit-btn:hover, .publish-button:hover, .save-button:hover, .profile-action.primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.profile-action.secondary, .cancel-button {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}

.profile-action.secondary:hover, .cancel-button:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

/* =========================================================
   HOME / GUEST / WELCOME BOX
========================================================= */
.home-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 50px;
}

.welcome-box {
  max-width: 760px;
  margin: 25px auto 35px;
  padding: 42px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.welcome-box h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -1.5px;
  color: var(--text);
}

.welcome-box p {
  margin: 0;
  color: var(--muted);
}

.welcome-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-weight: 700;
  background: var(--surface);
}

.outline-btn:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

/* =========================================================
   FEED POST CARD (EDGE-TO-EDGE / SOCIAL MEDIA STYLE)
========================================================= */
.home-container .post-card,
.dashboard-grid .feed .post-card,
.feed .post-card,
.profile-post {
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.post-card .post-user,
.profile-post-header {
  position: relative !important;
  width: 100% !important;
  min-height: 58px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--line) !important;
}

.post-card .post-user-left,
.profile-post-user-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.post-card .feed-profile-link,
.profile-post-dp-link {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  display: block !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  text-decoration: none !important;
}

.post-card .feed-profile-pic,
.profile-post-dp {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  border: 2px solid var(--text) !important;
  padding: 1px !important;
  background: var(--surface) !important;
  box-sizing: border-box !important;
}

.post-card .feed-user-info,
.profile-post-user-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  flex: 0 1 auto !important;
  min-width: 0 !important;
  margin-left: 10px !important;
  padding: 0 !important;
  text-align: left !important;
}

.feed-name-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  line-height: 1.15 !important;
}

.post-card .post-name,
.profile-post-name {
  display: inline-block !important;
  font-size: 15px !important;
  line-height: 20px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.follow-dot {
  display: inline-block !important;
  font-size: 13px !important;
  color: var(--muted) !important;
}

.feed-follow-btn {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1877f2 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

.feed-follow-btn.following {
  color: var(--muted) !important;
}

.post-card .post-time,
.profile-post-time {
  display: block !important;
  margin-top: 2px !important;
  font-size: 11px !important;
  line-height: 15px !important;
  color: var(--muted) !important;
  font-weight: 400 !important;
  white-space: nowrap !important;
}

.profile-post-menu {
  flex: 0 0 auto !important;
  margin-left: 10px !important;
}

.profile-post-menu summary {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-size: 22px !important;
  list-style: none !important;
}

.profile-post-menu summary::-webkit-details-marker {
  display: none !important;
}

.post-card .post-content,
.profile-post-text {
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 12px !important;
  box-sizing: border-box !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: var(--text) !important;
  text-align: left !important;
}

.post-card .post-image,
.post-card img.post-image,
.profile-post-image {
  display: block !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: auto !important;
  margin-left: 50% !important;
  transform: translateX(-50%) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
}

.post-card .post-video,
.profile-post-video {
  display: block !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: auto !important;
  margin-left: 50% !important;
  transform: translateX(-50%) !important;
  border-radius: 0 !important;
}

.profile-post-media {
  width: calc(100% - 24px) !important;
  margin: 10px 12px !important;
}

/* Post Actions */
.post-card .actions,
.profile-post-actions {
  position: relative !important;
  width: 100% !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  padding: 5px 8px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-top: 1px solid var(--line) !important;
  background: transparent !important;
}

.post-card .actions .like-btn,
.post-card .actions .comment-btn,
.post-card .actions .share-btn,
.profile-action-link {
  flex: 1 1 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 38px !important;
  padding: 5px 8px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.post-card .actions .like-btn:hover,
.post-card .actions .comment-btn:hover,
.post-card .actions .share-btn:hover,
.profile-action-link:hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
}

.post-card + .post-card,
.profile-post + .profile-post {
  margin-top: 12px !important;
  border-top: 8px solid var(--bg) !important;
}

/* =========================================================
   DASHBOARD & PROFILE
========================================================= */
.dashboard-welcome {
  width: min(calc(100% - 32px), var(--content));
  margin: 24px auto 20px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.dashboard-welcome h1 {
  margin: 0 0 5px;
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.6px;
}

.dashboard-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dashboard-grid {
  width: min(calc(100% - 32px), var(--content));
  margin: 0 auto 45px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.side-card {
  position: sticky;
  top: 82px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.side-card h3 {
  margin: 7px 10px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.side-card > a {
  display: block;
  padding: 11px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  color: #334155;
}

.side-card > a:hover {
  background: var(--surface-2);
  color: var(--accent-2);
}

.section-title {
  margin: 0;
  padding: 8px 0 13px;
  font-size: 19px;
  letter-spacing: -0.4px;
}

.empty-box {
  padding: 35px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.empty-box h3 {
  margin: 0 0 6px;
}

.empty-box p {
  margin: 0;
  color: var(--muted);
}

.professional-profile {
  width: min(100%, var(--content));
  margin: 20px auto 50px;
  padding: 0 16px;
}

.profile-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.profile-cover {
  height: 190px;
  position: relative;
  background: linear-gradient(120deg, #0f172a, #075985, #0ea5e9);
}

.profile-main {
  position: relative;
  padding: 0 24px 25px;
}

.profile-avatar-wrap {
  position: relative;
  width: 116px;
  height: 116px;
  margin-top: -58px;
}

.professional-profile-img {
  width: 116px;
  height: 116px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--surface);
  background: #e2e8f0;
}

.profile-online-dot {
  position: absolute;
  right: 6px;
  bottom: 9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  border: 3px solid var(--surface);
}

.profile-actions-top {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: -48px;
  min-height: 48px;
  flex-wrap: wrap;
}

.profile-identity {
  margin-top: 20px;
}

.profile-identity h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.7px;
}

.profile-handle {
  margin: 2px 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-bio {
  max-width: 700px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 14px;
}

.profile-stats {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.profile-stat {
  min-width: 105px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  text-align: center;
}

.profile-stat strong {
  display: block;
  font-size: 18px;
}

.profile-stat span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.profile-tabs {
  display: flex;
  gap: 24px;
  margin-top: 15px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
}

.profile-tabs a {
  padding: 13px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  border-bottom: 2px solid transparent;
}

.profile-tabs a.active, .profile-tabs a:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* =========================================================
   FORMS / AUTH / POST DETAIL
========================================================= */
.auth-page {
  min-height: calc(100vh - var(--header));
  display: grid;
  place-items: center;
  padding: 35px 16px;
}

.auth-box, .post-box, .create-box, .edit-profile-box, .settings-card {
  width: min(100%, 500px);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.auth-box {
  text-align: center;
}

.auth-icon {
  font-size: 38px;
  margin-bottom: 7px;
}

.auth-box h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.6px;
}

.auth-subtitle {
  margin: 7px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.auth-box form, .post-box form, .create-box form, .edit-profile-form {
  display: grid;
  gap: 12px;
}

.auth-box input, .post-box input, .post-box textarea, .create-box input,
.create-box textarea, .edit-profile-form input, .edit-profile-form textarea,
.settings-card input, textarea, select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.auth-box input:focus, .post-box input:focus, .post-box textarea:focus,
.create-box input:focus, .create-box textarea:focus, .edit-profile-form input:focus,
.edit-profile-form textarea:focus, .settings-card input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.password-box {
  position: relative;
}

.password-box input {
  padding-right: 48px;
}

.password-box span {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.auth-footer {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-footer a {
  font-weight: 750;
  color: var(--accent-2);
}

.post-detail-container {
  width: min(calc(100% - 32px), 760px);
  margin: 25px auto 50px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.post-detail-dp {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-list-dp {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.comments-list {
  padding: 0 18px;
}

.comment-bubble {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* =========================================================
   NOTIFICATIONS / MESSAGES / CHAT
========================================================= */
.notification-page, .chat-page {
  width: min(calc(100% - 32px), 900px);
  margin: 25px auto;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.notification-content {
  font-size: 13px;
}

.chat-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}

.chat-header {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.chat-box {
  min-height: 360px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.my-message, .other-message {
  max-width: 75%;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 13px;
}

.my-message {
  align-self: flex-end;
  background: #e0f2fe;
  color: #075985;
}

.other-message {
  align-self: flex-start;
  background: var(--surface-2);
  color: #334155;
}

.message-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.message-form input {
  flex: 1;
}

/* =========================================================
   SETTINGS & THEME TOGGLE
========================================================= */
.theme-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.switch {
  position: relative;
  width: 48px;
  height: 27px;
  display: inline-block;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.2s;
}

.slider:before {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider:before {
  transform: translateX(21px);
}

/* =========================================================
   FOOTER
========================================================= */
.site-footer {
  margin-top: 50px;
  padding: 35px 18px 18px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-content {
  width: min(100%, var(--content));
  margin: auto;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 19px;
}

.footer-brand p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  font-size: 12px;
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  width: min(100%, var(--content));
  margin: 25px auto 0;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 11px;
}

/* =========================================================
   DARK MODE OVERRIDES
========================================================= */
body.dark-mode {
  --bg: #080c13;
  --surface: #101722;
  --surface-2: #151e2b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #243244;
  --line-strong: #334155;
  --accent: #22d3ee;
  --accent-2: #38bdf8;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.22);
}

body.dark-mode .site-header {
  background: rgba(16, 23, 34, 0.96);
  border-color: var(--line);
}

body.dark-mode .header-brand,
body.dark-mode .auth-text-link,
body.dark-mode .header-action-btn,
body.dark-mode .post-name,
body.dark-mode .profile-post-name,
body.dark-mode .post-content,
body.dark-mode .profile-post-text {
  color: #f8fafc !important;
}

body.dark-mode .header-avatar-btn,
body.dark-mode .feed-profile-pic,
body.dark-mode .profile-post-dp {
  border-color: #f8fafc !important;
}

body.dark-mode .header-action-btn:hover {
  background: #1e293b;
  color: var(--accent);
}

body.dark-mode .post-card .post-user,
body.dark-mode .profile-post-header,
body.dark-mode .post-card .actions,
body.dark-mode .profile-post-actions {
  border-color: #243244 !important;
}

body.dark-mode .post-card + .post-card,
body.dark-mode .profile-post + .profile-post {
  border-top-color: #111827 !important;
}

body.dark-mode .post-card .actions .like-btn,
body.dark-mode .post-card .actions .comment-btn,
body.dark-mode .post-card .actions .share-btn,
body.dark-mode .profile-action-link {
  color: #d1d5db !important;
}

body.dark-mode .post-card .actions .like-btn:hover,
body.dark-mode .post-card .actions .comment-btn:hover,
body.dark-mode .post-card .actions .share-btn:hover,
body.dark-mode .profile-action-link:hover {
  background: #1f2937 !important;
}

/* =========================================================
   RESPONSIVE MEDIA QUERIES
========================================================= */
@media (max-width: 850px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .side-card {
    position: static;
    display: flex;
    gap: 4px;
    overflow: auto;
    padding: 6px;
  }
  .side-card h3 {
    display: none;
  }
  .side-card > a {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  :root {
    --header: 52px;
  }

  .site-header {
    padding: 0 12px;
    height: var(--header);
  }

  .header-brand {
    font-size: 17px;
  }

  .auth-text-link {
    font-size: 13px;
  }

  .header-avatar-btn,
  .header-action-btn {
    width: 34px;
    height: 34px;
  }

  .post-card .post-user,
  .profile-post-header {
    min-height: 52px !important;
    padding: 8px 12px !important;
  }

  .post-card .feed-profile-link,
  .post-card .feed-profile-pic,
  .profile-post-dp-link,
  .profile-post-dp {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    flex-basis: 38px !important;
  }

  .post-card .feed-user-info,
  .profile-post-user-info {
    margin-left: 8px !important;
  }

  .post-card .post-name,
  .profile-post-name {
    font-size: 14px !important;
    line-height: 18px !important;
  }

  .post-card .post-time,
  .profile-post-time {
    font-size: 11px !important;
  }

  .post-card .post-content,
  .profile-post-text {
    padding: 12px !important;
    font-size: 14.5px !important;
  }

  .post-card .actions,
  .profile-post-actions {
    min-height: 44px !important;
    padding: 4px 6px !important;
  }

  .post-card .actions .like-btn,
  .post-card .actions .comment-btn,
  .post-card .actions .share-btn,
  .profile-action-link {
    font-size: 12px !important;
    gap: 4px !important;
    height: 36px !important;
  }

  .footer-content {
    display: block;
  }

  .footer-links {
    margin-top: 20px;
  }
}

@media (max-width: 400px) {
  .guest-auth-links {
    gap: 4px;
  }
  .auth-text-link {
    font-size: 12px;
  }
  .header-brand {
    font-size: 16px;
  }
}

