/* ================= Base Styles ================= */
:root {
  --primary-green: #10b981;
  --radial: radial-gradient(circle at 50% 60%, rgba(16,185,129,0.05), transparent 50%);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  color: #374151;
  background: var(--radial);
  line-height: 1.6;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
/* Utility */
.hidden {
  display: none !important;
}

/* ================= Common Components ================= */
/* Botón CTA */
.cta-button {
  background: var(--primary-green);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}
.cta-button:hover {
  box-shadow: 0 0 20px rgba(16,185,129,0.4);
  transform: translateY(-2px);
}

/* Forms & Cards */
.card {
  background: #fff;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
}

/* ================= Header (for Index, Login, Signup) ================= */
header {
  background: rgba(255,255,255,0.7);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(229,231,235,0.5);
  backdrop-filter: blur(10px);
  z-index: 1000;

}
.section-header {
  border-bottom: 0px;
  position: relative;

}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}
.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111;
  text-decoration: none;
}
.logo-green {
  color: var(--primary-green);
}
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-menu a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-menu a:hover {
  color: var(--primary-green);
}
.nav-cta {
  color: var(--primary-green) !important;
  font-weight: 600 !important;
}
.nav-cta:hover {
  text-decoration: underline;
}

.notification-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff3b30;
  color: white;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.hidden {
  display: none !important;
}

.nav-btn {
  position: relative;
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #374151;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: white;
  position: absolute;
  top: 70px;
  right: 10px;
  width: 200px;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.1);
  padding: 1rem;
  border-radius: 0.5rem;
}
.mobile-nav a {
  text-decoration: none;
  color: #374151;
  font-weight: 500;
  padding: 0.5rem;
}
.mobile-nav a:hover {
  color: var(--primary-green);
}


@media (max-width: 768px) {
  /* Mobile-specific toggle container styles */
  .toggle-container {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .toggle-label {
    font-size: 14px;
  }
  
  /* Alternative layout: horizontal but smaller */
  .toggle-container.horizontal {
    flex-direction: row;
    gap: 6px;
    font-size: 14px;
  }
  
  .toggle-container.horizontal .toggle-label {
    font-size: 13px;
  }
  
  .switch {
    width: 44px;
    height: 24px;
  }
  
  .switch .slider:before {
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
  }
  
  .switch input:checked + .slider:before {
    transform: translateX(20px);
  }

  header {
    padding: 0.75rem 1rem;
    /* Keep the blurred background and bottom border */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229,231,235,0.5);
  }
  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .logo {
    margin-bottom: 0.5rem;
    font-size: 2rem; /* Slightly larger for mobile */
  }
  .nav-menu {
    display: none;
  }
  .hamburger {
    display: block;
  }

}


/* ================= Hero Section (Homepage) ================= */
.hero {
  padding: 4rem 0;
}
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hero-text {
  flex: 1 1 50%;
}
.hero-text h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 1rem;
}
.hero-text .subheading {
  font-size: 1.125rem;
  color: #374151;
  margin-bottom: 1.5rem;
}
.hero-image {
  flex: 1 1 50%;
  text-align: center;
}
.hero-image img {
  max-width: 100%;
  height: auto;
}

/* ================= How It Works & Benefits (Homepage) ================= */
.como-funciona, .beneficios-section {
  padding: 4rem 0;
}
.como-funciona h2, .beneficios-section h2 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  color: #111;
}
.section-description {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #4b5563;
  font-size: 1rem;
}
.steps-container, .benefits-container {
  display: grid;
  gap: 2rem;
}
.steps-container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.benefits-container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.step, .benefit {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step:hover, .benefit:hover {
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.step-number {
  width: 50px;
  height: 50px;
  border: 2px solid var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-green);
  margin: 0 auto 1rem;
}
.step h3, .benefit h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
}
.step p, .benefit p {
  font-size: 1rem;
  color: #374151;
  line-height: 1.5;
}
/* Force benefits icons to be large and green on Index */
.benefits-container .benefit i {
  font-size: 1.75rem;
  color: var(--primary-green);
}

/* ================= CTA Section (Homepage) ================= */
.cta-section {
  text-align: center;
  padding: 3rem 0;
}
.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1rem;
}
.cta-section .section-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}
.cta-section .cta-button {
  font-size: 1.125rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
}

