/* ======================
   WKU Theme Colors
   ====================== */
:root {
    --wku-blue: #1a73e8;
    --wku-dark-blue: #0d47a1;
    --wku-green: #34a853;
    --wku-red: #e74c3c;
    --wku-dark: #2c3e50;
    --wku-light: #ecf0f1;
    --header-gradient: linear-gradient(135deg, var(--wku-blue) 0%, #4285f4 100%);
    --footer-gradient: linear-gradient(135deg, var(--wku-dark-blue) 0%, #1565c0 100%);
}

/* ======================
   Body & Main Styles
   ====================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ======================
   Enhanced Navigation
   ====================== */
.navbar {
    background: var(--header-gradient) !important;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    color: white;
}

.navbar-logo {
    height: 60px;
    width: 60px;
    object-fit: contain;
}

.brand-text {
    margin-left: 8px;
}

/* Navigation toggle button */
.navbar-toggler {
    border: none;
    padding: 0.25rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ======================
   Navigation Menu Spacing & Styling
   ====================== */
.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

/* Active Menu Item Styles */
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: rgb(36, 15, 15) !important;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

/* ======================
   Dropdown Menu Styling
   ====================== */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--wku-blue);
}

.dropdown-item.active {
    background-color: var(--wku-blue) !important;
    color: white !important;
}

/* ======================
   Main Content
   ====================== */
main.container {
    flex: 1;
    padding-top: 1.5rem !important;
    padding-bottom: 3rem !important;
}

/* ======================
   Enhanced Cards
   ====================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background-color: var(--wku-blue);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.dashboard-card {
    transition: all 0.3s ease;
    border-left: 5px solid var(--wku-blue);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.dashboard-card .card-icon {
    font-size: 2.8rem;
    color: var(--wku-blue);
    opacity: 0.9;
}

/* ======================
   Table Styles
   ====================== */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* ======================
   Form Styles
   ====================== */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ======================
   Status Indicators
   ====================== */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-approved {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.status-present {
    background-color: #d4edda;
    color: #155724;
}

.status-absent {
    background-color: #f8d7da;
    color: #721c24;
}

/* ======================
   Flash Messages Container
   ====================== */
.flash-messages-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    width: 350px;
    max-width: calc(100vw - 40px);
}

/* ======================
   Flash Messages Styling - FIXED
   ====================== */
.flash-message {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 1rem 1.25rem;
    animation: slideInRight 0.5s ease-out;
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
    opacity: 1 !important;
    transform: translateX(0) !important;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out !important;
    animation-duration: 0.5s !important;
    animation-fill-mode: forwards !important;
}

/* Different alert backgrounds with transparency */
.flash-message.alert-success {
    background-color: rgba(25, 135, 84, 0.95);
    color: white;
    border-left: 4px solid #198754;
}

.flash-message.alert-danger {
    background-color: rgba(220, 53, 69, 0.95);
    color: white;
    border-left: 4px solid #dc3545;
}

.flash-message.alert-warning {
    background-color: rgba(255, 193, 7, 0.95);
    color: #212529;
    border-left: 4px solid #ffc107;
}

.flash-message.alert-info {
    background-color: rgba(13, 110, 253, 0.95);
    color: white;
    border-left: 4px solid #0d6efd;
}

.flash-message.alert-primary {
    background-color: rgba(13, 110, 253, 0.95);
    color: white;
    border-left: 4px solid #0d6efd;
}

/* Flash message icons */
.flash-icon {
    min-width: 24px;
    text-align: center;
}

.flash-icon .fa-check-circle {
    color: #4ade80;
}

.flash-icon .fa-exclamation-circle {
    color: #f87171;
}

.flash-icon .fa-exclamation-triangle {
    color: #fbbf24;
}

.flash-icon .fa-info-circle {
    color: #60a5fa;
}

/* Animation for flash messages */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutSlow {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    70% {
        opacity: 0.7;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Auto-dismiss animation */
.flash-message.alert-dismissible.fade {
    animation: fadeOutSlow 2s ease-out forwards !important;
    animation-delay: 4s !important;
}

/* Close button styling */
.flash-message .btn-close {
    filter: invert(1);
    opacity: 0.8;
    padding: 0.75rem;
    background-size: 0.75rem;
    transition: opacity 0.3s ease;
}

.flash-message .btn-close:hover {
    opacity: 1;
}

/* Regular alerts (non-flash) */
.alert:not(.flash-message) {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ======================
   Enhanced Footer
   ====================== */
.footer {
    background: var(--footer-gradient) !important;
    color: white;
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--wku-blue), var(--wku-green));
}

/* Footer Logo */
.footer-logo {
    height: 60px;
    width: 60px;
    object-fit: contain;
    opacity: 0.9;
}

.footer-title {
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.footer-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.footer-link i {
    margin-right: 5px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: white;
    color: var(--wku-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Footer Text */
.text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.border-white-20 {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ======================
   Sidebar Navigation (if needed)
   ====================== */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ======================
   Loading Spinner
   ====================== */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* ======================
   Print Styles
   ====================== */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* ======================
   Responsive Design
   ====================== */
@media (max-width: 991.98px) {
    /* Navigation */
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Dropdown menu on mobile */
    .dropdown-menu {
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-logo {
        height: 50px;
        width: 50px;
    }
    
    .footer-links {
        justify-content: flex-start;
        margin-top: 1.5rem;
    }
    
    .footer-link {
        margin-bottom: 0.5rem;
    }
    
    /* Flash messages on mobile */
    .flash-messages-container {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .flash-message {
        width: 100%;
    }
    
    .social-links {
        margin-top: 1rem;
        justify-content: center;
    }
    
    /* Sidebar adjustments */
    .sidebar {
        position: static;
        height: auto;
    }
    
    .sidebar-sticky {
        height: auto;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 35px;
        width: 35px;
    }
    
    .footer-logo {
        height: 45px;
        width: 45px;
    }
}

@media (max-width: 576px) {
    .navbar-brand .brand-text {
        font-size: 1rem;
    }
    
    .navbar-logo {
        height: 30px;
        width: 30px;
    }
    
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-logo {
        height: 40px;
        width: 40px;
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ======================
   Utility Classes (if needed)
   ====================== */
.no-underline {
    text-decoration: none !important;
}

.cursor-pointer {
    cursor: pointer;
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======================
   Form Validation Styles
   ====================== */
.is-invalid {
    border-color: var(--wku-red) !important;
}

.is-valid {
    border-color: var(--wku-green) !important;
}

.invalid-feedback {
    color: var(--wku-red);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ======================
   Button Styles
   ====================== */
.btn-primary {
    background-color: var(--wku-blue);
    border-color: var(--wku-blue);
}

.btn-primary:hover {
    background-color: #0d47a1;
    border-color: #0d47a1;
}

.btn-outline-primary {
    color: var(--wku-blue);
    border-color: var(--wku-blue);
}

.btn-outline-primary:hover {
    background-color: var(--wku-blue);
    border-color: var(--wku-blue);
}

/* ======================
   Custom Scrollbar
   ====================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ======================
   Required Field Styling
   ====================== */
.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.form-text.required-hint {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-text.required-hint .asterisk {
    color: #dc3545;
    font-weight: bold;
}

/* Validation Styles */
.validation-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--wku-green) !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--wku-red) !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.real-time-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.real-time-feedback.valid-feedback {
    color: var(--wku-green);
}

.real-time-feedback.invalid-feedback {
    color: var(--wku-red);
}

/* Password strength meter */
.password-strength-meter {
    height: 4px;
    margin-top: 5px;
    border-radius: 2px;
    background-color: #e9ecef;
    overflow: hidden;
}

.password-strength-meter .strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-weak { background-color: #dc3545; }
.strength-fair { background-color: #fd7e14; }
.strength-good { background-color: #ffc107; }
.strength-strong { background-color: #20c997; }
.strength-very-strong { background-color: var(--wku-green); }

/* ======================
   Enhanced Input Group
   ====================== */
.input-group.has-validation {
    position: relative;
}

.input-group.has-validation .form-control {
    padding-right: 2.5rem;
}

.input-group.has-validation .validation-icon {
    right: 40px;
}

/* Confirmation Modal Styles */
#confirmationModal .modal-content {
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#confirmationModal .modal-header {
    background-color: var(--wku-blue);
    color: white;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

#confirmationModal .modal-body {
    padding: 2rem;
    font-size: 1.1rem;
    text-align: center;
}

#confirmationModal .modal-footer {
    border-top: 1px solid #dee2e6;
    justify-content: center;
    padding: 1rem 2rem;
}

#confirmationModal .btn {
    min-width: 100px;
    font-weight: 500;
}

/* Shift Details Modal */
#shiftDetailsModal .modal-content {
    border-radius: 10px;
}

#shiftDetailsModal .modal-header {
    background-color: var(--wku-dark-blue);
    color: white;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

#shiftDetailsModal dt {
    font-weight: 600;
    color: var(--wku-dark);
}

#shiftDetailsModal dd {
    color: #666;
}