
body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sidebar {
    width: 280px;
    background: linear-gradient(145deg, #3c2d8a 0%, #4d3aa0 100%);
    color: white;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 4px 0 20px rgba(60, 45, 138, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

/* Sidebar brand/logo area */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation links container */
.nav-links {
    padding-top: 2rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

#logo {
  position: relative;
  z-index: 1;
  height: 160px;
  object-fit: contain;
  padding: 40px 20px;
  margin-top: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: 1.25rem 0 1.25rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px 0 0 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    background: rgba(255, 255, 255, 0.05);
}

/* Hover effect shimmer */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link:hover::before {
    left: 100%;
}

/* Navigation link hover and active states */
.nav-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white !important;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    color: white !important;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
    font-weight: 600;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Logout section styling */
.logout {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    position: relative;
    z-index: 1;
}

/* Logout button styling */
.logout .btn-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    padding: 1rem 2rem;
    margin: 1.25rem 0 1.25rem 1rem;
    border-radius: 8px 0 0 8px;
    transition: all 0.3s ease;
    width: calc(100% - 1rem);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.logout .btn-link::before {
    content: "🚪";
    margin-right: 0.75rem;
    font-size: 1rem;
}

.logout .btn-link:hover {
    color: white;
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

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

/* Content area styling */
.content {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    min-height: 100vh;
}

/* Add subtle pattern to content area */
.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background:
        radial-gradient(circle at 20% 50%, rgba(60, 45, 138, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(137, 190, 22, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(60, 45, 138, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.content > * {
    position: relative;
    z-index: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        min-height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .sidebar::before {
        display: none;
    }
    
    .nav-links {
        padding-top: 1rem;
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .nav-link {
        white-space: nowrap;
        margin: 0;
        flex-shrink: 0;
        color: #e2e8f0;
    }
    
    .nav-link:hover {
        transform: translateY(-2px) scale(1.02);
    }
    
    .logout {
        border-top: none;
        padding: 0.5rem 0.75rem;
    }
    
    .content {
        min-height: auto;
    }
}

/* Additional professional touches */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Focus states for accessibility */
.nav-link:focus,
.logout .btn-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Loading animation for nav links */
@keyframes navLinkPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.nav-link.loading {
    animation: navLinkPulse 1.5s ease-in-out infinite;
}

/* Smooth transitions for reduced motion users */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .logout .btn-link,
    .sidebar {
        transition: none;
    }
    
    .nav-link::before {
        display: none;
    }
}


  /* ===== BASE STYLES ===== */
  .schedule-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
  }

  /* ===== HEADER ===== */
  .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
  }

  .header-content {
    flex: 1;
  }

  .page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
  }

  .page-subtitle {
    color: #475569;
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
  }

  .header-actions {
    display: flex;
    gap: 1rem;
    align-self: anchor-center;
  }

  /* ===== BUTTONS ===== */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .btn-primary {
    background: #89be16;
    color: white;
  }

  .btn-primary:hover {
    background: #6d9613;
    transform: translateY(-1px);
  }

  .btn-export {
    background: #89be16;
    color: white;
    padding: 0.6rem 1.25rem;
    height: 48px;
    display: inline-flex;
    align-items: center;
  }

  .btn-export:hover {
    background: #6d9613;
    color: white !important;
    transform: translateY(-1px);
  }

  .location-schedule {
    height: 48px;
    padding: 0.6rem 1rem;
  }

  .btn-outline {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
  }

  .btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
  }

  /* ===== CARDS ===== */
  .card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
  }

  .card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .card-body {
    padding: 2rem;
  }

  .section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.015em;
  }

  .subsection-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
  }

  /* ===== FORMS ===== */
  .upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .form-grid {
    display: grid;
    gap: 1rem;
  }

  .form-grid p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .form-grid label {
    font-weight: 500;
    color: #374151;
  }

  .form-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .form-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    transition: border-color 0.2s ease;
  }

  .location-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    background: rgb(248, 250, 252);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
  }

  .table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .form-input:focus {
    border-color: #89be16;
    box-shadow: 0 0 0 3px rgba(137, 190, 22, 0.1);
    outline: none;
  }

  .form-grid input[type="file"] {
    border: 2px dashed #d1d5db;
    background: #f9fafb;
  }

  .form-grid input[type="file"]:hover {
    border-color: #89be16;
    background: #f4f9e8;
  }

  /* ===== FILTERS ===== */
  .filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .calendar-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
  }

  /* ===== SELECTION SECTION ===== */
  .selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .selection-section {
    display: flex;
    flex-direction: column;
  }

  .selection-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .checkbox-group {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    max-height: 500px;
    overflow-y: auto;
  }

  .checkbox-group::-webkit-scrollbar {
    width: 6px;
  }

  .checkbox-group::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
  }

  .checkbox-group::-webkit-scrollbar-track {
    background-color: #f0f0f0;
  }


  .checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .checkbox-label:hover {
    background: #f4f1ff;
    border: 1px solid #89be16;
  }

  .checkbox-label {
    border: 1px solid transparent;
    transition: all 0.2s ease;
  }

  .checkbox-label:last-child {
    margin-bottom: 0;
  }

  .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
    cursor: pointer;
  }

  .checkbox-text {
    color: #1e293b;
    font-weight: 500;
  }

  .no-items {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    margin: 0;
  }

  .collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
  }

  .collapsible-header:hover {
    background: #f1f5f9;
  }

  .collapsible-header.active {
    background: #f4f9e8;
    border-color: #89be16;
  }

  .subsection-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .collapse-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
    color: #6b7280;
  }

  .collapsible-header.active .collapse-icon {
    transform: rotate(180deg);
    color: #89be16;
  }

  .collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .collapsible-content.active {
    max-height: 1000px;
  }

  /* ===== TABLES ===== */
  .tables-section {
    margin-bottom: 3rem;
  }

  .section-header {
    margin-bottom: 1.5rem;
  }

  .table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
  }

  .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
  }

  .table-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
  }

  .table-container {
    overflow-x: auto;
  }

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

  .modern-font{
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  }

  .modern-table thead th {
    background: #1e293b;
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
  }

  .modern-table tbody .table-row {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
  }

  .modern-table tbody tr[onclick] {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
    border-left: 4px solid transparent;
  }

  .modern-table tbody tr[onclick]:hover {
    background: #f4f1ff;
    cursor: pointer;
    border-left: 4px solid #89be16;
    box-shadow: 0 2px 8px rgba(137, 190, 22, 0.15);
  }

  .modern-table tbody tr[onclick]:active {
    background: #e8f4d4;
  }

  .modern-table td {
    padding: 1rem;
    vertical-align: middle;
    color: #1e293b;
    font-weight: 500;
    text-align: center;
  }

  .day-badge {
    background: #8b5cf6;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
  }

  .time-cell {
    font-family: monospace;
    font-weight: 700;
    color: #0f172a;
  }

  .location-cell {
    color: #475569;
    font-weight: 500;
  }

  .empty-row {
    background: #f9fafb;
  }

  .empty-cell {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
  }

  /* ===== RESPONSIVE ===== */
  @media (max-width: 768px) {
    .schedule-container {
      padding: 1rem;
    }

    .page-header {
      flex-direction: column;
      gap: 1rem;
    }

    .page-title {
      font-size: 1.5rem;
    }

    .selection-grid {
      grid-template-columns: 1fr;
    }

    .calendar-filters {
      grid-template-columns: 1fr;
      padding: 1rem;
    }

    .filters-grid {
      grid-template-columns: 1fr;
    }

    .form-controls {
      flex-direction: column;
    }

    .table-header {
      flex-direction: column;
      gap: 1rem;
      align-items: stretch;
    }

    .modern-table {
      font-size: 0.85rem;
    }

    .modern-table td,
    .modern-table th {
      padding: 0.75rem;
    }
  }

