/* 让翻译按钮和下拉列表横向排列 */
.empty-space-btn-row-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

/* 翻译下拉列表样式 */
.empty-space-btn-select {
    height: 32px;
    min-width: 80px;
    font-size: 15px;
    border: 1.2px solid #444;
    border-radius: 6px;
    padding: 0 8px;
    background: #fff;
    margin-left: 4px;
    cursor: pointer;
    transition: border 0.2s;
}
.empty-space-btn-select:focus {
    border-color: #1976d2;
    outline: none;
}
/* 历史菜单按钮的三个小圆点 */
.sidebar-history-menu-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    background: #bbb;
    border-radius: 50%;
    margin: 0 2px;
}
.sidebar-user-menu-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 7px;
    margin-bottom: 2px;
}
.sidebar-user-menu-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.sidebar-user-menu-btn {
    background: none;
    border: none;
    padding: 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}
.sidebar-user-menu-btn:hover {
    background: #eee;
}
.sidebar-user-menu-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    background: #bbb;
    border-radius: 50%;
    margin: 0 2px;
}

.sidebar-user-menu-dropdown {
    position: absolute;
    right: 16px;
    bottom: 48px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    min-width: 90px;
    z-index: 100;
    display: none;
    flex-direction: column;
}
.sidebar-user-menu-item {
    padding: 10px 18px;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}
.sidebar-user-menu-item:hover {
    background: #f9fafb;
}
.beian-police-icon {
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin-right: 3px;
    margin-bottom: 2px;
}

/* 上传报告按钮样式 */
#uploadForm button,
#uploadBtn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 15px;
    cursor: pointer;
    margin-right: 8px;
    transition: box-shadow 0.2s;
}

#uploadForm button:hover,
#uploadBtn:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-color: #b3d1f7;
}

#uploadForm {
    position: absolute;
    left: 16px;
    bottom: 36px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.98);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 8px 16px;
    border: 1.5px solid #bbb;
}

#uploadInput {
    font-size: 15px;
    border: none;
    background: none;
    outline: none;
}

/* 首页底部按钮选中样式 */
.homepage-bottom-btn.selected {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #174ea6;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(23,78,166,0.08);
}

/* 首页底部按钮图标样式 */
.homepage-bottom-btn-icon {
    width: 22px;
    height: 22px;
    margin-right: 10px;
    margin-left: -6px;
    vertical-align: middle;
    display: inline-block;
}
/* 首页聊天框下方两个按钮区 */
.homepage-bottom-btn-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 12px;
}
.homepage-bottom-btn {
    padding: 12px 38px;
    font-size: 18px;
    background: #fff;
    color: #222;
    border: 1.5px solid #bbb;
    border-radius: 32px;
    /* 跑道形：左右半圆，上下直线 */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: background 0.2s, border 0.2s;
    outline: none;
}
.homepage-bottom-btn:hover {
    background: #f5f5f5;
}
.empty-space-btn-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-space-btn-label {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    text-align: center;
    user-select: none;
}

/* empty-space 顶部按钮区样式 */
.empty-space-btn-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-left: 20px; /* 与卡片左侧对齐 */
}

