﻿/* ========================================================= */
/* 🌐 GLOBAL BASE */
/* ========================================================= */

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #5b8df9, #2ed6a8);
    color: #333;
    overflow-x: hidden;
}

/* ========================================================= */
/* 🔐 LOGIN */
/* ========================================================= */

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    width: 380px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 2rem;
    text-align: center;
}

    .login-card h4 {
        font-weight: 600;
        margin-bottom: 1rem;
    }

/* ========================================================= */
/* 🧩 FORM & BUTTON */
/* ========================================================= */

.form-control {
    border-radius: 8px;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
}

/* ========================================================= */
/* 🧱 ADMINLTE CORE LAYOUT */
/* ========================================================= */

.wrapper {
    min-height: 100vh;
    position: relative;
}

.content-wrapper {
    min-height: calc(100vh - 57px);
    padding-bottom: 70px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.main-footer {
    position: relative;
    font-size: 0.9rem;
    color: #888;
}

/* ========================================================= */
/* 📚 SIDEBAR (ADMINLTE) */
/* ========================================================= */

.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
}

/* Sidebar menu */
.nav-sidebar .nav-item {
    margin-bottom: 0.2rem;
}

.nav-sidebar .nav-link {
    color: #c2c7d0;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

    .nav-sidebar .nav-link:hover {
        background-color: rgba(255,255,255,0.12);
        color: #fff;
    }

    .nav-sidebar .nav-link.active {
        background-color: #007bff;
        color: #fff;
    }

/* Treeview */
.nav-sidebar .nav-treeview {
    padding-left: 0;
    list-style: none;
    background-color: rgba(0,0,0,0.15);
}

    .nav-sidebar .nav-treeview .nav-link {
        padding: 0.4rem 1rem 0.4rem 2rem;
        font-size: 0.85rem;
    }

/* ========================================================= */
/* 🔔 NOTIFICATION */
/* ========================================================= */

.notif-item {
    display: flex;
    align-items: flex-start;
}

.notif-text {
    max-width: 260px;
    word-wrap: break-word;
    font-size: 14px;
}

.notif-time {
    font-size: 11px;
    color: #888;
}

.notif-dropdown {
    max-height: 320px;
    overflow-y: auto;
}

/* ========================================================= */
/* ⏳ LOADING OVERLAY */
/* ========================================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-box {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    min-width: 260px;
}

/* ========================================================= */
/* 📱 MOBILE & MAUI WEBVIEW FIX */
/* ========================================================= */

@media (max-width: 991.98px) {

    .main-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    body.sidebar-open .main-sidebar {
        transform: translateX(0);
    }

    .content-wrapper,
    .main-header,
    .main-footer {
        margin-left: 0 !important;
    }
}

/* ========================================================= */
/* 🚫 HIDE BLAZOR ERROR UI (MAUI SAFE) */
/* ========================================================= */

#blazor-error-ui {
    display: none !important;
}