/* ===== LOGIN PAGE STYLES ===== */
.login-page-body {
  background: linear-gradient(135deg, #3c2d8a 0%, #5a4aa0 100%);
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  max-width: 450px;
  width: 100%;
}

.login-body {
  padding: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.login-form {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}

.form-floating {
  margin-bottom: 1.5rem;
  position: relative;
  margin-left: 20%;
  margin-right: 20%;
  padding: 0%;
}

.form-floating label {
  visibility: visible;
}

.form-control {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  transition: all 0.3s ease;
  background-color: #f8fafc;
  width: 100%;
  height: 60px;
  font-size: 1rem;
}

.form-control:focus {
  border-color: #89be16;
  box-shadow: 0 0 0 0.2rem rgba(137, 190, 22, 0.25);
  background-color: white;
}

.form-label {
  color: #64748b;
  font-weight: 500;
  font-size: 0.95rem;
  padding-left: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: absolute;
  top: 50%;
  left: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  background: transparent;
}

.form-label i {
  margin-right: 0.75rem;
}

.form-floating .form-control:focus ~ .form-label,
.form-floating .form-control:not(:placeholder-shown) ~ .form-label {
  top: 8px;
  left: 8px;
  font-size: 0.75rem;
  padding: 0 0.5rem;
  background: white;
  border-radius: 4px;
  transform: translateY(0);
  color: #89be16;
}

.form-control::placeholder {
  color: transparent;
}

.btn-login {
  background: #89be16;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: 1.1rem;
  width: 100%;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(137, 190, 22, 0.3);
  background: #6d9613;
}

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

.error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #c81f1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.help-text {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.5rem;
  text-align: center;
}

.login-logo {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 2rem auto;
}

.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
}