/* ================= Footer ================= */
footer {
  background: #fff;
  padding: 1rem 0;
}
footer p {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
}

/* ================= Auth & Other Page Layouts ================= */
.login-container {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}
.login-card {
  max-width: 400px;
  width: 100%;
}
.auth-layout {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}
@media (max-width: 768px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
}
.info-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.features {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}
.feature-card {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  flex: 1;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.icon-container {
  font-size: 2rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
}

/* ================= Admin Panel Custom Styles ================= */
/* Sidebar Navigation - Fixed on Left with 140px Width */

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #555;
  margin-top: 10px;
}

.fa-spinner {
  margin-right: 8px;
}


.sidebar {
  width: 140px;
  background: #fff;
  padding: 1.5rem 0;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}
.sidebar .logo {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
}
.sidebar .logo .logo-green {
  color: var(--primary-green);
}
.sidebar-nav ul {
  list-style: none;
  padding: 0;
  width: 100%;
}
.sidebar-nav ul li {
  margin-bottom: 1rem;
}
.nav-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  border-radius: 8px;
  color: #374151;
}
.nav-btn i {
  font-size: 1.75rem;
}
.nav-btn:hover {
  background: rgba(16,185,129,0.1);
  transform: scale(1.05);
}
.nav-btn.active {
  background: rgba(16,185,129,0.2);
  color: var(--primary-green);
}
@media (max-width: 768px) {
  .sidebar{
    width:90px;
  }
  .sidebar .logo {
    display:none;
  }
  .main-content {
    margin-left: 90px !important; 
  }
}

/* Main Content for Admin Panel */
.main-content {
  margin-left: 140px;
  padding: 2rem;
}

/* Toggle Switch for Solicitudes Section (Admin) */
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 20px;
  font-weight: bold;
  font-size: 16px;
}
.toggle-label {
  color: #27292E;
}
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #40434A;
}
input:checked + .slider:before {
  transform: translateX(24px);
}

/* Request Card Adjustments (Admin) */
.request-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}
.request-card:hover {
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}
.card-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  flex: 1;
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-status {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}
.status-pendiente {
  background: #FEF3C7;
  color: #92400E;
}
.status-resuelto {
  background: #D1FAE5;
  color: #065F46;
}
.card-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.card-company-info {
  display: flex;
  flex-direction: column;
}
.history-company {
  font-weight: 600;
  font-size: 1.125rem;
  color: #111;
}
.history-rut {
  font-size: 0.75rem;
  color: #6b7280;
}
.history-date {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Companies and Users Section Enhancements */
.header-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 1rem;
}
.search-bar {
  display: flex;
  margin-bottom: 1rem;
}
.search-bar input {
  flex: 1;
  padding: 0.75rem;
  font-size: 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem 0 0 0.375rem;
}
.search-bar button {
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 1px solid var(--primary-green);
  background: var(--primary-green);
  color: #fff;
  border-radius: 0 0.375rem 0.375rem 0;
  cursor: pointer;
  transition: background 0.3s ease;
}
.add-company {
  text-align: right;
  margin-bottom: 1rem;
}
.companies-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}
.company-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.company-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.options-group {
  display: flex;
  gap: 4px;
}
.flex-end{
  justify-content: flex-end;
}
.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  font-size: 0.9rem;
  color: #6b7280;
  width:35px;
  height:35px;
}
.icon-btn:hover {
  background: var(--primary-green);
  color: #fff;
  transform: scale(1.1);
}
.company-rut {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.5rem;
}
.users-list h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.users-list ul {
  list-style: disc;
  padding-left: 1rem;
}
.files-tags {
  margin-top: 1rem;
}
.file-tag {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  transition: background 0.3s ease;
}
.file-tag i {
  margin-right: 0.25rem;
}
.file-tag:hover {
  background: #e5e7eb;
}

