/* Basic layout setup */
body {
  display: flex;
  height: 100vh;
  width: 100vw;
  margin: 0;
  overflow: hidden;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #334155;
}

.card:hover + .details-table {
  display: block;
}
.details-table {
  display: none;
  position: absolute;
  z-index: 100;
  background-color: #fff;
  width: 100%;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.15);
  border-radius: 5px;
}
.details-table table {
  margin: 0;
}

#calendar-container {
  height: 80vh;
  width: 80vw;
  margin: 0 auto;
}
#calendar {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transform: rotateX(5deg);
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  height: 100%;
  width: 100%;
}
@media (max-width: 576px) {
  .fc-toolbar {
      flex-direction: column !important;
      align-items: center;
  }
  .fc-toolbar h2 {
      font-size: 1.2rem;
  }
}

.page {
  display: none;
  padding: 20px;
}
.page.active {
  display: block;
}

.form-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 5rem;
}

.form-item {
  flex: 1 1 calc(50% - 1rem);
  box-sizing: border-box;
  margin-bottom: 0.2rem;
}

.form-item label {
  display: block;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-item .form-control,
.form-item .mul-select,
.form-item input[type="file"] {
  width: 100%;
  height: 2.7rem;
}

.form-item button,
.form-item a {
  margin-right: 0.2rem;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .form-item {
    flex: 1 1 90%;
  }
}

/* Modern Navbar */
.navbar {
  height: 64px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar h5 {
  color: white;
  padding-left: 5%;
  padding-right: 0%;
  font-weight: 600;
  font-size: 1.2rem;
}

/* Main content area */
.content {
  margin-top: 64px;
  margin-left: 240px;
  padding: 2rem;
  height: calc(100vh - 64px);
  overflow-y: auto;
  transition: margin-left 0.3s ease;
  background: #f8fafc;
}

/* Modern Sidebar */
.sidebar {
  margin-top: 64px;
  width: 240px;
  height: calc(100vh - 64px);
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  position: fixed;
  left: -240px;
  top: 0;
  transition: left 0.3s ease;
  padding-top: 1.5rem;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar a {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  margin: 0.25rem 0.5rem;
  font-weight: 500;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar .dropdown-toggle::after {
  margin-left: auto;
}

/* Main content */
.content {
  display: flex;
  flex-wrap: wrap;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 8%;  
  transition: margin-left 0.3s ease;
  padding: 4%;
  width: 100%;
  height: auto;
  background: #f8f9fa;
}

/* Toggled sidebar */
.sidebar.active {
  left: 0;
}
.content.active {
  margin-left: 240px;
}

/* Toggle button */
.sidebar-toggle {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1000;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Modern Tables */
.table {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: none;
}

.table thead th {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: #f8fafc;
  transform: scale(1.005);
}

.table-striped tbody tr:nth-of-type(odd) {
  background: #fafbfc;
}

/* Modern Cards */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  background: white;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border-radius: 0.75rem 0.75rem 0 0 !important;
  border: none;
  font-weight: 600;
  padding: 1.25rem;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.card-text {
  margin-bottom: 0.75rem;
  color: #64748b;
  line-height: 1.5;
}

/* Modern Buttons */
.btn {
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

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

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-primary {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* Form Elements */
.form-control {
  border-radius: 0.5rem;
  border: 2px solid #e2e8f0;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  background: #f8fafc;
}

.form-control:focus {
  border-color: #1e293b;
  box-shadow: 0 0 0 0.2rem rgba(30, 41, 59, 0.15);
  background: white;
}

.input-group-text {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border: none;
  border-radius: 0.5rem 0 0 0.5rem;
  font-weight: 500;
}

/* Alerts */
.alert {
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.25rem;
  font-weight: 500;
}

/* Badges */
.badge {
  border-radius: 1rem;
  padding: 0.375rem 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .navbar {
    height: 56px;
    padding: 0 1rem;
  }

  .navbar h5 {
    font-size: 1rem;
    padding-left: 10%;
  }

  .sidebar {
    width: 240px;
    left: -240px;
  }

  .content.active {
    display: 100%;
    margin-left: 240px;
    width: 100%;

  }

  .sidebar-toggle {
    padding: 0.625rem 1rem;
  }

  .dataTables_filter,
  .dataTables_length,
  .dataTables_info,
  .dataTables_paginate {
    display: none !important;
  }

  .card-container {
    display: 90%;
    flex-direction: column;
    gap: 1rem;
  }

  .card {
    width: 100%;
    padding: 3%;
    margin-bottom: 10%;
    border-radius: 0.25rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  .filter-bar {
    margin-bottom: 1.25rem;
  }

  .card-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
  }

  .card-text {
    margin-bottom: 0.75rem;
    color: #64748b;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* Improved card layout for mobile */
  .card-header h5 {
    font-size: 1rem;
  }

  .card-body .row .col-6 {
    margin-bottom: 0.5rem;
  }

  .card-body .d-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .card-body .d-flex span {
    font-size: 0.875rem;
  }
}

/* Tablet Responsiveness */
@media (min-width: 480px) and (max-width: 1024px) {

  .sidebar {
    width: 200px;
  }

  .content.active {
    margin-left: 200px;
  }

  .navbar h5 {
    font-size: 1.1rem;
  }

  .card-body .row .col-6 {
    margin-bottom: 6rem;
  }

  .card-body .d-flex {
    flex-direction: row;
    align-items: center;
    margin: 2%;
    padding: 3%;
    gap: 0.5rem;
  }

  .card-body .d-flex span {
    font-size: 0.9rem;
  }

}

/* Professional card styling */
.card-professional {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  background: white;
  overflow: hidden;
}

.card-professional:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-professional .card-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border-radius: 0.75rem 0.75rem 0 0 !important;
  border: none;
  font-weight: 600;
  padding: 1.25rem;
}

.card-professional .card-title {
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card-professional .card-subtitle {
  color: #e2e8f0;
  font-size: 0.9rem;
}

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

.card-professional .text-primary {
  color: #3b82f6 !important;
}

.card-professional .text-success {
  color: #10b981 !important;
}

.card-professional .text-muted {
  color: #64748b !important;
}

@media print {
  .hide-on-print {
    display: none !important;
  }
}

/* Chat Styles */
.chat-container {
  height: 70vh;
  overflow-y: auto;
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.message-bubble {
  max-width: 70%;
  border-radius: 1.25rem;
  padding: 0.75rem 1.125rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
  line-height: 1.4;
}

.message-in {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  margin-right: auto;
  color: #334155;
}

.message-out {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  margin-left: auto;
}

.group-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1e293b;
}

/* Enhanced Mobile Responsiveness for Small Phones (480px and below) */