.shape:nth-child(3) {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* ===== MODAL STYLES ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.modal[style*="block"] {
  display: block !important;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0;
  border-radius: 12px;
  width: 95%;
  max-width: 1400px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
  border: 1px solid #e9ecef;
}

.modal-header {
  background: linear-gradient(135deg, #343a40 0%, #495057 100%);
  color: white;
  padding: 20px 30px;
  border-bottom: none;
  position: relative;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-body {
  padding: 30px;
}

.close-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

/* ===== FORM STYLES ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.95rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: #fff;
  box-sizing: border-box;
}

.form-input-schedule,
.form-select-schedule {
  width: 80%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: #fff;
  box-sizing: border-box;
  margin-right: 10px;
}

.form-group-schedule {
  display: flex;
  flex-direction: row;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ===== ENHANCED BUTTON STYLES ===== */
.btn-success {
  background: linear-gradient(135deg, #89be16 0%, #6d9613 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #6d9613 0%, #557210 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(137, 190, 22, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #c81f1c 0%, #a01816 100%);
  color: white;
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #a01816 0%, #801412 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 31, 28, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: white;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* ===== MODAL TABLE STYLES ===== */
.modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-table thead {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
}

.modal-table th {
  padding: 15px;
  text-align: left;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  letter-spacing: 0.025em;
}

.modal-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.modal-table tbody tr:hover {
  background-color: #f4f1ff;
}

.modal-table input[type="time"],
.modal-table select {
  width: 5vh;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 0.9rem;
}

.modal-table input[type="checkbox"] {
  transform: scale(1.2);
  accent-color: #89be16;
}

/* ===== BUTTON GROUP ===== */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.button-group-left {
  justify-content: flex-start;
}

/* ===== INFO DISPLAY STYLES ===== */
.patient-info,
.provider-info {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #89be16;
}

.patient-info p,
.provider-info p {
  margin: 8px 0;
  font-size: 1rem;
}

.patient-info strong,
.provider-info strong {
  color: #0f172a;
  font-weight: 700;
}

.patient-info span,
.provider-info span {
  color: #1e293b;
  font-weight: 500;
}

/* ===== ANIMATION ===== */
@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ===== INDIVIDUAL SCHEDULE STYLES ===== */
.individual-schedule-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  margin: 0;
}

.individual-schedule-modal {
  margin: 0 !important;
  max-width: 1200px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  position: absolute;
  flex-shrink: 0;
}

.individual-schedule-header {
  background: linear-gradient(135deg, #343a40 0%, #495057 100%);
  color: white;
}

.individual-schedule-close {
  color: white;
  float: right;
  font-size: 2rem;
}

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

.individual-schedule-actions {
  width: 100px;
}

.individual-schedule-center {
  text-align: center;
}

.individual-schedule-buttons {
  margin-top: 20px;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

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

.mt-20 {
  margin-top: 20px;
}

.w-100 {
  width: 100%;
}

.w-fit {
  width: fit-content;
}

/* ===== RESPONSIVE MODAL STYLES ===== */
@media (max-width: 768px) {
  .login-body {
    padding: 1.5rem;
  }

  .login-title {
    font-size: 1.5rem;
  }

  .login-card {
    max-width: 90%;
  }

  .login-form {
    max-width: 100%;
  }

  .modal-content {
    width: 95%;
    margin: 10px auto;
  }

  .modal-body {
    padding: 20px;
  }

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

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}
  .schedule-widget {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
  }

  .schedule-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    min-width: 1200px;
    gap: 0;
    background: white;
    border: 1px solid #d1d5db;
  }

  .time-column,
  .day-column {
    background: white;
    border-right: 1px solid #d1d5db;
  }

  .time-column {
    border-right: 2px solid #cbd5e1;
  }

  .time-header,
  .day-header {
    padding: 12px;
    font-weight: 600;
    text-align: center;
    background: #f3f4f6;
    border-bottom: 2px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .time-slot {
    height: 60px;
    padding: 0;
    padding-left: 12px;
    padding-right: 12px;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    position: relative;
  }

  .time-slot::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid #d1d5db;
  }

  .appointments-container {
    position: relative;
    height: calc(60px * 13);
    /* 13 hours from 7:00 to 20:00 */
    border-left: 1px solid #d1d5db;
    background-image:
      repeating-linear-gradient(to bottom,
        transparent,
        transparent 29px,
        #e5e7eb 29px,
        #e5e7eb 30px,
        transparent 30px,
        transparent 59px,
        #d1d5db 59px,
        #d1d5db 60px);
  }

  .appointment-block {
    position: absolute;
    left: 6px;
    right: 6px;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-left: 4px solid rgba(0, 0, 0, 0.4);
    box-sizing: border-box; /* Ensure height includes padding and border */
  }

  .appointment-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    z-index: 5;
    opacity: 0.9;
    cursor: pointer;
  }

  .appointment-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  .appointment-content {
    color: white;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    padding-top: 4px;
  }

  .appointment-title {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    line-height: 1.3;
  }

  /* Lunch Break Styling */
  .appointment-block.lunch-break {
    background: repeating-linear-gradient(
      45deg,
      #9e9e9e,
      #9e9e9e 10px,
      #757575 10px,
      #757575 20px
    ) !important;
    border-color: #616161 !important;
    cursor: default;
    opacity: 0.8;
  }

  .appointment-block.lunch-break:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: default;
  }

  .appointment-block.lunch-break .appointment-title {
    font-style: italic;
  }

  /* Backup Provider Styling */
  .appointment-block.backup-block {
    background: repeating-linear-gradient(
      45deg,
      #0ea5e9,
      #0ea5e9 10px,
      #0284c7 10px,
      #0284c7 20px
    ) !important;
    border: 2px solid #0369a1 !important;
    cursor: pointer;
    opacity: 0.85;
  }

  .appointment-block.backup-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(14, 165, 233, 0.5);
    opacity: 1;
  }

  /* Hide text content in backup blocks - click to view details */
  .appointment-block.backup-block .appointment-content {
    visibility: hidden;
  }

  /* Backup View Mode - when viewing only backups */
  .schedule-widget.backup-view-mode .appointment-block.backup-block {
    opacity: 1;
  }

  /* Backup view button styling */
  .backup-view-btn {
    background-color: #e0f2fe !important;
    border-color: #0ea5e9 !important;
    color: #0369a1 !important;
  }

  .backup-view-btn.active {
    background-color: #0ea5e9 !important;
    color: white !important;
  }

  .backup-view-btn:hover {
    background-color: #bae6fd !important;
  }

  .backup-view-btn.active:hover {
    background-color: #0284c7 !important;
  }

  /* Overlapping backup blocks - side by side layout */
  .schedule-widget.backup-view-mode .appointment-block.backup-block {
    position: absolute;
    box-sizing: border-box;
    /* Width and left will be set dynamically by JS */
  }

  /* Unassigned Blocks Styling */
  .appointment-block.unassigned-block {
    background: repeating-linear-gradient(
      -45deg,
      #fecaca,
      #fecaca 8px,
      #fca5a5 8px,
      #fca5a5 16px
    ) !important;
    border: 3px dashed #dc2626 !important;
    cursor: pointer;
    opacity: 0.95;
  }

  .appointment-block.unassigned-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
    z-index: 10;
    opacity: 1;
  }

  .appointment-block.unassigned-block .appointment-title {
    color: #7f1d1d;
    font-weight: 600;
  }

  .appointment-block.unassigned-block .unassigned-label {
    color: #dc2626;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.8);
    padding: 1px 4px;
    border-radius: 2px;
    display: inline-block;
  }

  /* Travel Block Styling */
  .appointment-block.travel-block {
    background: repeating-linear-gradient(
      45deg,
      #fbbf24,
      #fbbf24 8px,
      #f59e0b 8px,
      #f59e0b 16px
    ) !important;
    border: 2px solid #d97706 !important;
    border-left-width: 2px !important; /* Override thicker left border for small blocks */
    cursor: default;
    opacity: 0.75;
    padding: 2px 4px; /* Reduced padding for small travel blocks */
  }

  .appointment-block.travel-block:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: default;
    opacity: 0.85;
  }

  .appointment-block.travel-block .appointment-title {
    color: #78350f;
    font-size: 11px;
    font-weight: 600;
  }

  .appointment-block.travel-block .travel-label {
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.7);
    padding: 1px 4px;
    border-radius: 2px;
    display: inline-block;
  }

  /* Appointment Details Modal */
  .appointment-info {
    padding: 20px 0;
  }

  .info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .info-row:last-child {
    border-bottom: none;
  }

  .info-row strong {
    color: #374151;
    font-weight: 600;
  }

  .info-row span {
    color: #6b7280;
  }

  .view-toggle {
    display: flex;
    gap: 8px;
  }

  .color-btn {
    transition: all 0.2s ease;
    background: white;
    border: 2px solid #d1d5db;
    color: #374151;
  }

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

  .color-btn.active {
    background: linear-gradient(135deg, #3c2d8a 0%, #4d3aa0 100%) !important;
    color: white;
    border-color: #3c2d8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(60, 45, 138, 0.3);
  }

  .color-btn.active:hover {
    background: linear-gradient(135deg, #2d2266 0%, #3c2d8a 100%) !important;
    box-shadow: 0 6px 12px rgba(60, 45, 138, 0.4);
  }

  .unassigned-toggle {
    transition: all 0.2s ease;
    background: white;
    border: 2px solid #dc2626;
    color: #dc2626;
    margin-left: 16px;
  }

  .unassigned-toggle:hover {
    background: #fef2f2;
    border-color: #b91c1c;
  }

  .unassigned-toggle.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: white;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
  }

  .unassigned-toggle.active:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
  }

  /* Ensure appointments don't overflow */
  .day-column {
    overflow: hidden;
  }

  /* Make schedule scrollable */
  .schedule-widget {
    max-height: 800px;
    overflow-y: auto;
  }

  /* Unassigned Blocks Styles */
  .location-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
  }

  .location-clinic {
    background-color: #e9d5ff;
    color: #5b21b6;
  }

  .location-home {
    background-color: #d9f99d;
    color: #3f6212;
  }

  .location-school {
    background-color: #ddd6fe;
    color: #4c1d95;
  }

  .reason-text {
    color: #6d2e8c;
    font-size: 14px;
    font-weight: 500;
    display: block;
    line-height: 1.5;
    padding: 8px;
    background-color: #f3e8ff;
    border-left: 3px solid #7c3aed;
    border-radius: 4px;
  }

  .badge {
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
  }

