* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f5f5f5;
  min-height: 100vh;
}

.hidden {
  display: none;
}

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: #1a3a5f; /* Darker blue that won't clash with logo */
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 0 20px;
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
  /* margin-bottom: 20px; */
}

.sidebar-logo img {
  max-width: 100%;
}

.menu-item {
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item:hover,
.menu-item.active {
  background-color: #0f2642; /* Darker shade for hover/active state */
}

/* Specific hover styling for logo and logout buttons */
.menu-item[data-section="logo"]:hover,
.menu-item[data-section="logout"]:hover {
  background-color: #e0e0e0; /* Grey color for logo and logout hover */
}

.menu-item i {
  margin-right: 10px;
  font-size: 18px;
}

.content {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 20px 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1a3a5f; /* Matching sidebar color */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 10px;
}

.filter-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 4px;
  margin-right: 10px;
  transition: background-color 0.2s ease;
}

.filter-toggle-btn.active {
  background-color: #e6f7ff;
  color: #0066cc;
}

.filter-toggle-btn:hover {
  background-color: #f0f0f0;
}

.main-card {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-bottom: 20px;
  display: none !important;
  position: absolute;
  width: 100%;
  z-index: 1;
}

.client-mobile-header {
  display: none;
}

@media screen and (max-width: 768px) {
  .client-mobile-header {
    display: flex;
  }
}

.main-card.active {
  display: block !important;
  height: 88%;
  position: relative;
  z-index: 10;
}

.card-title_old {
  color: #1a3a5f; /* Matching sidebar color */
  font-size: 18px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.active {
  border-bottom-color: #1a3a5f; /* Matching sidebar color */
  color: #0066b2;
  font-weight: bold;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  background-color: #f9f9f9;
  padding: 20px;
}

/* Case tracker styles */

.timeline {
  position: relative;
  margin: 20px 0;
  padding-left: 40px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background-color: #e0e0e0;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 25px;
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -40px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  border: 3px solid #ddd;
  top: 15px;
  z-index: 1;
}

/* Status colors */
.timeline-item.completed .timeline-marker {
  background-color: #4caf50;
  border-color: #4caf50;
}

.timeline-item.current .timeline-marker {
  background-color: #1a3a5f;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.timeline-content {
  padding: 0;
}

.timeline-date {
  color: #666;
  font-size: 13px;
  margin-bottom: 5px;
  font-weight: 500;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a3a5f;
}

.timeline-desc {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}


/* Chat styles */
.chat-container {
  height: 96%;
  display: flex;
  width: 100%;
}

#client-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* border-top: 1px solid #eee; */
}

.client-item {
  padding: 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
  min-height: 53px; /* Ensure consistent height for all client items */
}

