/* Custom Modern CSS Improvements for ShadowRMS */

/* Light Mode Enhancements - Match Dark Mode Quality */
.nav-sidebar .nav-item > .nav-link.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
}

.sidebar .nav-link:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #007bff !important;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-bottom: 1px solid #007bff33 !important;
}

.table th {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: none !important;
}

.form-control:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

/* Enhanced Dark Mode */
.dark-mode {
    background: linear-gradient(135deg, #0a0e13 0%, #1a1f27 100%) !important;
    color: #e2e8f0 !important;
}

.dark-mode .main-sidebar {
    background: linear-gradient(180deg, #0f1419 0%, #1a1f27 100%) !important;
}

.dark-mode .content-wrapper {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f27 100%) !important;
    color: #e2e8f0 !important;
}

.dark-mode .navbar {
    background: linear-gradient(90deg, #0a0e13 0%, #1a1f27 100%) !important;
    border-bottom: 2px solid #007bff !important;
}

/* Blue accents for dark mode */
.dark-mode .card {
    background: linear-gradient(135deg, #1a1f27 0%, #242b36 100%) !important;
    border: 1px solid #007bff33 !important;
    color: #e2e8f0 !important;
}

.dark-mode .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4) !important;
}

/* Better dark mode text readability */
.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
    color: #f7fafc !important;
}

.dark-mode p, .dark-mode span, .dark-mode div {
    color: #e2e8f0 !important;
}

.dark-mode .nav-link {
    color: #cbd5e0 !important;
}

.dark-mode .nav-link:hover {
    color: #f7fafc !important;
}

/* Enhanced Dark Mode - Deeper improvements */
.dark-mode .main-header {
    background: linear-gradient(90deg, #0a0e13 0%, #1a1f27 100%) !important;
    border-bottom: 1px solid #007bff !important;
}

.dark-mode .nav-sidebar .nav-item > .nav-link.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3) !important;
}

.dark-mode .sidebar .nav-link:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #f7fafc !important;
}

.dark-mode .card-header {
    background: linear-gradient(135deg, #1a1f27 0%, #242b36 100%) !important;
    border-bottom: 1px solid #007bff33 !important;
    color: #f7fafc !important;
}

.dark-mode .table {
    background: #1a1f27 !important;
    color: #e2e8f0 !important;
}

.dark-mode .table th {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border: none !important;
}

.dark-mode .table td {
    border-color: #374151 !important;
    color: #e2e8f0 !important;
}

.dark-mode .form-control {
    background: #242b36 !important;
    border: 1px solid #374151 !important;
    color: #e2e8f0 !important;
}

.dark-mode .form-control:focus {
    background: #2d3748 !important;
    border-color: #007bff !important;
    color: #f7fafc !important;
}

.dark-mode .dropdown-menu {
    background: #242b36 !important;
    border: 1px solid #374151 !important;
}

.dark-mode .dropdown-item {
    color: #e2e8f0 !important;
}

.dark-mode .dropdown-item:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #f7fafc !important;
}

/* Sleeker shadows and borders */
.card {
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
}

/* Modern buttons */
.btn {
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

/* Sleeker form inputs */
.form-control {
    border: 2px solid #e2e8f0 !important;
    border-radius: 6px !important;
    transition: border-color 0.2s ease !important;
}

.form-control:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1) !important;
}

/* Modern sidebar */
.main-sidebar {
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1) !important;
}

/* Sleeker navigation */
.nav-sidebar .nav-link {
    border-radius: 6px !important;
    margin: 2px 8px !important;
}

/* Modern tables */
.table {
    border-radius: 8px !important;
    overflow: hidden !important;
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

/* Better spacing and typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600 !important;
    color: #2d3748 !important;
}

/* Sleeker alerts */
.alert {
    border: none !important;
    border-radius: 8px !important;
    border-left: 4px solid !important;
}

.alert-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    color: white !important;
    border-left-color: #22543d !important;
}

.alert-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%) !important;
    color: white !important;
    border-left-color: #742a2a !important;
}

.alert-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
    color: white !important;
    border-left-color: #2c5282 !important;
}

/* Modern loading animations */
.btn.loading {
    position: relative !important;
}