/* ===== STATUS BADGES ===== */
/* Using consistent purple (#3c2d8a) and green (#89be16) color palette */

/* Employment Status - Full Time (Purple) */
.badge.bg-info {
  background: linear-gradient(135deg, #3c2d8a 0%, #4d3aa0 100%) !important;
  color: white !important;
}

.badge.bg-info:hover {
  background: linear-gradient(135deg, #2d2266 0%, #3c2d8a 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(60, 45, 138, 0.3);
}

/* Employment Status - Part Time (Green) */
.badge.bg-warning {
  background: linear-gradient(135deg, #89be16 0%, #6d9613 100%) !important;
  color: white !important;
}

.badge.bg-warning:hover {
  background: linear-gradient(135deg, #6d9613 0%, #557210 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(137, 190, 22, 0.3);
}

/* Active Status - Active (Green) */
.badge.bg-success {
  background: linear-gradient(135deg, #89be16 0%, #6d9613 100%) !important;
  color: white !important;
}

.badge.bg-success:hover {
  background: linear-gradient(135deg, #6d9613 0%, #557210 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(137, 190, 22, 0.3);
}

/* Active Status - Inactive (Muted Purple) */
.badge.bg-danger {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  color: white !important;
}

.badge.bg-danger:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* Gender Badges - Male (Purple) */
.badge.bg-primary {
  background: linear-gradient(135deg, #3c2d8a 0%, #4d3aa0 100%) !important;
  color: white !important;
}

.badge.bg-primary:hover {
  background: linear-gradient(135deg, #2d2266 0%, #3c2d8a 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(60, 45, 138, 0.3);
}

/* Gender Badges - Female (Green) */
.badge.bg-success {
  background: linear-gradient(135deg, #89be16 0%, #6d9613 100%) !important;
  color: white !important;
}

.badge.bg-success:hover {
  background: linear-gradient(135deg, #6d9613 0%, #557210 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(137, 190, 22, 0.3);
}

/* Gender Badges - None/Not specified (Muted Gray) */
.badge.bg-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  color: white !important;
}

.badge.bg-secondary:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* ===== LOGOUT MODAL FIX ===== */
/* Ensure modal appears above backdrop */
.modal-backdrop {
  z-index: 1040 !important;
}

#logoutModal {
  z-index: 1050 !important;
}

#logoutModal .modal-dialog {
  z-index: 1060 !important;
}

/* ===== PATIENT AVAILABILITY GRID STYLES ===== */

.availability-grid-container {
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.availability-grid-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
}

.availability-grid-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.availability-legend {
  display: flex;
  gap: 15px;
  font-size: 14px;
}

.availability-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-clinic { color: #3b82f6; }
.legend-home { color: #10b981; }
.legend-school { color: #f59e0b; }

.availability-grid {
  display: grid;
  grid-template-columns: 50px repeat(7, 1fr);
  height: 360px;
  overflow-y: auto;
  background: #fff;
  min-width: 600px;
}

.grid-time-column {
  background: #f5f5f5;
  border-right: 1px solid #ddd;
}

.grid-day-column {
  position: relative;
  border-left: 1px solid #eee;
  min-width: 0;
}

.grid-header-cell {
  height: 30px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}

.grid-time-slot {
  height: 30px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  padding: 2px 4px;
  color: #666;
  display: flex;
  align-items: flex-start;
}

.grid-blocks-area {
  position: relative;
  height: 390px; /* 13 hours * 30px */
  cursor: crosshair;
}

.availability-block {
  position: absolute;
  left: 2px;
  right: 2px;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  font-size: 13px;
  padding: 2px 4px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.1s, box-shadow 0.1s;
  z-index: 2;
}

.availability-block:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 3;
}

.availability-block.clinic { background: #3b82f6; }
.availability-block.home { background: #10b981; }
.availability-block.school { background: #f59e0b; }

/* Provider availability block status colors */
.availability-block.active-block { background: #10b981; }
.availability-block.inactive-block { background: #6b7280; }

/* Provider availability legend */
.legend-active { color: #10b981; }
.legend-inactive { color: #6b7280; }

/* Availability Tooltip */
.availability-tooltip {
  position: fixed;
  background: #333;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  z-index: 1000;
  max-width: 250px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
}

.availability-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #333;
}

.availability-tooltip .tooltip-row {
  margin: 4px 0;
}

.availability-tooltip .tooltip-label {
  color: #aaa;
  font-size: 10px;
  text-transform: uppercase;
}

/* ===== EDITABLE GRID STYLES ===== */

/* Selection overlay for click+drag creation */
.grid-selection-overlay {
  position: absolute;
  background: rgba(59, 130, 246, 0.3);
  border: 2px dashed #3b82f6;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
  left: 2px;
  right: 2px;
}

/* Resize handles on blocks */
.resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
  opacity: 0;
  transition: opacity 0.15s;
}

.resize-handle:hover,
.availability-block:hover .resize-handle {
  opacity: 1;
}

.resize-handle.top {
  top: -2px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), transparent);
  border-radius: 4px 4px 0 0;
}

.resize-handle.bottom {
  bottom: -2px;
  background: linear-gradient(to top, rgba(255,255,255,0.8), transparent);
  border-radius: 0 0 4px 4px;
}

.availability-block.dragging {
  opacity: 0.7;
  cursor: grabbing;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.availability-block.resizing {
  z-index: 100;
}

/* Draft block (striped, can overlap temporarily) */
.availability-block.draft {
  background: repeating-linear-gradient(
    45deg,
    rgba(59, 130, 246, 0.3),
    rgba(59, 130, 246, 0.3) 4px,
    rgba(59, 130, 246, 0.5) 4px,
    rgba(59, 130, 246, 0.5) 8px
  ) !important;
  border: 2px dashed #3b82f6 !important;
  animation: draft-pulse 1.5s ease-in-out infinite;
}

@keyframes draft-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* ===== HORIZONTAL DRAG-TO-COPY STYLES ===== */

/* Original block during horizontal drag */
.availability-block.horizontal-dragging {
  opacity: 0.5;
  cursor: copy !important;
  z-index: 10;
}

/* Ghost blocks during horizontal drag */
.availability-block.ghost-block {
  pointer-events: none;
  opacity: 0.7;
  border: 2px dashed currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

/* Valid drop target (no overlap) */
.availability-block.ghost-valid {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.4) !important;
  color: #166534;
  animation: ghost-pulse 0.6s ease-in-out infinite alternate;
}

/* Invalid drop target (has overlap) */
.availability-block.ghost-invalid {
  border-color: #ef4444 !important;
  background: repeating-linear-gradient(
    45deg,
    rgba(239, 68, 68, 0.2),
    rgba(239, 68, 68, 0.2) 5px,
    rgba(239, 68, 68, 0.35) 5px,
    rgba(239, 68, 68, 0.35) 10px
  ) !important;
  color: #991b1b;
}

@keyframes ghost-pulse {
  0% { opacity: 0.5; }
  100% { opacity: 0.8; }
}

/* Grid mode during horizontal copy */
.availability-grid.horizontal-copy-mode {
  cursor: copy;
}

.availability-grid.horizontal-copy-mode .grid-blocks-area {
  cursor: copy;
}

/* Toast notification for copy feedback */
.copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: toast-slide-up 0.3s ease-out;
}

.copy-toast.success {
  background: #059669;
}

.copy-toast.warning {
  background: #d97706;
}

.copy-toast.error {
  background: #dc2626;
}

@keyframes toast-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Shift key indicator during drag */
.shift-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(59, 130, 246, 0.95);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Block time and provider display */
.availability-block .block-time {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.availability-block .block-provider {
  display: block;
  font-size: 10px;
  opacity: 0.9;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Conflict warning styling */
.availability-block.conflict {
  border: 2px solid #ff9800 !important;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

.conflict-icon {
  color: #ff9800;
  margin-left: 4px;
  font-size: 12px;
}

.conflict-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #856404;
}

.conflict-option {
  color: #ff9800 !important;
  font-style: italic;
}

/* Day column hover state during drag */
.grid-day-column.drag-over .grid-blocks-area {
  background: rgba(59, 130, 246, 0.05);
}

/* Edit popup */
.availability-edit-popup {
  position: fixed;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  padding: 16px;
  z-index: 1001;
  width: 400px;
  max-height: 70vh;
  overflow-y: auto;
}

.popup-header {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  color: #333;
}

.popup-field {
  margin-bottom: 12px;
}

.popup-field label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 500;
}

.popup-field select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.popup-providers {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fafafa;
}

.popup-providers .provider-list-container {
  max-height: 120px;  /* Show ~4 providers */
  overflow-y: auto;
}

.popup-providers .provider-search-input:focus {
  outline: none;
  border-color: #007bff;
}

.popup-provider-item {
  display: flex;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

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

.popup-provider-item input {
  margin-right: 8px;
}

.popup-provider-item label {
  margin: 0;
  font-size: 13px;
  cursor: pointer;
  text-transform: none;
  font-weight: normal;
  color: #333;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.popup-actions .btn {
  padding: 6px 16px;
  font-size: 13px;
}
