/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS file if present) with a full path will be added to the output.
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

/* Tailwind CSS Directives - Essential for Tailwind to work */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Accordion Animation Styles */
[data-accordion-target="content"] {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

[data-accordion-target="content"].active {
  opacity: 1;
}

[data-accordion-target="icon"] {
  transition: transform 0.3s ease;
}

/* Smooth hover effects for FAQ buttons */
[data-accordion-target="trigger"]:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

/* Focus styles for accessibility */
[data-accordion-target="trigger"]:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Loading animation for better UX */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Smooth transitions for all interactive elements */
button, a, input, select, textarea {
  transition: all 0.2s ease-in-out;
}

/* Enhanced focus styles for better accessibility */
button:focus, a:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Custom scrollbar for better UX */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Custom Sidebar Styles */
.sidebar-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
  height: calc(100vh - 140px); /* Account for header and school dropdown */
  max-height: calc(100vh - 140px);
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

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

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

.sidebar-scrollbar::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 3px;
}

.sidebar-scrollbar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(156, 163, 175, 0.7);
}

/* Smooth module animations */
.module-submenu {
  transition: max-height 300ms ease-in-out, opacity 300ms ease-in-out;
  overflow: hidden;
}

/* Enhanced hover effects */
.sidebar-link {
  transition: all 200ms ease-in-out;
}

.sidebar-link:hover {
  transform: translateX(2px);
}

/* Active state styling - Blue link indicator */
.sidebar-link.active,
.submodule-item.active,
.module-header.active {
  background-color: rgba(59, 130, 246, 0.1) !important;
  border-left: 3px solid #3b82f6 !important;
  color: #3b82f6 !important;
}

.sidebar-link.active i,
.submodule-item.active i,
.module-header.active i {
  color: #3b82f6 !important;
}

/* Module header hover effects */
.module-header:hover {
  background-color: rgba(55, 65, 81, 0.8);
}

/* Submodule item hover effects */
.submodule-item:hover {
  background-color: rgba(55, 65, 81, 0.6);
  transform: translateX(4px);
}

/* Icon animations */
.module-icon {
  transition: transform 200ms ease-in-out, color 200ms ease-in-out;
}

.module-header:hover .module-icon {
  transform: scale(1.1);
}

/* Toggle icon smooth rotation */
.toggle-icon {
  transition: transform 200ms ease-in-out;
}

/* Expand/Collapse button styles */
.module-control-btn {
  transition: all 200ms ease-in-out;
}

.module-control-btn:hover {
  background-color: rgba(59, 130, 246, 0.2);
  transform: translateY(-1px);
}

