/* =========================================================
   GLOBAL / GLASSMORPHISM
========================================================= */
body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg, #0b0f19, #111827);
    color: #fff;
    backdrop-filter: blur(10px);
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   PAGE LOADER
========================================================= */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11,15,25,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#page-loader .spinner {
    border: 4px solid rgba(255,255,255,0.2);
    border-top: 4px solid #4f7cff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* =========================================================
   TOPBAR / HAMBURGER MENU
========================================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(17,24,39,0.7);
    backdrop-filter: blur(15px);
    padding: 15px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4f7cff;
}

.navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar .avatar-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.navbar .avatar-btn img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #4f7cff;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 50px;
    background: rgba(17,24,39,0.85);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    min-width: 180px;
    overflow: hidden;
    z-index: 999;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 12px 20px;
    color: #fff;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: rgba(79,124,255,0.2);
    color: #4f7cff;
}

.admin-item {
    border: 1px solid #ff4d4f;
    color: #ff4d4f !important;
    font-weight: bold;
    border-radius: 5px;
}

.admin-item:hover {
    background: #ff4d4f !important;
    color: #fff !important;
}

/* =========================================================
   LOG CARD / GLASS EFFECT
========================================================= */
.log-card {
    background: rgba(17,24,39,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.log-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(79,124,255,0.3);
}

.log-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.log-item {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* =========================================================
   FOOTER / SOCIAL ICONS
========================================================= */
footer {
    margin-top: 40px;
    padding: 25px 20px;
    text-align: center;
    background: rgba(17,24,39,0.7);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer .social-icons a {
    margin: 0 10px;
    font-size: 1.4rem;
    color: #4f7cff;
    transition: 0.3s;
}

footer .social-icons a:hover {
    color: #ff4d4f;
}

/* =========================================================
   RESPONSIVE / MOBILE
========================================================= */
@media (max-width: 991px) {
    .navbar {
        flex-direction: row;
        justify-content: space-between;
    }
    .dropdown-menu {
        right: 15px;
        top: 60px;
    }
    .log-card {
        padding: 15px;
    }
}

/* =========================================================
   PROGRESS BAR
========================================================= */
.progress {
    height: 20px;
    border-radius: 15px;
    background: rgba(255,255,255,0.1);
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    background: #4f7cff;
    border-radius: 15px;
    transition: width 0.4s ease;
}

/* =========================================================
   ANIMATIONS
========================================================= */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* =========================
   LAYOUT FIX
========================= */
.app-wrapper {
    display: flex;
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: rgba(17,24,39,0.8);
    backdrop-filter: blur(15px);
    padding: 20px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.sidebar .brand {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #4f7cff;
}

.sidebar-link {
    display: block;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(79,124,255,0.2);
    color: #4f7cff;
}

/* =========================================================
   MAIN
========================================================= */
.main-content {
    flex: 1;
    padding: 20px 30px;
}

/* =========================================================
   FIX BOOTSTRAP DROPDOWN
========================================================= */
.dropdown-menu {
    backdrop-filter: blur(20px);
    background: rgba(17,24,39,0.9);
}

/* =========================================================
   LOGIN PAGE / MOBIL
========================================================= */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 35px;
    border-radius: 20px;
    background: rgba(17,24,39,0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-logo {
    font-size: 40px;
    color: #4f7cff;
}

/* =========================
   LOGIN MOBILE IMPROVEMENTS
========================= */

.login-container {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border-radius: 20px;
    background: rgba(17,24,39,0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* MOBIL */
@media (max-width: 576px) {

    .login-container {
        align-items: flex-start;
        padding-top: 60px;
    }

    .login-box {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .login-logo {
        font-size: 32px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .form-control-lg {
        font-size: 16px; /* iOS zoom fix */
        padding: 14px;
    }

    .login-btn {
        padding: 14px;
        font-size: 1rem;
    }
}