* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

/* NAVBAR */
.navbar {
  background: #0f172a;
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  color: white;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-left: 14px;
  font-size: 14px;
}

/* LAYOUT */
.container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}

h1, h2, h3 { margin-top: 0; }

/* FORM */
input, textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  margin-top: 6px;
  margin-bottom: 14px;
  font-size: 14px;
  background: white;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* BUTTONS */
button, .btn {
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
}

.btn-light {
  background: #e2e8f0;
  color: #111827;
}

/* TEXT */
.muted {
  color: #6b7280;
  font-size: 13px;
}

/* FLASH */
.flash {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}

.flash.success { background: #dcfce7; color: #166534; }
.flash.warning { background: #fef3c7; color: #92400e; }
.flash.danger { background: #fee2e2; color: #991b1b; }

/* GRID */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* COMMENTS */
.comment {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  margin-top: 8px;
}

/* PROFILE */
.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: #cbd5e1;
}

.profile-avatar-large {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #cbd5e1;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  background: #0f172a;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-link {
  color: #111827;
  text-decoration: none;
}

.profile-link:hover {
  text-decoration: underline;
}

/* POST HEADER */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* POST BODY */
.post-body {
  margin-left: 58px;
}

/* IMAGE */
.post-image-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.post-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

/* ACTIONS */
.post-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.post-actions .btn {
  margin-left: auto;
}

/* MENU (3 dots) */
.post-menu {
  position: relative;
  margin-left: auto;
}

.menu-btn {
  background: transparent;
  color: #475569;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  margin: 0;
  box-shadow: none;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.menu-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.menu-btn:active {
  transform: scale(0.96);
}

.menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 34px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  padding: 8px;
  min-width: 150px;
  z-index: 30;
  border: 1px solid #e5e7eb;
  transform: translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.menu-dropdown.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-dropdown a,
.menu-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #111827;
  border-radius: 8px;
  text-decoration: none;
}

.menu-dropdown a:hover,
.menu-dropdown button:hover {
  background: #f8fafc;
}

.menu-dropdown form {
  margin: 0;
}

.menu-dropdown .danger-action {
  color: #b91c1c;
}

/* HERO / PREVIEW */
.hero-card {
  text-align: center;
  padding: 32px 24px;
}

.hero-text {
  max-width: 650px;
  margin: 0 auto 20px;
  font-size: 16px;
  color: #475569;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-section {
  margin-bottom: 16px;
}

.preview-card {
  position: relative;
  overflow: hidden;
}

.preview-faded {
  opacity: 0.9;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.preview-overlay-content {
  text-align: center;
  max-width: 420px;
}

.preview-overlay-content p {
  margin-bottom: 14px;
  font-weight: 600;
  color: #0f172a;
}

.like-icon {
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
}

.like-icon:hover {
  color: #111827;
}

.like-icon.liked {
  color: #2563eb;
}

.like-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.like-form {
  margin: 0;
}

.like-icon {
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
}

.like-icon:hover {
  color: #111827;
}

.like-summary-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #374151;
}

.like-summary-link:hover {
  color: #111827;
}

.like-count {
  font-size: 14px;
  font-weight: 600;
}

.like-avatars {
  display: flex;
  align-items: center;
  margin-left: 2px;
}

.like-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  margin-left: -6px;
  background: #cbd5e1;
}

.like-avatar:first-child {
  margin-left: 0;
}

.like-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  background: #0f172a;
}

.like-user-card {
  padding-top: 14px;
  padding-bottom: 14px;

}
/* RESPONSIVE */
@media (max-width: 700px) {
  .row { grid-template-columns: 1fr; }
}

/* =========================
   MARINET PHASE 2A SIDEBAR
   Add this at bottom of style.css
   ========================= */

/* Hide old top navbar when using sidebar layout */
.navbar {
  display: none;
}

/* App shell */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: #f4f7fb;
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-height: 100vh;
  background: #071827;
  color: #ffffff;
  padding: 24px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #0ea5e9;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  flex-shrink: 0;
}

.sidebar-brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.sidebar-brand span {
  display: block;
  color: #9fb3c8;
  font-size: 13px;
  margin-top: 3px;
}

/* Sidebar links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav a {
  color: #dbeafe;
  text-decoration: none;
  padding: 13px 14px;
  border-radius: 12px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* User box at bottom */
.sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user strong {
  display: block;
  font-size: 14px;
  color: #ffffff;
}

.sidebar-user span {
  display: block;
  font-size: 12px;
  color: #b6c6d6;
  margin-top: 3px;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #cbd5e1;
}

.sidebar-avatar-placeholder {
  background: #0ea5e9;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Main content area */
.main-area {
  flex: 1;
  margin-left: 280px;
  min-height: 100vh;
}

/* Override old container size for wider app layout */
.main-area .container {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 28px;
}

/* Mobile top bar */
.mobile-topbar {
  display: none;
}

/* Make cards cleaner with sidebar layout */
.card {
  border: 1px solid #e5e7eb;
}

/* Small muted line used in feed */
.small-muted {
  margin-top: -6px;
}

/* Mobile layout */
@media (max-width: 800px) {
  .app-shell {
    display: block;
  }

/* =========================
   FIX: HIDE MOBILE TOPBAR ON DESKTOP
   ========================= */

.mobile-topbar {
  display: none !important;
}

/* Only show mobile topbar on small screens */
@media (max-width: 800px) {
  .mobile-topbar {
    display: flex !important;
  }
}

  .sidebar {
    display: none;
  }

  .main-area {
    margin-left: 0;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #071827;
    padding: 14px 18px;
  }

  .mobile-topbar .brand {
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    font-size: 20px;
  }

  .mobile-links {
    display: flex;
    gap: 14px;
  }

  .mobile-links a {
    color: #dbeafe;
    text-decoration: none;
    font-weight: 600;
  }

  .main-area .container {
    padding: 18px;
  }

  .profile-header {
    align-items: flex-start;
  }

  .post-body {
    margin-left: 0;
  }
}

/* Active sidebar link */
.sidebar-nav a.active {
  background: rgba(14, 165, 233, 0.22);
  color: #ffffff;
  border: 1px solid rgba(14, 165, 233, 0.45);
}

/* Experience history */
.experience-item {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
}

.experience-item h4 {
  margin: 0 0 6px;
  font-size: 17px;
}

.experience-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.checkbox-line input {
  width: auto;
  margin: 0;
}

.danger-small {
  background: #fee2e2;
  color: #991b1b;
  padding: 8px 12px;
  font-size: 13px;
}

.danger-small:hover {
  background: #fecaca;
}

/* People / Network page */
.people-hero h2 {
  margin-bottom: 6px;
}

.people-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.people-search-form input {
  margin: 0;
}

.people-search-form button,
.people-search-form .btn {
  white-space: nowrap;
}

.people-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.people-card {
  margin-bottom: 0;
}

.people-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.people-card-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.people-card-header p {
  margin: 0;
}

.people-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #cbd5e1;
  flex-shrink: 0;
}

.people-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.people-card-body p {
  margin: 8px 0;
  font-size: 14px;
}

.people-bio {
  color: #475569;
  line-height: 1.5;
}

.availability-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.people-card-actions {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .people-grid {
    grid-template-columns: 1fr;
  }

  .people-search-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Connections */
.people-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.people-card-actions form {
  margin: 0;
}

.connect-btn {
  background: #0ea5e9;
  color: white;
}

.connected-btn {
  background: #e2e8f0;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.profile-connect-form {
  margin-top: 12px;
}

/* Notifications */
.sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notification-badge {
  background: #ef4444;
  color: white;
  font-size: 12px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.notification-item {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.notification-item:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.notification-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-user p {
  margin: 4px 0 0;
}

.notification-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notification-actions form {
  margin: 0;
}

/* Company pages */
.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.company-card {
  margin-bottom: 0;
}

.company-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.company-card-header h3 {
  margin: 0 0 4px;
}

.company-card-header p {
  margin: 0;
}

.company-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}

.company-logo-large {
  width: 120px;
  height: 120px;
  border-radius: 18px;
  object-fit: cover;
  background: #e2e8f0;
  flex-shrink: 0;
}

.company-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: white;
  font-size: 28px;
  font-weight: 700;
}

.company-description {
  color: #475569;
  line-height: 1.5;
}

.company-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.company-profile-main {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.company-profile-actions form {
  margin: 0;
}

.company-employee-list {
  display: flex;
  flex-direction: column;
}

.company-employee {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e5e7eb;
  padding: 14px 0;
}

.company-employee:first-child {
  border-top: none;
  padding-top: 0;
}

.company-employee p {
  margin: 4px 0 0;
}

@media (max-width: 900px) {
  .company-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-row {
    flex-direction: column;
  }

  .company-profile-header {
    flex-direction: column;
  }

  .company-profile-main {
    flex-direction: column;
  }
}

/* Clickable company links */
.inline-company-link {
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 600;
}

.inline-company-link:hover {
  text-decoration: underline;
}

/* Messaging */
.message-thread {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: #111827;
  border-top: 1px solid #e5e7eb;
  padding: 14px 0;
}

.message-thread:first-of-type {
  border-top: none;
  padding-top: 0;
}

.message-thread:hover {
  background: #f8fafc;
  margin-left: -10px;
  margin-right: -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 12px;
}

.message-thread-main {
  flex: 1;
}

.message-thread-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.message-thread-main p {
  margin: 4px 0;
}

.message-preview {
  color: #475569;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.conversation-header h2 {
  margin-bottom: 4px;
}

.conversation-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.conversation-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-bubble-row {
  display: flex;
}

.message-bubble-row.sent {
  justify-content: flex-end;
}

.message-bubble-row.received {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 70%;
  padding: 11px 13px;
  border-radius: 16px;
  background: #e2e8f0;
}

.message-bubble-row.sent .message-bubble {
  background: #0ea5e9;
  color: white;
}

.message-bubble p {
  margin: 0;
  line-height: 1.4;
}

.message-bubble span {
  display: block;
  font-size: 11px;
  margin-top: 5px;
  opacity: 0.75;
}

.message-compose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}

.message-compose textarea {
  margin: 0;
  min-height: 70px;
}

.message-compose button {
  height: 46px;
}

@media (max-width: 700px) {
  .conversation-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-compose {
    flex-direction: column;
    align-items: stretch;
  }

  .message-bubble {
    max-width: 90%;
  }
}

/* Groups */
.group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.group-card {
  margin-bottom: 0;
}

.member-select-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.member-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
}

.member-select-item input {
  width: auto;
  margin: 0;
}

.member-select-item small {
  display: block;
  color: #6b7280;
  margin-top: 3px;
}

.group-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.group-header form {
  margin: 0;
}

.group-members {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.group-member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

@media (max-width: 900px) {
  .group-grid {
    grid-template-columns: 1fr;
  }

  .group-header {
    flex-direction: column;
  }
}

/* Group chat photo sharing */
.group-message-compose {
  align-items: stretch;
}

.group-message-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-upload-btn {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.image-upload-btn input {
  display: none;
}

.group-chat-image {
  display: block;
  max-width: 420px;
  max-height: 420px;
  border-radius: 14px;
  margin-top: 8px;
  object-fit: cover;
}
.message-bubble-row.sent .group-chat-image {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

@media (max-width: 700px) {
  .group-chat-image {
    max-width: 220px;
    max-height: 220px;
  }
}

.image-click-note {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  opacity: 0.75;
}

.selected-image-name {
  display: block;
  font-size: 12px;
  color: #475569;
  margin-top: -4px;
}

/* Group message 3-dot menu / edit / reply / forward */
.group-message-bubble {
  position: relative;
  padding-top: 34px;
}

.message-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 30;
}

.message-menu-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.16);
  color: inherit;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}

