/* Custom overrides for sidebar positioning */
.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    z-index: 996 !important;
    transition: all 0.3s !important;
    padding: 20px !important;
    overflow-y: auto !important;
    background-color: #fff !important;
    box-shadow: 0px 0px 20px rgba(1, 41, 112, 0.1) !important;
}

.main {
    margin-left: 260px !important;
    padding: 80px 30px 20px 30px !important;
    transition: all 0.3s !important;
    min-height: 100vh !important;
    background-color: #f6f9ff !important;
}

.header {
    transition: all 0.5s !important;
    z-index: 997 !important;
    height: 60px !important;
    box-shadow: 0px 2px 20px rgba(1, 41, 112, 0.1) !important;
    background-color: #fff !important;
    padding-left: 20px !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 260px !important;
}

.toggle-sidebar-btn {
    font-size: 32px !important;
    padding-left: 10px !important;
    cursor: pointer !important;
    color: #012970 !important;
    margin-right: 15px !important;
}

.toggle-sidebar .sidebar {
    left: -300px !important;
}

.toggle-sidebar .main {
    margin-left: 0 !important;
}

.toggle-sidebar .header {
    left: 0 !important;
}

/* Fix for sidebar nav links */
.sidebar-nav .nav-link {
    display: flex !important;
    align-items: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #012970 !important;
    transition: 0.3s !important;
    background: #f6f9ff !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    margin-bottom: 5px !important;
}

.sidebar-nav .nav-link i {
    font-size: 16px !important;
    margin-right: 10px !important;
    color: #4154f1 !important;
}

.sidebar-nav .nav-link.active {
    color: #4154f1 !important;
    background: #f6f9ff !important;
}

.sidebar-nav .nav-link:hover {
    color: #4154f1 !important;
    background: #f6f9ff !important;
}

/* Fix for dashboard cards */
.card {
    margin-bottom: 30px !important;
    border: none !important;
    border-radius: 5px !important;
    box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1) !important;
    background-color: #fff !important;
    overflow: hidden !important;
    display: block !important;
}

.card-header {
    border-color: #ebeef4 !important;
    background-color: #fff !important;
    color: #798eb3 !important;
    padding: 15px !important;
    border-bottom: 1px solid #ebeef4 !important;
    display: block !important;
}

.card-header.flex {
    display: flex !important;
}

.card-header .justify-between {
    justify-content: space-between !important;
}

.card-header .items-center {
    align-items: center !important;
}

.card-title {
    padding: 20px 0 15px 0 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    color: #012970 !important;
    font-family: "Nunito", sans-serif !important;
    display: block !important;
}

