* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 8px;
    background: #f0f2f5;
    min-height: 100vh;
}

/* 顶部导航 - 新设计 */
.navbar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	margin-right: 20px;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.nav-brand i {
    font-size: 22px;
    color: #10b981;
}

.nav-menu {
    display: flex;
    gap: 2px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-link.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16,185,129,0.35);
}

.nav-dropdown .nav-link {
    pointer-events: none;
}

.dropdown-icon {
    font-size: 11px;
    margin-left: 4px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

/* 下拉菜单 */
.nav-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.nav-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 160px;
    padding: 6px;
    display: none;
    z-index: 9999;
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #10b981;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.9);
}

.nav-user span {
    font-weight: 500;
}

.nav-user a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s;
    padding: 8px;
    border-radius: 8px;
}

.nav-user a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* 主内容区 */
.main-content {
    padding: 24px 32px 0 32px;
    max-width: 100%;
    margin: 0 auto;
    height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.main-content iframe {
    width: 100%;
    height: calc(100vh - 64px - 24px);
    min-height: calc(100vh - 64px - 24px);
    border: none;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: block;
    overflow-y: auto;
}

/* 平板响应式 (768px - 1024px) */
@media (max-width: 1024px) {
    .navbar { 
        padding: 0 12px; 
        height: 56px;
    }
    .nav-brand { 
        margin-right: 12px; 
        font-size: 14px;
        gap: 6px;
    }
    .nav-brand i {
        font-size: 18px;
    }
    .nav-menu {
        gap: 0;
    }
    .nav-link { 
        padding: 6px 8px; 
        font-size: 11px;
        gap: 4px;
    }
    .nav-link i {
        font-size: 12px;
    }
    .dropdown-icon {
        font-size: 9px;
        margin-left: 2px;
    }
    .nav-user {
        gap: 8px;
    }
    .nav-user span {
        font-size: 11px;
    }
    .main-content { 
        padding: 16px; 
    }
}

/* 手机响应式 (小于 768px) */
@media (max-width: 768px) {
    .navbar { 
        height: 52px;
        padding: 0 8px;
    }
    .nav-brand { 
        font-size: 0; /* 隐藏文字 */
        margin-right: 8px;
        gap: 0;
    }
    .nav-brand i {
        font-size: 20px;
    }
    .nav-menu { 
        gap: 1px;
        flex: 1;
        justify-content: center;
    }
    .nav-link { 
        padding: 8px;
        font-size: 0; /* 隐藏文字 */
    }
    .nav-link i {
        font-size: 18px;
        margin: 0;
    }
    .nav-link span {
        display: none;
    }
    .dropdown-icon {
        display: none;
    }
    .nav-user {
        gap: 4px;
        margin-left: 4px;
    }
    .nav-user span {
        display: none;
    }
    .nav-user a {
        padding: 6px;
        font-size: 16px;
    }
    .dropdown-menu {
        position: fixed;
        left: 8px;
        right: 8px;
        top: auto;
        margin-top: 4px;
        min-width: auto;
    }
    .main-content { 
        padding: 8px; 
    }
    .main-content iframe { 
        height: calc(100vh - 52px - 8px);
        min-height: calc(100vh - 52px - 8px);
        border-radius: 8px; 
    }
}

/* 小屏手机 (小于 480px) */
@media (max-width: 480px) {
    .navbar {
        height: 48px;
        padding: 0 6px;
    }
    .nav-brand i {
        font-size: 18px;
    }
    .nav-link {
        padding: 6px;
    }
    .nav-link i {
        font-size: 16px;
    }
    .nav-user a {
        padding: 5px;
        font-size: 14px;
    }
    .main-content {
        padding: 6px;
    }
    .main-content iframe {
        height: calc(100vh - 48px - 6px);
        min-height: calc(100vh - 48px - 6px);
        border-radius: 6px;
    }
}

/* =========================================
   手机端汉堡菜单抽屉式导航
   ========================================= */

/* 默认隐藏手机端元素 */
.mobile-menu-toggle,
.mobile-overlay,
.mobile-sidebar {
    display: none;
}

/* 手机端 (小于 768px) */
@media (max-width: 768px) {
    /* 显示汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 20px;
        cursor: pointer;
        padding: 0;
        margin-right: 8px;
        border-radius: 8px;
        transition: background 0.2s;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .mobile-menu-toggle:active {
        background: rgba(255,255,255,0.2);
    }
    
    /* 隐藏PC端导航菜单，只保留品牌、汉堡按钮和用户区 */
    .nav-menu {
        display: none;
    }
    
    .nav-brand {
        flex: 1;
        font-size: 16px;
        margin-right: 0;
    }
    
    /* 遮罩层 */
    .mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* 侧边抽屉菜单 */
    .mobile-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 20px rgba(0,0,0,0.3);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-sidebar.active {
        transform: translateX(0);
    }
    
    /* 抽屉头部 */
    .mobile-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        background: rgba(0,0,0,0.2);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #fff;
        font-size: 16px;
        font-weight: 600;
    }
    
    .mobile-brand i {
        font-size: 22px;
        color: #10b981;
    }
    
    .mobile-close {
        width: 36px;
        height: 36px;
        background: rgba(255,255,255,0.1);
        border: none;
        border-radius: 8px;
        color: rgba(255,255,255,0.8);
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    
    .mobile-close:hover {
        background: rgba(255,255,255,0.2);
        color: #fff;
    }
    
    /* 菜单内容 */
    .mobile-menu {
        padding: 12px;
    }
    
    .mobile-menu-section {
        padding: 16px 12px 8px 12px;
        font-size: 11px;
        font-weight: 600;
        color: rgba(255,255,255,0.4);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 12px;
        color: rgba(255,255,255,0.85);
        text-decoration: none;
        border-radius: 10px;
        font-size: 14px;
        transition: all 0.2s;
        margin-bottom: 4px;
    }
    
    .mobile-menu-item i {
        font-size: 18px;
        width: 24px;
        text-align: center;
        color: rgba(255,255,255,0.6);
        transition: color 0.2s;
    }
    
    .mobile-menu-item:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
    
    .mobile-menu-item:hover i {
        color: #10b981;
    }
    
    .mobile-menu-item.active {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: #fff;
        box-shadow: 0 4px 12px rgba(16,185,129,0.3);
    }
    
    .mobile-menu-item.active i {
        color: #fff;
    }
    
    .mobile-menu-divider {
        height: 1px;
        background: rgba(255,255,255,0.1);
        margin: 12px;
    }
    
    .mobile-logout {
        color: #ef4444;
    }
    
    .mobile-logout i {
        color: #ef4444;
    }
    
    .mobile-logout:hover {
        background: rgba(239,68,68,0.15);
        color: #ef4444;
    }
    
    .mobile-logout:hover i {
        color: #ef4444;
    }
    
    /* 菜单分组 */
    .mobile-menu-group {
        margin-bottom: 4px;
    }
    
    .mobile-menu-toggle-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 12px;
        color: rgba(255,255,255,0.85);
        text-decoration: none;
        border-radius: 10px;
        font-size: 14px;
        transition: all 0.2s;
        cursor: pointer;
        user-select: none;
    }
    
    .mobile-menu-toggle-item i:first-child {
        font-size: 18px;
        width: 24px;
        text-align: center;
        color: rgba(255,255,255,0.6);
    }
    
    .mobile-menu-toggle-item .arrow {
        margin-left: auto;
        font-size: 12px;
        transition: transform 0.3s;
        color: rgba(255,255,255,0.4);
    }
    
    .mobile-menu-toggle-item:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }
    
    .mobile-menu-toggle-item:hover i:first-child {
        color: #10b981;
    }
    
    .mobile-menu-group.open .mobile-menu-toggle-item .arrow {
        transform: rotate(180deg);
    }
    
    .mobile-submenu {
        display: none;
        padding-left: 12px;
        margin-left: 12px;
        border-left: 2px solid rgba(255,255,255,0.1);
    }
    
    .mobile-menu-group.open .mobile-submenu {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-submenu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        border-radius: 8px;
        font-size: 13px;
        transition: all 0.2s;
        margin-bottom: 2px;
    }
    
    .mobile-submenu-item i {
        font-size: 16px;
        width: 20px;
        text-align: center;
        color: rgba(255,255,255,0.5);
    }
    
    .mobile-submenu-item:hover {
        background: rgba(255,255,255,0.06);
        color: #fff;
    }
    
    .mobile-submenu-item:hover i {
        color: #10b981;
    }
    
    .mobile-submenu-item.active {
        background: rgba(16,185,129,0.15);
        color: #10b981;
    }
    
    .mobile-submenu-item.active i {
        color: #10b981;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .mobile-sidebar {
        width: 260px;
    }
    
    .mobile-menu-item {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .mobile-menu-item i {
        font-size: 16px;
    }
}
