/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #5a3e36;
}

/* Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* White with some transparency, adjust as desired */
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    z-index: 9999; /* Ensure it's on top of everything */
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Smooth transition for hiding */
    opacity: 1;
    visibility: visible;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Allows clicks to pass through once hidden */
}

/* Rotating Logo */
.rotating-logo {
    width: 120px; /* Adjust logo size */
    height: 120px; /* Adjust logo size */
    animation: rotate 2s linear infinite; /* Apply the rotation animation */
    /* object-fit: contain;  Uncomment if your logo's aspect ratio needs preserving within the square */
}

/* Keyframe Animation for Rotation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Page Content (initially hidden) */
.page-content {
    display: none; /* Hide page content until loader is gone */
}

/* Header Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 40px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Button Styles */
.btn-primary {
    background-color: #8B4513;
    border-color: #8B4513;
}

.btn-primary:hover {
    background-color: #A0522D;
    border-color: #A0522D;
}

.btn-secondary {
    background-color: #D2B48C;
    border-color: #D2B48C;
    color: #5a3e36;
}

.btn-secondary:hover {
    background-color: #CDAA7D;
    border-color: #CDAA7D;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    color: #5a3e36;
}

/* Form Styles */
.form-control, .form-select {
    border: 1px solid #D2B48C;
}

.form-control:focus, .form-select:focus {
    border-color: #8B4513;
    box-shadow: 0 0 0 0.25rem rgba(139, 69, 19, 0.25);
}

/* Alert Styles */
.alert {
    border-radius: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 30px;
    }

    .card {
        border-radius: 8px;
    }

    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Responsive for loader */
    .rotating-logo {
        width: 90px; /* Smaller logo on tablets */
        height: 90px;
    }
}

@media (max-width: 480px) {
    /* Responsive for loader */
    .rotating-logo {
        width: 70px; /* Even smaller on mobile */
        height: 70px;
    }
}


/* Custom Colors */
.bg-light-brown {
    background-color: #f5f5dc;
}

.text-brown {
    color: #5a3e36;
}

/* Dashboard Widgets */
.dashboard-widget {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.widget-primary {
    background-color: #8B4513;
}

.widget-secondary {
    background-color: #A0522D;
}

.widget-tertiary {
    background-color: #D2B48C;
    color: #5a3e36;
}

/* Badge Styles */
.badge-brown {
    background-color: #8B4513;
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #8B4513;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A0522D;
}