/* ===== 日志中心（原型 4f4849 布局） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Consolas", "Microsoft Yahei", sans-serif; }
:root {
    --main-blue: #0391db;
    --main-blue-light: #0aa8f0;
    --main-blue-deep: #0269a8;
    --line-blue: rgba(120, 210, 255, 0.35);
    --att-img-h: 100px;
    --pending-img-h: 80px;
}
body { background: var(--main-blue); min-height: 100vh; padding-top: 80px; color: #e8f4ff; overflow-x: hidden; }
[hidden] { display: none !important; }

/* ===== 粒子画布 ===== */
.bg-particle-wrap { position: fixed; inset: 0; z-index: -1; }
canvas#particleCanvas { width: 100%; height: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

/* ===== 头部 ===== */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 99; background: transparent;
    padding: 16px 20px; transition: all 0.35s ease; }
.header.scrolled { background: linear-gradient(90deg, rgba(3, 120, 185, 0.92), rgba(3, 145, 219, 0.88));
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-blue);
    box-shadow: 0 4px 16px rgba(0, 80, 160, 0.25); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 16px; }
.header-inner h1 { font-size: 28px; color: #fff; letter-spacing: 2px; position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.header-inner h1::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 60px; height: 3px;
    background: linear-gradient(90deg, #fff, #9be4ff); border-radius: 2px; }

.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ===== 主题筛选：自定义下拉 ===== */
.topic-select { position: relative; display: inline-block; }
.topic-trigger { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 32px 0 16px;
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(180, 232, 255, 0.5); border-radius: 6px;
    color: #ffffff; font-size: 15px; font-family: inherit; font-weight: 500; letter-spacing: 0.5px;
    cursor: pointer; position: relative; white-space: nowrap; backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 60, 110, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.topic-trigger:hover, .topic-select.open .topic-trigger { background: rgba(255, 255, 255, 0.2);
    border-color: rgba(190, 240, 255, 0.85);
    box-shadow: 0 4px 14px rgba(0, 60, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.topic-trigger-icon { flex: none; font-size: 15px; line-height: 1; }
.topic-trigger-text { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-trigger-arrow { position: absolute; right: 14px; top: 50%; width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #a9e4ff;
    transform: translateY(-50%); transition: border-top-color 0.25s ease, transform 0.25s ease; pointer-events: none; }
.topic-trigger:hover .topic-trigger-arrow, .topic-select.open .topic-trigger-arrow { border-top-color: #ffffff; }
.topic-select.open .topic-trigger-arrow { transform: translateY(-50%) rotate(180deg); }

.topic-dropdown { position: absolute; top: calc(100% + 6px); left: 0; z-index: 200; display: none;
    flex-direction: column; width: max-content; min-width: 100%; max-width: min(510px, calc(100vw - 40px));
    max-height: 320px; overflow-y: auto; padding: 6px;
    background: linear-gradient(160deg, rgba(3, 152, 228, 0.98) 0%, rgba(2, 105, 168, 0.98) 100%);
    border: 1px solid rgba(180, 232, 255, 0.5); border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 45, 90, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px); animation: topicIn 0.18s ease; }
.topic-select.open .topic-dropdown { display: flex; }
@keyframes topicIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.topic-option { width: 100%; padding: 9px 12px; border-radius: 6px; color: #eaf7ff; font-size: 15px;
    line-height: 1.4; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background 0.18s ease, color 0.18s ease; }
.topic-option:hover { background: rgba(255, 255, 255, 0.16); }
.topic-option.active { background: rgba(255, 255, 255, 0.26); color: #ffffff; font-weight: 600; }

/* ===== 日期按钮 ===== */
#dateBtn { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 20px;
    background: rgba(255, 255, 255, 0.12); color: #ffffff; border: 1px solid rgba(180, 232, 255, 0.5);
    border-radius: 6px; font-size: 15px; font-weight: 500; letter-spacing: 0.5px; cursor: default;
    white-space: nowrap; backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0, 60, 110, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
#dateBtn:hover { background: rgba(255, 255, 255, 0.2); border-color: rgba(190, 240, 255, 0.85);
    box-shadow: 0 4px 14px rgba(0, 60, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
#dateBtn .date-icon { font-size: 16px; line-height: 1; }

/* ===== 添加日志按钮：亮光扫过 ===== */
#addBtn { position: relative; overflow: hidden; display: inline-flex; align-items: center;
    justify-content: center; height: 46px; padding: 0 26px;
    background: linear-gradient(135deg, #0aa8f0 0%, #0284c9 55%, #0269a8 100%); color: #ffffff;
    border: 1px solid rgba(155, 228, 255, 0.65); border-radius: 6px; cursor: pointer; font-size: 16px;
    font-weight: 600; letter-spacing: 1px;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 60, 110, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
#addBtn::before { content: ""; position: absolute; top: -60%; left: -80%; width: 38%; height: 220%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.06) 22%,
        rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.06) 78%, rgba(255,255,255,0) 100%);
    transform: rotate(-22deg); filter: blur(1px); animation: btnShine 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes btnShine { 0% { left: -80%; } 65% { left: 135%; } 100% { left: 135%; } }
#addBtn:hover { transform: translateY(-2px); border-color: rgba(190, 240, 255, 0.95);
    box-shadow: 0 6px 22px rgba(0, 60, 110, 0.5), 0 0 20px rgba(120, 220, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
#addBtn:hover::before { animation-duration: 0.9s; }
#addBtn:active { transform: translateY(0); }

/* 个人中心按钮（沿用头部按钮视觉） */
#userChip { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px;
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(180, 232, 255, 0.5); border-radius: 6px;
    color: #fff; font-size: 14px; font-family: inherit; cursor: pointer; backdrop-filter: blur(4px);
    transition: .25s; }
#userChip:hover { background: rgba(255, 255, 255, 0.24); border-color: rgba(190, 240, 255, 0.85); }
#userChip .user-avatar { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.28);
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 14px; }
#userChip .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
#userChip .user-chip-caret { width: 0; height: 0; border-left: 4px solid transparent;
    border-right: 4px solid transparent; border-top: 5px solid rgba(255,255,255,.8); }

/* ===== 日志列表 ===== */
.log-list { max-width: 1200px; width: 100%; background: rgba(3, 145, 219, 0.55);
    box-shadow: 0 -15px 30px #0082c5; border: 1px solid var(--line-blue); border-radius: 12px;
    overflow: hidden; backdrop-filter: blur(4px); }
.log-item { border-bottom: 1px solid rgba(120, 210, 255, 0.18); transition: background-color 0.3s, box-shadow 0.3s; }
.log-item:last-child { border-bottom: none; }
.log-item:nth-child(odd) { background-color: rgba(255, 255, 255, 0.035); }
.log-item:nth-child(even) { background-color: rgba(255, 255, 255, 0.10); }
.log-item.open:nth-child(odd) { background-color: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 18px rgba(150, 220, 255, 0.12); }
.log-item.open:nth-child(even) { background-color: rgba(255, 255, 255, 0.19);
    box-shadow: inset 0 0 18px rgba(150, 220, 255, 0.12); }

.log-header { padding: 16px 22px; cursor: pointer; border-radius: 10px; outline: none;
    transition: background-color 0.25s; }
.log-header:hover { background-color: rgba(255, 255, 255, 0.07); }
.log-header:focus-visible { box-shadow: 0 0 0 2px rgba(180, 232, 255, 0.75); }
.log-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: bold;
    color: #ffffff; line-height: 1.4; }
.log-title-icon { flex: none; width: 20px; height: 20px; color: #a9e4ff; display: inline-flex;
    align-items: center; justify-content: center; transition: color 0.25s ease; }
.log-title-icon svg { width: 100%; height: 100%; display: block; }
.log-header:hover .log-title-icon, .log-item.open .log-title-icon { color: #ffffff; }
.log-title-text { flex: 1 1 auto; min-width: 0; word-break: break-all; }
/* 系统公告徽标 */
.announce-badge { flex: none; font-size: 12px; font-weight: 600; letter-spacing: .5px;
    padding: 2px 9px; border-radius: 10px; color: #04557f;
    background: linear-gradient(90deg, #fff2b8, #ffe27a);
    border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 1px 6px rgba(0, 40, 80, 0.25); }
/* 公告卡片：左侧高亮条，与普通日志区分 */
.log-item.is-announce { border-left: 3px solid #ffe27a; }
.log-item.is-announce .log-meta .meta-topic { background: rgba(255, 226, 122, 0.18);
    border-color: rgba(255, 226, 122, 0.5); }
/* 公告开关（仅管理员/管理角色可见） */
.switch-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #ffe27a; cursor: pointer; }
.switch-label input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.switch-label input[type="checkbox"]:disabled + span { opacity: .55; }
.log-arrow { flex: none; width: 0; height: 0; border-left: 6px solid transparent;
    border-right: 6px solid transparent; border-top: 8px solid #a9e4ff;
    transition: transform 0.28s ease, border-top-color 0.28s ease; }
.log-item.open .log-arrow { transform: rotate(180deg); border-top-color: #ffffff; }

.log-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 14px;
    color: #cbe9ff; margin-top: 8px; padding-left: 30px; }
.log-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; word-break: break-all; }
.log-meta .meta-topic { padding: 1px 9px; border-radius: 10px; background: rgba(155, 228, 255, 0.16);
    border: 1px solid rgba(180, 232, 255, 0.35); color: #eaf7ff; max-width: 100%; }

.log-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s ease; }
.log-item.open .log-body { grid-template-rows: 1fr; }
.log-body-inner { overflow: hidden; min-height: 0; }
.log-body-pad { padding: 4px 22px 18px; }
.log-content { background: rgba(255, 255, 255, 0.12); padding: 16px; border-radius: 8px;
    border-left: 4px solid #9be4ff; overflow-x: auto; }
.log-content pre { font-family: Consolas, monospace; color: #f2fbff; white-space: pre-wrap;
    word-break: break-all; line-height: 1.6; }

/* 列表内内容折叠：正文 10 行 + 盒子内 2 行省略号 */
.log-content.is-limited { max-height: none; overflow: hidden; position: relative; }
.log-content.is-limited pre { display: -webkit-box; -webkit-line-clamp: 10; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis; max-height: calc(1.6em * 10); }

/* 「展开」行（位于 .log-content 盒子内部）：整行省略号 → 100px 省略号 + 展开文字 + 三角 + 后续省略号 */
.log-expand-row { display: flex; align-items: center; gap: 0; margin-top: 6px;
    font-family: Consolas, monospace; font-size: 14px; line-height: 1.6; letter-spacing: 2px;
    color: #dff3ff; cursor: pointer; user-select: none; white-space: nowrap; overflow: hidden; }
.log-expand-row[hidden] { display: none; }
.log-expand-row .expand-dots { flex: 1 1 auto; overflow: hidden; white-space: nowrap; letter-spacing: 2px; }
.log-expand-row .expand-dots::before { content: "……………………………………"; }
/* 第二行：最前面固定 100px 的省略号 */
.log-expand-row .expand-dots:first-child { flex: 0 0 100px; max-width: 100px; }
.log-expand-row .expand-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    padding: 0 8px; color: #9be4ff; letter-spacing: 1px; transition: color .2s; }
.log-expand-row:hover .expand-btn { color: #fff; }
.log-expand-row .expand-text { letter-spacing: 1px; }
.log-expand-row .expand-arrow { width: 0; height: 0; border-left: 5px solid transparent;
    border-right: 5px solid transparent; border-top: 6px solid currentColor;
    transition: transform .25s ease; }
.log-expand-row:hover .expand-arrow { transform: translateY(2px); }

/* IP 行内的操作按钮组 */
.meta-actions { display: inline-flex; align-items: center; gap: 10px; margin-left: 4px;
    padding-left: 14px; border-left: 1px solid rgba(180, 232, 255, 0.35); }
.meta-actions button { background: none; border: none; padding: 0; font-family: inherit;
    font-size: 13px; color: #a9e4ff; cursor: pointer; transition: .2s; }
.meta-actions button:hover { color: #fff; text-decoration: underline; }
/* 删除：与编辑/跟进/复制的 #a9e4ff 同色系，但再淡一级，弱化存在感 */
.meta-actions button.act-del { color: rgba(169, 228, 255, 0.62); }
.meta-actions button.act-del:hover { color: #ff9e9e; text-decoration: underline; }
/* 复制按钮：成功后短暂变绿提示 */
.meta-actions button.act-copy.copied { color: #9dffc4; text-decoration: none; }
.meta-actions button.act-copy.copy-fail { color: #ff9e9e; text-decoration: none; }

/* ===== 追加内容（类似留言/回复） ===== */
.log-replies { margin-top: 14px; display: flex; flex-direction: column; gap: 12px;
    border-left: 2px solid rgba(155, 228, 255, 0.35); padding-left: 50px; }
.reply-item { background: rgba(2, 105, 168, 0.35); border: 1px solid rgba(180, 232, 255, 0.25);
    border-radius: 8px; padding: 12px 16px; position: relative; }
.reply-item::before { content: ""; position: absolute; left: -38px; top: 18px; width: 36px; height: 2px;
    background: rgba(155, 228, 255, 0.35); }
.reply-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px;
    color: #cbe9ff; margin-bottom: 8px; }
.reply-head .reply-title { font-size: 15px; font-weight: 700; color: #fff; }
.reply-head .reply-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px;
    background: rgba(155, 228, 255, 0.2); border: 1px solid rgba(180, 232, 255, 0.4); color: #eaf7ff; }
.reply-del { margin-left: auto; background: none; border: none; color: #ffc9c9; cursor: pointer;
    font-size: 13px; font-family: inherit; }
.reply-del:hover { color: #ff8f8f; text-decoration: underline; }
.reply-content { background: rgba(255, 255, 255, 0.08); padding: 10px 14px; border-radius: 6px;
    border-left: 3px solid rgba(155, 228, 255, 0.6); }
.reply-content pre { font-family: Consolas, monospace; color: #f2fbff; white-space: pre-wrap;
    word-break: break-all; line-height: 1.6; }

/* 通用关闭按钮 */
.modal-close { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.28); color: #fff;
    font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: .22s; z-index: 6; }
.modal-close:hover { background: rgba(214, 45, 45, 0.85); border-color: #fff; }
.modal { position: relative; }
.form-modal { position: relative; }

/* ===== 详情弹窗：复用 log-item 布局 ===== */
.detail-mask { position: fixed; inset: 0; z-index: 1100; background-color: rgba(0, 45, 85, 0.6);
    display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(6px); }
.detail-mask.show { display: flex; }
/* 关闭按钮的定位容器：宽度与面板一致，按钮绝对定位在其右上角 */
.detail-shell { position: relative; width: 100%; max-width: 1000px; height: calc(100vh - 40px);
    max-height: 100vh; display: flex; }
.detail-panel { flex: 1 1 auto; width: 100%; height: 100%;
    display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line-blue);
    background: rgba(3, 145, 219, 0.96); box-shadow: 0 20px 60px rgba(0, 45, 90, 0.55);
    overflow: hidden; animation: modalIn 0.26s ease; position: relative; }
.detail-panel .log-item { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    background: rgba(255, 255, 255, 0.10); border-bottom: none; }
.detail-panel .log-header { padding: 18px 24px; cursor: default; flex: none; }
.detail-panel .log-header:hover { background-color: transparent; }
.detail-panel .log-title { font-size: 21px; padding-right: 46px; }
.detail-panel .log-arrow { display: none; }
.detail-panel .log-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    grid-template-rows: none; transition: none; }
.detail-panel .log-body-inner { display: flex; flex-direction: column; flex: 1 1 auto;
    min-height: 0; overflow: visible; }
.detail-panel .log-body-pad { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0;
    padding: 0 24px 22px; }
/* 内容区：视口高度 - 头部 - 附件 - 内边距 */
.detail-panel .log-content { flex: 1 1 auto; min-height: 120px; overflow-y: auto; }
.detail-panel .log-attachments { flex: none; max-height: 34vh; overflow-y: auto; }
.detail-panel .att-remove { display: none; }
/* 右上角关闭按钮：与面板同色系、略深一档，浮在内容之上始终可见 */
.detail-close { position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(2, 100, 160, 0.55);
    color: rgba(255, 255, 255, 0.92); font-size: 17px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: .22s; z-index: 30;
    padding: 0; font-family: inherit; }
.detail-close:hover { background: rgba(1, 72, 118, 0.85); border-color: rgba(255, 255, 255, 0.55);
    color: #fff; transform: rotate(90deg); }

/* ===== 附件展示 ===== */
.log-attachments { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 12px; }
.att-item { position: relative; flex: 0 0 auto; border-radius: 8px; overflow: hidden;
    border: 1px solid rgba(180, 232, 255, 0.3); background: rgba(255, 255, 255, 0.1);
    transition: transform 0.22s, box-shadow 0.22s; }
.att-image-item { cursor: zoom-in; padding: 0; line-height: 0; height: var(--att-img-h); }
/* 图片固定高度，宽度按原图比例自适应，保证不变形 */
.att-image-item img { height: var(--att-img-h); width: auto; max-width: none; object-fit: contain; display: block; }
.att-image-item:hover, .att-file-item:hover { transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 40, 80, 0.35); }
.att-file-item { cursor: pointer; width: 150px; padding: 10px 12px; display: flex; flex-direction: column;
    gap: 4px; min-height: var(--att-img-h); justify-content: center; }
.att-file-icon { font-size: 24px; }
.att-file-name { font-size: 13px; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-file-size { font-size: 12px; color: #cbe9ff; }
.att-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.6); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer; font-size: 14px; font-family: inherit; line-height: 1; display: flex;
    align-items: center; justify-content: center; z-index: 3; opacity: 0; transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease; }
.att-item:hover .att-remove, .att-remove:focus-visible { opacity: 1; transform: scale(1); }
.att-remove:hover { background: rgba(214, 45, 45, 0.95); border-color: rgba(255, 255, 255, 0.8); }
@media (hover: none) { .att-remove { opacity: 1; transform: scale(1); } }

.empty-tip { padding: 50px; text-align: center; color: #eaf7ff; font-size: 16px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.page-btn { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 8px;
    border: 1px solid rgba(180, 232, 255, 0.35); background: rgba(255, 255, 255, 0.1); color: #eaf7ff;
    font-size: 14px; cursor: pointer; transition: all 0.22s; font-family: inherit; }
.page-btn:hover:not(:disabled):not(.active) { background: rgba(255, 255, 255, 0.22); }
.page-btn.active { background: #ffffff; color: #00639f; font-weight: 700; border-color: #ffffff; cursor: default; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { color: #cbe9ff; font-size: 13px; margin-left: 6px; }

/* ===== 弹窗 ===== */
.mask { position: fixed; inset: 0; background-color: rgba(0, 45, 85, 0.55); display: none; align-items: center;
    justify-content: center; z-index: 999; padding: 0 20px; backdrop-filter: blur(6px); }
.mask.show { display: flex; }
.modal { width: 100%; max-width: 1200px; height: 74vh;
    background: linear-gradient(160deg, rgba(3, 152, 228, 0.97) 0%, rgba(2, 105, 168, 0.97) 100%);
    border: 1px solid rgba(180, 232, 255, 0.5); border-radius: 12px; padding: 28px; display: flex;
    flex-direction: column; box-shadow: 0 20px 60px rgba(0, 45, 90, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: modalIn 0.28s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); } }
.modal h2 { font-size: 22px; margin-bottom: 20px; color: #ffffff; text-shadow: 0 2px 8px rgba(0, 45, 90, 0.35); }
.modal.form-modal { height: auto; max-height: 92vh; max-width: 480px; padding: 30px 28px; overflow-y: auto; }
.form-wrap { flex: 1; overflow-y: auto; padding-right: 8px; }
.form-item { margin-bottom: 20px; }
.form-item label { display: block; margin-bottom: 8px; color: #eaf7ff; font-weight: 500; }
.label-hint { font-size: 12px; color: rgba(230, 248, 255, 0.65); font-weight: 400; }
.form-item input[type="text"], .form-item input[type="password"], .form-item input[type="email"],
.form-item textarea { width: 100%; padding: 12px; background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(180, 232, 255, 0.4); border-radius: 6px; font-size: 15px; color: #ffffff;
    font-family: Consolas, monospace; outline: none; transition: 0.25s; }
.form-item input::placeholder, .form-item textarea::placeholder { color: rgba(230, 248, 255, 0.6); }
.form-item input:focus, .form-item textarea:focus { background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff; box-shadow: 0 0 0 3px rgba(180, 232, 255, 0.3); }
.form-item input:disabled { opacity: .65; }
.form-item textarea { min-height: 180px; resize: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row .form-item { margin-bottom: 0; }
/* ===== 是否通知（到期提醒） ===== */
.notify-picker { display: inline-flex; gap: 8px; }
.notify-opt { cursor: pointer; user-select: none; }
.notify-opt input { position: absolute; opacity: 0; pointer-events: none; }
.notify-opt .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid rgba(207,233,255,.7); margin-right: 7px; transition: .2s; }
.notify-opt span { display: inline-flex; align-items: center; padding: 2px 4px; border-radius: 0; font-size: 14px;
    background: transparent; color: #cfe9ff; border: none; transition: .2s; }
.notify-opt input:checked + span { background: transparent; color: #ffe27a; font-weight: 600; border: none; }
.notify-opt input:checked + span .dot { border-color: #6b5200; background: #fff; box-shadow: inset 0 0 0 3px #6b5200; }
.notify-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 46px; }
.notify-label { margin-bottom: 0 !important; display: flex; align-items: center; line-height: 1; }
.notify-expire-inline { display: flex; align-items: center; gap: 8px; }
.notify-expire-inline label { margin-bottom: 0 !important; white-space: nowrap; line-height: 1; }
.notify-picker { display: inline-flex; gap: 14px; align-items: center; }
.notify-hint { margin-top: 8px; font-size: 12px; color: rgba(255, 214, 120, .85); }
/* 是否通知 / 是否共享：同行两列（左：通知 + 到期时间；右：共享 + 主题） */
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; align-items: start; }
.meta-cell { min-width: 0; }
.meta-cell .notify-line { align-items: center; gap: 12px; }
.meta-cell .notify-expire-inline { margin-left: 2px; }
.meta-cell .notify-hint { max-width: 96%; line-height: 1.6; }
@media (max-width: 960px) { .meta-grid { grid-template-columns: 1fr; gap: 14px; } }
/* 跟进弹窗：只有「是否通知」一列（共享在创建日志时已设定） */
#metaRow.meta-single .meta-grid { grid-template-columns: 1fr; }
/* 列表里的到期时间标签 */
.meta-expire { color: #ffe27a; }
.meta-expire.is-soon { color: #ffcf7a; font-weight: 600; }
.meta-expire.is-overdue { color: #ff9d9d; font-weight: 600; }
/* 选了共享主题后，日志主题输入框被锁定 */
.form-item input.topic-locked { background: rgba(255, 255, 255, 0.06); color: #cfe9ff;
    border-style: dashed; border-color: rgba(180, 232, 255, 0.28); cursor: not-allowed; }
#logExpireAt, #editExpireAt { width: auto; min-width: 240px; color-scheme: dark; cursor: pointer;
    padding: 12px; background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(180, 232, 255, 0.4); border-radius: 6px;
    font-size: 15px; color: #ffffff; font-family: Consolas, monospace; outline: none; transition: 0.25s; }
#logExpireAt:hover, #editExpireAt:hover { border-color: rgba(180, 232, 255, 0.7); }
#logExpireAt:focus, #editExpireAt:focus, #logExpireAt.dt-open, #editExpireAt.dt-open {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff; box-shadow: 0 0 0 3px rgba(180, 232, 255, 0.3); }

/* ===== 到期时间选择层（配色与主题一致） ===== */
.dt-pop { position: fixed; z-index: 3000; width: 302px; padding: 14px 14px 12px;
    background: linear-gradient(160deg, rgba(3, 138, 210, 0.99) 0%, rgba(2, 88, 146, 0.99) 100%);
    border: 1px solid rgba(180, 232, 255, 0.5); border-radius: 12px;
    box-shadow: 0 18px 46px rgba(0, 30, 60, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #eaf7ff; font-size: 14px; animation: dtIn 0.16s ease; }
@keyframes dtIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dt-pop [hidden] { display: none !important; }
.dt-title { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px;
    border: 1px solid transparent; background: transparent; color: #fff; font-size: 15px;
    font-weight: 700; letter-spacing: 0.5px; font-family: inherit; cursor: pointer; transition: 0.2s; }
.dt-title:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(180, 232, 255, 0.45); color: #ffe27a; }
.dt-care { font-size: 10px; line-height: 1; color: rgba(214, 241, 255, 0.75); transition: 0.2s; }
.dt-title:hover .dt-care { color: #ffe27a; }
/* 年 / 月 选择面板 */
.dt-months, .dt-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dt-pick { height: 36px; padding: 0; border-radius: 8px; border: 1px solid transparent;
    background: transparent; color: #eaf7ff; font-size: 13px; font-family: inherit;
    cursor: pointer; transition: 0.18s; }
.dt-pick:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(180, 232, 255, 0.5); color: #fff; }
.dt-pick.is-today { border-color: rgba(255, 227, 122, 0.75); color: #ffe27a; }
.dt-pick.is-sel { background: linear-gradient(160deg, #ffe9a3, #ffcf5c); border-color: #ffe27a;
    color: #073a5c; font-weight: 700; box-shadow: 0 4px 12px rgba(255, 207, 92, 0.35); }
.dt-nav { width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(180, 232, 255, 0.35);
    background: rgba(255, 255, 255, 0.1); color: #eaf7ff; font-size: 16px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; font-family: inherit; }
.dt-nav:hover { background: rgba(255, 255, 255, 0.24); border-color: #ffe27a; color: #ffe27a; }
.dt-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.dt-week span { text-align: center; font-size: 12px; color: rgba(214, 241, 255, 0.7); }
.dt-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dt-day { height: 30px; border: 1px solid transparent; border-radius: 8px; background: transparent;
    color: #eaf7ff; font-size: 13px; font-family: inherit; cursor: pointer; transition: 0.18s; padding: 0; }
.dt-day:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(180, 232, 255, 0.5); color: #fff; }
.dt-day.is-empty { pointer-events: none; }
.dt-day.is-today { border-color: rgba(255, 227, 122, 0.75); color: #ffe27a; }
.dt-day.is-sel { background: linear-gradient(160deg, #ffe9a3, #ffcf5c); border-color: #ffe27a;
    color: #073a5c; font-weight: 700; box-shadow: 0 4px 12px rgba(255, 207, 92, 0.35); }
.dt-time { display: flex; align-items: center; gap: 6px; margin-top: 10px;
    padding-top: 10px; border-top: 1px dashed rgba(180, 232, 255, 0.3); }
.dt-time-label { font-size: 12px; color: rgba(214, 241, 255, 0.8); margin-right: 2px; }
.dt-colon { color: #cbe9ff; }
.dt-sel { flex: 1 1 auto; padding: 6px 8px; border-radius: 6px; border: 1px solid rgba(180, 232, 255, 0.4);
    background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 13px;
    font-family: Consolas, monospace; outline: none; cursor: pointer; }
.dt-sel:focus { border-color: #fff; background: rgba(255, 255, 255, 0.22); }.dt-sel { color-scheme: dark; }
.dt-sel option { background: #0d3f61; color: #eaf7ff; }
.dt-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dt-btn { padding: 8px 14px; border-radius: 7px; border: 1px solid rgba(180, 232, 255, 0.4);
    background: rgba(255, 255, 255, 0.1); color: #eaf7ff; font-size: 13px; font-family: inherit;
    cursor: pointer; transition: 0.2s; }
.dt-btn:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; color: #fff; }
.dt-btn.dt-clear { color: #ffc9c9; }
.dt-btn.dt-clear:hover { border-color: #ff9e9e; color: #ff9e9e; background: rgba(255, 120, 120, 0.16); }
.dt-btn.dt-today { margin-right: auto; }
.dt-btn.dt-ok { padding: 8px 22px; font-weight: 700; border-color: #ffe27a;
    background: linear-gradient(160deg, #ffe9a3, #ffcf5c); color: #073a5c;
    box-shadow: 0 4px 14px rgba(255, 207, 92, 0.32); }
.dt-btn.dt-ok:hover { filter: brightness(1.06); border-color: #fff; color: #073a5c; }

/* 是否共享：主题下拉（与到期时间框同款外观，展开列表配色随主题） */
.share-select { width: auto; min-width: 220px; padding: 12px 34px 12px 12px;
    background-color: rgba(255, 255, 255, 0.14); border: 1px solid rgba(180, 232, 255, 0.4);
    border-radius: 6px; font-size: 15px; color: #ffffff; font-family: inherit;
    outline: none; transition: 0.25s; cursor: pointer; color-scheme: dark;
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a9e4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; }
.share-select:hover { border-color: rgba(180, 232, 255, 0.7); }
.share-select:focus { background-color: rgba(255, 255, 255, 0.22);
    border-color: #ffffff; box-shadow: 0 0 0 3px rgba(180, 232, 255, 0.3); }
.share-select option { background: #0b3f61; color: #eaf7ff; padding: 8px 10px; }
.share-select option:checked { background: #1a7bb0; color: #ffffff; font-weight: 600; }

.attach-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.attach-picker button { padding: 10px 20px; border-radius: 6px; border: 1px dashed rgba(180, 232, 255, 0.6);
    background: rgba(255, 255, 255, 0.12); color: #ffffff; cursor: pointer; font-size: 14px;
    font-family: inherit; transition: 0.25s; }
.attach-picker button:hover { background: rgba(255, 255, 255, 0.26); border-style: solid; }
.attach-hint { margin-top: 8px; font-size: 12px; color: rgba(230, 248, 255, 0.7); }
.attach-preview { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-top: 12px; }
.attach-preview:empty { margin-top: 0; }
.pending-att-item { position: relative; flex: 0 0 auto; max-width: 220px;
    background: rgba(255, 255, 255, 0.12); border-radius: 8px; padding: 0; overflow: hidden;
    border: 1px solid rgba(180, 232, 255, 0.28); }
/* 预览图：高度固定，宽度按原比例计算，不拉伸不变形 */
.pending-att-item img { height: var(--pending-img-h); width: auto; max-width: 220px;
    object-fit: contain; display: block; background: rgba(0, 30, 60, 0.25); }
.pending-file-box { width: 120px; height: var(--pending-img-h); display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px; }
.pending-file-icon { font-size: 26px; }
.pending-att-name { padding: 6px 8px; font-size: 12px; color: #eaf7ff; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
.pending-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.6); color: #fff; border: 1px solid rgba(255,255,255,.35); cursor: pointer;
    font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.pending-remove:hover { background: rgba(200, 40, 40, 0.9); }

.modal-btn-group { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; flex: none; }
.modal-btn-group button { padding: 10px 26px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16); color: #eaf7ff; font-size: 15px; cursor: pointer;
    transition: all 0.25s; font-family: inherit; }
#cancelBtn:hover { background: rgba(255, 255, 255, 0.3); }
#submitBtn { background: linear-gradient(90deg, #ffffff, #d6f1ff); color: #00639f; font-weight: 600;
    border: none; box-shadow: 0 4px 14px rgba(0, 45, 90, 0.3); }
#submitBtn:hover { box-shadow: 0 6px 20px rgba(0, 45, 90, 0.45); transform: translateY(-1px); }
#submitBtn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.save-btn { background: linear-gradient(90deg, #ffffff, #d6f1ff) !important; color: #00639f !important;
    font-weight: 700; border: none !important; }

/* 个人中心 */
.profile-avatar-section { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.profile-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex: none;
    background: linear-gradient(135deg, #0aa8f0, #0269a8); display: flex; align-items: center;
    justify-content: center; font-size: 30px; font-weight: 700; color: #fff;
    border: 2px solid rgba(180, 232, 255, 0.5); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hint { font-size: 12px; color: rgba(230, 248, 255, 0.65); margin-top: 6px; }
.btn-small { padding: 8px 18px; border-radius: 6px; border: 1px solid rgba(180, 232, 255, 0.5);
    background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-small:hover { background: rgba(255, 255, 255, 0.28); }
.btn-danger { padding: 10px 20px; border-radius: 6px; border: 1px solid rgba(255, 140, 140, 0.6);
    background: rgba(200, 40, 40, 0.28); color: #ffd9d9; font-size: 14px; cursor: pointer; font-family: inherit; }
.btn-danger:hover { background: rgba(220, 50, 50, 0.5); color: #fff; }
.profile-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 20px; }

/* ===== 灯箱 ===== */
.lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 20, 40, 0.88); display: none;
    align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; backdrop-filter: blur(4px); }
.lightbox.show { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65); }

/* ===== 滚动条 / 响应式 ===== */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(0, 60, 105, 0.5); }
::-webkit-scrollbar-thumb { background: #56a9e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8ecbf0; }
@media (max-width: 900px) {
    .header-inner h1 { font-size: 20px; }
    .header-inner h1::after { width: 40px; }
    #dateBtn { display: none; }
}
@media (max-width: 560px) {
    body { padding-top: 70px; }
    .header { padding: 12px 14px; }
    .header-inner { gap: 10px; }
    .header-inner h1 { font-size: 16px; letter-spacing: 1px; }
    .header-inner h1::after { display: none; }
    .topic-trigger { height: 40px; font-size: 13px; padding: 0 26px 0 10px; }
    .topic-trigger-text { max-width: 64px; }
    #addBtn { height: 40px; padding: 0 16px; font-size: 14px; }
    #userChip { height: 40px; padding: 0 12px; }
    #userChip .user-name { display: none; }
    .container { padding: 0 12px 40px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-row .form-item { margin-bottom: 20px; }
    .form-modal { max-width: 100%; padding: 22px 18px; }
    .log-title { font-size: 16px; }
    .log-title-icon { width: 16px; height: 16px; }
    .log-meta { padding-left: 24px; font-size: 12px; gap: 6px 12px; }
    .modal { padding: 20px 16px; height: auto; max-height: 88vh; }
}

/* ===== 个人中心：云空间大小 ===== */
.space-box { }
.space-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.space-bar-in { height: 100%; border-radius: 6px; background: #6fe3a5; transition: width .4s; }
.space-txt { margin-top: 7px; font-size: 12px; color: rgba(230,248,255,.75); letter-spacing: .5px; }

/* 共享页：返回/登录 链接按钮 */
.share-back-link { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 8px;
    font-size: 14px; color: #eaf7ff; text-decoration: none; letter-spacing: .5px;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(180, 232, 255, 0.4);
    transition: .25s; white-space: nowrap; }
.share-back-link:hover { background: rgba(255, 255, 255, 0.26); border-color: #ffe27a; color: #ffe27a; }
