/* Main Styles */
body {
    font-family: 'Inter', sans-serif;
}

/* Modern Login Page Styles */
.login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.1"><circle cx="30" cy="30" r="2"/></g></g></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-card {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

.login-input {
    transition: all 0.3s ease;
    background: rgba(249, 250, 251, 0.8);
}

.login-input:focus {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1);
}

.login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    animation-delay: 4s;
}

/* Flash Message Styles */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    color: #059669;
}

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

/* Brand Logo Animation */
.brand-logo {
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Input Focus Effects */
.input-group:focus-within .input-icon {
    color: #3b82f6;
    transform: scale(1.1);
}

.input-icon {
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .floating-element {
        display: none;
    }
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 250px;
    background-color: #1e40af;
    color: #fff;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.25rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-menu-item:hover, .sidebar-menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-menu-item i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu-item span {
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-collapsed .sidebar-menu-item span {
    display: none;
}

.sidebar-collapsed .sidebar-logo-text {
    display: none;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.sidebar-user-info {
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

.sidebar-collapsed .sidebar-user-info {
    display: none;
}

/* Main Content Styles */
.main-content {
    margin-left: 250px;
    transition: all 0.3s;
    padding-top: 60px; /* Add padding for fixed header */
    padding-bottom: 60px; /* Add padding for fixed footer */
}

.main-content-expanded {
    margin-left: 70px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 250px; /* Match sidebar width */
    right: 0;
    z-index: 100;
    background-color: white;
    border-bottom: 1px solid rgba(229, 231, 235, 1);
    transition: all 0.3s;
}

.sidebar-collapsed + .main-content header {
    left: 70px; /* Match collapsed sidebar width */
}

@media (max-width: 768px) {
    header {
        left: 0;
    }
}

#user-dropdown-button {
    transition: all 0.2s;
}

#user-dropdown-button:hover {
    opacity: 0.9;
}

#user-dropdown-menu {
    transform-origin: top right;
    transition: all 0.1s ease-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 1);
}

#user-dropdown-menu.show {
    display: block;
    animation: dropdown-appear 0.2s ease-out;
}

@keyframes dropdown-appear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Footer Styles */
footer {
    position: fixed;
    bottom: 0;
    left: 250px; /* Match sidebar width */
    right: 0;
    z-index: 100;
    background-color: white;
    transition: all 0.3s;
}

.sidebar-collapsed + .main-content footer {
    left: 70px; /* Match collapsed sidebar width */
}

@media (max-width: 768px) {
    footer {
        left: 0;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    .mobile-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 998;
        background-color: #1e40af;
        color: white;
        border: none;
        border-radius: 0.25rem;
        padding: 0.5rem;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
}