
.alert-message {
    position: fixed;
    right: 50px;
    top: 100px;
    z-index: 100000;
    opacity: 0.8;
    transition: visibility 20s 2s, opacity 2s linear;
}
label.error{
    display: block;
}

/* === Base styles === */

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Hide main content until loaded */
.content-loaded {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

.content-loaded * {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* Hide content by default */
body {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Dropdown styling */
/* Dropdown styling */

/* Main dropdown menu */
/* Dropdown Base */

.main-dropdown {
display: none;
position: absolute;
top: 100%;
left: 0;
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
padding: 1rem;
max-height: 80vh;
overflow-y: auto;
width: 340px;
z-index: 9999;
}

.main-link, .submenu-toggle {
font-size: 15px;
color: #333;
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 10px;
border-radius: 6px;
cursor: pointer;
transition: background 0.3s ease;
}

.main-link:hover,
.submenu-toggle:hover {
background-color: #f5f5f5;
color: #007bff;
}

.submenu {
display: none;
margin-top: 0.3rem;
padding-left: 1rem;
}

.submenu li {
margin-bottom: 0.2rem;
}

.sub-link {
font-size: 0.95rem;
color: #555;
display: block;
padding: 5px 10px;
border-radius: 4px;
transition: 0.3s;
}

.sub-link:hover {
background: #f0f0f0;
color: #007bff;
}

.submenu-arrow {
font-size: 1.2rem;
margin-left: 10px;
color: #777;
transition: transform 0.3s ease;
}

.submenu-parent.open .submenu-arrow {
transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
.main-dropdown {
width: 100%;
left: 0;
right: 0;
}
.submenu-indicator {
display: block;
}
}

/* Optional: prevent background scroll */
body.lock-scroll {
overflow: hidden;
}

.submenu-indicator {
font-size: 0.65rem;
margin-left: 5px;
transition: transform 0.3s ease;
margin-bottom: 2px;
}
.nav-item.dropdown.open .submenu-indicator {
transform: rotate(180deg); /* animate arrow on open */
}