.empty-space-btn {
    background: #fff;
    border: 1.2px solid #444;
    border-radius: 6px;
    padding: 4px 12px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.empty-space-btn:hover {
    background: #e3f2fd;
    border-color: #1976d2;
}

.empty-space-btn-icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* empty-space 卡片样式 */
.empty-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: calc(100% - 20px);
    margin: 20px 10px 0 10px;
    padding: 20px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.empty-card-title {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    margin-bottom: 0;
    line-height: 1.4;
    padding-bottom: 0;
}

.empty-card-divider {
    width: 100%;
    height: 1px;
    background: #f0f0f0;
    margin: 16px 0 16px 0;
    border: none;
}

.empty-card-content {
    font-size: 15px;
    color: #444;
    line-height: 1.7;
}

/* 密码输入框右侧眼睛按钮 */
.input-eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-eye-btn img {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

/* 输入框图标包裹 */
.input-icon-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* 输入框左侧图标样式 */
.input-icon {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 2;
}

/* 有图标的输入框样式 */
.with-icon {
    padding-left: 40px !important;
}

/* 登录弹窗小字提示样式 */
.login-modal-tip {
    color: #888;
    font-size: 14px;
    margin-bottom: -20px;
    margin-top: 0;
    text-align: left;
    line-height: 1.4;
    padding-left: 2px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.chat-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    background-color: #fff;
    position: relative;
    z-index: 2;
}

.chat-container.collapsed {
    width: 60%;
}

.chat-header {
    background-color: #eaeaea;
    color: #333;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-header h1 {
    font-size: 22px;
    font-weight: bold;
    margin-left: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px 16px 16px 16px;
    background-color: #fff;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.received {
    flex-direction: row;
}

.message.sent {
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    margin: 0 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    max-width: 60%;
    padding: 10px 15px;
    border-radius: 10px;
    position: relative;
}

.received .message-content {
    background-color: #fff;
    border: none;
}

.sent .message-content {
    background-color: #e3f2fd;
    border: none;
}

.chat-input-area {
    padding: 10px 16px;
    background-color: #fff;
    border-top: none;
    display: flex;
    align-items: center;
}

.input-container {
    position: relative;
    display: flex;
    flex: 1;
    background: none;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.message-input {
    flex: 1;
    border: 1px solid #bbb;
    padding: 28px 15px 28px 15px;
    outline: none;
    font-size: 16px;
    border-radius: 6px;
    resize: none;
    margin-right: 12px;
}

.send-btn {
    background-color: #1976d2;
    color: #fff;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    position: static;
    margin-right: 12px;
}

.send-btn:hover {
    background-color: #129611;
}

.send-btn:active {
    background-color: #0d7c0c;
}

.toggle-btn {
    background-color: #1aad19;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.2s;
}

.toggle-btn:hover {
    background-color: #129611;
}

.empty-space {
    flex: 1 1 0%;
    width: 40%;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    color: #222;
    font-size: 18px;
    overflow-y: auto;
    max-height: 100vh;
    padding: 32px 24px;
}

.layout-root {
    display: flex;
    height: 100vh;
    overflow: visible;
}
.sidebar {
    width: 280px;
    background: #f9fafb;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    height: 100vh;
    z-index: 20;
    position: relative; /* 新增，让底部栏只在侧边栏底部 */
    overflow: visible;
}

.sidebar.collapsed {
    display: none;
}

.sidebar-top {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 12px;
    border-bottom: 1px solid #f9fafb;
    background: #f9fafb;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.sidebar-fold-btn {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-left: auto;
}

.sidebar-title {
    font-size: 22px;
    color: #174ea6;
    font-weight: bold;
    margin-right: 10px;
    letter-spacing: 2px;
    user-select: none;
}

#groupList {
    padding: 0 12px;
    overflow: visible;
}

#historyList {
    padding: 0 12px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: visible;
    max-height: calc(100vh - 220px);
}
#historyList:hover {
    overflow-y: auto;
}


#mainContainer {
    flex: 1;
    transition: margin-left 0.3s;
}

.sidebar-divider {
    width: 100%;
    height: 1px;
    background: #f9fafb;
    margin: 0 0 18px 0;
}

.sidebar-new-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    border-radius: 32px;
    padding: 10px 18px;
    margin: 0 auto 15px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    width: 180px;
    transition: box-shadow 0.2s;
}

.sidebar-new-btn:hover {
    box-shadow: 0 4px 16px rgba(23,78,166,0.08);
}

