/* Jiuou Theme Integration for User Center - Glassmorphism Style */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Quicksand:wght@500;700&display=swap');

:root {
    /* Vivid Color Palette */
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --accent: #F472B6;
    --accent-glow: #fb7185;
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #ffffff;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    
    --card-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --header-height: 70px;
    --sidebar-width: 250px;
    --collapsed-sidebar-width: 70px;
}

body {
    font-family: 'Quicksand', 'Noto Sans SC', sans-serif;
    color: var(--text-main);
    background-color: #F0F4F8;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(244, 114, 182, 0.1) 0%, transparent 40%);
    background-attachment: fixed;
}

/* ================== Layout Fixes ================== */

/* Header Fixes */
#page-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1005;
}

.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 24px;
}

.navbar-brand-box {
    width: var(--sidebar-width);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
}

/* Sidebar Fixes */
.vertical-menu {
    width: var(--sidebar-width);
    z-index: 1004;
    background: rgba(255, 255, 255, 0.7);
    bottom: 0;
    margin-top: 0;
    position: fixed;
    top: var(--header-height);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    transition: width 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.vertical-menu .h-100 {
    flex: 1;
    overflow-y: auto;
}

/* Sidebar Footer (Toggle Button) */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: flex-end;
}

#vertical-menu-btn-bottom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border: none;
    transition: all 0.3s;
}

#vertical-menu-btn-bottom:hover {
    background: var(--primary);
    color: #fff;
}

.vertical-collpsed .sidebar-footer {
    justify-content: center;
}

.vertical-collpsed #vertical-menu-btn-bottom i {
    transform: rotate(180deg);
}

.main-content {
    margin-left: var(--sidebar-width);
    overflow: hidden;
    transition: margin-left 0.3s ease;
}

.page-content {
    padding: calc(var(--header-height) + 24px) 24px 24px 24px;
    min-height: 100vh;
}

/* Collapsed Sidebar */
body.vertical-collpsed .vertical-menu {
    width: var(--collapsed-sidebar-width);
}

body.vertical-collpsed .main-content {
    margin-left: var(--collapsed-sidebar-width);
}

body.vertical-collpsed .navbar-brand-box {
    width: var(--collapsed-sidebar-width);
}

body.vertical-collpsed .logo span.logo-lg {
    display: none;
}

body.vertical-collpsed .logo span.logo-sm {
    display: block;
}

/* ================== Header Icons Alignment ================== */
.header-item {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
}

.noti-icon i {
    font-size: 22px;
    color: var(--text-muted);
}

.header-profile-user {
    height: 36px;
    width: 36px;
    background-color: var(--glass-bg);
    padding: 2px;
}

/* ================== Sidebar Menu ================== */
.metismenu {
    padding-top: 10px;
}

.metismenu li {
    display: block;
    width: 100%;
}

.metismenu li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-main);
    position: relative;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 0 50px 50px 0;
    margin-right: 10px;
}

.metismenu li a i {
    min-width: 24px;
    font-size: 18px;
    margin-right: 10px;
    text-align: center;
    color: var(--text-muted);
    transition: all 0.3s;
}

.metismenu li a:hover, .metismenu li.mm-active > a {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.metismenu li.mm-active > a i {
    color: var(--primary);
}

/* Collapsed Sidebar Menu Fixes */
.vertical-collpsed .metismenu li {
    position: relative;
}

.vertical-collpsed .metismenu li a {
    padding: 15px 0;
    justify-content: center;
    margin-right: 0;
    border-radius: 0;
}

.vertical-collpsed .metismenu li a span {
    display: none;
}

.vertical-collpsed .metismenu li a i {
    margin-right: 0;
    font-size: 20px;
}

/* Collapsed Hover Dropdown */
.vertical-collpsed .metismenu li:hover > ul {
    display: block !important;
    position: absolute;
    left: var(--collapsed-sidebar-width);
    top: 0;
    width: 220px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 4px 4px 20px rgba(0,0,0,0.1);
    border-radius: 0 12px 12px 0;
    padding: 10px 0;
    z-index: 1005;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.vertical-collpsed .metismenu li:hover > a {
    background: var(--primary);
    color: #fff;
}

.vertical-collpsed .metismenu li:hover > a i {
    color: #fff;
}

.vertical-collpsed .metismenu li ul li a {
    padding: 10px 20px;
    justify-content: flex-start;
    border-radius: 0;
    margin: 0;
}

.vertical-collpsed .metismenu li ul li a span {
    display: inline-block;
}

/* MetisMenu Selection Fixes */
.mm-active > a {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--primary) !important;
}

.mm-active > a i {
    color: var(--primary) !important;
}

/* ================== Components ================== */

/* Card & Layout */
.card, .zdlogin, .loginDiv {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: var(--glass-shadow) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Buttons */
.btn-primary, .zdbtn button {
    background: var(--primary) !important;
    border-color: transparent !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    transition: var(--transition) !important;
}

.btn-primary:hover, .zdbtn button:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4) !important;
}

/* Form Inputs */
.form-control, .iam-input-text {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    height: auto !important;
    color: var(--text-main) !important;
    transition: var(--transition) !important;
}

.form-control:focus, .iam-input-text:focus {
    background: #fff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* ================== Auth Pages (Login/Register) ================== */

/* Fullscreen Wrapper */
.auth-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
}

/* Auth Card */
.zdlogin {
    width: 960px !important;
    max-width: 100% !important;
    display: flex !important;
    overflow: hidden !important;
    border-radius: 24px !important;
    background: var(--glass-bg) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
    animation: fadeInUp 0.6s ease-out;
}

#loginAdv {
    flex: 1 !important;
    background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 40px !important;
    color: white;
}

.loginDiv {
    flex: 1.2 !important;
    padding: 60px !important;
    background: #fff !important; /* Solid white for better readability in form */
    border: none !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.QRLoginSwitchDiv {
    margin-bottom: 40px !important;
    border-bottom: 2px solid #f1f5f9 !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 40px !important;
}

.selectedType {
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    padding-bottom: 15px !important;
    font-weight: 700 !important;
    margin-bottom: -2px;
}

.ng-binding {
    font-size: 1.1rem !important;
    cursor: pointer !important;
    transition: all 0.2s;
}

/* Fix Images */
.pep-ad-img-wrapper img {
    max-width: 100% !important;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15)) !important;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile FAB */
#mobile-menu-fab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-fab:active {
    transform: scale(0.9);
}

/* ================== Mobile Responsiveness ================== */
@media (max-width: 991px) {
    .navbar-brand-box {
        width: auto;
    }

    .vertical-menu {
        display: none; /* Hidden by default */
        width: 280px;
        position: fixed;
        z-index: 1006;
        top: 0; 
        height: 100vh;
        box-shadow: 0 0 40px rgba(0,0,0,0.3);
    }

    body.sidebar-enable .vertical-menu {
        display: flex;
    }

    body.sidebar-enable:before {
        content: "";
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1005;
        backdrop-filter: blur(4px);
    }

    .main-content {
        margin-left: 0 !important;
    }

    /* Auth Page Mobile */
    .zdlogin {
        flex-direction: column !important;
        width: 100% !important;
        border-radius: 20px !important;
    }

    #loginAdv {
        width: 100% !important;
        padding: 40px 20px !important;
        min-height: auto !important;
    }

    .loginDiv {
        width: 100% !important;
        padding: 40px 20px !important;
    }

    .QRLoginSwitchDiv {
        justify-content: center !important;
        gap: 20px !important;
    }
}