/* Historial Section Enhancements */
.history-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.history-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.history-card:hover {
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.history-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.history-company {
  font-weight: 600;
  font-size: 1.125rem;
  color: #111;
}
.history-rut {
  font-size: 0.75rem;
  color: #6b7280;
}
.history-date {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Pagination Styles */
.pagination-container {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #374151;
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
  background: rgba(16,185,129,0.1);
  border-color: var(--primary-green);
  color: var(--primary-green);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--primary-green);
  border-color: var(--primary-green);
  color: #fff;
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
  color: #9ca3af;
}

.pagination-ellipsis {
  padding: 0.5rem;
  color: #9ca3af;
  font-weight: 500;
}

.pagination-info {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: center;
}

/* ================= Request Page Specific Styles ================= */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-green);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}
.back-btn:hover {
  transform: translateX(-5px);
}
.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.request-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .request-container{
    display: flex !important;
    flex-direction: column;
  }
}
.request-details, .action-form {
  width: 100%;
}

/* Thumbnail styling */
.file-thumbnails {
  padding: 10px 0;
}

.file-thumbnail {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}
.thumbnail {
  max-width: 150px;
  max-height: 150px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.download-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  color: #6b7280;
  font-size: 0.9rem;
  padding: 8px;


}

.download-btn:hover {
  background: var(--primary-green);
  color: #fff;
  transform: scale(1.1);
}

/* Lightbox modal styling */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox.hidden {
  display: none;
}
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
}
.lightbox-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #6b7280;
}


/* Accordion for Conversation History */
.accordion {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-top: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.accordion-header {
  background: #f3f4f6;
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
}
.accordion-header i {
  transition: transform 0.3s ease;
}
.accordion-header i.rotate {
  transform: rotate(180deg);
}
.accordion-content {
  padding: 1rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

/* Chat Bubble Styles */
.conversation-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.conversation-history .chat-bubble {
  max-width: 80% !important;
}


/* Dropzone (Retaining previous styling with hover) */
.dropzone {
  border: 2px dashed #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.dropzone:hover {
  border-color: var(--primary-green);
  background: #f0fdf4;
}

.dropzone-active {
  background: #dcfce7 !important;
  border-color: var(--primary-green) !important;
  border-style: solid !important;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(16,185,129,0.15);
}

/* File Item Styles */
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
  padding: 0.5rem;
  border-radius: 0.375rem;
  margin-top: 0.3rem;
}
.file-name {
  font-size: 0.875rem;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.file-remove {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.875rem;
}

/* Action Form Textarea */
.action-form textarea.form-input {
  resize: vertical;
  /* Inherit the same style as .form-input */
}

/* Make sure the "Enviar Archivo" button uses the same styles as .cta-button */
.action-form .cta-button {
  width: 100%;
  margin-top: 1rem;
}

/* ================= Historial Page Specific Styles ================= */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}
.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-green);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}
.back-btn:hover {
  transform: translateX(-5px);
}
.company-header-info {
  text-align: right;
}
.company-header-info .company-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  display: block;
}
.company-header-info .company-rut {
  font-size: 0.875rem;
  color: #6b7280;
  display: block;
  margin-top: 0.25rem;
}

/* Chat History Container */
.chat-history {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Reduced gap between chat bubbles */
  margin-top: 1rem;
}

/* Chat Bubble Styles */
.chat-bubble {
  max-width: 60%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  word-wrap: break-word;
}
.chat-bubble p {
  margin: 0 0 0.5rem 0; /* Ensure paragraph and date are separated */
}
.chat-bubble.user {
  background: #f3f4f6;
  color: #374151;
  align-self: flex-start;
}
.chat-bubble.admin {
  background: var(--primary-green);
  color: #fff;
  align-self: flex-end;
}

