/* Global Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f3f2ef;
  color: #000000;
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

a {
  color: #0a66c2;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* LinkedIn-style Navbar */
.navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 8px 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 1.25rem;
  color: #0a66c2 !important;
  text-decoration: none;
}

.navbar-brand svg {
  margin-right: 8px;
}

.brand-text {
  font-weight: 600;
}

.navbar-nav .nav-link {
  color: #666666 !important;
  font-weight: 400;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: #0a66c2 !important;
  background-color: #f3f2ef;
  text-decoration: none !important;
}

.navbar-nav .nav-link i {
  margin-right: 6px;
  font-size: 0.875rem;
}

.nav-text {
  font-size: 0.875rem;
}

.nav-profile-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-menu {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 8px 0;
}

.dropdown-item {
  padding: 8px 16px;
  font-size: 0.875rem;
  color: #000000;
}

.dropdown-item:hover {
  background-color: #f3f2ef;
  color: #000000;
}

.dropdown-divider {
  margin: 8px 0;
  border-color: #e0e0e0;
}

/* LinkedIn Profile Container */
.linkedin-profile-container {
  background-color: #f3f2ef;
  min-height: 100vh;
}

.linkedin-profile-container .container {
  margin-top: 32px;
}

/* Cover Photo Section */
.cover-photo-section {
  position: relative;
  margin-bottom: 0;
}

.cover-photo {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}


.profile-picture {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}




.verified-badge {
  margin-left: 8px;
}

.verified-badge svg {
  color: #0a66c2;
  vertical-align: middle;
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid transparent;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* Admin Mode Styles */
.navbar-nav .nav-item .nav-link i {
  margin-right: 0.5rem;
}

.navbar-nav .nav-item .nav-link[href="/profile-edit"],
.navbar-nav .nav-item .nav-link[href="/messages"] {
  color: #0a66c2;
  font-weight: 500;
}

.navbar-nav .nav-item .nav-link[href="/profile-edit"]:hover,
.navbar-nav .nav-item .nav-link[href="/messages"]:hover {
  color: #004182;
}

.dropdown-menu .dropdown-item i {
  margin-right: 0.5rem;
  width: 16px;
  text-align: center;
}

.dropdown-menu .dropdown-item[href*="logout"] {
  color: #dc3545;
}

.dropdown-menu .dropdown-item[href*="logout"]:hover {
  background-color: #f8d7da;
  color: #721c24;
}

/* Admin Mode Visual Indicator */
.navbar.admin-mode {
  border-bottom: 3px solid #0a66c2;
  position: relative;
}

.navbar.admin-mode::before {
  content: "ADMIN MODE";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #0a66c2;
  color: white;
  padding: 2px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}

/* Super Admin Mode Visual Indicator */
.navbar.super-admin-mode {
  border-bottom: 3px solid #dc3545;
  position: relative;
}

.navbar.super-admin-mode::before {
  content: "SUPER ADMIN MODE";
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #dc3545;
  color: white;
  padding: 2px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}

.profile-headline {
  font-size: 1.25rem;
  font-weight: 400;
  color: #000000;
  margin: 0 0 4px 0;
}

.profile-location {
  font-size: 0.875rem;
  color: #666666;
  margin: 0 0 8px 0;
}

.contact-link {
  color: #0a66c2;
}

.profile-stats {
  font-size: 0.875rem;
  color: #666666;
}

.profile-stats .connections,
.profile-stats .followers {
  margin-right: 16px;
}


/* LinkedIn Cards */
.linkedin-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0;
  margin-bottom: 16px;
  box-shadow: none;
}

.card-header {
  padding: 16px 24px 0 24px;
  border-bottom: none;
  background: transparent;
}

.card-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 16px 0;
}

.card-content {
  padding: 0 24px 24px 24px;
}

.card-content p {
  margin-bottom: 16px;
  color: #000000;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Experience Section */
.experience-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.experience-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.experience-title h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 2px 0;
}

.experience-title .company {
  font-size: 0.875rem;
  color: #0a66c2;
  margin: 0;
}

.experience-period {
  font-size: 0.875rem;
  color: #666666;
  white-space: nowrap;
}

.experience-location {
  font-size: 0.875rem;
  color: #666666;
  margin: 0 0 8px 0;
}