.sidebar-new-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.sidebar-new-text {
    color: #222;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* 折叠后左上角按钮区域 */
.collapsed-header {
    position: fixed;
    top: 0;
    left: 0;
    height: 60px;
    display: flex;
    align-items: center;
    background: transparent;
    z-index: 100;
    padding: 0 10px;
}

.collapsed-logo {
    width: 32px;
    height: 32px;
    margin-right: 8px;
}

.collapsed-btn {
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.collapsed-btn:hover {
    box-shadow: 0 4px 16px rgba(23,78,166,0.08);
}

.collapsed-icon {
    width: 21px;
    height: 21px;
}

#homepageInput {
    width:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    height:100vh;
    position:absolute;
    top:0;
    left:0;
    background:#fff;
    z-index:10;
}

#homepageInput1 {
    display:flex;
    flex-direction:column;
    align-items:center;
    width:50vw;
}

#homepageInput2 {
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:24px;
}

#homepageInput3 {
    position:relative;
    width:100%;
    min-width:320px;
    max-width:100%;
    overflow:visible;
}

#homepageInput4 {
    width:auto;
    display:block;
    position:absolute;
    right:16px;
    bottom:36px;
    z-index:2;
}

#homepageInput2img {
    width:40px;
    height:40px;
    margin-right:14px;
}

#homepageInput2h2 {
    font-size:28px;
    font-weight:bold;
    color:#222;
    margin:0;
}

#homepageMessageInput {
    width:100%;
    min-width:320px;
    max-width:100%;
    padding:16px;
    font-size:18px;
    border-radius:6px;
    border:1px solid #bbb;
    margin-bottom:20px;
    outline:none;
    resize:none;
    box-sizing:border-box;
}

#homepageSendBtn {
    padding:10px 32px;
    font-size:18px;
    background:#1976d2;
    color:#fff;
    border:none;
    border-radius:6px;
    cursor:pointer;
    box-shadow:0 2px 8px rgba(0,0,0,0.04);
    transition:background-color 0.2s;
    position:static;
}

#chatContainer {
    display:none;
}

#downloadBtn {
    margin-bottom:24px;
    padding:8px 24px;
    font-size:16px;
    background:#bbb;
    color:#fff;
    border:none;
    border-radius:6px;
    cursor:not-allowed;
}

/* 导航栏历史记录按钮样式（无背景，仅文字） */
.sidebar-history-btn {
    width: 100%;
    margin: 0;
    padding: 10px 0 10px 10px;
    text-align: left;
    background: none;
    border: none;
    border-radius: 0;
    color: #505267;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    box-shadow: none;
}

.sidebar-history-btn:hover {
    background: #e0e4ea;
    color: #222;
    border-radius: 16px;
}

/* 选中状态样式 */
.sidebar-history-btn.selected {
    background: #e3f2fd;
    color: #174ea6;
    border-radius: 16px;
    font-weight: bold;
}

/* 历史记录时间样式 */
.sidebar-history-item {
    margin-bottom: 4px; /* 原来可能更大，调小为4px或更小 */
    flex-direction: column;
    align-items: flex-start;
    overflow: visible;
}

.sidebar-history-date {
    font-size: 12px;
    color: #999;
    margin-left: 0;
    margin-bottom: 2px;
    padding-left: 10px;
    display: block;
    text-align: left;
    width: 100%;
}

/* 分组标题样式 */
.sidebar-history-group-title {
    font-size: 13px;
    color: #bbb;
    font-weight: bold;
    margin: 18px 0 6px 10px;
    letter-spacing: 1px;
}

/* 历史按钮和菜单按钮一行显示 */
.sidebar-history-btn-row {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: visible;
}

/* 三个灰色圆点按钮 */
.sidebar-history-menu-btn {
    background: none;
    border: none;
    padding: 0 6px;
    margin-left: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}

.sidebar-history-menu-btn:hover {
    background: none;
    border: none;
    padding: 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
    margin-left: auto;
    margin: 0 1.5px;
}

/* 下拉菜单结构（暂时隐藏，仅样式） */
.sidebar-history-menu-dropdown {
    position: absolute;
    right: 0;
    top: 36px;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    min-width: 90px;
    z-index: 50;
    display: none;
    flex-direction: column;
}

