/* SHSAS - Custom Styles
   Tailwind CSS utility-first with minimal custom overrides
   Version: 1.0 (Prompt-11)
*/

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Sidebar transitions */
#sidebar {
    transition: transform 0.3s ease, width 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print styles */
@media print {
    #sidebar, #navbar, .no-print {
        display: none !important;
    }
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Focus states */
input:focus, select:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* Card hover effect */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Sidebar active link */
.sidebar-link-active {
    background-color: #3b82f6;
    color: white;
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Form error styling */
.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Alert animations */
.alert {
    animation: slideDown 0.3s ease;
}

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

/* Accounts Submenu Styles - CRITICAL FIX FOR VISIBILITY */
.submenu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
}

.submenu.show {
    display: block !important;
}

.submenu li {
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.submenu li:last-child {
    border-bottom: none !important;
}

.sidebar-sublink {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1rem 0.75rem 3.5rem !important;
    color: #e5e7eb !important; /* Light gray - always visible */
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

.sidebar-sublink:hover {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important; /* Pure white on hover */
    padding-left: 3.7rem !important;
}

.sidebar-sublink.active {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important; /* Pure white when active */
    font-weight: 500 !important;
    border-left: 3px solid #60a5fa !important; /* Light blue accent */
}

.sidebar-sublink i {
    margin-right: 0.75rem !important;
    font-size: 0.875rem !important;
    width: 18px !important;
    text-align: center !important;
    opacity: 1 !important;
    color: #e5e7eb !important; /* Match text color */
}

.sidebar-sublink:hover i {
    color: #ffffff !important; /* Pure white on hover */
}

.sidebar-sublink.active i {
    color: #ffffff !important; /* Pure white when active */
}

.sidebar-link .fa-chevron-down {
    transition: transform 0.3s ease !important;
    font-size: 0.7rem !important;
}

.sidebar-link[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg) !important;
}