/* Scroll position indicator */
.scroll-indicator {
  position: absolute;
  right: 2px;
  top: 0;
  width: 2px;
  background: linear-gradient(to bottom, #3b82f6, #1d4ed8);
  border-radius: 1px;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

.sidebar-scrollbar:hover .scroll-indicator {
  opacity: 1;
}

/* Ensure sidebar takes full height */
#sidebar {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure navigation area is properly scrollable */
#sidebar .flex-1 {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

/* Force scrolling to work */
.sidebar-scrollbar {
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch;
}

/* Fix for module submenu content */
.module-submenu > div {
  padding-bottom: 0.5rem;
}

/* Ensure proper spacing in collapsed state */
.module-submenu[style*="max-height: 0"] {
  margin: 0;
  padding: 0;
}

/* Force scrolling to work */
.sidebar-scrollbar {
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch;
}

/* Mobile responsive adjustments - Updated to use lg breakpoint */
@media (max-width: 1023px) {
  .sidebar-scrollbar {
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
  }
}

/* Ensure nav content doesn't overflow */
#sidebar nav {
  min-height: 0;
  flex: 1;
}

/* Student Form Enhanced Styles */
.student-tabs-panel {
  transition: opacity 300ms ease-in-out, transform 300ms ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

.student-tabs-panel.hidden {
  opacity: 0;
  transform: translateY(10px);
}

/* Staff Form Enhanced Styles */
.staff-tabs-panel {
  transition: opacity 300ms ease-in-out, transform 300ms ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

.staff-tabs-panel.hidden {
  opacity: 0;
  transform: translateY(10px);
}

/* Staff Tab Navigation Styles */
.staff-tabs-nav {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Staff Tab Button Animations */
.staff-tab-button {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.staff-tab-button:hover::before {
  left: 100%;
}

/* Staff Tab Active States */
.staff-tab-button.bg-gradient-to-r {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.staff-tab-button.bg-white {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-tab-button.bg-white:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* Staff Progress Tracker */
.staff-progress-step {
  transition: all 300ms ease-in-out;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-progress-step.completed {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

/* Staff Form Field Enhancements */
.staff-form-field:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Staff Success Messages */
.staff-success-message {
  animation: slideInRight 0.5s ease-out;
}

/* Staff Form Validation Styles */
.staff-form-field.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  animation: shake 0.5s ease-in-out;
}

.staff-form-field.success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Staff Button Enhancements */
.staff-btn-gradient {
  background: linear-gradient(135deg, var(--tw-gradient-stops));
  transition: all 200ms ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.staff-btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.staff-btn-gradient:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Staff Form Section Cards */
.staff-section-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 200ms ease-in-out;
  border: 1px solid #e5e7eb;
}

.staff-section-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* Staff Emergency Contact Sections */
.staff-emergency-primary {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fecaca;
}

.staff-emergency-secondary {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fed7aa;
}

/* Staff Salary Section */
.staff-salary-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
}

/* Staff Bank Details Section */
.staff-bank-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}

/* Enhanced Tab Navigation Styles */
.student-tabs-nav {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tab button animations with enhanced styling */
.student-tab-button {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.student-tab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 500ms ease-in-out;
}

.student-tab-button:hover::before {
  left: 100%;
}

/* Active tab styling with enhanced colors */
.student-tab-button.bg-indigo-600 {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

.student-tab-button.bg-indigo-600:hover {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
  transform: translateY(-2px);
}

/* Inactive tab styling */
.student-tab-button.bg-gray-100 {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}

.student-tab-button.bg-gray-100:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Disabled tab styling */
.student-tab-button.opacity-50 {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #94a3b8;
  cursor: not-allowed;
}

.student-tab-button.opacity-50:hover {
  transform: none;
  box-shadow: none;
}

/* Progress tracker enhanced styling */
.progress-step {
  transition: all 300ms ease-in-out;
}

.progress-step.completed {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Form field focus effects */
.student-form-field:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Success message animations */
.success-message {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Notification system */
.notification {
  transform: translateX(100%);
  transition: transform 300ms ease-in-out;
}

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

/* Card hover effects */
.student-card {
  transition: all 300ms ease-in-out;
}

.student-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Button ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Transport assignment card styling */
.transport-assignment-card {
  transition: all 300ms ease-in-out;
}

.transport-assignment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Mobile responsive adjustments - Updated to use md breakpoint */
@media (max-width: 767px) {
  .student-tabs-nav {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .student-tabs-nav::-webkit-scrollbar {
    display: none;
  }
  
  .student-tab-button {
    min-width: 120px;
    flex-shrink: 0;
  }
}

/* Loading spinner */
.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Form validation error styling */
.form-field-error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Enhanced tab content transitions */
.student-tabs-panel {
  transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1), 
              transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.student-tabs-panel.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
}

/* Tab icon animations */
.student-tab-button span {
  transition: transform 200ms ease-in-out;
}

.student-tab-button:hover span {
  transform: scale(1.1);
}

/* Progress tracker step animations */
.progress-step {
  transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.completed {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

/* Enhanced form field styling */
.student-form-field input:focus,
.student-form-field select:focus,
.student-form-field textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

/* Tab content fade in effect */
.student-tabs-panel:not(.hidden) {
  animation: fadeInUp 400ms ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced button hover states */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  transition: all 300ms ease-in-out;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

/* Tab indicator line animation */
.student-tab-button span[class*="absolute"] {
  transition: all 300ms ease-in-out;
}

.student-tab-button.bg-indigo-600 span[class*="absolute"] {
  background: linear-gradient(90deg, #ffffff 0%, #e0e7ff 100%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Responsive tab layout improvements - Updated to use sm breakpoint */
@media (max-width: 639px) {
  .student-tabs-nav {
    padding: 4px;
  }
  
  .student-tab-button {
    padding: 12px 8px;
    font-size: 0.875rem;
  }
  
  .student-tab-button span {
    font-size: 1.25rem;
  }
}

/* Enhanced accessibility */
.student-tab-button:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Smooth scrolling for tab navigation */
.student-tabs-nav {
  scroll-behavior: smooth;
}

/* Tab content loading state */
.student-tabs-panel.loading {
  opacity: 0.7;
  pointer-events: none;
}

.student-tabs-panel.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Enhanced Top Navigation Bar Styles */
.top-nav {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  transition: all 300ms ease-in-out;
}

.top-nav:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Top nav button animations */
.top-nav-button {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  font-weight: 500;
}

.top-nav-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 500ms ease-in-out;
}

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

.top-nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Enhanced dropdown styling */
.top-nav-dropdown {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  animation: slideDown 200ms ease-out;
  position: absolute;
  z-index: 1000;
  min-width: 200px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-visible {
  animation: slideDown 200ms ease-out;
}

/* User profile button enhancement */
.user-profile-button {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  padding: 8px 12px;
}

.user-profile-button:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Notification button enhancement */
.notification-button {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
}

.notification-button:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Quick actions button enhancement */
.quick-actions-button {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
}

.quick-actions-button:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

/* School logo enhancement */
.school-logo {
  transition: all 300ms ease-in-out;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.school-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* School name badge enhancement */
.school-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: all 300ms ease-in-out;
}

.school-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Dropdown menu items enhancement */
.dropdown-menu-item {
  transition: all 200ms ease-in-out;
  border-radius: 8px;
  margin: 2px 4px;
}

.dropdown-menu-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  transform: translateX(4px);
}

/* Quick action items enhancement */
.quick-action-item {
  transition: all 200ms ease-in-out;
  border-radius: 8px;
}

.quick-action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile menu button enhancement */
.mobile-menu-button {
  transition: all 300ms ease-in-out;
  border-radius: 8px;
  padding: 8px;
}

.mobile-menu-button:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  transform: scale(1.05);
}

/* Enhanced page title styling */
.page-title {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  transition: all 300ms ease-in-out;
}

.page-title:hover {
  transform: translateX(4px);
}

/* Responsive enhancements - Updated to use md breakpoint */
@media (max-width: 767px) {
  .top-nav {
    padding: 0 16px;
  }
  
  .user-profile-button {
    padding: 6px 8px;
  }
  
  .school-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  
  .top-nav-dropdown {
    min-width: 180px;
    right: 0;
  }
}

/* Large screen dropdown positioning */
@media (min-width: 1024px) {
  .top-nav-dropdown {
    min-width: 220px;
  }
  
  .user-profile-button {
    padding: 8px 16px;
  }
}

/* Enhanced accessibility */
.top-nav-button:focus,
.user-profile-button:focus,
.notification-button:focus,
.quick-actions-button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Loading state for notifications */
.notification-loading {
  animation: pulse 2s infinite;
}

/* Enhanced flash messages */
.flash-message {
  animation: slideInDown 300ms ease-out;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tooltip styles */
.tooltip-element {
  z-index: 9999;
  pointer-events: none;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

/* Dashboard specific styles */
.dashboard-gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dashboard-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 16px;
  overflow: hidden;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Quick action cards */
.quick-action-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  overflow: hidden;
}

.quick-action-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Management cards */
.management-card {
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  overflow: hidden;
}

.management-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Smooth transitions for all interactive elements */
* {
  transition: color 200ms ease-in-out, background-color 200ms ease-in-out, border-color 200ms ease-in-out;
}

/* Sidebar Styles */
.app-sidebar {
  width: 250px;
  min-width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  background-color: #1e293b; /* Dark bg */
  overflow-y: auto;
}

/* Main content shift beside sidebar */
[data-sidebar-target="mainContent"] {
  margin-left: 250px;
  width: calc(100% - 250px);
  min-width: 0; /* important for flex children to wrap instead of overflow */
  overflow-x: hidden;
  transition: margin-left 0.3s ease, width 0.3s ease;
}

/* when sidebar hidden (mobile), let main use full width */
@media (max-width: 1023px) {
  [data-sidebar-target="mainContent"] {
    margin-left: 0;
    width: 100%;
    overflow-x: hidden;
  }
}

/* prevent flex/grid children from growing and causing horizontal scroll */
.main, .page, .container, .staff-index-page, .staff-index-container, .cards-mobile, .table-responsive, .flex-1 {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* make any wide tables scrollable instead of stretching page */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* better table handling */
table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  word-break: break-word;
}

/* keep images/videos/iframes from overflowing */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Fix: prevent horizontal overflow and align main content with sidebar */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* already present, reinforce */
}

/* =====================================================
   Staff Attendance Page Styles
   ===================================================== */
.staff-attendance-toggle-group {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
}

.staff-attendance-toggle-btn {
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.staff-attendance-toggle-btn:hover {
  color: #1e293b;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.staff-attendance-toggle-btn.active-present {
  background: #10b981 !important;
  color: white !important;
  border-color: #059669;
}

.staff-attendance-toggle-btn.active-absent {
  background: #ef4444 !important;
  color: rgb(213, 142, 142) !important;
  border-color: #dc2626;
}

.staff-attendance-toggle-btn.active-late {
  background: #f59e0b !important;
  color: rgb(214, 157, 157) !important;
  border-color: #d97706;
}

.staff-attendance-toggle-btn.active-half {
  background: #6366f1 !important;
  color: rgb(235, 173, 173) !important;
  border-color: #4f46e5;
}

.staff-attendance-marked-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid white;
  border-radius: 50%;
}