.experience-description {
  font-size: 0.875rem;
  color: #000000;
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.experience-achievements {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.experience-achievements li {
  font-size: 0.875rem;
  color: #000000;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* Education Section */
.education-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}

.education-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.education-title h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 2px 0;
}

.education-title .institution {
  font-size: 0.875rem;
  color: #0a66c2;
  margin: 0;
}

.education-period {
  font-size: 0.875rem;
  color: #666666;
  white-space: nowrap;
}

.education-location {
  font-size: 0.875rem;
  color: #666666;
  margin: 0 0 8px 0;
}

.education-description {
  font-size: 0.875rem;
  color: #000000;
  margin: 0;
  line-height: 1.5;
}

/* Skills Section */
.skills-section {
  margin-bottom: 24px;
}

.skills-section:last-child {
  margin-bottom: 0;
}

.skills-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 8px 0;
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background-color: #f3f2ef;
  color: #000000;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.875rem;
  font-weight: 400;
  border: 1px solid #e0e0e0;
}

/* People You May Know */
.people-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

.people-item:last-child {
  border-bottom: none;
}

.people-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.people-info {
  flex: 1;
}

.people-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 2px 0;
}

.people-info p {
  font-size: 0.75rem;
  color: #666666;
  margin: 0;
}

/* Open to Work Card */
.open-to-work {
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  color: #ffffff;
  border: none;
}

.open-to-work .card-content {
  padding: 16px 24px;
}

.open-to-work-content {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.open-to-work-icon {
  margin-right: 12px;
}

.open-to-work-icon svg {
  color: #ffffff;
}

.open-to-work-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.open-to-work-text p {
  font-size: 0.875rem;
  color: #ffffff;
  margin: 0;
  opacity: 0.9;
}

.open-to-work .btn {
  background-color: #ffffff;
  color: #0a66c2;
  border: none;
  font-weight: 600;
}

.open-to-work .btn:hover {
  background-color: #f3f2ef;
  color: #0a66c2;
}

/* Profile URL */
.profile-url {
  font-size: 0.875rem;
  color: #0a66c2;
  word-break: break-all;
}

/* Buttons */
.btn {
  border-radius: 24px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 6px 16px;
  border: 1px solid;
}

.btn-primary {
  background-color: #0a66c2;
  border-color: #0a66c2;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #004182;
  border-color: #004182;
  color: #ffffff;
}

.btn-outline-primary {
  background-color: transparent;
  border-color: #0a66c2;
  color: #0a66c2;
}

.btn-outline-primary:hover {
  background-color: #0a66c2;
  border-color: #0a66c2;
  color: #ffffff;
}

.btn-outline-secondary {
  background-color: transparent;
  border-color: #666666;
  color: #666666;
}

.btn-outline-secondary:hover {
  background-color: #666666;
  border-color: #666666;
  color: #ffffff;
}

.btn-sm {
  padding: 4px 12px;
  font-size: 0.75rem;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 32px 0;
}

.footer-section h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 8px 0;
}

.footer-section h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section p {
  font-size: 0.875rem;
  color: #666666;
  margin: 0 0 4px 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  font-size: 0.875rem;
  color: #666666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: #0a66c2;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #666666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: #0a66c2;
}