.chat-bubble.admin .chat-date {
  color: #fff;
  text-align: right;

}
.chat-bubble.request {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #374151;
  align-self: flex-start;
  border-radius: 1rem;
  display: block;
}
.chat-date {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* ================= File Bundle Specific Styles ================= */

    /* File Bundle Specific Styles */
    .bundle-header {
      text-align: center;
      margin: 2rem 0 3rem;
    }
    .bundle-header .logo {
      margin: 0 auto 1rem;
      font-size: 5rem;
    }
    .bundle-title {
      font-size: 2rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
    }
    .bundle-subtitle {
      font-size: 1.125rem;
      color: #6b7280;
      margin-bottom: 2rem;
    }
    .file-list {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-bottom: 2rem;
    }
    .bundle-list .file-item {
      display: block;
      padding: 0.75rem 1rem;
      border: 1px solid #e2e8f0;
      border-radius: 0.5rem;
      color: #374151;
      text-decoration: none;
      transition: background 0.3s ease, transform 0.3s ease;
    }
    .file-item:hover {
      background: #f3f4f6;
      transform: translateY(-2px);
    }
    .file-item i {
      margin-right: 0.5rem;
      color: var(--primary-green);
    }
    .download-all {
      text-align: center;
      margin-bottom: 2rem;
    }

    /* ================= Notifications Specific Styles ================= */

     .notif-container {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      margin: 2rem 0;
    }
    .notif-card {
      width: calc(33.333% - 1rem);
      padding: 1rem;
      border: 1px solid #e2e8f0;
      border-radius: 0.5rem;
      background: #fff;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      position: relative;
    }
    .notif-card:hover {
      box-shadow: 0 10px 15px rgba(0,0,0,0.1);
      transform: translateY(-5px);
    }
    .notif-card.active {
      border-color: var(--primary-green);
      background: #e5f9f0;
    }
    .notif-header {
      font-size: 1.25rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
    }
    .notif-frequency {
      font-size: 0.9rem;
      color: #6b7280;
      margin-bottom: 0.5rem;
    }
    .action-buttons {
      display: flex;
      justify-content: space-between;
      gap: 0.5rem;
    }
    .toggle-btn, .view-btn {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 0.9rem;
      color: var(--primary-green);
    }
    /* Floating buttons */
    .floating-add-btn {
      position: fixed;
      right: 2rem;
      bottom: 2rem;
      width: 60px;
      height: 60px;
      background: var(--primary-green);
      color: #fff;
      border-radius: 50%;
      font-size: 2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      z-index: 1500;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .floating-add-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 0 20px rgba(16,185,129,0.4);
    }
    .floating-compose-btn {
      position: fixed;
      right: 2rem;
      bottom: 100px;
      width: 60px;
      height: 60px;
      background: #40434A;
      color: #fff;
      border-radius: 50%;
      font-size: 1.8rem;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
      z-index: 1500;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    .floating-compose-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 0 20px rgba(64,67,74,0.4);
    }
    /* Modal Styles */
    .modal {
      display: none; /* Hidden by default */
      position: fixed;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      overflow: auto;
      background-color: rgba(0,0,0,0.4);
    }
    .modal-content {
      background-color: #fff;
      margin: 10% auto;
      padding: 2rem;
      border: 1px solid #e2e8f0;
      border-radius: 0.5rem;
      width: 90%;
      max-width: 600px;
      position: relative;
    }
    .close-modal {
      position: absolute;
      top: 1rem;
      right: 1rem;
      font-size: 1.5rem;
      cursor: pointer;
      color: #6b7280;
    }
    /* Responsive adjustments */
    @media (max-width: 768px) {
      .notif-card {
        width: calc(50% - 1rem);
      }
    }
    @media (max-width: 480px) {
      .notif-card {
        width: 100%;
      }
    }

       /* Additional styles for the notifications section */
    .companies-notifications {
      display: flex;
      flex-direction: column;
      gap: 2rem;
      margin-top: 1rem;
    }
    .company-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-radius: 0.5rem;
      overflow: hidden;
    }

    /* Notifications list inside the company card */
    .notif-list {
      padding: 1rem;
    }
    .notif-list p {
      margin: 0 0 0.5rem 0;
      font-weight: 600;
      font-size: 0.95rem;
      color: #374151;
    }
    .notif-list ul {
      list-style: none;
      padding-left: 0;
      margin: 0;
    }
    .notif-list ul li {
      padding: 0.5rem 0;
      border-bottom: 1px solid #e2e8f0;
      font-size: 0.9rem;
      color: #374151;
    }
    .notif-list ul li:last-child {
      border-bottom: none;
    }

/* ================= SII Forms Styles ================= */
.form-help {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
  display: block;
}

.file-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.file-download {
  margin-left: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.file-item:hover .file-download {
  opacity: 1;
}

/* Enhanced form styles for SII pages */
.form-group {
  margin-bottom: 1.5rem;
}

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

.form-label i {
  margin-right: 0.5rem;
  color: var(--primary-green);
  width: 16px;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}
  