.message-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 34px;
  min-width: 190px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  z-index: 50;
  overflow: hidden;
}

.message-menu.open .message-menu-dropdown {
  display: block;
}

.message-menu-dropdown button,
.message-menu-dropdown .menu-link {
  width: 100%;
  display: block;
  background: white;
  color: #0f172a;
  border: none;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.message-menu-dropdown button:hover,
.message-menu-dropdown .menu-link:hover {
  background: #f1f5f9;
}

.message-menu-dropdown form {
  margin: 0;
}

.message-menu-dropdown select {
  width: calc(100% - 16px);
  margin: 8px;
  padding: 7px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
}

.edit-message-form {
  display: none;
  margin-top: 8px;
}

.edit-message-form textarea {
  min-height: 70px;
  font-size: 14px;
  margin-bottom: 8px;
}

.edit-message-actions {
  display: flex;
  gap: 8px;
}

.edit-message-actions button {
  padding: 7px 11px;
  font-size: 13px;
}

.reply-preview {
  border-left: 3px solid rgba(14, 165, 233, 0.8);
  background: rgba(255, 255, 255, 0.22);
  padding: 7px 9px;
  border-radius: 10px;
  margin: 8px 0;
  font-size: 13px;
}

.reply-preview strong {
  display: block;
  margin-bottom: 3px;
}

.reply-preview span {
  display: block;
  opacity: 0.85;
}

.reply-box {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border-left: 4px solid #0ea5e9;
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
}

.reply-box p {
  margin: 3px 0 0;
  color: #475569;
  font-size: 13px;
}

.reply-box button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #0f172a;
  cursor: pointer;
}

.forwarded-label {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  margin-bottom: 4px;
}

.reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reply-preview-image {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.reply-box-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-box-image {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

:root {
  --marine-navy: #062542;
  --marine-navy-dark: #031827;
  --marine-blue: #1266f1;
  --marine-bg: #f4f7fb;
  --marine-card: #ffffff;
  --marine-text: #0f172a;
  --marine-muted: #64748b;
  --marine-border: #e5e7eb;
}

body {
  margin: 0;
  background: var(--marine-bg);
  color: var(--marine-text);
  font-family: Arial, sans-serif;
}

.marinet-app {
  min-height: 100vh;
}

/* Top bar */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 68px;
  background: linear-gradient(135deg, var(--marine-navy-dark), var(--marine-navy));
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}

.app-logo {
  color: white;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
}

.app-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #0d4f8b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-icon {
  position: relative;
  color: white;
  text-decoration: none;
  font-size: 20px;
}

.topbar-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.avatar-placeholder {
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main */
.app-main {
  padding-bottom: 88px;
}

.app-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 18px 14px;
}

/* Flash */
.flash {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 15px;
}

.flash.success {
  background: #dcfce7;
  color: #166534;
}

/* Bottom mobile nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: white;
  border-top: 1px solid var(--marine-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  box-shadow: 0 -6px 24px rgba(15,23,42,.08);
}

.bottom-nav a {
  position: relative;
  text-decoration: none;
  color: #475569;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 20px;
  min-width: 56px;
}

.bottom-nav small {
  font-size: 11px;
}

.bottom-nav a.active {
  color: var(--marine-blue);
  font-weight: 700;
}

.bottom-nav b {
  position: absolute;
  top: -5px;
  right: 7px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  border-radius: 999px;
  padding: 2px 5px;
}

/* Floating post button */
.floating-post-btn {
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--marine-blue);
  color: white;
  text-decoration: none;
  font-size: 34px;
  line-height: 54px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(18,102,241,.35);
  z-index: 210;
}

/* Desktop sidebar */
.desktop-sidebar {
  display: none;
}

/* Make old cards look more modern */
.card,
.post-card {
  background: white;
  border-radius: 22px;
  border: 1px solid var(--marine-border);
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

/* Desktop layout */
@media (min-width: 900px) {
  .app-topbar {
    display: none;
  }

  .desktop-sidebar {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, var(--marine-navy-dark), var(--marine-navy));
    color: white;
    padding: 24px;
    box-sizing: border-box;
  }

  .sidebar-brand {
    color: white;
    text-decoration: none;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    background: #0d4f8b;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-brand span {
    display: block;
    color: #cbd5e1;
    font-size: 13px;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-nav a {
    color: #dbeafe;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .sidebar-nav a.active,
  .sidebar-nav a:hover {
    background: rgba(255,255,255,.13);
    color: white;
  }

  .app-main {
    margin-left: 250px;
    padding-bottom: 30px;
  }

  .bottom-nav,
  .floating-post-btn {
    display: none;
  }
}

/* ================================
   MARINET MOBILE FEED DESIGN
================================ */

.app-container {
  padding: 14px 10px 95px;
}

.card {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
}

/* Post card */
.card .post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 8px;
}

.post-author {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.profile-avatar,
.profile-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-avatar {
  object-fit: cover;
}

.profile-avatar-placeholder {
  background: #07182f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.profile-link {
  color: #0f172a;
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
}

.post-author .muted {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.small-muted {
  font-size: 12px !important;
}

.inline-company-link {
  color: #1266f1;
  font-weight: 700;
  text-decoration: none;
}

/* 3 dot menu */
.post-menu {
  position: relative;
}

.menu-btn {
  border: none;
  background: transparent;
  font-size: 24px;
  color: #475569;
  padding: 4px 8px;
  border-radius: 999px;
}

.menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 34px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15,23,42,.16);
  min-width: 130px;
  overflow: hidden;
  z-index: 50;
}

.menu-dropdown.show {
  display: block;
}

.menu-dropdown a,
.menu-dropdown button {
  width: 100%;
  display: block;
  padding: 11px 14px;
  border: none;
  background: white;
  text-align: left;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
}

.danger-action {
  color: #dc2626 !important;
}

/* Post body */
.post-body {
  padding: 6px 16px 0;
}

.post-body p {
  margin: 8px 0 12px;
  font-size: 15px;
  line-height: 1.45;
  color: #0f172a;
}

.post-image-container {
  margin: 10px -16px 0;
}

.post-image {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  display: block;
}

/* Actions */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px 16px;
}

.like-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.like-form {
  margin: 0;
}

.like-icon {
  border: none;
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 700;
}

.like-summary-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  text-decoration: none;
  font-weight: 700;
}

.like-count {
  font-size: 14px;
}

.like-avatars {
  display: flex;
  align-items: center;
}

.like-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  margin-left: -6px;
}