.btn.loading::after {
    content: '' !important;
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    margin: auto !important;
    border: 2px solid transparent !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sleeker modals */
.modal-content {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-bottom: none !important;
    border-radius: 12px 12px 0 0 !important;
}

/* Better scrollbars */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e0 !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0 !important;
}

/* Modern progress bars */
.progress {
    border-radius: 8px !important;
    height: 8px !important;
    background-color: #e2e8f0 !important;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Sleeker badges */
.badge {
    border-radius: 12px !important;
    font-weight: 500 !important;
    padding: 4px 12px !important;
}

/* Fix Server-Wide badges - simpler approach */
.badge.badge-danger {
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
    margin-left: 8px !important;
    white-space: nowrap !important;
}

/* Modern dropdowns */
.dropdown-menu {
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.dropdown-item {
    border-radius: 4px !important;
    margin: 2px 4px !important;
    transition: all 0.2s ease !important;
}

.dropdown-item:hover {
    background-color: #f7fafc !important;
    transform: translateX(4px) !important;
}

/* Override any remaining pink highlights in light mode */
.btn-danger, .badge-danger {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
}

.alert-danger {
    background-color: #cce7ff !important;
    border-color: #007bff !important;
    color: #0056b3 !important;
}

/* Fix text selection to use blue instead of pink */
::selection {
    background-color: #007bff !important;
    color: white !important;
}

::-moz-selection {
    background-color: #007bff !important;
    color: white !important;
}

/* ===================================
   GOOGLE CALENDAR STYLE REDESIGN
   =================================== */

/* Calendar Container */
.fc {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 14px !important;
}

/* Header Toolbar - Clean Modern Design */
.fc-toolbar-chunk {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.fc-toolbar.fc-header-toolbar {
    margin: 0 !important;
    padding: 24px 32px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e1e5e9 !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Calendar Title - Premium Typography */
.fc-toolbar-title {
    font-size: 24px !important;
    font-weight: 500 !important;
    color: #f7fafc !important;
    margin: 0 !important;
    line-height: 32px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: -0.01em !important;
    flex-grow: 1 !important;
    text-align: center !important;
}

/* Navigation Buttons - Premium Modern Style */
.fc .fc-button,
.fc-button {
    background: #ffffff !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 10px !important;
    color: #3c4043 !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    height: 40px !important;
    min-width: 44px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: 0.025em !important;
    outline: none !important;
}

.fc-button:hover {
    background: #f8f9fa !important;
    border-color: #dadce0 !important;
    color: #1a73e8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.fc-button:focus {
    background: #f8f9fa !important;
    border-color: #1a73e8 !important;
    color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px) !important;
}

.fc-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.fc-button-active {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
    border-color: #1a73e8 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3) !important;
    font-weight: 600 !important;
}

.fc-button-active:hover {
    background: linear-gradient(135deg, #1557b0 0%, #0f4c81 100%) !important;
    border-color: #1557b0 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4) !important;
    transform: translateY(-1px) !important;
}

.fc-button-active:focus {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%) !important;
    border-color: #1a73e8 !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2), 0 4px 12px rgba(26, 115, 232, 0.4) !important;
}

/* Button Groups - Improved Spacing and Styling */
.fc-button-group {
    display: flex !important;
    gap: 2px !important;
    background: #f1f3f4 !important;
    border-radius: 12px !important;
    padding: 2px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.fc-button-group > .fc-button {
    border-radius: 10px !important;
    margin-left: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #5f6368 !important;
    font-weight: 500 !important;
    min-width: 60px !important;
}

.fc-button-group > .fc-button:hover {
    background: rgba(255, 255, 255, 0.8) !important;
    color: #1a73e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.fc-button-group > .fc-button-active {
    background: #ffffff !important;
    color: #1a73e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    font-weight: 600 !important;
}

.fc-button-group > .fc-button-active:hover {
    background: #ffffff !important;
    color: #1557b0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Navigation Button Spacing */
.fc-prev-button, .fc-next-button {
    min-width: 44px !important;
    padding: 10px 12px !important;
}

.fc-today-button {
    margin-left: 8px !important;
    margin-right: 8px !important;
}

/* Calendar Grid - Clean Modern Look */
.fc-scrollgrid {
    border: none !important;
    border-radius: 0 0 12px 12px !important;
    overflow: hidden !important;
}

.fc-scrollgrid-section-header > td {
    border: none !important;
    background: #f8f9fa !important;
}

.fc-scrollgrid-section-body > td {
    border: none !important;
}

/* Day Headers - Clean Typography */
.fc-col-header-cell {
    background: #f8f9fa !important;
    border: none !important;
    border-bottom: 1px solid #e1e5e9 !important;
    padding: 12px 8px !important;
}

.fc-col-header-cell-cushion {
    color: #e2e8f0 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
}

/* Calendar Days - Google Style Grid */
.fc-daygrid-day {
    border: 1px solid #e8eaed !important;
    background: #ffffff !important;
    transition: background-color 0.2s ease !important;
}

.fc-daygrid-day:hover {
    background: #f8f9fa !important;
}

.fc-daygrid-day.fc-day-today {
    background: #e3f2fd !important;
    border-color: #007bff !important;
}

/* Day Numbers - Clean Modern Typography */
.fc-daygrid-day-number {
    color: #3c4043 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    padding: 8px 12px !important;
    text-decoration: none !important;
    display: block !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: #007bff !important;
    font-weight: 600 !important;
}

.fc-day-other .fc-daygrid-day-number {
    color: #9aa0a6 !important;
}

/* Week Numbers - Subtle Design */
.fc-daygrid-week-number {
    background: #f8f9fa !important;
    color: #5f6368 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-right: 1px solid #e8eaed !important;
    padding: 8px !important;
    text-align: center !important;
}

/* Events - Modern Card Style */
.fc-event {
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    margin: 2px 4px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.fc-event:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.fc-event-title {
    font-weight: 500 !important;
    line-height: 1.3 !important;
}

/* More Events Link */
.fc-daygrid-more-link {
    color: #007bff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin: 2px 4px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.fc-daygrid-more-link:hover {
    background: rgba(0, 123, 255, 0.1) !important;
    color: #0056b3 !important;
}

/* Time Grid Views (Week/Day) */
.fc-timegrid-axis {
    border: none !important;
    background: #f8f9fa !important;
}

.fc-timegrid-slot {
    border-color: #e8eaed !important;
    height: 48px !important;
}

.fc-timegrid-slot-label {
    color: #5f6368 !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
}

/* List View */
.fc-list-event {
    border: none !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid #e8eaed !important;
}

.fc-list-event:hover {
    background: #f8f9fa !important;
}

.fc-list-event-time {
    color: #5f6368 !important;
    font-weight: 500 !important;
}

.fc-list-event-title {
    color: #3c4043 !important;
    font-weight: 500 !important;
}

/* Dark Mode Calendar Styles */
.dark-mode .fc-toolbar.fc-header-toolbar {
    background: #1a1f27 !important;
    border-bottom-color: #374151 !important;
}

.dark-mode .fc-toolbar-title {
    color: #e2e8f0 !important;
}

.dark-mode .fc-button {
    background: #242b36 !important;
    border-color: #374151 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.dark-mode .fc-button:hover {
    background: #2d3748 !important;
    border-color: #4a5568 !important;
    color: #60a5fa !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .fc-button:focus {
    background: #2d3748 !important;
    border-color: #60a5fa !important;
    color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .fc-button-active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    border-color: #1d4ed8 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.4) !important;
}

.dark-mode .fc-button-active:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%) !important;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.5) !important;
}

/* Dark Mode Button Groups */
.dark-mode .fc-button-group {
    background: #2d3748 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .fc-button-group > .fc-button {
    background: transparent !important;
    border: none !important;
    color: #a0aec0 !important;
    box-shadow: none !important;
}

.dark-mode .fc-button-group > .fc-button:hover {
    background: rgba(45, 55, 72, 0.8) !important;
    color: #60a5fa !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

.dark-mode .fc-button-group > .fc-button-active {
    background: #374151 !important;
    color: #60a5fa !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .fc-button-group > .fc-button-active:hover {
    background: #4a5568 !important;
    color: #93c5fd !important;
}

.dark-mode .fc-col-header-cell {
    background: #242b36 !important;
    border-bottom-color: #374151 !important;
}

.dark-mode .fc-col-header-cell-cushion {
    color: #a0aec0 !important;
}

.dark-mode .fc-daygrid-day {
    background: #1a1f27 !important;
    border-color: #374151 !important;
}

.dark-mode .fc-daygrid-day:hover {
    background: #242b36 !important;
}

.dark-mode .fc-day-today {
    background: rgba(0, 123, 255, 0.1) !important;
    border-color: #007bff !important;
}

.dark-mode .fc-daygrid-day-number {
    color: #e2e8f0 !important;
}

.dark-mode .fc-day-other .fc-daygrid-day-number {
    color: #718096 !important;
}

.dark-mode .fc-daygrid-week-number {
    background: #242b36 !important;
    color: #a0aec0 !important;
    border-right-color: #374151 !important;
}

/* SIDEBAR CALENDAR - Force compact for smaller containers */
.card-primary .fc-toolbar .fc-button,
.card .fc-toolbar .fc-button {
    background: #007bff !important;
    border: 1px solid #007bff !important;
    color: #ffffff !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    height: 28px !important;
    min-width: 40px !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 65px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3) !important;
    transition: all 0.15s ease !important;
}

/* SIDEBAR CALENDAR - Hover and Active States */
.card-primary .fc-toolbar .fc-button:hover,
.card .fc-toolbar .fc-button:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4) !important;
    transform: translateY(-1px) !important;
}

.card-primary .fc-toolbar .fc-button-active,
.card .fc-toolbar .fc-button-active,
.card-primary .fc-toolbar .fc-button.fc-button-active,
.card .fc-toolbar .fc-button.fc-button-active {
    background: #004085 !important;
    border-color: #004085 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.5) !important;
    font-weight: 600 !important;
}

/* LIGHT MODE - Sidebar calendar with black text */
body:not(.dark-mode) .card-primary .fc-toolbar .fc-button,
body:not(.dark-mode) .card .fc-toolbar .fc-button {
    background: #007bff !important;
    border-color: #007bff !important;
    color: #000000 !important;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3) !important;
}

body:not(.dark-mode) .card-primary .fc-toolbar .fc-button:hover,
body:not(.dark-mode) .card .fc-toolbar .fc-button:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
    color: #000000 !important;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4) !important;
}

