@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(to bottom, #1e5799 0%, #207cca 51%, #2989d8 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex: 1;
    height: calc(100vh - 30px);
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: linear-gradient(to bottom, #f1f8ff 0%, #dae6f2 100%);
    border-right: 1px solid #a5b3c5;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
}

.logo-area {
    padding: 20px 15px 15px;
    background: linear-gradient(to bottom, #4b6bc6 0%, #3a56a4 100%);
    color: white;
    text-align: center;
    border-bottom: 1px solid #2a4080;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.logo-area::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.3;
    }
    to {
        opacity: 0.7;
    }
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
    color: white;
    line-height: 1.2;
}

.tagline {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.menu-items {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.menu-btn {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(to bottom, #f9f9f9 0%, #e5e5e5 100%);
    border: none;
    border-bottom: 1px solid #d0d0d0;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    position: relative;
}

.menu-btn:hover {
    background: linear-gradient(to bottom, #e1efff 0%, #c6e2ff 100%);
    border-left: 4px solid #4b6bc6;
}

.menu-btn.active {
    background: linear-gradient(to bottom, #d4e4f7 0%, #b8d4f0 100%);
    border-left: 4px solid #4b6bc6;
    font-weight: bold;
    color: #2a4080;
}

.menu-btn i {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.content {
    flex: 1;
    background: #ececec;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    position: relative;
}

#contentFrame {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
    position: relative;
    top: 0;
    left: 0;
}

#preloader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    flex-direction: column;
}

.preloader-content {
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.preloader-logo {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #4b6bc6;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(75, 107, 198, 0.3);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4b6bc6, #2989d8);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.footer {
    height: 30px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #4b6bc6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 18px;
    z-index: 101;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.mobile-menu-btn.menu-open {
    transform: rotate(90deg);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.login-icon {
    position: fixed;
    top: 15px;
    right: 15px;
    background: #4b6bc6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 18px;
    cursor: pointer;
    z-index: 102;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-icon:hover {
    background: #3a56a4;
    transform: scale(1.1);
}

.user-menu {
    position: fixed;
    top: 70px;
    right: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 15px;
    min-width: 200px;
    z-index: 103;
    display: none;
}

.user-menu.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-info {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.user-name {
    font-weight: bold;
    color: #333;
}

.user-email {
    font-size: 12px;
    color: #666;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 8px 0;
    background: none;
    border: none;
    text-align: left;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
}

.menu-item:hover {
    color: #4b6bc6;
}

.menu-item i {
    margin-right: 8px;
    width: 16px;
}

.user-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 102;
    display: none;
}

.user-menu-overlay.show {
    display: block;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    .content {
        margin-left: 0;
        padding-top: 60px;
    }

    .content.menu-open {
        margin-left: 0;
    }

    .login-icon {
        top: 70px;
        right: 15px;
    }
    
    .user-menu {
        top: 125px;
        right: 15px;
    }

    .menu-btn {
        padding: 11px 16px;
        font-size: 13.5px;
    }

    .menu-btn i {
        font-size: 15px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 260px;
    }

    .menu-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .logo {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .tagline {
        font-size: 10px;
    }
}

.menu-items::-webkit-scrollbar {
    width: 6px;
}

.menu-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.menu-items::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #4b6bc6, #3a56a4);
    border-radius: 3px;
}

.menu-items::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #3a56a4, #2a4080);
}

.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #a5b3c5, #8a9bb8);
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #8a9bb8, #6e82a1);
}

.menu-btn.restricted {
    position: relative;
    background: linear-gradient(to bottom, #fff3cd 0%, #ffeaa7 100%) !important;
    border-left: 4px solid #ffc107 !important;
}

.menu-btn.restricted:hover {
    background: linear-gradient(to bottom, #ffeaa7 0%, #ffd966 100%) !important;
}

.restricted-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #856404;
    font-size: 12px;
    background: rgba(255, 193, 7, 0.2);
    padding: 4px;
    border-radius: 3px;
}

.menu-btn.restricted.active {
    background: linear-gradient(to bottom, #ffeaa7 0%, #ffd966 100%) !important;
    border-left: 4px solid #ffc107 !important;
    font-weight: bold;
    color: #856404;
}

@media (max-width: 768px) {
    .restricted-icon {
        right: 12px;
        font-size: 11px;
        padding: 3px;
    }
}