.sidebar-history-menu-item {
    padding: 8px 16px;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-history-menu-item:hover {
    background: #f9fafb;
}

.sidebar-history-menu-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 子菜单样式 */
.sidebar-history-submenu {
    position: absolute;
    right: 100%;
    top: 0;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    min-width: 120px;
    z-index: 100;
    display: none;
    flex-direction: column;
    margin-right: 4px;
}

.sidebar-history-submenu-item {
    padding: 8px 16px;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.sidebar-history-submenu-item:hover {
    background: #f9fafb;
}

.sidebar-history-rename-input {
    font-size: 15px;
    padding: 4px 10px;
    border: 1px solid #bcd;
    border-radius: 8px;
    outline: none;
    margin: 0;
    background: #fff;
    color: #222;
}

.sidebar-userbar {
    display: flex;
    align-items: center;
    padding: 18px 16px 18px 16px;
    border-top: 1px solid #f9fafb;
    background: #f9fafb;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-user-avatar {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    margin-left: 6px;     /* 新增，头像整体向右挪动 */
    margin-right: 12px;   /* 恢复为12px，按钮不会被挪动 */
    object-fit: cover;
    background: #f9fafb;
}

.sidebar-login-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 0 8px;
    font-weight: 400;   /* 改为常规字体，不加粗 */
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-login-btn:hover {
    background: #e3e3e3;
}

.sidebar-logout-btn {
    background: none;
    border: 1px solid #888;      /* 与文字同色的外边框 */
    color: #888;
    font-size: 15px;
    cursor: pointer;
    margin-left: auto;           /* 靠右对齐 */
    border-radius: 6px;
    padding: 0 14px;
    transition: background 0.2s, border 0.2s;
    height: 32px;
    line-height: 32px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.sidebar-logout-btn:hover {
    background: #e3e3e3;
    border-color: #666;
}

/* 登录弹窗遮罩 */
.login-modal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗内容 */
.login-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    padding: 44px 48px 36px 48px;   /* 增大内边距 */
    min-width: 400px;               /* 增大宽度 */
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login-modal-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 18px;
    text-align: center;
    color: #222;
}

.login-modal-close {
    position: absolute;
    right: 16px;
    top: 14px;
    background: none;
    border: none;
    font-size: 22px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.login-modal-close:hover {
    color: #d32f2f;
}

.login-modal-form {
    display: flex;
    flex-direction: column;
    gap: 28px;                      /* 增大行间距 */
}

.login-modal-row {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    width: 100%;
    padding: 0;
}

.login-modal-label {
    display: none;
}

.login-modal-input {
    font-size: 17px;
    padding: 10px 14px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    outline: none;
    background: #fafbfc;
    color: #222;
    transition: border 0.2s;
    margin-bottom: 0;
    width: 100%;
}

/* 新增：无标签输入框宽度对齐按钮 */
.no-label-row {
    width: 100%;
    padding: 0;
}

.full-width-input {
    width: 100%;
    box-sizing: border-box;
}

.login-modal-btn-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    gap: 12px;
}

.login-modal-btn {
    flex: 1;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    padding: 8px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.login-modal-btn:last-child {
    background: #e0e0e0;
    color: #444;
}

.login-modal-btn:hover {
    filter: brightness(0.95);
}

.sidebar-username {
    color: #888;
    font-size: 16px;
    font-weight: 400;
    margin-left: 0;
    cursor: default;
    transition: color 0.2s;
    padding: 0 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.sidebar-username:hover {
    background: #e3e3e3;
}

.report-show-btn {
    background: #fff;
    border: 1.5px solid #174ea6;
    color: #174ea6;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border 0.2s;
    margin-bottom: 2px;
}

.report-show-btn:hover {
    background: #e3f2fd;
}

.beian-link {
    color: #bbb;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    margin: 0 6px;
    transition: color 0.2s;
    display: inline-block;
}

.beian-link:hover {
    color: #888;
    text-decoration: underline;
}