.card-title.mb-0 {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

.card-body {
    padding: 20px !important;
    display: block !important;
}

/* Dashboard info cards */
.card.overflow-hidden {
    display: block !important;
}

.card .flex.items-center {
    display: flex !important;
    align-items: center !important;
}

.card .flex-shrink-0 {
    flex-shrink: 0 !important;
}

.card .rounded-full {
    border-radius: 9999px !important;
}

.card .text-lg {
    font-size: 1.125rem !important;
}

.card .text-2xl {
    font-size: 1.5rem !important;
}

.card .font-semibold {
    font-weight: 600 !important;
}

.card .font-bold {
    font-weight: 700 !important;
}

.card .text-gray-700 {
    color: #4a5568 !important;
}

.card .text-gray-800 {
    color: #2d3748 !important;
}

.card .p-5 {
    padding: 1.25rem !important;
}

.card .mr-4 {
    margin-right: 1rem !important;
}

.card .bg-blue-100 {
    background-color: #ebf8ff !important;
}

.card .bg-green-100 {
    background-color: #f0fff4 !important;
}

.card .bg-purple-100 {
    background-color: #faf5ff !important;
}

.card .text-blue-600 {
    color: #3182ce !important;
}

.card .text-green-600 {
    color: #38a169 !important;
}

.card .text-purple-600 {
    color: #805ad5 !important;
}

.card .text-xl {
    font-size: 1.25rem !important;
}

/* Dashboard grid layout fixes */
.grid {
    display: grid !important;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

.md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.gap-4 {
    gap: 1rem !important;
}

.gap-6 {
    gap: 1.5rem !important;
}

.mt-6 {
    margin-top: 1.5rem !important;
}

/* Make sure the dashboard content is visible */
#main {
    background-color: #f6f9ff !important;
    padding: 20px 30px !important;
    transition: all 0.3s !important;
}

@media (max-width: 1199px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1199px) {
    .sidebar {
        left: 0 !important;
    }
    .main {
        margin-left: 0 !important;
    }
    .header {
        left: 0 !important;
    }
    .toggle-sidebar .sidebar {
        left: -300px !important;
    }
}

/* Dashboard info cards */
.info-card {
    padding-bottom: 10px !important;
}

.info-card h6 {
    font-size: 28px !important;
    color: #012970 !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.card-icon {
    font-size: 32px !important;
    line-height: 0 !important;
    width: 64px !important;
    height: 64px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 4px !important;
    margin-right: 15px !important;
}

.card-icon.rounded-circle {
    border-radius: 50% !important;
}

.card-icon.blue {
    background: #e6f1ff !important;
    color: #4154f1 !important;
}

.card-icon.green {
    background: #e0f8e9 !important;
    color: #2eca6a !important;
}

.card-icon.orange {
    background: #fff7e6 !important;
    color: #ff771d !important;
}

.flex {
    display: flex !important;
}

.items-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.text-xl {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
}

.font-bold {
    font-weight: 700 !important;
}

.text-blue-600 {
    color: #4154f1 !important;
}

.text-green-600 {
    color: #2eca6a !important;
}

.text-orange-600 {
    color: #ff771d !important;
}

/* Custom Button Styles for Better Visibility */

/* Primary button - more visible with blue color */
.btn-primary,
button.btn-primary,
a.btn-primary,
input[type="submit"].btn-primary,
button[type="button"].btn-primary {
    background-color: #4154f1 !important;
    border-color: #4154f1 !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 2px 4px rgba(65, 84, 241, 0.3) !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover,
input[type="submit"].btn-primary:hover,
button[type="button"].btn-primary:hover {
    background-color: #2a3fc9 !important;
    border-color: #2a3fc9 !important;
    box-shadow: 0 4px 8px rgba(65, 84, 241, 0.5) !important;
}

/* Secondary button - with gray background and better contrast */
.btn-secondary,
button.btn-secondary,
a.btn-secondary,
input[type="button"].btn-secondary,
button[type="button"].btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
    transition: all 0.3s !important;
    display: inline-flex !important;
    align-items: center !important;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3) !important;
}

.btn-secondary:hover,
button.btn-secondary:hover,
a.btn-secondary:hover,
input[type="button"].btn-secondary:hover,
button[type="button"].btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.5) !important;
}

/* Tailwind buttons - fix white text issues */
button[type="submit"], 
input[type="submit"],
.bg-gray-800,
.bg-blue-600,
.bg-gray-200,
.inline-flex.items-center.px-4.py-2.bg-gray-800,
.inline-flex.items-center.px-4.py-2.bg-blue-600,
.inline-flex.items-center.px-4.py-2.bg-gray-200 {
    color: white !important;
    background-color: #1f2937 !important;
    box-shadow: 0 2px 4px rgba(31, 41, 55, 0.3) !important;
}

/* Form-specific buttons */
form button,
form input[type="submit"],
form input[type="button"] {
    background-color: #4154f1 !important;
    color: white !important;
    border-color: #4154f1 !important;
    box-shadow: 0 2px 4px rgba(65, 84, 241, 0.3) !important;
}

/* Form-specific buttons hover */
form button:hover,
form input[type="submit"]:hover,
form input[type="button"]:hover {
    background-color: #2a3fc9 !important;
    border-color: #2a3fc9 !important;
    box-shadow: 0 4px 8px rgba(65, 84, 241, 0.5) !important;
}

/* Gradient button - ensure visibility */
.btn-gradient,
button.btn-gradient,
a.btn-gradient {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: white !important;
    background-image: linear-gradient(310deg, #7928CA 0%, #FF0080 100%) !important;
    border-radius: 0.375rem !important;
    transition: all 150ms ease-in-out !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(255, 0, 128, 0.3) !important;
}

.btn-gradient:hover,
button.btn-gradient:hover,
a.btn-gradient:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(255, 0, 128, 0.4) !important;
}

/* CRUD button - ensure visibility */
.btn-crud,
button.btn-crud,
a.btn-crud {
    display: inline-flex !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: white !important;
    background-image: linear-gradient(310deg, #141727 0%, #3A416F 100%) !important;
    border-radius: 0.375rem !important;
    transition: all 150ms ease-in-out !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(20, 23, 39, 0.3) !important;
}

.btn-crud:hover,
button.btn-crud:hover,
a.btn-crud:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(20, 23, 39, 0.4) !important;
} 