.social-link svg,
.social-link i {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.footer-bottom {
  border-top: 1px solid #e0e0e0;
  padding: 16px 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-content p {
  font-size: 0.75rem;
  color: #666666;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 0.75rem;
  color: #666666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #0a66c2;
}

/* LinkedIn Messaging Bar */
.chat-widget {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 1000;
  width: 280px;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.chat-toggle {
  width: 100%;
  height: 48px;
  background-color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.chat-toggle:hover {
  background-color: #f3f2ef;
}

.messaging-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}

.chat-toggle i {
  color: #666666;
  font-size: 16px;
}

.chat-toggle .messaging-text {
  color: #000000;
  font-size: 0.875rem;
  font-weight: 400;
  flex: 1;
}

.chat-toggle .messaging-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-toggle .messaging-controls i {
  color: #666666;
  font-size: 14px;
}

.chat-container {
  position: absolute;
  bottom: 48px;
  right: 0;
  width: 320px;
  background-color: #ffffff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
  display: none;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  border-bottom: none;
}

.chat-widget.active .chat-container {
  display: block;
}

.chat-header {
  background-color: #0a66c2;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h4 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.chat-close {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
  font-size: 14px;
}

.chat-close:hover {
  background-color: rgba(255,255,255,0.1);
}

.chat-body {
  padding: 16px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0a66c2;
  box-shadow: 0 0 0 1px rgba(10,102,194,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.contact-form .btn {
  margin-top: 4px;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Responsive Design */

@media (max-width: 768px) {
  .profile-picture {
  width: 120px;
  height: 120px;
  }

  .profile-headline {
    font-size: 1rem;
    text-align: center;
  }

  .profile-location {
    text-align: center;
  }

  .profile-stats {
    text-align: center;
  }

  .card-header,
  .card-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .experience-header,
  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .experience-period,
  .education-period {
    margin-top: 4px;
  }

  .chat-widget {
    width: 250px;
  }
  
  .chat-container {
    width: 280px;
    right: -10px;
  }
}

@media (max-width: 480px) {
  .chat-widget {
    width: calc(100vw - 20px);
    right: 10px;
  }
  
  .chat-container {
    width: calc(100vw - 20px);
    right: 10px;
  }
}

/* ========================================
   PROFILE PAGE STYLES
   ======================================== */

/* Profile Not Found Page */
.profile-not-found {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.not-found-container {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 100%;
}

.not-found-icon {
  font-size: 4rem;
  color: #dc3545;
  margin-bottom: 1.5rem;
}

.not-found-content h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.not-found-content p {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.not-found-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Maintenance Page */
.maintenance-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.maintenance-container {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 100%;
}

.maintenance-icon {
  font-size: 4rem;
  color: #ffc107;
  margin-bottom: 1.5rem;
}

.maintenance-content h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.maintenance-content p {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.maintenance-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Private Profile Page */
.private-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.private-container {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  max-width: 500px;
  width: 100%;
}

.private-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.private-content h1 {
  color: #333;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.private-content p {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.private-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Profile Container */
.profile-container {
  background-color: #f3f2ef;
  min-height: 100vh;
}

/* Cover Photo */
.cover-photo {
  height: 350px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(10,102,194,0.3) 0%, rgba(0,65,130,0.5) 100%);
}

/* Profile Picture Container */
.profile-picture-container {
  position: absolute;
  bottom: -90px; /* Increased overlap for better integration */
  left: 24px;
  z-index: 10;
}

.profile-picture {
  width: 180px; /* Increased from 152px */
  height: 180px; /* Increased from 152px */
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  position: relative;
  z-index: 12;
}

.verification-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #0a66c2;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  font-size: 12px;
  z-index: 15;
}

/* Profile Header */
.profile-header {
  background: white;
  padding: 0;
  position: relative;
  z-index: 5;
}

.profile-info {
  padding: 2rem 0 1rem 0;
  margin-left: 220px; /* Increased to accommodate larger profile picture */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px; /* Match profile picture height */
}

.profile-name {
  font-size: 1.75rem; /* Increased from 1.5rem */
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem; /* Increased from 0.25rem */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Profile Actions - Better positioning */
.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: center;
  min-height: 180px; /* Match profile picture height */
  padding: 2rem 0 1rem 0;
}

.profile-actions .btn {
  min-width: 140px;
  justify-content: flex-start;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.profile-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.verified-badge {
  color: #0a66c2;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-title {
  font-size: 1.1rem; /* Increased from 1rem */
  color: #666;
  margin-bottom: 0.5rem; /* Increased from 0.25rem */
  font-weight: 500; /* Increased from 400 */
}

.profile-location {
  color: #666;
  margin-bottom: 0.75rem; /* Increased from 0.5rem */
  font-size: 0.9rem; /* Increased from 0.875rem */
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.profile-bio {
  color: #333;
  line-height: 1.6; /* Increased from 1.5 */
  margin-bottom: 1rem; /* Increased from 0.75rem */
  font-size: 0.95rem; /* Increased from 0.875rem */
  max-width: 500px; /* Prevent bio from being too wide */
}

.contact-info {
  margin-top: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #0a66c2;
  text-decoration: none;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.contact-item:hover {
  text-decoration: underline;
}

/* Profile actions moved to header navigation */

.profile-content {
  padding: 1rem 0 2rem 0;
}

/* Profile Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background-color: #0a66c2;
  color: white;
}

.btn-primary:hover {
  background-color: #004182;
}

.btn-outline-secondary {
  background-color: transparent;
  color: #666;
  border: 1px solid #666;
}

.btn-outline-secondary:hover {
  background-color: #f3f2ef;
  border-color: #000;
  color: #000;
}

/* Profile Sections */
.profile-section {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.profile-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 1rem;
}

.experience-item,
.education-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #eee;
}

.experience-item:last-child,
.education-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.experience-item h3,
.education-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.25rem;
}

.company,
.institution {
  color: #0a66c2;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.period {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.location {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.description {
  color: #333;
  line-height: 1.6;
}

/* Skills */
.skill-category {
  margin-bottom: 1rem;
}

.skill-category h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background-color: #f3f2ef;
  color: #000;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 400;
  border: 1px solid #e0e0e0;
}

/* Profile Links */
.profile-link {
  display: block;
  color: #0a66c2;
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

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

.profile-link:last-child {
  border-bottom: none;
}

/* Profile Stats Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.stat-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0a66c2;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
}

/* Empty Section Styling */
.empty-section {
  text-align: center;
  padding: 3rem 2rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
  margin: 1rem 0;
}

.empty-icon {
  font-size: 3rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.empty-section h3 {
  color: #495057;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.empty-section p {
  color: #6c757d;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-section .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.empty-section .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
}

/* Messenger Widget */
.messenger-widget {
  position: fixed;
  bottom: 0px;
  right: 20px;
  width: 350px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.messenger-widget.active {
  transform: translateY(0);
}

.messenger-header {
  background: #0a66c2;
  color: white;
  padding: 1rem;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.messenger-header h3 {
  margin: 0;
  font-size: 1rem;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.messenger-form {
  padding: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0a66c2;
}

/* Profile Page Responsive Design */
@media (max-width: 768px) {
  .profile-picture-container {
    left: 50%;
    transform: translateX(-50%);
    bottom: -70px; /* Adjusted for larger profile picture */
  }
  
  .profile-picture {
    width: 140px; /* Smaller on mobile */
    height: 140px;
  }
  
  .profile-info {
    margin-left: 0;
    padding: 2rem 1rem 0 1rem;
    text-align: center;
    min-height: auto;
  }
  
  .profile-header {
    margin-top: 70px; /* Adjusted for larger profile picture */
  }
  
  .profile-actions {
    min-height: auto;
    padding: 1rem 0;
    align-items: center;
  }
  
  .profile-actions .btn {
    width: 100%;
    max-width: 200px;
  }
  
  .profile-bio {
    max-width: none; /* Remove width constraint on mobile */
  }
  
  .messenger-widget {
    width: calc(100% - 40px);
    right: 20px;
    left: 20px;
  }
}

/* ========================================
   PROFILE EDIT PAGE STYLES
   ======================================== */

.profile-edit-container {
  background-color: #f3f2ef;
  min-height: 100vh;
  padding: 2rem 0;
}

.profile-edit-header {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-edit-header h1 {
  color: #000;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.profile-edit-header p {
  color: #666;
  font-size: 1rem;
}

.form-section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-section h3 {
  color: #000;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0a66c2;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 600;
  color: #000;
  margin-bottom: 0.5rem;
  display: block;
}

.form-control {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: #0a66c2;
  box-shadow: 0 0 0 0.2rem rgba(10, 102, 194, 0.25);
}

.privacy-setting {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.privacy-icon {
  font-size: 1rem;
  color: #0a66c2;
  cursor: pointer;
  transition: color 0.2s;
  margin-right: 0.25rem;
}

.privacy-icon:hover {
  color: #004182;
}

.privacy-icon.locked {
  color: #dc3545;
}

.privacy-icon.locked:hover {
  color: #c82333;
}

.privacy-select {
  width: auto;
  min-width: 100px;
  font-size: 0.875rem;
  padding: 0.5rem;
}

.current-image {
  margin-top: 0.5rem;
}

.current-image small {
  color: #666;
  font-size: 0.875rem;
}

.current-image img {
  margin-top: 0.25rem;
  border-radius: 4px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background-color: #0a66c2;
  color: white;
}

.btn-primary:hover {
  background-color: #004182;
}

.btn-outline-primary {
  background-color: transparent;
  color: #0a66c2;
  border: 1px solid #0a66c2;
}

.btn-outline-primary:hover {
  background-color: #0a66c2;
  color: white;
}

.btn-outline-secondary {
  background-color: transparent;
  color: #666;
  border: 1px solid #666;
}

.btn-outline-secondary:hover {
  background-color: #666;
  color: white;
}

.image-upload-form {
  margin-bottom: 1rem;
}

.image-upload-form .form-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* Experience, Education, Skills sections */
.dynamic-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 4px;
  background: #f9f9f9;
}

.dynamic-section h4 {
  color: #000;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.add-item-btn {
  background-color: #0a66c2;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

.add-item-btn:hover {
  background-color: #004182;
}

.remove-item-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  float: right;
}

.remove-item-btn:hover {
  background-color: #c82333;
}

/* Responsive Design for Profile Edit */
@media (max-width: 768px) {
  .profile-edit-container {
    padding: 1rem 0;
  }
  
  .form-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .privacy-setting {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .privacy-select {
    width: 100%;
  }
}

/* Admin Dashboard Styles */
.admin-dashboard-header {
  background: linear-gradient(135deg, #0a66c2, #004182);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.admin-dashboard-header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.admin-dashboard-header .admin-welcome {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.admin-dashboard-header .admin-role-info {
  margin-top: 0.5rem;
}

.admin-dashboard-header .badge {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* Admin Layout Styles */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 200px);
}

.admin-sidebar {
  width: 250px;
  background: #f8f9fa;
  border-right: 1px solid #e0e0e0;
  padding: 1rem 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
}

.admin-nav .nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: #666;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.admin-nav .nav-item:hover {
  background: #e9ecef;
  color: #0a66c2;
  border-left-color: #0a66c2;
}

.admin-nav .nav-item.active {
  background: #e3f2fd;
  color: #0a66c2;
  border-left-color: #0a66c2;
  font-weight: 600;
}

.admin-nav .nav-item i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.admin-content {
  flex: 1;
  padding: 2rem;
}

/* Admin Cards */
.admin-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.admin-card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.admin-card-body {
  padding: 1.5rem;
}

/* Admin Tables */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #f8f9fa;
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
}

.admin-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.admin-table tr:hover {
  background: #f8f9fa;
}

/* Admin Statistics Cards */
.admin-stats-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.admin-stats-card:hover {
  transform: translateY(-2px);
}

.admin-stats-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.admin-stats-label {
  color: #666;
  font-size: 0.9rem;
}

/* Admin Buttons */
.admin-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.admin-btn-primary {
  background: #0a66c2;
  color: white;
}

.admin-btn-primary:hover {
  background: #004182;
}

.admin-btn-danger {
  background: #dc3545;
  color: white;
}

.admin-btn-danger:hover {
  background: #c82333;
}

.admin-btn-warning {
  background: #ffc107;
  color: #212529;
}

.admin-btn-warning:hover {
  background: #e0a800;
}

.admin-btn-success {
  background: #28a745;
  color: white;
}

.admin-btn-success:hover {
  background: #218838;
}

/* Admin Forms */
.admin-form-group {
  margin-bottom: 1rem;
}

.admin-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.admin-form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.admin-form-input:focus {
  outline: none;
  border-color: #0a66c2;
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.2);
}

/* Admin Alerts */
.admin-alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.admin-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.admin-alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.admin-alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.admin-alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Admin Modals */
.admin-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.admin-modal-content {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.admin-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.admin-modal-close:hover {
  color: #333;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

/* Admin Pagination */
.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.admin-pagination a {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  color: #0a66c2;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.admin-pagination a:hover {
  background: #0a66c2;
  color: white;
}

.admin-pagination .active {
  background: #0a66c2;
  color: white;
}

/* Admin Badges */
.admin-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-badge-success {
  background: #d4edda;
  color: #155724;
}

.admin-badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.admin-badge-warning {
  background: #fff3cd;
  color: #856404;
}

.admin-badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

.admin-badge-secondary {
  background: #e2e3e5;
  color: #383d41;
}

/* Admin Responsive */
@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .admin-nav .nav-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .admin-nav .nav-item.active {
    border-left: none;
    border-bottom-color: #0a66c2;
  }
  
  .admin-content {
    padding: 1rem;
  }
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem 1.5rem;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    min-width: 300px;
    border-left: 4px solid #0a66c2;
}

/* Skill Category Management */
.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin: 0.25rem 0;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.category-item span {
    flex: 1;
    font-weight: 500;
}

.category-item .btn {
    margin-left: 0.5rem;
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification.toast-success {
  border-left-color: #28a745;
}

.toast-notification.toast-error {
  border-left-color: #dc3545;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-content i {
  font-size: 1.2rem;
}

.toast-success .toast-content i {
  color: #28a745;
}

.toast-error .toast-content i {
  color: #dc3545;
}

.toast-content span {
  font-weight: 500;
  color: #333;
}

/* Notification Badge Styles */
.nav-link .badge {
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  line-height: 1.2;
  padding: 0.25em 0.5em;
}

.nav-link.position-relative {
  padding-right: 1.5rem;
}

/* Simple Dropdown Fix - Keep it within viewport */
.dropdown-menu {
  max-width: 300px;
  word-wrap: break-word;
}

/* Ensure right-aligned dropdowns don't go off screen */
.dropdown-menu-end {
  right: 0;
  left: auto;
}

/* Mobile: Make dropdowns smaller and ensure they fit */
@media (max-width: 768px) {
  .dropdown-menu {
    max-width: 280px;
    right: 0;
    left: auto;
  }
}

.dropdown-item {
  padding: 0.75rem 1rem;
  white-space: normal;
  word-wrap: break-word;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
}

.dropdown-item .badge {
  font-size: 0.65rem;
  padding: 0.2em 0.4em;
}

/* Timeline Styles */
.timeline {
  position: relative;
  padding: 20px 0;
  margin: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #0a66c2, #004182);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 60px;
}

.timeline-marker {
  position: absolute;
  left: 22px;
  top: 8px;
  width: 16px;
  height: 16px;
  background: #0a66c2;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 2;
}

.timeline-content {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.timeline-content h4 {
  color: #0a66c2;
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-company {
  color: #666;
  font-weight: 500;
  margin: 0 0 8px 0;
  font-size: 0.95rem;
}

.timeline-period {
  color: #888;
  font-size: 0.9rem;
  margin: 0 0 12px 0;
  font-weight: 500;
}

.timeline-location {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 12px 0;
}

.timeline-location i {
  color: #0a66c2;
  margin-right: 6px;
}

.timeline-description {
  color: #333;
  line-height: 1.6;
  margin: 0 0 12px 0;
  font-size: 0.95rem;
}

.timeline-achievements {
  background: #f8f9fa;
  border-left: 3px solid #0a66c2;
  padding: 12px 16px;
  margin-top: 12px;
  border-radius: 0 4px 4px 0;
}

.timeline-achievements strong {
  color: #0a66c2;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 6px;
}

.timeline-achievements p {
  margin: 0;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Section Header Styles */
.section-header {
  margin-bottom: 30px;
}

.section-header h2 {
  color: #0a66c2;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-subtitle {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    padding-left: 50px;
  }
  
  .timeline-marker {
    left: 12px;
    width: 14px;
    height: 14px;
  }
  
  .timeline-content {
    padding: 16px;
  }
  
  .timeline-content h4 {
    font-size: 1rem;
  }
}

/* Messenger Style Widget */
.messenger-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 500px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  border: 1px solid #e1e5e9;
  max-height: 80vh;
}

.messenger-widget.active {
  display: flex;
}

.messenger-header {
  background: #1877f2;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}

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

.messenger-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}

.messenger-user-details h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.messenger-status {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.messenger-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.messenger-status.offline::before {
  background: #6b7280;
}

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

.messenger-action-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.messenger-action-btn:hover {
  background-color: rgba(255,255,255,0.1);
}

.messenger-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f0f2f5;
  overflow: hidden;
  min-height: 0;
}

.messenger-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.message-item.message-sent {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  flex: 1;
  max-width: 70%;
}

.message-bubble {
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: relative;
}

.message-sent .message-bubble {
  background: #1877f2;
  color: white;
}

.message-sent .message-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 12px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-left-color: #1877f2;
}

.message-received .message-bubble::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 12px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-right-color: #ffffff;
}

.message-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.message-time {
  font-size: 11px;
  color: #65676b;
  margin-top: 4px;
  text-align: right;
}

.message-sent .message-time {
  text-align: left;
}

.system-message {
  background: #e3f2fd !important;
  color: #1976d2 !important;
  text-align: center;
  font-size: 12px;
  padding: 8px 12px;
}

.system-message::after {
  display: none;
}

.messenger-input-form {
  padding: 16px;
  background: white;
  border-top: 1px solid #e1e5e9;
  flex-shrink: 0;
}

/* Contact form for non-logged-in users */
.messenger-contact-form {
  padding: 20px;
  background: #ffffff;
  height: 100%;
  overflow-y: auto;
}

.contact-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.contact-form-header h3 {
  color: #1877f2;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.contact-form-header p {
  color: #65676b;
  font-size: 14px;
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1c1e21;
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #1877f2;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.form-input:hover,
.form-textarea:hover {
  border-color: #9ca3af;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #e1e5e9;
}

.btn-cancel {
  padding: 10px 20px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  background: #ffffff;
  color: #65676b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  border-color: #9ca3af;
  background: #f8f9fa;
}

.btn-send {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #1877f2;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-send:hover {
  background: #166fe5;
  transform: translateY(-1px);
}

.btn-send:active {
  transform: translateY(0);
}

.messenger-input-container {
  display: flex;
  align-items: center;
  background: #f0f2f5;
  border-radius: 30px;
  gap: 8px;
}

.messenger-input-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.messenger-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: #1c1e21;
  padding: 8px 0;
}

.messenger-input::placeholder {
  color: #65676b;
}

.messenger-send-btn {
  background: #1877f2;
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.messenger-send-btn:hover {
  background: #166fe5;
}

.messenger-send-btn:disabled {
  background: #bcc0c4;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
  .messenger-widget {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    bottom: 20px;
    right: 20px;
    left: 20px;
  }
  
  .messenger-header {
    padding: 12px 16px;
  }
  
  .messenger-messages {
    padding: 12px;
  }
  
  .messenger-input-form {
    padding: 12px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .form-input,
  .form-textarea {
    font-size: 16px;
    padding: 14px 16px;
  }
  
  .messenger-contact-form {
    padding: 16px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-cancel,
  .btn-send {
    width: 100%;
    justify-content: center;
  }
}

/* Messages Page Styles */
.messages-page-container {
  padding: 2rem 0;
  min-height: 80vh;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header h1 {
  color: #0a66c2;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #666;
  font-size: 1.1rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #e1e5e9;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0a66c2;
}

.stat-card.new h3 {
  color: #dc3545;
}

.stat-card.read h3 {
  color: #28a745;
}

.stat-card.replied h3 {
  color: #17a2b8;
}

.stat-card p {
  color: #666;
  font-weight: 500;
  margin: 0;
}

.filter-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e1e5e9;
}

.filter-tab {
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #666;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  color: #0a66c2;
  text-decoration: none;
}

.filter-tab.active {
  color: #0a66c2;
  border-bottom-color: #0a66c2;
}

.messages-list {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.message-item {
  transition: background-color 0.2s ease;
}

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

.message-item.unread {
  background-color: #f8f9fa;
  border-left: 4px solid #0a66c2;
}

.message-item:hover {
  background-color: #f8f9fa;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.message-sender {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sender-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.sender-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #e1e5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1.2rem;
}

.sender-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.sender-info p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.message-meta {
  text-align: right;
  flex-shrink: 0;
}

.message-time {
  display: block;
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.message-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-new {
  background: #dc3545;
  color: white;
}

.status-read {
  background: #28a745;
  color: white;
}

.status-replied {
  background: #17a2b8;
  color: white;
}

.message-content {
  margin-bottom: 1rem;
}

.message-subject {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.message-text {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

.message-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.no-messages {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.no-messages-icon {
  font-size: 4rem;
  color: #e1e5e9;
  margin-bottom: 1rem;
}

.no-messages h3 {
  color: #333;
  margin-bottom: 0.5rem;
}

.pagination-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.pagination {
  margin: 0;
}

.page-link {
  color: #0a66c2;
  border-color: #e1e5e9;
}

.page-link:hover {
  color: #004182;
  background-color: #f8f9fa;
  border-color: #e1e5e9;
}

.page-item.active .page-link {
  background-color: #0a66c2;
  border-color: #0a66c2;
}

/* Responsive Design for Messages */
@media (max-width: 768px) {
  .message-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .message-meta {
    text-align: left;
  }
  
  .message-actions {
    justify-content: flex-start;
  }
  
  .filter-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .filter-tab {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}
