/**
 * 🌸 萌神 Tailwind 重置样式 V1.0
 * 目的：覆盖 app.min.css 的干扰，让 Tailwind 类正常工作
 * 设计师：UIUX 萌神 (Kawaii Architect)
 */

/* ═══════════════════════════════════════
   1. 顶部栏布局重置
   ═══════════════════════════════════════ */
#page-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 260px;
    height: 70px;
    width: auto;
    margin-left: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: left 0.3s ease;
}

body.vertical-collpsed #page-topbar {
    left: 88px;
}

/* ═══════════════════════════════════════
   2. 主内容区布局重置
   ═══════════════════════════════════════ */
.main-content {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

body.vertical-collpsed .main-content {
    margin-left: 88px;
}

.footer {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

body.vertical-collpsed .footer {
    margin-left: 88px;
}

/* ═══════════════════════════════════════
   3. 侧边栏布局重置
   ═══════════════════════════════════════ */
.vertical-menu,
#sidebar-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 2010;
    transition: width 0.3s ease;
}

body.vertical-collpsed .vertical-menu,
body.vertical-collpsed #sidebar-menu-container {
    width: 88px;
}

/* ═══════════════════════════════════════
   4. 顶部栏内部元素重置
   ═══════════════════════════════════════ */
/* 收缩按钮 */
#vertical-menu-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#vertical-menu-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

#vertical-menu-btn:focus {
    outline: none;
    box-shadow: none;
}

/* 搜索框容器 - 强制显示 */
.topbar-search-box {
    display: block;
    position: relative;
}

@media (max-width: 1023px) {
    .topbar-search-box {
        display: none;
    }
}

/* 搜索输入框 */
.topbar-search-input {
    width: 280px;
    height: 44px;
    padding: 0 16px 0 44px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    color: #334155;
    transition: all 0.3s ease;
}

.topbar-search-input::placeholder {
    color: #94a3b8;
}

.topbar-search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.topbar-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #94a3b8;
    pointer-events: none;
}

/* ═══════════════════════════════════════
   5. 顶部栏功能按钮
   ═══════════════════════════════════════ */
.topbar-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.6);
    color: #64748b;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.topbar-icon-btn:hover {
    background: #ffffff;
    color: #6366f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.topbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.topbar-badge.animate {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ═══════════════════════════════════════
   6. 用户下拉菜单
   ═══════════════════════════════════════ */
.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 4px 16px 4px 6px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-dropdown-trigger:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 🌸 顶部栏头像 - 使用独立类名避免与 dashboard 冲突 */
.topbar-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    min-height: 32px;
    max-height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 220px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(241, 245, 249, 1);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 1050;
    overflow: hidden;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-bottom: 1px solid #f1f5f9;
}

.user-dropdown-header .name {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.user-dropdown-header .email {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.user-dropdown-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: #6366f1;
    text-decoration: none;
}

.user-dropdown-item .icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-dropdown-item .icon-box.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.user-dropdown-item .icon-box.green {
    background: #ecfdf5;
    color: #10b981;
}

.user-dropdown-item .icon-box.red {
    background: #fef2f2;
    color: #ef4444;
}

.user-dropdown-item.danger {
    color: #ef4444;
}

.user-dropdown-divider {
    height: 1px;
    margin: 4px 16px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}
