* { margin: 0; padding: 0; box-sizing: border-box; }


        .btn, button, input[type="submit"], input[type="button"], .btn-icon, .page-link {
            box-shadow: none !important;
        }
        .btn:hover, .btn:focus, button:hover, button:focus,
        .btn-icon:hover, .btn-icon:focus, .page-link:hover, .page-link:focus {
            box-shadow: none !important;
        }

        body {
            font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
            height: 100vh;
            display: flex;
            background: #f7f7f8;
        }

        /* 左侧菜单 */
        .sidebar {
            width: 180px;
            background: #fff;
            border-right: 1px solid #e8e8e8;
            display: flex;
            flex-direction: column;
            padding: 16px 12px;
            position: relative;
            transition: width 0.3s ease;
            flex-shrink: 0;
        }

        /* 收起状态 */
        .sidebar.collapsed {
            width: 72px;
            padding: 16px 8px;
        }

        .sidebar.collapsed .logo {

            justify-content: center;
        }

        .sidebar.collapsed .logo img {
            display: none;
        }

        .sidebar.collapsed .logo::after {
            content: '价';
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border-radius: 8px;
            background: #fbca50;
            color: #111;
            font-size: 20px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .sidebar.collapsed .menu-content {
            align-items: center;
        }

        .sidebar.collapsed .menu-item {
            justify-content: center;
            padding: 12px;
            width: 44px;
            height: 44px;
            margin: 0 auto 4px;
        }

        .sidebar.collapsed .menu-item .menu-text {
            display: none;
        }

        /* 收起时底部区域：保留显示，只展示头像 */
        .sidebar.collapsed .sidebar-footer {
            padding: 8px 0;
            border-top: none;
        }

        .sidebar.collapsed .user-card {
            justify-content: center;
            padding: 8px;
        }

        .sidebar.collapsed .user-card .avatar {
            width: 36px;
            height: 36px;
        }

        .sidebar.collapsed .user-card .user-name {
            display: none;
        }

        .sidebar.collapsed .logout-link {
            display: none;
        }

        .sidebar.collapsed .collapse-toggle {
            justify-content: center;
            padding: 10px;
        }

        /* 收起/展开按钮 - 仅桌面端显示 */
        .collapse-toggle {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 8px 11px;
            margin: 0 0 12px 0;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            color: #666;
            background: #fff;
            border: 1px solid #e0e0e0;
            transition: all 0.2s ease;
            width: 100%;
            box-sizing: border-box;
        }

        @media (min-width: 769px) {
            .collapse-toggle {
                display: flex;
            }
        }

        .collapse-toggle:hover {
            background: #f5f5f5;
            border-color: #ccc;
        }

        .collapse-toggle svg {
            transition: transform 0.3s ease;
            flex-shrink: 0;
        }

        .sidebar.collapsed .collapse-toggle svg {
            transform: rotate(180deg);
        }

        /* 收起状态下tooltip提示 */
        .sidebar.collapsed .menu-item {
            position: relative;
        }

        .sidebar.collapsed .menu-item:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            left: calc(100% + 8px);
            top: 50%;
            transform: translateY(-50%);
            background: #333;
            color: #fff;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            z-index: 1000;
            opacity: 0;
            animation: tooltipFade 0.2s ease 0.1s forwards;
        }

        .sidebar.collapsed .menu-item:hover::before {
            content: '';
            position: absolute;
            left: 100%;
            top: 50%;
            transform: translateY(-50%);
            border: 6px solid transparent;
            border-right-color: #333;
            z-index: 1000;
            opacity: 0;
            animation: tooltipFade 0.2s ease 0.1s forwards;
        }

        /* 收起状态下user-card的tooltip */
        .sidebar.collapsed .user-card {
            position: relative;
        }

        .sidebar.collapsed .user-card:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            left: calc(100% + 8px);
            top: 50%;
            transform: translateY(-50%);
            background: #333;
            color: #fff;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            z-index: 1000;
            opacity: 0;
            animation: tooltipFade 0.2s ease 0.1s forwards;
        }

        .sidebar.collapsed .user-card:hover::before {
            content: '';
            position: absolute;
            left: 100%;
            top: 50%;
            transform: translateY(-50%);
            border: 6px solid transparent;
            border-right-color: #333;
            z-index: 1000;
            opacity: 0;
            animation: tooltipFade 0.2s ease 0.1s forwards;
        }

        @keyframes tooltipFade {
            to { opacity: 1; }
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 8px;

            font-size: 18px;
            font-weight: 600;
            color: #1a1a1a;
            text-decoration: none;
        }

        .logo:hover { color: #1a1a1a; text-decoration: none; }

        .logo-icon {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            background: linear-gradient(135deg, #ff7e5f, #ff5f56);
        }

        /* 功能列表按钮（窄屏显示） */
        .menu-toggle {
            display: none;
            align-items: center;
            gap: 6px;
            padding: 7px 12px;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            color: #333;
            background: #fff;
            margin-left: auto;
        }

        .menu-toggle:hover { background: #f5f5f5; }
        .menu-toggle .arrow { transition: transform .2s; }
        .sidebar.open .menu-toggle .arrow { transform: rotate(180deg); }

        .new-chat {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            border: 1px solid #e0e0e0;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            color: #333;
            margin-bottom: 12px;
            transition: background .15s;
            text-decoration: none;
        }

        .new-chat:hover { background: #f5f5f5; color: #333; text-decoration: none; }

        .menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 12px;
            border-radius: 8px;
            font-size: 14px;
            color: #555;
            cursor: pointer;
            margin-bottom: 2px;
            text-decoration: none;
            border: none;
            background: transparent;
            width: 100%;
            text-align: left;
        }

        .menu-item:hover { background: #f5f5f5; color: #555; text-decoration: none; }
        .menu-item.active { background: #eef2ff; color: #4e83fd; font-weight: 500; }
        .menu-item.active:hover { background: #eef2ff; color: #4e83fd; }

        .menu-nav { display: flex; flex-direction: column; }

        .menu-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }

        .sidebar-footer {
            margin-top: auto;
            padding-top: 12px;
            border-top: 1px solid #f0f0f0;
        }

        .user-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            border-radius: 8px;
            cursor: pointer;
            text-decoration: none;
        }

        .user-card:hover { background: #f5f5f5; text-decoration: none; }

        .avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, #ffb347, #ff7e5f);
            object-fit: cover;
            flex-shrink: 0;
        }

        .user-name { font-size: 14px; color: #333; }

        .auth-buttons {
            display: flex;
            gap: 8px;
            padding: 8px 0px;
        }

        .auth-btn {
            flex: 1;
            text-align: center;
            padding: 7px 0;
            border-radius: 8px;
            font-size: 13px;
            text-decoration: none;
            cursor: pointer;
        }

        .auth-btn.login {
            background: #ff5151;
            color: #fff;
        }

        .auth-btn.login:hover { background: #e64a0e; color: #fff; text-decoration: none; }

        .auth-btn.register {
            border: 1px solid #e0e0e0;
            color: #666;
        }

        .auth-btn.register:hover { background: #f5f5f5; color: #666; text-decoration: none; }

        .logout-link {
            display: block;
            padding: 6px 12px;
            font-size: 13px;
            color: #999;
            text-decoration: none;
        }

        .logout-link:hover { color: #666; text-decoration: none; }

        /* 右侧主区域 */
        .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

        .topbar {
            height: 60px;
            display: flex;
            align-items: center;
            padding: 0 24px;
            background: #fff;
            border-bottom: 1px solid #e8e8e8;
            flex-shrink: 0;
        }

        .search-box {
            position: relative;
            flex: 1;
            max-width: 560px;
            display: flex;
            align-items: center;
            background: #f5f5f7;
            border-radius: 12px;
            padding: 0 14px;
            height: 40px;
        }

        .search-box svg { width: 18px; height: 18px; color: #999; flex-shrink: 0; }

        .search-box input {
            flex: 1;
            border: none;
            outline: none;
            background: transparent;
            font-size: 14px;
            margin-left: 8px;
            color: #333;
        }

        .search-box input::placeholder { color: #aaa; }

        .search-box button {
            border: none;
            background: transparent;
            color: #111;
            font-size: 14px;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
        }

        .search-box button:hover { background: #eef2ff; }

        /* ===== 搜索建议下拉框 ===== */
        .suggest-dropdown {
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1000;
            max-height: 320px;
            overflow-y: auto;
            display: none;
        }
        .suggest-dropdown.active { display: block; }
        .suggest-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            cursor: pointer;
            transition: background 0.15s;
            border-bottom: 1px solid #f5f5f5;
        }
        .suggest-item:last-child { border-bottom: none; }
        .suggest-item:hover,
        .suggest-item.selected {
            background: #f5f7ff;
        }
        .suggest-item-name {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }
        .suggest-item-meta {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .suggest-item-code {
            font-size: 12px;
            color: #666;
        }
        .suggest-item-tag {
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 4px;
            background: #eef2ff;
            color: #5470c6;
            font-weight: 500;
        }

        .topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

        .icon-btn {
            width: auto;
            padding: 0 10px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #666;
            border: none;
            background: transparent;
            white-space: nowrap;
        }

        .icon-btn:hover { background: #f5f5f5; }

        /* 内容区 */
        .content {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
        }

        /* 响应式：窄屏时左侧菜单收到顶部，功能列表按钮展开 */
        @media (max-width: 768px) {
            body { flex-direction: column; height: 100dvh; }

            .sidebar {
                width: 100%;
                height: auto;
                flex-direction: row;
                align-items: center;
                padding: 8px 12px;
                border-right: none;
                border-bottom: 1px solid #e8e8e8;
                flex-shrink: 0;
                z-index: 10;
            }

            .logo { padding: 4px 0; font-size: 16px; }
            .logo-icon { width: 24px; height: 24px; }
            .menu-toggle { display: flex; }

            /* 下拉面板 */
            .menu-content {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: #fff;
                border-bottom: 1px solid #e8e8e8;
                box-shadow: 0 4px 12px rgba(0,0,0,.08);
                padding: 12px;
                flex-direction: column;
            }

            .sidebar.open .menu-content { display: flex; }
            .new-chat { margin-bottom: 8px; }
            .sidebar-footer { margin-top: 8px; }
            .topbar { padding: 0 12px; height: 52px; }
            .search-box { max-width: none; }
            .topbar-actions .icon-btn:first-child { display: none; }
            .content { padding: 16px; }
        }

        /* 弹出框圆角统一为 1.5rem */
        .modal-content { border-radius: 1.5rem; }
        .modal-header { border-radius: calc(1.5rem - 1px) calc(1.5rem - 1px) 0 0; }
        .modal-footer { border-radius: 0 0 calc(1.5rem - 1px) calc(1.5rem - 1px); }