.like-avatar-placeholder {
  background: #0f172a;
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn.btn-light {
  background: #eef2f7;
  color: #0f172a;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: none;
}

/* Fix floating button position */
.floating-post-btn {
  width: 54px;
  height: 54px;
  right: 22px;
  bottom: 120px;
  line-height: 50px;
  font-size: 34px;
}

/* Mobile tighter view */
@media (max-width: 600px) {
  .app-container {
    padding-left: 8px;
    padding-right: 8px;
  }

  .card {
    border-radius: 20px;
  }

  .profile-link {
    font-size: 16px;
  }

  .post-author .muted {
    font-size: 12.5px;
  }

  .post-body p {
    font-size: 15px;
  }
}

@media (max-width: 600px) {
  .floating-post-btn {
    bottom: 145px;
    right: 18px;
  }
}

/*
 .floating-post-btn {
  display: none;
} 
*/


.create-post-card {
  background: white;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

.create-post-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.create-post-textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  font-size: 16px;
  resize: vertical;
  box-sizing: border-box;
  margin-top: 14px;
}

.upload-box {
  margin-top: 14px;
  display: block;
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
}

.upload-box input {
  display: block;
  margin: 10px auto 0;
}

.create-post-input {
  width: 100%;
  margin-top: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 13px;
  font-size: 15px;
  box-sizing: border-box;
}

.create-post-submit {
  width: 100%;
  margin-top: 18px;
  border: none;
  border-radius: 999px;
  padding: 14px;
  background: #1266f1;
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.create-post-textarea {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.create-post-textarea::placeholder {
  font-family: Arial, sans-serif;
}

.feed-create-box {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

.feed-create-user {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #64748b;
  font-weight: 600;
}

.feed-create-user img,
.feed-create-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
}

.feed-create-user img {
  object-fit: cover;
}

.feed-create-avatar {
  background: #07182f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.feed-create-photo {
  display: block;
  margin-top: 12px;
  text-align: center;
  background: #f1f5f9;
  color: #1266f1;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px;
  font-weight: 800;
}

.feed-create-box {
  padding: 12px 14px;
}

.feed-create-photo {
  padding: 8px;
  margin-top: 10px;
}

.feed-create-user span {
  font-size: 15px;
}

.post-actions {
  padding-top: 10px;
}

.like-icon,
.btn.btn-light {
  font-size: 13px;
  padding: 8px 13px;
  background: #f1f5f9;
}

.like-count {
  font-size: 13px;
}

.feed-tabs {
  display: flex;
  background: white;
  border-radius: 18px;
  padding: 5px;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}

.feed-tabs a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #64748b;
  padding: 10px 6px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.feed-tabs a.active {
  background: #1266f1;
  color: white;
}

/* ================================
   MARINET PEOPLE / CONNECTIONS PAGE
================================ */

.people-hero {
  padding: 18px;
  margin-bottom: 16px;
}

.people-hero h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.people-search-form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.people-search-form input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 14px;
}

.people-search-form button {
  border: none;
  border-radius: 999px;
  background: #1266f1;
  color: white;
  padding: 0 16px;
  font-weight: 800;
}

.people-grid {
  display: grid;
  gap: 14px;
}

.people-card {
  padding: 16px;
}

.people-card-header {
  display: flex;
  align-items: center;
  gap: 13px;
}

.people-avatar,
.people-avatar-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
}

.people-avatar {
  object-fit: cover;
}

.people-avatar-placeholder {
  background: #07182f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.people-card-header h3 {
  margin: 0;
  font-size: 17px;
}

.people-card-header .muted {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.people-card-body {
  margin-top: 12px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.people-card-body p {
  margin: 6px 0;
}

.availability-badge {
  background: #dcfce7;
  color: #166534;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.people-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.people-card-actions .btn,
.people-card-actions button {
  flex: 1;
  border-radius: 999px;
  padding: 10px 12px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  border: none;
}

.people-card-actions .btn {
  background: #f1f5f9;
  color: #0f172a;
}

.connect-btn {
  background: #1266f1;
  color: white;
}

.connected-btn {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 600px) {
  .people-search-form {
    flex-direction: column;
  }

  .people-search-form button {
    padding: 12px;
  }

  .people-card-actions {
    flex-direction: row;
  }
}

.connection-tabs {
  display: flex;
  background: white;
  border-radius: 22px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
}

.connection-tabs a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 16px;
  text-decoration: none;
  color: #64748b;
  font-weight: 800;
  font-size: 13px;
}

.connection-tabs a.active {
  background: #1266f1;
  color: white;
}

/* ================================
   MARINET CHAT / MESSAGES PAGE
================================ */

.message-thread {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.message-thread:last-child {
  border-bottom: none;
}

.message-thread-main {
  flex: 1;
  min-width: 0;
}

.message-thread-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.message-thread-top strong {
  font-size: 16px;
}

.message-thread .muted {
  margin: 4px 0;
  font-size: 13px;
  color: #64748b;
}

.message-preview {
  margin: 6px 0 0;
  font-size: 14px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-badge {
  background: #1266f1;
  color: white;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card {
  box-sizing: border-box;
}

.card > h2,
.card > h3,
.card > p {
  padding-left: 18px;
  padding-right: 18px;
}

.card > h2,
.card > h3 {
  padding-top: 18px;
}

.message-thread {
  padding-left: 18px;
  padding-right: 18px;
}

/* ================================
   MARINET CONVERSATION PAGE
================================ */

.conversation-header {
  padding: 16px;
}

.conversation-header h2 {
  margin: 0;
  font-size: 20px;
}

.conversation-header .btn {
  display: inline-block;
  margin-top: 12px;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
}

.conversation-card {
  padding: 0;
  overflow: hidden;
}

.conversation-messages {
  padding: 18px;
  min-height: 420px;
  max-height: 60vh;
  overflow-y: auto;
  background: #f8fafc;
}

.message-bubble-row {
  display: flex;
  margin-bottom: 12px;
}

.message-bubble-row.sent {
  justify-content: flex-end;
}

.message-bubble-row.received {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 78%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
}

.message-bubble-row.sent .message-bubble {
  background: #1266f1;
  color: white;
  border-bottom-right-radius: 6px;
}

.message-bubble-row.received .message-bubble {
  background: white;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 6px;
}

.message-bubble p {
  margin: 0;
}

.message-bubble span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  opacity: .75;
}

.message-compose {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.message-compose textarea {
  flex: 1;
  min-height: 44px;
  max-height: 90px;
  resize: none;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: Arial, sans-serif;
}

.message-compose button {
  border: none;
  border-radius: 999px;
  background: #1266f1;
  color: white;
  padding: 0 18px;
  font-weight: 800;
}

/* ================================
   MARINET PROFILE PAGE
================================ */

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.profile-avatar-large,
.profile-avatar-large.profile-avatar-placeholder {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-avatar-large {
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 6px 18px rgba(15,23,42,.18);
}

.profile-header h3 {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
}

.profile-header .muted {
  margin: 5px 0 0;
  font-size: 14px;
  line-height: 1.35;
}

.card form {
  padding: 0 18px 18px;
}

.card label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
}

.card input,
.card select,
.card textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  background: white;
}

.card textarea {
  min-height: 110px;
  resize: vertical;
}

.card button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  border: none;
  border-radius: 999px;
  padding: 14px;
  background: #1266f1;
  color: white;
  font-size: 15px;
  font-weight: 800;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.experience-item {
  padding: 16px 18px;
  border-top: 1px solid #e5e7eb;
}

.experience-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.experience-item h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.checkbox-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: auto;
}

@media (max-width: 600px) {
  .profile-header {
    align-items: flex-start;
  }

  .profile-avatar-large,
  .profile-avatar-large.profile-avatar-placeholder {
    width: 72px;
    height: 72px;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
.profile-public-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
  margin-bottom: 16px;
}

.profile-cover {
  height: 130px;
  background: linear-gradient(135deg, #031827, #06466f);
}

.profile-public-main {
  padding: 0 18px 20px;
  text-align: left;
}

.profile-public-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  margin-top: -48px;
  box-shadow: 0 8px 22px rgba(15,23,42,.22);
}

.profile-public-main h2 {
  margin: 12px 0 4px;
  font-size: 26px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.profile-stats div {
  padding: 14px 6px;
  text-align: center;
}

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

.profile-stats span {
  font-size: 12px;
  color: #64748b;
}

.profile-about h3 {
  margin-bottom: 6px;
}

.profile-about p {
  color: #334155;
  line-height: 1.5;
}

.edit-profile-panel summary {
  margin-top: 18px;
  background: #1266f1;
  color: white;
  border-radius: 999px;
  padding: 13px;
  text-align: center;
  font-weight: 800;
  cursor: pointer;
}

.edit-profile-panel form {
  padding: 10px 0 0;
}

.add-experience-panel summary {
  margin: 16px 18px 18px;
  background: #1266f1;
  color: white;
  border-radius: 999px;
  padding: 13px;
  text-align: center;
  font-weight: 800;
  cursor: pointer;
}

.add-experience-panel form {
  padding-top: 0;
}

/* ================================
   MARINET NOTIFICATIONS / ALERTS
================================ */

.notification-item {
  padding: 18px;
  border-top: 1px solid #e5e7eb;
}

.notification-user {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notification-user p {
  margin: 5px 0;
  color: #475569;
  font-size: 14px;
}

.notification-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.notification-actions form {
  flex: 1;
}

.notification-actions .btn,
.notification-actions button {
  width: 100%;
  border-radius: 999px;
  padding: 11px 14px;
  font-weight: 800;
  border: none;
}

.notification-actions .connect-btn {
  background: #1266f1;
  color: white;
}

.notification-actions .connected-btn {
  background: #f1f5f9;
  color: #0f172a;
}

/* ================================
   MARINET GROUPS PAGE
================================ */

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.section-heading-row h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.section-heading-row .muted {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.section-heading-row .btn {
  white-space: nowrap;
  border-radius: 999px;
  padding: 11px 15px;
  background: #1266f1;
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

.group-grid {
  display: grid;
  gap: 14px;
}

.group-card {
  padding: 18px;
}

.group-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.group-card p {
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.group-card .btn {
  display: block;
  margin-top: 14px;
  text-align: center;
  border-radius: 999px;
  padding: 11px 14px;
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 600px) {
  .section-heading-row {
    align-items: flex-start;
  }

  .section-heading-row .btn {
    padding: 10px 13px;
  }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-open-btn {
  border: none;
  background: transparent;
  color: white;
  font-size: 26px;
  font-weight: 800;
  padding: 4px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  display: none;
}

.drawer-overlay.show {
  display: block;
}

/* IMAGE DRAWER VERSION */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  display: none;
}

.drawer-overlay.show {
  display: block;
}

.image-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 330px;
  height: 100vh;
  background: #031827;
  z-index: 500;
  transition: .25s ease;
  overflow: hidden;
}

.image-drawer.show {
  left: 0;
}

.drawer-full-image {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* close button */
.drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  border: none;
  background: rgba(0,0,0,.35);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 24px;
}

.drawer-bg {
  position: absolute;
  inset: 0;
  background: url("/static/ship-drawer.png") center / 100% 100% no-repeat;
}

.real-drawer-menu {
  position: absolute;
  top: 20%;
  left: 8%;
  right: 8%;
  z-index: 15;
  display: grid;
  gap: 18px;
}

.real-drawer-menu a {
  height: 78px;
  display: block;
  text-indent: -9999px;
}

/* ================================
   MARINET SIDEBAR DRAWER
================================ */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 23, 0.55);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

.drawer-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.marinet-drawer {
  position: fixed;
  top: 0;
  left: -88%;
  width: 86%;
  max-width: 390px;
  height: 100vh;
  z-index: 9100;

  background:
    linear-gradient(180deg, rgba(5, 21, 38, 0.48), rgba(7, 36, 62, 0.55)),
    url("/static/ship-drawer.png") left top / cover no-repeat;

  color: white;
  padding: 22px 18px;
  transition: 0.28s ease;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
}

.marinet-drawer.show {
  left: 0;
}

.drawer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 26px;
  line-height: 1;
  z-index: 20;
}

.drawer-menu {
  margin-top: 100px;
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 10;
}

.drawer-menu a {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 14px;
  border-radius: 18px;
  text-decoration: none;
  color: white;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.drawer-menu a span {
  font-size: 20px;
}

.drawer-menu a strong {
  font-size: 15px;
  font-weight: 700;
}

.drawer-menu a em {
  font-style: normal;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.drawer-menu a:active {
  transform: scale(0.98);
}

.drawer-logout {
  background: rgba(239, 68, 68, 0.22) !important;
}

/* ================================
   MARINET LANDING PAGE
================================ */

.landing-body {
  margin: 0;
  padding: 0;
  background: #00172b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.landing-page {
  min-height: 100vh;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(0, 20, 40, 0.22), rgba(0, 20, 40, 0.55)),
    url("/static/landing-bg.png") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  color: white;
  padding: 72px 26px 58px;
  box-sizing: border-box;
}

.landing-top {
  margin-top: 10px;
}

.landing-anchor {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  backdrop-filter: blur(8px);
}

.landing-top h1 {
  margin: 0;
  font-size: 46px;
  letter-spacing: 4px;
  font-weight: 800;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.landing-top p {
  margin: 12px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.landing-actions {
  width: 100%;
  max-width: 420px;
  margin-bottom: 8px;
}

.landing-start-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #0284ff, #005bea);
  color: white;
  text-decoration: none;
  padding: 18px 20px;
  border-radius: 22px;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(0, 91, 234, 0.35);
}

.landing-login-link {
  display: inline-block;
  margin-top: 24px;
  color: white;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

/* ================================
   FEED POST ACTIONS
================================ */

.post-actions-modern {
  display: grid;
  gap: 10px;
  padding: 14px 4px 8px;
  border-top: 1px solid #e5e7eb;
  margin-top: 14px;
}

.feed-action-form {
  margin: 0;
}

.feed-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: #111827;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 2px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.feed-like-anchor {
  color: #c1121f;
  font-size: 22px;
  width: 28px;
  text-align: center;
}

.feed-comment-icon {
  font-size: 21px;
  width: 28px;
  text-align: center;
}

.feed-share-icon {
  color: #111827;
  font-size: 24px;
  width: 28px;
  text-align: center;
}

.feed-action-btn:active {
  transform: scale(0.98);
}

.post-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid #f1f5f9;
}

.comment-count-link {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}

/* ================================
   CLEAN FEED ACTION BAR
================================ */

.post-actions-clean {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #f1f5f9;
  margin-top: 14px;
  padding: 6px 0;
}

.post-action-form {
  margin: 0;
}

.post-action-clean-btn {
  width: 100%;
  height: 42px;
  border: none;
  background: transparent !important;
  color: #334155 !important;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  box-shadow: none !important;
  padding: 0 !important;
}

.post-action-clean-btn:hover,
.post-action-clean-btn:active {
  background: #f1f5f9 !important;
  transform: none !important;
}

.action-anchor {
  color: #c1121f;
  font-size: 18px;
  line-height: 1;
}

.post-stats-clean {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  font-size: 13px;
  color: #64748b;
}

.post-stats-clean a {
  color: #64748b;
  text-decoration: none;
}

.comment-count-link {
  white-space: nowrap;
}

.post-stats-clean {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 10px;
  margin: 0;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #64748b;
  overflow: hidden;
}

.like-summary-link-clean {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  text-decoration: none;
  min-width: 0;
}

.comment-count-link-clean {
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
}

/* make feed action area narrower */
.post-actions-clean {
  padding: 2px 0 !important;
  margin-top: 8px !important;
}

.post-action-clean-btn {
  height: 10px !important;
  font-size: 13px !important;
  gap: 5px !important;
}

.action-anchor {
  font-size: 17px !important;
}

.post-stats-clean {
  padding: 5px 18px 7px !important;
  font-size: 12px !important;
}

/* ================================
   INLINE FEED COMMENT BOX
================================ */

.inline-comment-box {
  display: none;
  padding: 8px 16px 12px;
  border-top: 1px solid #f1f5f9;
}

.inline-comment-box.show {
  display: block;
}

.inline-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.inline-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.inline-comment-placeholder {
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.inline-comment-form input {
  flex: 1;
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0 13px;
  font-size: 14px;
  outline: none;
  background: #f8fafc;
}

.inline-comment-form input:focus {
  border-color: #0f74d1;
  background: white;
}

.inline-comment-form button {
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #0f74d1;
  color: white;
  padding: 0 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ================================
   FIX INLINE COMMENT FORM
================================ */

.inline-comment-box {
  padding: 8px 18px 12px !important;
}

.inline-comment-form {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

.inline-comment-avatar {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
}

.inline-comment-form input {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  height: 38px !important;
  border-radius: 999px !important;
}

.inline-comment-form button {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 64px !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

.inline-comment-form {
  gap: 6px !important;
}

.inline-comment-form input {
  height: 36px !important;
  font-size: 13px !important;
}

.inline-comment-form button {
  min-width: 54px !important;
  height: 36px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
}

/* ================================
   COMBINED FEED COMMENTS AREA
================================ */

.action-count {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feed-comments-area {
  display: none;
  padding: 10px 18px 14px;
  border-top: 1px solid #f1f5f9;
}

.feed-comments-area.show {
  display: block;
}

.feed-comments-list {
  margin-bottom: 10px;
}

.feed-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 10px;
}

.feed-comment-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 30px;
}

.feed-comment-placeholder {
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
}

.feed-comment-bubble {
  background: #f1f5f9;
  border-radius: 16px;
  padding: 8px 12px;
  flex: 1;
}

.feed-comment-bubble strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 2px;
}

.feed-comment-bubble p {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.35;
}

.pending-btn {
  background: #e5e7eb !important;
  color: #64748b !important;
  border: none !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.connected-btn:disabled,
.pending-btn:disabled {
  opacity: 1;
}

/* ================================
   CENTER FEED POSTS
================================ */

.app-container {
  max-width: 680px;
  margin: 0 auto;
}

.feed-tabs,
.feed-create-box,
.card {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .app-main {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .app-container {
    max-width: 100%;
    margin: 0 auto;
  }

  .card {
    margin-left: auto;
    margin-right: auto;
    border-radius: 24px;
  }

  .post-image-container {
    margin-left: 0;
    margin-right: 0;
  }

  .post-image {
    width: 100%;
    display: block;
  }
}

/* ================================
   FULL WIDTH MOBILE FEED CARDS
================================ */

@media (max-width: 768px) {
  .app-main {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .app-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .feed-tabs,
  .feed-create-box,
  .card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important;
  }

  .card {
    border-left: none !important;
    border-right: none !important;
  }

  .post-image-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .post-image {
    width: 100% !important;
    border-radius: 0 !important;
  }
}

/* ================================
   FOLLOW BUTTONS
================================ */

.follow-btn {
  background: #eef6ff !important;
  color: #0f74d1 !important;
  border: none !important;
  box-shadow: none !important;
}

.following-btn {
  background: #e5e7eb !important;
  color: #475569 !important;
  border: none !important;
  box-shadow: none !important;
}

/* ================================
   PROFILE ACTIONS - FINAL CLEAN
================================ */

.linkedin-profile-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 18px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.linkedin-profile-actions form {
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.linkedin-action-btn {
  height: 40px;
  min-width: 118px;
  border-radius: 999px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}

.primary-action {
  background: #1266f1;
  color: #ffffff;
}

.outline-action {
  background: #ffffff;
  color: #1266f1;
  border: 2px solid #1266f1;
}

.linkedin-more-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 2px solid #64748b;
  background: #ffffff;
  color: #334155;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: none;
  cursor: pointer;
}

.linkedin-action-btn:active,
.linkedin-more-btn:active {
  transform: scale(0.97);
}

/* Mobile profile header */
@media (max-width: 768px) {
  .profile-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 18px 18px;
  }

  .profile-avatar-large,
  .profile-avatar-large.profile-avatar-placeholder {
    width: 92px;
    height: 92px;
    flex: 0 0 92px;
  }

  .profile-header h2 {
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 8px;
  }

  .profile-header .muted {
    font-size: 15px;
    line-height: 1.35;
    margin: 4px 0;
  }

  .linkedin-profile-actions {
    margin-top: 18px;
    max-width: 100%;
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .linkedin-action-btn {
    height: 38px;
    min-width: 112px;
    padding: 0 14px;
    font-size: 14px;
  }

  .linkedin-more-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 17px;
  }
}

/* final profile action row cleanup */
@media (max-width: 768px) {
  .linkedin-profile-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 42px !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .linkedin-action-btn {
    min-width: 0 !important;
    width: 100% !important;
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }

  .linkedin-more-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .profile-header {
    overflow: hidden !important;
  }
}

/* PROFILE BUTTONS IN ONE LINE */
@media (max-width: 768px) {
  .linkedin-profile-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .linkedin-profile-actions form {
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  .linkedin-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }

  .linkedin-more-btn {
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
}

/* ================================
   PROFILE HEADER - LINKEDIN STYLE FINAL
================================ */

.profile-top-card {
  padding: 0 !important;
}

.profile-header-modern {
  display: grid !important;
  grid-template-columns: 150px 1fr !important;
  column-gap: 20px !important;
  row-gap: 22px !important;
  align-items: start !important;
  padding: 34px 32px 30px !important;
}

.profile-photo-col {
  display: flex;
  justify-content: center;
}

.profile-info-col {
  min-width: 0;
}

.profile-info-col h2 {
  margin: 0 0 10px !important;
  font-size: 34px !important;
  line-height: 1.1 !important;
}

.profile-info-col .muted {
  margin: 6px 0 !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
}

.linkedin-profile-actions {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 150px 1fr 42px !important;
  gap: 14px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0 !important;
}

.linkedin-profile-actions form {
  margin: 0 !important;
  padding: 0 !important;
}

.linkedin-action-btn {
  width: 100% !important;
  height: 42px !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

.primary-action {
  background: #1266f1 !important;
  color: white !important;
  border: 2px solid #1266f1 !important;
}

.outline-action {
  background: white !important;
  color: #1266f1 !important;
  border: 2px solid #1266f1 !important;
}

.linkedin-more-btn {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  border: 2px solid #64748b !important;
  background: white !important;
  color: #334155 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  padding: 0 !important;
}

/* Mobile */
@media (max-width: 768px) {
  .profile-header-modern {
    grid-template-columns: 150px 1fr !important;
    column-gap: 18px !important;
    row-gap: 20px !important;
    padding: 34px 32px 28px !important;
  }

  .profile-avatar-large,
  .profile-avatar-large.profile-avatar-placeholder {
    width: 122px !important;
    height: 122px !important;
  }

  .profile-info-col h2 {
    font-size: 28px !important;
  }

  .profile-info-col .muted {
    font-size: 16px !important;
  }

  .linkedin-profile-actions {
    grid-template-columns: 150px 1fr 42px !important;
    gap: 12px !important;
  }
}

/* ================================
   PROFILE HEADER FINAL ADJUSTMENT
================================ */

@media (max-width: 768px) {
  .profile-header-modern {
    display: grid !important;
    grid-template-columns: 132px minmax(0, 1fr) !important;
    column-gap: 18px !important;
    row-gap: 16px !important;
    padding: 28px 28px 24px !important;
    align-items: center !important;
  }

  .profile-photo-col {
    justify-content: center !important;
  }

  .profile-avatar-large,
  .profile-avatar-large.profile-avatar-placeholder {
    width: 106px !important;
    height: 106px !important;
    flex: 0 0 106px !important;
  }

  .profile-info-col {
    min-width: 0 !important;
  }

  .profile-info-col h2 {
    font-size: 28px !important;
    line-height: 1.1 !important;
    margin: 0 0 8px !important;
    white-space: nowrap !important;
  }

  .profile-info-col .muted {
    font-size: 15px !important;
    line-height: 1.35 !important;
    margin: 4px 0 !important;
  }

  .linkedin-profile-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 132px 1fr 42px !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 2px !important;
  }

  .linkedin-action-btn {
    height: 40px !important;
    font-size: 14px !important;
    padding: 0 12px !important;
  }

  .linkedin-more-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }
}

/* FINAL PROFILE HEADER SIZE */
@media (max-width: 768px) {
  .profile-header-modern {
    grid-template-columns: 120px minmax(0, 1fr) !important;
    column-gap: 18px !important;
    row-gap: 12px !important;
    padding: 24px 28px 20px !important;
  }

  .profile-avatar-large,
  .profile-avatar-large.profile-avatar-placeholder {
    width: 98px !important;
    height: 98px !important;
    flex: 0 0 98px !important;
  }

  .profile-info-col h2 {
    font-size: 26px !important;
    margin-bottom: 6px !important;
  }

  .profile-info-col .muted {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin: 3px 0 !important;
  }

  .linkedin-profile-actions {
    grid-template-columns: 120px 1fr 40px !important;
    gap: 10px !important;
  }

  .linkedin-action-btn {
    height: 38px !important;
  }

  .linkedin-more-btn {
    width: 38px !important;
    height: 38px !important;
  }
}

/* reduce empty space under profile buttons */
@media (max-width: 768px) {
  .profile-header-modern {
    padding-bottom: 14px !important;
  }

  .linkedin-profile-actions {
    margin-bottom: 0 !important;
  }
}

/* ================================
   STORY IMAGE SIZE
================================ */

.story-image-wrap {
  margin-top: 14px;
  width: 100%;
}

.story-image {
  width: 100%;
  height: 220px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
}

@media (max-width: 600px) {
  .story-image {
    height: 180px;
  }
}

/* ================================
   SEA STORIES FINAL STYLE
================================ */

.stories-hero {
  padding: 18px !important;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.stories-hero h2 {
  margin: 0 0 6px !important;
  font-size: 26px;
}

.stories-hero p {
  margin: 0 !important;
  line-height: 1.4;
}

.story-create-btn {
  background: #1266f1;
  color: white !important;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  white-space: nowrap;
}

.story-card {
  padding: 18px !important;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.story-card h3 {
  margin: 12px 0 8px !important;
  font-size: 22px;
  line-height: 1.25;
}

.story-content {
  font-size: 15px;
  line-height: 1.55;
  color: #0f172a;
  white-space: pre-line;
  margin-bottom: 14px;
}

.story-image-wrap {
  margin-top: 12px;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

.story-image {
  width: 100%;
  height: 210px;
  border-radius: 18px;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 600px) {
  .stories-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .story-create-btn {
    text-align: center;
  }

  .story-card {
    padding: 16px !important;
  }

  .story-image {
    height: 170px;
  }
}

/* ================================
   FLEXIBLE STORY IMAGE
================================ */

.story-image-wrap {
  margin-top: 12px;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  justify-content: center;
}

.story-image {
  width: 100%;
  height: auto !important;
  max-height: 520px;
  object-fit: contain !important;
  object-position: center;
  border-radius: 18px;
  display: block;
}

@media (max-width: 600px) {
  .story-image {
    max-height: 430px;
  }
}

/* ================================
   STORY IMAGE FLEXIBLE FINAL
================================ */

.story-image-wrap {
  margin-top: 14px !important;
  width: 100% !important;
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #f8fafc !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.story-image {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 520px !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
  border-radius: 18px !important;
}

@media (max-width: 600px) {
  .story-image {
    max-height: 460px !important;
  }
}

.password-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-wrap input {
  flex: 1;
}

.password-toggle {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  color: #0f172a;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.password-toggle:hover {
  background: #e5e7eb;
}

.verify-email-card {
  max-width: 850px;
  margin: 30px auto;
  padding: 32px;
}

.verify-email-card h2 {
  margin-top: 0;
  font-size: 34px;
}

.verify-email-address {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  word-break: break-word;
}

.verify-actions {
  margin-top: 28px;
}

.logout-btn {
  display: inline-block;
  padding: 12px 20px;
  background: #0b3d5c;
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
}

.logout-btn:hover {
  background: #082f49;
  color: #ffffff;
}

.install-marinet-box {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  background: #061826;
  color: #ffffff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.install-marinet-box p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.install-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.install-actions button {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

#installMarinetBtn {
  background: #ffffff;
  color: #061826;
}

#dismissInstallBtn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

@media (max-width: 640px) {
  .install-marinet-box {
    flex-direction: column;
    align-items: stretch;
  }

  .install-actions {
    width: 100%;
  }

  .install-actions button {
    flex: 1;
  }
}
.chat-page {
  max-width: 900px;
  margin: 0 auto;
  background: #f4f7fb;
  min-height: calc(100vh - 100px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.chat-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
  font-size: 34px;
  line-height: 32px;
  text-align: center;
  font-weight: 700;
}

.chat-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-user h2 {
  margin: 0;
  font-size: 20px;
}

.chat-user p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 13px;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-avatar-placeholder {
  background: #0b3d5c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.chat-messages {
  padding: 18px;
  padding-bottom: 115px;
}

.chat-row {
  display: flex;
  margin-bottom: 12px;
}

.chat-sent {
  justify-content: flex-end;
}

.chat-received {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 72%;
  padding: 10px 12px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.chat-sent .chat-bubble {
  background: #dbeafe;
  color: #0f172a;
  border-bottom-right-radius: 4px;
}

.chat-received .chat-bubble {
  background: #ffffff;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}

.chat-bubble p {
  margin: 0 0 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-time {
  display: block;
  font-size: 11px;
  color: #64748b;
  text-align: right;
  margin-top: 4px;
}

.chat-image {
  display: block;
  max-width: 240px;
  max-height: 280px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 8px;
}

.reply-btn {
  border: none;
  background: transparent;
  color: #0b3d5c;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
}

.reply-preview-inside {
  border-left: 4px solid #0b3d5c;
  background: rgba(255, 255, 255, 0.55);
  padding: 7px 9px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.reply-preview-inside strong {
  display: block;
  color: #0b3d5c;
}

.reply-preview-inside span {
  color: #475569;
}

.deleted-message {
  color: #64748b;
  font-style: italic;
}

.empty-chat {
  text-align: center;
  margin-top: 30px;
}

.chat-compose {
  position: sticky;
  bottom: 0;
  z-index: 30;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 12px;
}

.chat-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chat-compose textarea {
  flex: 1;
  min-height: 44px;
  max-height: 110px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  padding: 11px 13px;
  font-family: inherit;
}

.image-upload-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-upload-btn input {
  display: none;
}

.chat-send-btn {
  border: none;
  background: #0b3d5c;
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
}

.reply-preview-box {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f1f5f9;
  border-left: 4px solid #0b3d5c;
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 10px;
}

.reply-preview-box strong {
  color: #0b3d5c;
  font-size: 13px;
}

.reply-preview-box p {
  margin: 2px 0 0;
  color: #475569;
  font-size: 13px;
}

.reply-preview-box button {
  border: none;
  background: #cbd5e1;
  color: #0f172a;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .chat-page {
    border-radius: 0;
    min-height: calc(100vh - 70px);
  }

  .chat-bubble {
    max-width: 84%;
  }

  .chat-image {
    max-width: 210px;
  }

  .chat-user h2 {
    font-size: 17px;
  }

  .chat-user p {
    font-size: 12px;
  }
}

.messages-page {
  max-width: 950px;
  margin: 0 auto;
}

.messages-hero {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.messages-hero h2 {
  margin: 0;
  font-size: 38px;
  color: #0f172a;
}

.messages-hero p {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 18px;
}

.new-message-btn {
  background: #0b3d5c;
  color: #ffffff;
  text-decoration: none;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
  white-space: nowrap;
}

.new-message-btn.small {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 14px;
}

.messages-search-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 18px;
}

.messages-search-card input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
}

.messages-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
}

.messages-section h3 {
  margin: 0 0 16px;
  color: #0f172a;
  font-size: 24px;
}

.modern-thread,
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}

.modern-thread:hover,
.contact-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.message-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.message-avatar-placeholder {
  background: #0b3d5c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.message-thread-main,
.contact-main {
  flex: 1;
  min-width: 0;
}

.message-thread-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.message-thread-top strong,
.contact-main strong {
  color: #0f172a;
  font-size: 17px;
}

.message-time {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.message-user-info,
.contact-main p {
  margin: 4px 0;
  color: #64748b;
  font-size: 13px;
}

.message-preview {
  margin: 0;
  color: #334155;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-unread-badge {
  background: #0b3d5c;
  color: white;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.contact-chat-icon {
  font-size: 22px;
}

.empty-message-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
}

.empty-message-box h4 {
  margin: 0 0 8px;
  color: #0f172a;
}

.empty-message-box p {
  margin: 0;
  color: #64748b;
}

@media (max-width: 700px) {
  .messages-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
  }

  .messages-hero h2 {
    font-size: 30px;
  }

  .messages-hero p {
    font-size: 15px;
  }

  .new-message-btn {
    text-align: center;
  }

  .messages-section {
    padding: 16px;
  }

  .modern-thread,
  .contact-row {
    padding: 12px 8px;
  }
}
.mobile-chat-list-page {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  min-height: calc(100vh - 90px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.chat-list-header {
  background: #061826;
  color: #ffffff;
  padding: 24px;
}

.chat-list-header h2 {
  margin: 0;
  font-size: 34px;
}

.chat-list-header p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.chat-list-search {
  padding: 16px;
  background: #061826;
}

.chat-list-search input {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 999px;
  padding: 15px 18px;
  font-size: 16px;
  background: #ffffff;
  color: #0f172a;
}

.chat-list-section {
  padding: 18px 0;
}

.chat-list-section h3 {
  margin: 0;
  padding: 0 20px 12px;
  color: #0f172a;
  font-size: 18px;
}

.chat-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
}

.chat-list-row:hover {
  background: #f8fafc;
}

.chat-list-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-list-avatar-placeholder {
  background: #0b3d5c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
}

.chat-list-main {
  flex: 1;
  min-width: 0;
}

.chat-list-main strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
}

.chat-list-main p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chat-list-top span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.chat-list-badge {
  background: #0b3d5c;
  color: #ffffff;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.chat-open-icon {
  font-size: 34px;
  color: #94a3b8;
}

.chat-empty-box {
  margin: 0 20px;
  padding: 24px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  text-align: center;
}

.chat-empty-box p {
  margin: 0 0 10px;
  color: #64748b;
}

.chat-empty-box a {
  color: #0b3d5c;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 700px) {
  .mobile-chat-list-page {
    border-radius: 0;
    min-height: calc(100vh - 70px);
  }

  .chat-list-header h2 {
    font-size: 30px;
  }

  .chat-list-row {
    padding: 12px 16px;
  }

  .chat-list-avatar {
    width: 52px;
    height: 52px;
  }
}
.marinet-chat-home {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  min-height: calc(100vh - 90px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  position: relative;
  padding-bottom: 82px;
}

.chat-home-header {
  background: #061826;
  color: #ffffff;
  padding: 24px;
}

.chat-home-header h2 {
  margin: 0;
  font-size: 34px;
}

.chat-home-header p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.chat-home-search {
  background: #061826;
  padding: 0 18px 18px;
}

.chat-home-search input {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 999px;
  padding: 15px 18px;
  font-size: 16px;
  background: #ffffff;
  color: #0f172a;
}

.chat-tab-content {
  display: none;
  padding-top: 10px;
}

.chat-tab-content.active {
  display: block;
}

.chat-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
}

.chat-list-row:hover {
  background: #f8fafc;
}

.chat-list-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-list-avatar-placeholder {
  background: #0b3d5c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
}

.chat-list-main {
  flex: 1;
  min-width: 0;
}

.chat-list-main strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
}

.chat-list-main p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chat-list-top span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.chat-list-badge {
  background: #0b3d5c;
  color: #ffffff;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.chat-open-icon {
  font-size: 34px;
  color: #94a3b8;
}

.chat-empty-box {
  margin: 22px;
  padding: 28px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  text-align: center;
}

.chat-empty-box h3 {
  margin: 0 0 8px;
  color: #0f172a;
}

.chat-empty-box p {
  margin: 0;
  color: #64748b;
}

.chat-empty-box a {
  display: inline-block;
  margin-top: 12px;
  color: #0b3d5c;
  font-weight: 800;
  text-decoration: none;
}

.chat-home-bottom-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  z-index: 10;
}

.chat-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.chat-tab-btn span {
  font-size: 24px;
}

.chat-tab-btn small {
  font-size: 13px;
}

.chat-tab-btn.active {
  color: #0b3d5c;
  background: #f1f5f9;
}

@media (max-width: 700px) {
  .marinet-chat-home {
    border-radius: 0;
    min-height: calc(100vh - 70px);
  }

  .chat-home-header h2 {
    font-size: 30px;
  }

  .chat-list-row {
    padding: 13px 16px;
  }

  .chat-list-avatar {
    width: 52px;
    height: 52px;
  }
}
/* MODERN MARINET MESSAGE CENTER */

.modern-msg {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  height: calc(100vh - 95px);
  min-height: 680px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  position: relative;
  padding-bottom: 86px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

.msg-top {
  background: linear-gradient(135deg, #061826, #0b3d5c);
  color: #ffffff;
  padding: 28px 26px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.msg-top h2 {
  margin: 0;
  font-size: 38px;
  letter-spacing: -0.5px;
}

.msg-top p {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 16px;
}

.msg-top-actions {
  display: flex;
  gap: 10px;
}

.msg-top-actions button {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

.msg-search-wrap {
  background: linear-gradient(135deg, #061826, #0b3d5c);
  padding: 0 20px 22px;
}

.msg-search {
  background: #ffffff;
  border-radius: 999px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-search span {
  color: #64748b;
  font-size: 18px;
}

.msg-search input {
  width: 100%;
  border: none;
  outline: none;
  padding: 15px 0;
  font-size: 16px;
  background: transparent;
  color: #0f172a;
}

.msg-content {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

.chat-tab-content {
  display: none;
  padding-top: 8px;
}

.chat-tab-content.active {
  display: block;
}

.chat-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease, transform 0.15s ease;
}

.chat-list-row:hover {
  background: #f8fafc;
}

.chat-list-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.chat-list-avatar-placeholder {
  background: linear-gradient(135deg, #0b3d5c, #0f5f89);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 23px;
}

.chat-list-main {
  flex: 1;
  min-width: 0;
}

.chat-list-main strong {
  display: block;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.2;
}

.chat-list-main p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-list-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chat-list-top span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.chat-list-badge {
  background: #10b981;
  color: #ffffff;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.chat-open-icon {
  font-size: 36px;
  color: #94a3b8;
}

.msg-empty-state {
  margin: 28px 22px;
  padding: 34px 22px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
  text-align: center;
}

.msg-empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: #e0f2fe;
  color: #0b3d5c;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 26px;
}

.msg-empty-state h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 20px;
}

.msg-empty-state p {
  margin: 0;
  color: #64748b;
  font-size: 15px;
}

.msg-empty-state a {
  display: inline-block;
  margin-top: 14px;
  background: #0b3d5c;
  color: #ffffff;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
}

.modern-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e5e7eb;
  display: flex;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.modern-tabs .chat-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.modern-tabs .chat-tab-btn span {
  font-size: 23px;
}

.modern-tabs .chat-tab-btn small {
  font-size: 12px;
}

.modern-tabs .chat-tab-btn.active {
  color: #0b3d5c;
}

.modern-tabs .chat-tab-btn.active::before {
  content: "";
  position: absolute;
  top: 10px;
  width: 48px;
  height: 30px;
  border-radius: 999px;
  background: #e0f2fe;
  z-index: -1;
}

@media (max-width: 700px) {
  .modern-msg {
    max-width: none;
    width: 100%;
    height: calc(100vh - 70px);
    min-height: calc(100vh - 70px);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .msg-top {
    padding: 22px 20px 16px;
  }

  .msg-top h2 {
    font-size: 32px;
  }

  .msg-top-actions button {
    width: 38px;
    height: 38px;
  }

  .chat-list-row {
    padding: 14px 16px;
  }

  .chat-list-avatar {
    width: 54px;
    height: 54px;
  }

  .modern-tabs {
    height: 78px;
  }
}
.msg-my-avatar-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.msg-my-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-my-avatar-placeholder {
  background: #ffffff;
  color: #0b3d5c;
  font-weight: 900;
  font-size: 18px;
}

.msg-top-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.msg-top-actions button span {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* MODERN PRIVATE CHAT SCREEN */

.modern-chat-screen {
  max-width: 900px;
  margin: 0 auto;
  height: calc(100vh - 95px);
  min-height: 680px;
  background: #eef3f8;
  border: 1px solid #dbe3ee;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.modern-chat-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.modern-chat-back {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  text-decoration: none;
  font-size: 42px;
  line-height: 38px;
  text-align: center;
  font-weight: 900;
  flex-shrink: 0;
}

.modern-chat-user {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.modern-chat-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.modern-chat-avatar-placeholder {
  background: linear-gradient(135deg, #0b3d5c, #0f5f89);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
}

.modern-chat-user-info {
  min-width: 0;
}

.modern-chat-user-info h2 {
  margin: 0;
  font-size: 24px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-chat-user-info p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.modern-chat-actions button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modern-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(11, 61, 92, 0.06), transparent 28%),
    #eef3f8;
}

.modern-chat-row {
  display: flex;
  margin-bottom: 12px;
}

.modern-sent {
  justify-content: flex-end;
}

.modern-received {
  justify-content: flex-start;
}

.modern-chat-bubble {
  max-width: 68%;
  padding: 10px 12px 8px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  position: relative;
}

.modern-sent .modern-chat-bubble {
  background: #dbeafe;
  color: #0f172a;
  border-bottom-right-radius: 5px;
}

.modern-received .modern-chat-bubble {
  background: #ffffff;
  color: #0f172a;
  border-bottom-left-radius: 5px;
}

.modern-message-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.modern-chat-time {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  text-align: right;
}

.modern-message-tools {
  margin-top: 6px;
}

.modern-message-tools button {
  border: none;
  background: transparent;
  padding: 0;
  color: #0b3d5c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.modern-reply-inside {
  border-left: 4px solid #0b3d5c;
  background: rgba(255, 255, 255, 0.65);
  padding: 8px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}

.modern-reply-inside strong {
  display: block;
  color: #0b3d5c;
  margin-bottom: 2px;
}

.modern-reply-inside span {
  color: #475569;
}

.modern-chat-image {
  display: block;
  max-width: 260px;
  max-height: 310px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 8px;
}

.modern-deleted-message {
  margin: 0;
  color: #64748b;
  font-style: italic;
}

.modern-empty-chat {
  max-width: 320px;
  margin: 90px auto 0;
  text-align: center;
  color: #64748b;
}

.modern-empty-chat div {
  width: 64px;
  height: 64px;
  background: #e0f2fe;
  color: #0b3d5c;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}

.modern-empty-chat h3 {
  margin: 0 0 8px;
  color: #0f172a;
}

.modern-empty-chat p {
  margin: 0;
}

.modern-chat-compose {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 12px 14px;
  flex-shrink: 0;
}

.modern-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.modern-compose-row textarea {
  flex: 1;
  min-height: 46px;
  max-height: 110px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
}

.modern-compose-row textarea:focus {
  border-color: #0b3d5c;
}

.modern-attach-btn,
.modern-camera-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
}

.modern-attach-btn input,
.modern-camera-btn input {
  display: none;
}

.modern-send-btn {
  width: 52px;
  height: 46px;
  border: none;
  border-radius: 18px;
  background: #0b3d5c;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.modern-reply-preview-box {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f1f5f9;
  border-left: 4px solid #0b3d5c;
  border-radius: 14px;
  padding: 9px 12px;
  margin-bottom: 10px;
}

.modern-reply-preview-box strong {
  color: #0b3d5c;
  font-size: 13px;
}

.modern-reply-preview-box p {
  margin: 2px 0 0;
  color: #475569;
  font-size: 13px;
}

.modern-reply-preview-box button {
  border: none;
  background: #cbd5e1;
  color: #0f172a;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .modern-chat-screen {
    max-width: none;
    width: 100%;
    height: calc(100vh - 70px);
    min-height: calc(100vh - 70px);
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .modern-chat-header {
    padding: 11px 12px;
    gap: 9px;
  }

  .modern-chat-back {
    width: 38px;
    height: 38px;
    font-size: 36px;
    line-height: 31px;
  }

  .modern-chat-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .modern-chat-user-info h2 {
    font-size: 18px;
  }

  .modern-chat-user-info p {
    font-size: 12px;
  }

  .modern-chat-actions {
    gap: 4px;
  }

  .modern-chat-actions button {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .modern-chat-messages {
    padding: 12px;
  }

  .modern-chat-bubble {
    max-width: 82%;
  }

  .modern-chat-image {
    max-width: 225px;
    max-height: 280px;
  }

  .modern-chat-compose {
    padding: 9px 10px;
  }

  .modern-compose-row {
    gap: 7px;
  }

  .modern-attach-btn,
  .modern-camera-btn {
    width: 40px;
    height: 40px;
  }

  .modern-send-btn {
    width: 44px;
    height: 40px;
    border-radius: 15px;
  }

  .modern-compose-row textarea {
    min-height: 40px;
    font-size: 15px;
    padding: 10px 12px;
  }
}
/* FIX MODERN CHAT COMPOSER SIZE */

.modern-chat-compose {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 10px 12px;
  flex-shrink: 0;
}

.modern-compose-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modern-compose-row textarea {
  flex: 1;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  line-height: 22px;
}

.modern-attach-btn,
.modern-camera-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  padding: 0;
}

.modern-send-btn {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border: none;
  border-radius: 50%;
  background: #0b3d5c;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 0 2px;
}

/* Make header action buttons a little cleaner */
.modern-chat-actions button {
  width: 42px;
  height: 42px;
  font-size: 17px;
}

/* Mobile correction */
@media (max-width: 700px) {
  .modern-chat-compose {
    padding: 8px 9px;
  }

  .modern-compose-row {
    gap: 6px;
  }

  .modern-compose-row textarea {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    font-size: 15px;
    padding: 9px 14px;
  }

  .modern-attach-btn,
  .modern-camera-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .modern-send-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
}

/* PAPYRUS + DOTTED + 3D CHAT BACKGROUND */

.modern-chat-messages {
  position: relative;
  overflow-y: auto;
  padding: 28px 24px;

  background:
    radial-gradient(circle at 1px 1px, rgba(120, 86, 40, 0.14) 1px, transparent 1.3px),
    radial-gradient(circle at 4px 4px, rgba(255, 255, 255, 0.18) 0.8px, transparent 1.1px),
    linear-gradient(145deg, #f3e7c9 0%, #e7d4ad 45%, #f0e2c3 100%);

  background-size: 16px 16px, 22px 22px, 100% 100%;

  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.45),
    inset 0 -22px 35px rgba(110, 77, 36, 0.10),
    inset 18px 0 28px rgba(255,255,255,0.12),
    inset -18px 0 28px rgba(120, 85, 40, 0.08);
}

.modern-chat-messages::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.20), transparent 20%, transparent 78%, rgba(90,60,20,0.07)),
    radial-gradient(circle at top left, rgba(255,255,255,0.25), transparent 35%),
    radial-gradient(circle at bottom right, rgba(120, 86, 40, 0.10), transparent 35%);
  mix-blend-mode: soft-light;
  z-index: 0;
}

.modern-chat-messages > * {
  position: relative;
  z-index: 1;
}

.modern-chat-messages {
  background-image: url("/static/chat-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.delete-message-form {
  display: inline;
  margin-left: 10px;
}

.delete-message-form button {
  border: none;
  background: transparent;
  padding: 0;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.modern-message-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.modern-message-tools button {
  border: none;
  background: transparent;
  padding: 0;
  color: #0b3d5c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
/* MESSAGE 3-DOT MENU */

.modern-message-menu {
  position: absolute;
  top: 8px;
  right: 8px;
}

.modern-received .modern-message-menu {
  right: auto;
  left: 8px;
}

.message-menu-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.modern-chat-bubble:hover .message-menu-btn {
  display: flex;
}

.message-menu-dropdown {
  position: absolute;
  top: 30px;
  right: 0;
  min-width: 120px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.18);
  padding: 6px;
  display: none;
  z-index: 50;
}

.modern-received .message-menu-dropdown {
  right: auto;
  left: 0;
}

.message-menu-dropdown.show {
  display: block;
}

.message-menu-dropdown button {
  width: 100%;
  border: none;
  background: transparent;
  color: #0f172a;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.message-menu-dropdown button:hover {
  background: #f1f5f9;
}

.message-menu-dropdown form {
  margin: 0;
}

.message-menu-dropdown .delete-menu-btn {
  color: #b91c1c;
}

/* On mobile, always show the 3-dot button */
@media (max-width: 700px) {
  .message-menu-btn {
    display: flex;
  }

  .modern-chat-bubble {
    padding-right: 34px;
  }

  .modern-received .modern-chat-bubble {
    padding-left: 34px;
    padding-right: 12px;
  }
}
.group-list-avatar {
  background: linear-gradient(135deg, #061826, #0b3d5c);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
}

/* MODERN GROUP CHAT SCREEN */

.group-modern-chat .modern-chat-header {
  background: #ffffff;
}

.group-chat-avatar {
  font-size: 26px;
}

.group-sender-name {
  display: block;
  color: #0b3d5c;
  font-size: 13px;
  margin-bottom: 5px;
}

.group-modern-bubble {
  padding-top: 12px;
}

.forwarded-label {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-style: italic;
  margin-bottom: 5px;
}

.modern-reply-image {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  margin-top: 6px;
}

.group-menu-link {
  display: block;
  text-decoration: none;
  color: #0f172a;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.group-menu-link:hover {
  background: #f1f5f9;
}

.message-menu-dropdown select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 7px;
  margin: 5px 0;
  font-size: 12px;
}

.group-edit-message-form {
  display: none;
  margin-top: 8px;
}

.group-edit-message-form textarea {
  width: 100%;
  min-height: 70px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px;
  font-family: inherit;
}

.group-edit-message-form button {
  border: none;
  border-radius: 10px;
  padding: 7px 10px;
  margin-top: 6px;
  margin-right: 5px;
  background: #0b3d5c;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.group-edit-message-form button[type="button"] {
  background: #e2e8f0;
  color: #0f172a;
}

.reply-box-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reply-box-image {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
}

.selected-image-name {
  display: block;
  margin-top: 6px;
  margin-left: 56px;
  color: #64748b;
  font-size: 12px;
}

/* MODERN IN-CHAT GROUP MEMBERS PANEL */

.group-members-panel {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 14px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  z-index: 15;
}

.group-members-panel.show {
  display: block;
}

.group-members-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.group-members-panel-head strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
}

.group-members-panel-head span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 2px;
}

.group-members-panel-head button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 20px;
  cursor: pointer;
}

.group-members-panel-list {
  display: grid;
  gap: 8px;
}

.group-member-row-small {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 9px 10px;
}

.group-member-small-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.group-member-small-placeholder {
  background: #0b3d5c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
}

.group-member-small-main {
  flex: 1;
  min-width: 0;
}

.group-member-small-main strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-member-small-main p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-member-small-admin {
  background: #e0f2fe;
  color: #0b3d5c;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .group-members-panel {
    max-height: 230px;
    padding: 10px;
  }

  .group-member-row-small {
    border-radius: 14px;
  }
}
/* Make group members list a floating in-chat panel */

.group-modern-chat {
  position: relative;
}

.group-members-panel {
  position: absolute;
  top: 92px;
  left: 16px;
  right: 16px;
  z-index: 100;

  display: none;
  max-height: 360px;
  overflow-y: auto;

  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dbe3ee;
  border-radius: 22px;
  padding: 16px;

  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.22),
    0 8px 20px rgba(15, 23, 42, 0.10);

  backdrop-filter: blur(14px);
}

.group-members-panel.show {
  display: block;
}

@media (max-width: 700px) {
  .group-members-panel {
    top: 70px;
    left: 8px;
    right: 8px;
    max-height: 55vh;
    border-radius: 18px;
    padding: 12px;
  }
}
/* MODERN GROUPS LIST */

.groups-list-panel {
  max-width: 950px;
  margin-top: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.groups-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #edf2f7;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.groups-list-row:last-child {
  border-bottom: none;
}

.groups-list-row:hover {
  background: #f8fafc;
}

.groups-list-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;

  background: linear-gradient(135deg, #061826, #0b5d82);
  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.12);
}

.groups-list-main {
  flex: 1;
  min-width: 0;
}

.groups-list-main strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
}

.groups-list-main p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.groups-list-main span {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.groups-list-admin {
  background: #e0f2fe;
  color: #0b3d5c;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.groups-list-arrow {
  color: #94a3b8;
  font-size: 34px;
  line-height: 1;
  flex-shrink: 0;
}

.groups-empty-state {
  padding: 30px;
  text-align: center;
}

.groups-empty-state h3 {
  margin: 0 0 8px;
  color: #0f172a;
}

.groups-empty-state p {
  margin: 0;
  color: #64748b;
}

.groups-empty-state a {
  display: inline-block;
  margin-top: 14px;
  padding: 11px 18px;
  border-radius: 14px;
  background: #0b3d5c;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 700px) {
  .groups-list-panel {
    border-radius: 18px;
  }

  .groups-list-row {
    padding: 13px 14px;
    gap: 11px;
  }

  .groups-list-icon {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .groups-list-main strong {
    font-size: 16px;
  }

  .groups-list-main p {
    font-size: 13px;
  }

  .groups-list-main span {
    font-size: 12px;
  }

  .groups-list-admin {
    display: none;
  }
}
/* GLOBAL UNREAD BADGES */

.nav-link-with-badge {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.side-nav-unread-badge {
  min-width: 27px;
  height: 27px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.bottom-nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-unread-badge {
  position: absolute;
  top: -9px;
  right: -15px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  border: 2px solid #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.drawer-link-with-badge {
  display: flex !important;
  align-items: center;
}

.drawer-link-with-badge strong {
  flex: 1;
}

.drawer-unread-badge {
  min-width: 25px;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

/* UNREAD BADGES ON MESSAGE PAGE TABS */

.chat-tab-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bottom-tab-unread-badge {
  position: absolute;
  top: -9px;
  right: -18px;

  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #ef4444;
  color: #ffffff;
  border: 2px solid #ffffff;

  font-size: 11px;
  font-weight: 900;
  line-height: 1;

  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}
.group-typing-indicator {
  padding: 7px 18px;
  background: #ffffff;
  color: #64748b;
  font-size: 13px;
  font-style: italic;
  border-top: 1px solid #eef2f7;
}

.group-typing-indicator span {
  display: inline-block;
}

@media (max-width: 700px) {
  .group-typing-indicator {
    padding: 6px 12px;
    font-size: 12px;
  }
}
.private-user-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.private-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* GROUP MEMBER ONLINE STATUS */

.group-member-status-dot {
  width: 11px;
  height: 11px;
  min-width: 11px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
  align-self: center;
}

.group-member-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

/* PRIVATE MESSAGE STEERING-WHEEL STATUS */

.modern-chat-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
}

.modern-chat-meta .modern-chat-time {
  margin-top: 0;
}

.private-message-status {
  display: inline-flex;
  align-items: center;
  color: #64748b;
  font-family: "Segoe UI Symbol", Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -3px;
  cursor: default;
}

.private-message-status.sent {
  color: #64748b;
  letter-spacing: 0;
}

.private-message-status.delivered {
  color: #64748b;
}

.private-message-status.read {
  color: #1266f1;
}

/* =========================================================
   MARINET MOBILE PHOTO AND VIDEO POSTING
   ========================================================= */

.mobile-media-picker {
  margin-top: 14px;
  margin-bottom: 16px;
}

.mobile-media-title {
  margin: 0 0 9px;
  color: #16344d;
  font-size: 14px;
  font-weight: 700;
}

.mobile-media-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-media-button {
  min-width: 0;
  min-height: 68px;
  padding: 10px 6px;
  border: 1px solid #d2dde6;
  border-radius: 12px;
  background: #f6f9fb;
  color: #12324b;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-media-button strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.mobile-media-button span {
  display: block;
  margin-top: 4px;
  color: #687d8e;
  font-size: 11px;
  line-height: 1.25;
}

.mobile-media-button:hover {
  border-color: #9fb3c3;
  background: #edf4f8;
}

.mobile-media-button:active {
  transform: scale(0.98);
}

.hidden-media-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.selected-media-preview {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #d2dde6;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.selected-media-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.selected-media-information {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.selected-media-information strong {
  color: #12324b;
  font-size: 14px;
}

.selected-media-name {
  display: block;
  max-width: 240px;
  margin-top: 3px;
  color: #687d8e;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-selected-media {
  flex-shrink: 0;
  padding: 7px 11px;
  border: 1px solid #d5b0b0;
  border-radius: 8px;
  background: #ffffff;
  color: #a22929;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.remove-selected-media:hover {
  background: #fff4f4;
}

.selected-media-content {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #071827;
}

.selected-post-image,
.selected-post-video {
  display: block;
  width: 100%;
  max-height: 450px;
  margin: 0 auto;
  object-fit: contain;
  background: #071827;
}

.selected-media-help {
  margin: 8px 2px 0;
  color: #687d8e;
  font-size: 12px;
  text-align: center;
}

.create-post-url-section {
  margin-top: 14px;
  margin-bottom: 14px;
}

.create-post-url-section label {
  display: block;
  margin-bottom: 6px;
  color: #16344d;
  font-size: 14px;
  font-weight: 700;
}

.create-post-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .mobile-media-buttons {
    gap: 6px;
  }

  .mobile-media-button {
    min-height: 64px;
    padding: 8px 4px;
  }

  .mobile-media-button strong {
    font-size: 13px;
  }

  .mobile-media-button span {
    font-size: 10px;
  }

  .selected-media-name {
    max-width: 190px;
  }
}
/* Private-message video player */

.modern-chat-video {
  display: block;
  width: 100%;
  max-width: 520px;
  max-height: 420px;
  border-radius: 14px;
  background: #000000;
  object-fit: contain;
}

@media (max-width: 600px) {
  .modern-chat-video {
    max-width: 100%;
    max-height: 360px;
  }
}

/* =========================================================
   PRIVATE CHAT PHOTO / VIDEO CAMERA MENU
   ========================================================= */

.modern-camera-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modern-camera-icon {
  display: block;
  width: 22px;
  height: 22px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modern-camera-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-choice-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 1000;

  display: none;
  width: 155px;
  padding: 6px;

  border: 1px solid #d5dee6;
  border-radius: 12px;
  background: #ffffff;

  box-shadow: 0 8px 24px rgba(0, 25, 45, 0.18);
}

.camera-choice-menu.show {
  display: block;
}

.camera-choice-option {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 12px;

  border-radius: 8px;
  color: #12324b;

  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.camera-choice-option:hover {
  background: #edf3f7;
}

.camera-choice-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   MARINET PRIVATE VIDEO CALL
   ========================================================= */

.video-call-panel {
  position: absolute;
  inset: 0;
  z-index: 500;
  background: #061826;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.video-call-top {
  min-height: 68px;
  padding: 14px 18px;
  background: rgba(3, 24, 39, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.video-call-top strong {
  display: block;
  font-size: 17px;
}

.video-call-top span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 13px;
}

.video-call-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 25px;
  cursor: pointer;
  padding: 0;
}

.video-call-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #020617;
  overflow: hidden;
}

.remote-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.local-video {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 150px;
  height: 210px;
  border-radius: 18px;
  object-fit: cover;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.video-call-controls {
  min-height: 82px;
  padding: 14px 18px;
  background: rgba(3, 24, 39, 0.98);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.video-call-controls button {
  min-width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}

.video-call-controls .end-video-call {
  min-width: 88px;
  border-radius: 999px;
  background: #dc2626;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 700px) {
  .local-video {
    right: 10px;
    bottom: 10px;
    width: 105px;
    height: 145px;
    border-radius: 14px;
  }

  .video-call-controls {
    min-height: 74px;
    padding: 11px 12px;
  }

  .video-call-controls button {
    width: 46px;
    height: 46px;
  }
}

.modern-chat-screen {
  position: relative;
}

.incoming-call-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  margin-top: 24px;
}

.incoming-call-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.incoming-call-circle {
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
}

.reject-video-call {
  background: linear-gradient(135deg, #ff4d4f, #dc2626);
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.3);
}

.accept-video-call {
  background: linear-gradient(135deg, #24d05a, #16a34a);
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.3);
}

.decline-phone-symbol {
  font-size: 34px;
  line-height: 1;
  transform: rotate(135deg);
}

.accept-video-symbol {
  width: 34px;
  height: 34px;
  fill: white;
}

.incoming-call-divider {
  width: 1px;
  height: 88px;
  background: rgba(148, 163, 184, 0.32);
}

.incoming-video-call {
  position: fixed;
  inset: 0;
  z-index: 9999;

  align-items: flex-start;
  justify-content: center;

  padding: 140px 16px 20px;

  background: rgba(3, 24, 39, 0.42);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* FINAL INCOMING VIDEO CALL NOTIFICATION */

.incoming-video-call {
  position: fixed !important;
  inset: 0 !important;
  z-index: 20000 !important;

  align-items: flex-start !important;
  justify-content: center !important;

  padding: 105px 14px 20px !important;

  background: rgba(3, 24, 39, 0.45) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.incoming-call-card {
  width: 100% !important;
  max-width: 430px !important;

  background: #ffffff !important;
  border-radius: 24px !important;
  padding: 22px 20px 20px !important;

  text-align: center !important;

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.30),
    0 8px 24px rgba(15, 23, 42, 0.16) !important;
}

.incoming-call-avatar {
  width: 68px !important;
  height: 68px !important;
  margin: 0 auto 12px !important;

  border-radius: 50% !important;
  overflow: hidden !important;

  background: #0b5d82 !important;
  color: #ffffff !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  font-size: 28px !important;
  font-weight: 800 !important;
}

.incoming-call-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.incoming-call-card h3 {
  margin: 0 0 5px !important;
  padding: 0 !important;

  color: #0f172a !important;
  font-size: 21px !important;
}

.incoming-call-card > p {
  margin: 0 !important;
  padding: 0 !important;

  color: #64748b !important;
  font-size: 14px !important;
}

.incoming-call-card .incoming-call-actions {
  display: flex !important;
  align-items: center !import
ant;
  justify-content: center !important;

  gap: 34px !important;
  margin-top: 22px !important;
}

.incoming-call-card .incoming-call-circle {
  width: 66px !important;
  height: 66px !important;
  padding: 0 !important;
}

.incoming-call-card .incoming-call-divider {
  width: 1px !important;
  height: 80px !important;
}

@media (max-width: 600px) {
  .incoming-video-call {
    padding-top: 92px !important;
  }

  .incoming-call-card {
    max-width: 360px !important;
    border-radius: 22px !important;
  }
}

/* FEED VIDEO SIZE */

.post-video-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 12px;
  background: #000;
  overflow: hidden;
}

.post-video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #000;
}

@media (max-width: 600px) {
  .post-video {
    max-height: 360px;
  }
}

/* LINKEDIN-STYLE FEED VIDEO */

.post-video-container {
  width: 100% !important;
  height: 640px !important;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  background: #000000 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
}

.post-video {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: 720px !important;
  object-fit: cover !important;
  background: #000000 !important;
  border-radius: 18px !important;
}
@media (max-width: 600px) {
  .post-video-container {
    height: 560px !important;
  }
}

.topbar-post-icon {
  font-size: 32px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

.floating-post-btn {
  background: transparent !important;
  color: var(--marine-blue) !important;
  box-shadow: none !important;
  border: 2px solid var(--marine-blue) !important;
}

/* Hide bottom navigation while scrolling down */
.bottom-nav {
  transition: transform 0.28s ease !important;
  will-change: transform;
}

.bottom-nav.bottom-nav-hidden {
  transform: translateY(120%) !important;
}

/* =========================================================
   FIXED CHAT LAYOUT
   Messages and Conversation pages
   ========================================================= */

body.chat-page {
  height: 100dvh;
  overflow: hidden !important;
}

body.chat-page .marinet-app {
  height: 100dvh;
  overflow: hidden;
}

body.chat-page .app-main {
  height: calc(100dvh - 88px);
  overflow: hidden !important;
}

body.chat-page .app-container {
  height: 100%;
  min-height: 0;
  overflow: hidden !important;
  padding-bottom: 0 !important;
}


/* MESSAGES PAGE */

body.chat-page .marinet-chat-home.modern-msg {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.chat-page .msg-top,
body.chat-page .msg-search-wrap {
  flex-shrink: 0;
}

body.chat-page .msg-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.chat-page .chat-home-bottom-tabs {
  position: relative !important;
  bottom: auto !important;
  flex-shrink: 0;
  z-index: 20;
}


/* CONVERSATION PAGE */

body.chat-page .modern-chat-screen {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.chat-page .modern-chat-header {
  flex-shrink: 0;
}

body.chat-page .modern-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.chat-page .private-typing-indicator {
  flex-shrink: 0;
}

body.chat-page .modern-chat-compose {
  position: relative !important;
  bottom: auto !important;
  flex-shrink: 0;
  z-index: 30;
}

/* Fill the full phone screen on chat pages */

body.chat-page .marinet-app {
  height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.chat-page .app-topbar {
  flex-shrink: 0 !important;
}

body.chat-page .app-main {
  flex: 1 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
}

body.chat-page .app-container {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Do not show the floating post button inside chat pages */

body.chat-page .floating-post-btn {
  display: none !important;
}

body.chat-page .modern-chat-compose {
  padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  margin-bottom: 0 !important;
  background: white !important;
  box-sizing: border-box !important;
}

body.chat-page,
body.chat-page .marinet-app {
  height: var(--marinet-viewport-height, 100dvh) !important;
  max-height: var(--marinet-viewport-height, 100dvh) !important;
}

body.chat-page .modern-chat-compose {
  width: 100% !important;
  min-height: 82px !important;
  padding: 12px 16px 18px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

/* Messages page spacing adjustments */

body.chat-page .marinet-chat-home.modern-msg {
  height: 100% !important;
}

body.chat-page .msg-search-wrap {
  padding: 12px 36px 18px !important;
}

body.chat-page .msg-search {
  height: 58px !important;
  min-height: 58px !important;
  border-radius: 30px !important;
  padding: 0 22px !important;
}

body.chat-page .msg-search input {
  height: 100% !important;
  font-size: 18px !important;
  padding: 0 !important;
}

body.chat-page .msg-search span {
  font-size: 24px !important;
}

/* Let the chat/contact list fill the middle space */

body.chat-page .msg-content {
  flex: 1 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* Make the four-button bar compact and keep it at the bottom */

body.chat-page .chat-home-bottom-tabs {
  height: 88px !important;
  min-height: 88px !important;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  margin: 0 !important;
  align-items: center !important;
  background: white !important;
  box-sizing: border-box !important;
}

body.chat-page .chat-tab-btn {
  height: 68px !important;
  padding: 4px 6px !important;
  justify-content: center !important;
}

body.chat-page .chat-tab-btn > span {
  font-size: 27px !important;
}

body.chat-page .chat-tab-btn small {
  font-size: 13px !important;
  margin-top: 2px !important;
}

/* Compact post Edit/Delete menu */

.post-header {
  position: relative;
}

.post-menu {
  position: relative;
  flex-shrink: 0;
}

.post-menu .menu-btn {
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: #f2f5f8 !important;
  color: #162235 !important;
  font-size: 28px !important;
  line-height: 46px !important;
  box-shadow: none !important;
}

.post-menu .menu-dropdown {
  position: absolute !important;
  top: 52px !important;
  right: 0 !important;
  width: 140px !important;
  min-width: 140px !important;
  padding: 6px !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16) !important;
  z-index: 500 !important;
}

.post-menu .menu-dropdown a,
.post-menu .menu-dropdown form,
.post-menu .menu-dropdown button {
  width: 100% !important;
  margin: 0 !important;
}

.post-menu .menu-dropdown a,
.post-menu .menu-dropdown button {
  display: block !important;
  padding: 11px 12px !important;
  border: none !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #182235 !important;
  text-align: left !important;
  text-decoration: none !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
}

.post-menu .menu-dropdown button.danger-action {
  color: #d62828 !important;
}

.post-menu .menu-dropdown a:hover,
.post-menu .menu-dropdown button:hover {
  background: #f2f5f8 !important;
}

.post-menu .menu-icon {
  font-size: inherit !important;
}

.post-menu .menu-dropdown {
  width: 118px !important;
  min-width: 118px !important;
  padding: 4px !important;
  border-radius: 12px !important;
}

.post-menu .menu-dropdown a,
.post-menu .menu-dropdown button {
  padding: 9px 10px !important;
  font-size: 15px !important;
  line-height: 1.1 !important;
}

.post-menu .menu-dropdown form {
  margin: 0 !important;
}

.post-menu .menu-dropdown a,
.post-menu .menu-dropdown button {
  text-align: left !important;
  padding-left: 12px !important;
}

.post-menu .menu-dropdown button.danger-action {
  display: block !important;
}

.post-menu .menu-dropdown button.danger-action {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  padding-left: 12px !important;
}

.post-menu .menu-dropdown button.danger-action .menu-icon {
  display: block !important;
  width: auto !important;
  margin: 0 !important;
  text-align: left !important;
}

/* Final alignment for post Edit/Delete menu */

.post-menu .menu-dropdown form {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.post-menu .menu-dropdown a,
.post-menu .menu-dropdown button.danger-action {
  width: 100% !important;
  padding: 9px 12px !important;
  margin: 0 !important;
  text-align: left !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

/* Repost label styling */

.repost-label {
  display: flex;
  align-items: center;
  gap: 7px;

  padding: 12px 18px 10px;
  margin: 0;

  color: #64748b;
  font-size: 14px;
  line-height: 1.2;

  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.repost-label > span:first-child {
  color: #0b3d5c;
  font-size: 18px;
  line-height: 1;
}

.repost-label strong {
  font-size: 14px;
  font-weight: 800;
}

.repost-label .profile-link {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.repost-label .profile-link:hover {
  text-decoration: underline;
}

/* =========================================
   CREATE CONTENT SELECTION
========================================= */

.create-hub {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 30px;
}

.create-hub-header {
  margin-bottom: 18px;
}

.create-hub-header h2 {
  margin: 0 0 6px;
  color: #061826;
  font-size: 26px;
}

.create-hub-header p {
  margin: 0;
  color: #64748b;
  line-height: 1.5;
}

.create-type-grid {
  display: grid;
  gap: 12px;
}

.create-type-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #dce4ea;
  border-radius: 14px;
  text-decoration: none;
  color: #061826;
  box-sizing: border-box;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.create-type-card:hover {
  transform: translateY(-1px);
  border-color: #1d78b5;
  box-shadow: 0 5px 16px rgba(6, 24, 38, 0.08);
}

.create-type-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf5fb;
  border-radius: 12px;
  font-size: 22px;
}

.create-type-text {
  flex: 1;
  min-width: 0;
}

.create-type-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: #061826;
}

.create-type-text span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.create-type-arrow {
  color: #1d78b5;
  font-size: 28px;
  line-height: 1;
}

.create-type-status {
  padding: 5px 8px;
  border-radius: 20px;
  background: #eef2f5;
  color: #718096;
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .create-hub {
    padding: 0 2px 24px;
  }

  .create-hub-header h2 {
    font-size: 23px;
  }

  .create-type-card {
    padding: 14px 12px;
    gap: 11px;
  }

  .create-type-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 20px;
  }

  .create-type-text strong {
    font-size: 15px;
  }

  .create-type-text span {
    font-size: 12px;
  }

  .create-type-status {
    font-size: 10px;
    padding: 4px 7px;
  }
}