body:not(.dark-mode) .card-primary .fc-toolbar .fc-button-active,
body:not(.dark-mode) .card .fc-toolbar .fc-button-active,
body:not(.dark-mode) .card-primary .fc-toolbar .fc-button.fc-button-active,
body:not(.dark-mode) .card .fc-toolbar .fc-button.fc-button-active {
    background: #004085 !important;
    border-color: #004085 !important;
    color: #000000 !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.5) !important;
}

.card-primary .fc-toolbar,
.card .fc-toolbar {
    padding: 16px 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 8px !important;
    border-bottom: 1px solid #dee2e6 !important;
}

/* DARK MODE - Sidebar calendar toolbar */
.dark-mode .card-primary .fc-toolbar,
.dark-mode .card .fc-toolbar {
    background: linear-gradient(135deg, #2d3748 0%, #374151 100%) !important;
    border-bottom: 1px solid #4a5568 !important;
}

.card-primary .fc-toolbar-chunk,
.card .fc-toolbar-chunk {
    gap: 4px !important;
    flex-wrap: wrap !important;
}

.card-primary .fc-toolbar-title,
.card .fc-toolbar-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    flex-basis: 100% !important;
    order: -1 !important;
    margin-bottom: 8px !important;
    text-align: center !important;
    color: #495057 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* DARK MODE - Sidebar calendar title */
.dark-mode .card-primary .fc-toolbar-title,
.dark-mode .card .fc-toolbar-title {
    color: #e2e8f0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* SIDEBAR CALENDAR - NUCLEAR OPTION FOR SIDEBAR BUTTONS */
html body .card-primary .fc-toolbar .fc-button,
html body .card .fc-toolbar .fc-button,
html body .card-primary .fc-toolbar button,
html body .card .fc-toolbar button {
    background: #ff0000 !important; /* DEBUGGING RED - SHOULD BE VERY OBVIOUS */
    border: 2px solid #00ff00 !important; /* DEBUGGING GREEN BORDER */
    color: #ffffff !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    height: 28px !important;
    min-width: 40px !important;
    margin: 0 2px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 65px !important;
    font-weight: 500 !important;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3) !important;
    transition: all 0.15s ease !important;
    font-family: Arial, sans-serif !important;
    text-transform: uppercase !important;
}

/* Ultra-compact right toolbar for sidebar */
.card-primary .fc-toolbar-chunk:last-child,
.card .fc-toolbar-chunk:last-child {
    flex-wrap: wrap !important;
    max-width: 100% !important;
    justify-content: center !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* Compact buttons for smaller containers */
    html body .fc-button {
        padding: 6px 12px !important;
        font-size: 12px !important;
        height: 32px !important;
        min-width: 50px !important;
        margin: 0 2px !important;
    }
    
    .fc-toolbar.fc-header-toolbar {
        padding: 16px 12px !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    
    .fc-toolbar-chunk {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .fc-toolbar-title {
        font-size: 20px !important;
        text-align: center !important;
        flex-basis: 100% !important;
        order: -1 !important;
        margin-bottom: 8px !important;
    }
}

@media (max-width: 768px) {
    .fc-toolbar.fc-header-toolbar {
        padding: 20px 16px !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .fc-toolbar-chunk {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
    }
    
    .fc-toolbar-title {
        font-size: 20px !important;
        text-align: center !important;
        order: -1 !important;
        width: 100% !important;
        margin-bottom: 8px !important;
    }
    
    html body .fc-button {
        padding: 8px 16px !important;
        font-size: 14px !important;
        height: 36px !important;
        min-width: 50px !important;
    }
    
    .fc-button-group > .fc-button {
        min-width: 50px !important;
        padding: 8px 14px !important;
    }
    
    .fc-col-header-cell {
        padding: 8px 4px !important;
    }
    
    .fc-daygrid-day-number {
        padding: 4px 8px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .fc-toolbar.fc-header-toolbar {
        padding: 16px 12px !important;
    }
    
    .fc-toolbar-title {
        font-size: 18px !important;
    }
    
    .fc-button {
        padding: 6px 12px !important;
        font-size: 13px !important;
        height: 32px !important;
        min-width: 44px !important;
    }
    
    .fc-button-group > .fc-button {
        min-width: 44px !important;
        padding: 6px 10px !important;
    }
}

/* ===================================
   HIGH SPECIFICITY CALENDAR OVERRIDES
   =================================== */

/* Force Calendar Button Styles with Higher Specificity - BETTER SPACING */
.card .fc .fc-button,
.fc .fc-toolbar .fc-button {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    border-radius: 8px !important;
    color: #3c4043 !important;
    font-weight: 500 !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    height: 44px !important;
    min-width: 80px !important;
    margin: 0 6px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: 0.025em !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

.card .fc .fc-button:hover,
.fc .fc-toolbar .fc-button:hover {
    background: #f1f3f4 !important;
    border-color: #1a73e8 !important;
    color: #1a73e8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(26, 115, 232, 0.1) !important;
    transform: translateY(-1px) !important;
}

.card .fc .fc-button-active,
.fc .fc-toolbar .fc-button-active {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3), 0 4px 16px rgba(26, 115, 232, 0.2) !important;
    font-weight: 600 !important;
}

.card .fc .fc-button-active:hover,
.fc .fc-toolbar .fc-button-active:hover {
    background: #1557b0 !important;
    border-color: #1557b0 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4), 0 6px 20px rgba(26, 115, 232, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Force Calendar Header Styles */
.card .fc .fc-toolbar.fc-header-toolbar {
    margin: 0 !important;
    padding: 24px 32px !important;
    background: #ffffff !important;
    border-bottom: 1px solid #e1e5e9 !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Dark Mode Header Fix */
.dark-mode .card .fc .fc-toolbar.fc-header-toolbar {
    background: #1a1f27 !important;
    border-bottom: 1px solid #374151 !important;
}

.card .fc .fc-toolbar-title {
    font-size: 24px !important;
    font-weight: 500 !important;
    color: #202124 !important;
    margin: 0 !important;
    line-height: 32px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: -0.01em !important;
    flex-grow: 1 !important;
    text-align: center !important;
}

/* Dark Mode Title Fix */
.dark-mode .card .fc .fc-toolbar-title {
    color: #e2e8f0 !important;
}

/* Force Button Group Styles - BETTER SPACING */
.card .fc .fc-button-group {
    display: flex !important;
    gap: 4px !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    padding: 4px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    margin: 0 8px !important;
}

.card .fc .fc-button-group > .fc-button {
    border-radius: 6px !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #5f6368 !important;
    font-weight: 500 !important;
    min-width: 70px !important;
    padding: 10px 16px !important;
    height: 36px !important;
}

.card .fc .fc-button-group > .fc-button:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a73e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    transform: none !important;
}

.card .fc .fc-button-group > .fc-button-active {
    background: #ffffff !important;
    color: #1a73e8 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(26, 115, 232, 0.1) !important;
    font-weight: 600 !important;
}

/* Dark Mode Button Fixes */
.dark-mode .card .fc .fc-button,
.dark-mode .fc .fc-toolbar .fc-button {
    background: #374151 !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .card .fc .fc-button:hover,
.dark-mode .fc .fc-toolbar .fc-button:hover {
    background: #4a5568 !important;
    border-color: #60a5fa !important;
    color: #60a5fa !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(96, 165, 250, 0.2) !important;
}

.dark-mode .card .fc .fc-button-active,
.dark-mode .fc .fc-toolbar .fc-button-active {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.4), 0 4px 16px rgba(29, 78, 216, 0.3) !important;
}

.dark-mode .card .fc .fc-button-group {
    background: #2d3748 !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

.dark-mode .card .fc .fc-button-group > .fc-button {
    background: transparent !important;
    color: #a0aec0 !important;
    box-shadow: none !important;
}

.dark-mode .card .fc .fc-button-group > .fc-button:hover {
    background: rgba(55, 65, 81, 0.8) !important;
    color: #60a5fa !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.dark-mode .card .fc .fc-button-group > .fc-button-active {
    background: #374151 !important;
    color: #60a5fa !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(96, 165, 250, 0.2) !important;
}

/* NUCLEAR OPTION - FORCE CALENDAR BUTTON STYLING */
html body .card-primary .fc-toolbar button,
html body .card .fc-toolbar button,
html body .fc-toolbar button,
html body button.fc-button,
html body .fc-button {
    background: #ffffff !important;
    border: 1px solid #dadce0 !important;
    border-radius: 8px !important;
    color: #3c4043 !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    height: 36px !important;
    min-width: 60px !important;
    margin: 0 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: 0.025em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    outline: none !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    line-height: normal !important;
    text-transform: none !important;
}

html body .card-primary .fc-toolbar button:hover,
html body .card .fc-toolbar button:hover,
html body .fc-toolbar button:hover,
html body button.fc-button:hover,
html body .fc-button:hover {
    background: #f8f9fa !important;
    border-color: #1a73e8 !important;
    color: #1a73e8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(26, 115, 232, 0.15) !important;
    transform: translateY(-1px) !important;
}

html body .fc-button-active,
html body button.fc-button-active {
    background: #1a73e8 !important;
    border-color: #1a73e8 !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    font-weight: 600 !important;
}

/* DARK MODE NUCLEAR OPTION */
.dark-mode html body .card-primary .fc-toolbar button,
.dark-mode html body .card .fc-toolbar button,
.dark-mode html body .fc-toolbar button,
.dark-mode html body button.fc-button,
.dark-mode html body .fc-button {
    background: #374151 !important;
    border-color: #4a5568 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.14) !important;
}

.dark-mode html body .card-primary .fc-toolbar button:hover,
.dark-mode html body .card .fc-toolbar button:hover,
.dark-mode html body .fc-toolbar button:hover,
.dark-mode html body button.fc-button:hover,
.dark-mode html body .fc-button:hover {
    background: #4a5568 !important;
    border-color: #60a5fa !important;
    color: #60a5fa !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(96, 165, 250, 0.2) !important;
}

.dark-mode html body .fc-button-active,
.dark-mode html body button.fc-button-active {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.4), 0 4px 16px rgba(29, 78, 216, 0.3) !important;
}