.unread-count {
  background-color: #1a3a5f;
  color: white;
  border-radius: 50%;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.client-item:hover {
  background-color: #f5f5f5;
}

.client-item.active {
  background-color: #e6f2ff;
  border-left: 3px solid #1a3a5f;
}

.client-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1a3a5f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.client-name {
  font-size: 16px;
  color: #333;
}

.unread-count {
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.chat-window-title {
  padding: 15px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
  font-size: 16px;
  background-color: #f9f9f9;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.status-paid {
  background-color: #e6ffe6;
  color: #008000;
  padding: 8px 20px;
  border-radius: 4px;
  display: inline-block;
}

.status-open {
  background-color: #e6f3ff;
  color: #0066cc;
  padding: 8px 20px;
  border-radius: 4px;
  display: inline-block;
}

.status-cancelled {
  background-color: #f2f2f2;
  color: #333333;
  padding: 8px 20px;
  border-radius: 4px;
  display: inline-block;
}

.status-past-due {
  background-color: #ffe6e6;
  color: #cc0000;
  padding: 8px 20px;
  border-radius: 4px;
  display: inline-block;
}

.message {
  margin-bottom: 15px;
  display: flex;
}

.message.incoming {
  flex-direction: row;
}

.message.outgoing {
  flex-direction: row-reverse;
}

.message-content {
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 18px;
  font-size: 14px;
}

.message.incoming .message-content {
  background-color: #e6e6e6;
  color: #333;
  border-bottom-left-radius: 4px;
}

.message.outgoing .message-content {
  background-color: #1a3a5f; /* Matching sidebar color */
  color: white;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
  text-align: right;
}

.chat-input {
  display: flex;
  gap: 10px;
}

.chat-input textarea {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.chat-input button {
  background-color: #1a3a5f; /* Matching sidebar color */
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
}

.chat-input button:hover {
  background-color: #0f2642; /* Darker shade for hover state */
}

/* Client container styles */
.client-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.client-sidebar {
  width: 250px;
  border-radius:8px;
  background-color: #1a3a5f;
  color: white;
  flex-shrink: 0;
}

.client-content {
  flex: 1;
  overflow: auto;
  padding: 0;
  width: calc(100% - 250px);
}

.client-content .main-card {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 15px;
  position: relative;
  display: none;
}

.client-content .main-card.active {
  display: block !important;
}

/* File repository styles */
.files-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.files-table th,
.files-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.files-table th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.files-table tr:hover {
  background-color: #f9f9f9;
}

.file-type-icon {
  width: 24px;
  height: 24px;
  background-color: #e9e9e9;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  background-color: #1a3a5f; /* Matching sidebar color */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}

.btn-red {
  background-color: #cf1a2b;
}

.btn:hover {
  opacity: 0.9;
}

.file-upload-form {
  margin-bottom: 20px;
  padding-top: 20px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

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

.upload-preview {
  padding: 15px;
  border: 1px dashed #ddd;
  border-radius: 4px;
  margin-top: 15px;
}

.upload-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #f0f0f0;
  border-radius: 4px;
  margin-bottom: 5px;
}

.upload-preview-item:last-child {
  margin-bottom: 0;
}

.file-name {
  font-size: 14px;
  flex-grow: 1;
}

.remove-file {
  background-color: transparent;
  border: none;
  color: #cf1a2b;
  cursor: pointer;
  font-size: 16px;
}

/* Additional styles specifically for the forms page */
.select-dropdown {
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
  min-width: 200px;
  font-size: 20px;
}

/* Custom Select Styles - Applies to all dropdowns */
.custom-select-wrapper {
  position: relative;
  /* min-width: 200px; */
  /* margin-right: 10px; */
}



.custom-select {
  width: 100%;
  padding: 12px 6px;
  font-size: 16px;
  /* min-width: 170px; */
  color: #1f2937;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  /* appearance: none; */
  cursor: pointer;
  transition: all 0.5s ease;
}

.custom-select:hover {

  background-color: white;
  color: black;
  border: 2px solid #008CBA;
}

.custom-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.btn-primary {
  background-color: #1a3a5f; /* Changed to match sidebar color */
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0f2642; /* Darker shade for hover state */
}

.forms-table {
  width: 100%;
  margin-top: 20px;
}

.forms-table table {
  width: 100%;
  border-collapse: collapse;
}

.forms-table th,
.forms-table td {
  padding: 12px 15px; /* Matched to main CSS table styling */
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.forms-table th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.forms-table tr:hover {
  background-color: #f9f9f9;
}

.btn-view {
  background-color: #1a3a5f; /* Changed to match sidebar color */
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-view:hover {
  opacity: 0.9;
}

.card-title {
  color: #1a3a5f; /* Matching sidebar color */
  font-size: 18px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 24px;
  padding: 0; /* Reset padding to match main CSS */
  border-bottom: none; /* Reset border to match main CSS */
}

/* Adding padding to card content for better spacing */
.card-content {
  padding-top: 15px;
}

.actions {
  display: flex;
  align-items: center;
}

/* Additional styles for the profile edit page */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.Phone-number-group {
  margin-bottom: 20px;
}

.Phone-number-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.btn {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: #0056b3;
  color: white;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.password-toggle {
  position: relative;
}

.password-toggle .toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #6c757d;
}

.card-subtitle {
  color: #6c757d;
  margin-bottom: 20px;
}

/* Calendar Styles */
.calendar-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.calendar-selectors {
  display: flex;
  gap: 10px;
  margin: 0 15px;
}

.nav-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 24px;
}

.nav-btn:hover {
  background: #e0e0e0;
}

.calendar-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.calendar-grid {
  flex: 1;
  min-width: 400px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.weekday {
  padding: 10px;
  text-align: center;
  font-weight: bold;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(80px, auto);
  border-left: 1px solid #ddd;
}

.calendar-day {
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 8px;
  position: relative;
  cursor: pointer;
  min-height: 80px;
}

.calendar-day:hover {
  background-color: #f8f8f8;
}

.day-number {
  font-weight: bold;
  margin-bottom: 5px;
}

.other-month {
  color: #aaa;
  background-color: #f9f9f9;
}

.today {
  background-color: #f0f7ff;
}

.selected-day {
  background-color: #e6f2ff;
}

.has-events {
  position: relative;
}

.has-events::after {
  content: "";
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  background-color: #007bff;
  border-radius: 50%;
}

.events-container {
  flex: 1;
  min-width: 400px;
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 15px;
  max-height: 500px;
  overflow-y: auto;
}

.events-date {
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.event-item {
  display: flex;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

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

.event-time {
  min-width: 80px;
  color: #666;
  font-weight: bold;
}

.event-details {
  flex: 1;
}

.event-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.event-description {
  color: #666;
  font-size: 0.9em;
}

.no-events {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
}

.casenumber-container {
  position: relative;
  display: inline-block;
  font-family: sans-serif;
}

.casenumber-label {
  cursor: pointer;
  font-weight: bold;
  color: #333;
}

.casenumber-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  margin-top: 5px;
  z-index: 1000;
}

.casenumber-content li {
  padding: 10px 15px;
  cursor: pointer;
  list-style: none;
}

.casenumber-content li:hover {
  background-color: #f0f0f0;
}

.casenumber-container:hover .casenumber-content {
  display: block;
}

.date-range {
  display: flex;
  gap: 5px;
  align-items: center;
  font-family: sans-serif;
}

.date-range label {
  font-weight: 500;
  color: #333;
  margin-right: 8px;
}

.date-range input[type="date"] {
  padding: 8px 6px 8px 7px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.date-range input[type="date"]:focus {
  outline: none;
  border-color: #007bff;
}

/* Filter Toggle and Search Container */
.search-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

/* Filter Toggle Button */
.filter-toggle-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  padding: 0;
}

.filter-toggle-btn:hover {
  background: #e9e9e9;
}

.filter-toggle-btn svg {
  width: 16px;
  height: 16px;
}

#search-bar, #todolist-search-bar, #repository-search-bar, #forms-search-bar, #cases-search-bar, #invoices-search-bar, #clients-search-bar, #clients-message-search-bar, #client-cases-search-bar, #client-todolist-search-bar {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px !important;
  height: 40px;
}

/* Filter Dropdown Container - initially hidden */
.filter-dropdown-container {
  display: none;
  flex: 1;
  /* max-width: 200px; */
}


/* Show dropdown when filters are open */
.filters-open .filter-dropdown-container {
  display: flex;
  justify-content: left;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Case tracker styles */
.case-header-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 100px;
}

.case-details-container {
  flex-grow: 1;
  max-width: 685px;
}


.case-status-header {
  background-color: #f8f9fa;
  /* Light grey background */
  border-radius: 10px;
  /* Rounded corners */
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  width: 25%;
  min-width: 220px;
}


.case-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 15px;
  background-color: #fff8e6;
  /* Light yellow background */
  border-radius: 8px;
  margin-bottom: 5px;
  border-left: 4px solid #1a3a5f;
}

.case-detail-label {
  font-weight: 600;
  color: #555;
  font-size: 14px;
}

.case-detail-value {
  color: #333;
  font-size: 15px;
}

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

/* Client header area in sidebar */
.client-header-area {
  background-color: white;
  padding: 15px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-name-display {
  color: #1a3a5f;
    background: white;
    width: 100%;
    padding: 11px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.return-to-clients-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #1a3a5f;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.return-to-clients-btn:hover {
  background-color: #0f2642;
}

.arrow-left-icon {
  font-size: 28px;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Client section input styles */
#client-detail-section input,
#client-detail-section select,
#client-detail-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: white;
}

#client-detail-section input:focus,
#client-detail-section select:focus,
#client-detail-section textarea:focus {
  outline: none;
  border-color: #1a3a5f;
  box-shadow: 0 0 0 2px rgba(26, 58, 95, 0.1);
}

#client-detail-section .search-filter input {
  flex: 1;
  min-width: 200px;
}

#client-detail-section button:not(.filter-toggle-btn) {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

#client-detail-section .btn-primary {
  background-color: #0056b3;
  color: white;
}

#client-detail-section .btn-primary:hover {
  background-color: #004494;
}

#client-detail-section .custom-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  padding-right: 30px;
}

/* Minimal styles for client list items */
.client-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.client-name {
  font-size: 16px;
}

.unread-count {
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Specific hover styling for logo and logout buttons */
.menu-item[data-section="logo"]:hover,
.menu-item[data-section="logout"]:hover {
  background-color: #e0e0e0; /* Grey color for logo and logout hover */
}