/* ===== 科技日志系统 - 前端公共样式 ===== */
* { 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);
}
body { background: var(--main-blue); min-height: 100vh; color: #e8f4ff; overflow-x: hidden; }
body.with-header { padding-top: 80px; }
[hidden] { display: none !important; }
.bg-particle-wrap { position: fixed; inset: 0; z-index: -1; }
canvas.particle { width: 100%; height: 100%; display: block; }

/* ===== 头部 ===== */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 99; padding: 16px 20px;
          background: linear-gradient(90deg, rgba(3,120,185,.92), rgba(3,145,219,.88));
          backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-blue); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.header h1 { font-size: 20px; letter-spacing: 1px; text-shadow: 0 2px 10px rgba(0,45,90,.4); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions > button { padding: 9px 20px; border-radius: 8px; border: 1px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.16); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: .25s; font-family: inherit; }
.header-actions > button:hover { background: rgba(255,255,255,.32); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.3);
    display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 15px; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.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); }

/* ===== 容器 / 工具栏 ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    background: rgba(3,130,200,.5); backdrop-filter: blur(10px); border: 1px solid var(--line-blue);
    border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }
.topic-filter { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.topic-filter select { padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(180,232,255,.5);
    background: rgba(255,255,255,.14); color: #fff; font-size: 14px; font-family: inherit; cursor: pointer; }
.topic-filter select option { color: #0269a8; }
.current-datetime { font-size: 13px; color: rgba(230,248,255,.85); letter-spacing: 1px; }

/* ===== 日志卡片 ===== */
.log-list { display: flex; flex-direction: column; gap: 18px; }
.log-card { background: rgba(3,130,200,.5); backdrop-filter: blur(10px); border: 1px solid var(--line-blue);
    border-radius: 16px; padding: 20px 24px; box-shadow: 0 10px 30px rgba(0,40,80,.25); animation: cardIn .35s ease; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.log-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.log-title { font-size: 18px; font-weight: 700; color: #fff; word-break: break-all; }
.log-topic { flex: none; font-size: 12px; padding: 4px 12px; border-radius: 20px;
    background: rgba(255,255,255,.18); border: 1px solid rgba(180,232,255,.5); color: #eaf7ff; white-space: nowrap; }
.log-meta { margin-top: 6px; font-size: 12px; color: rgba(230,248,255,.7); display: flex; gap: 16px; flex-wrap: wrap; }
.log-content { margin-top: 12px; font-size: 14px; line-height: 1.9; color: #eaf7ff;
    white-space: pre-wrap; word-break: break-all; background: rgba(0,40,80,.25);
    border-radius: 10px; padding: 14px 16px; max-height: 320px; overflow-y: auto; }
.log-attachments { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.log-att-img { width: 130px; height: 100px; object-fit: cover; border-radius: 8px; cursor: zoom-in;
    border: 1px solid rgba(180,232,255,.4); transition: .2s; }
.log-att-img:hover { transform: scale(1.04); box-shadow: 0 6px 18px rgba(0,30,60,.5); }
.log-att-file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px;
    background: rgba(255,255,255,.14); border: 1px solid rgba(180,232,255,.4); color: #fff;
    font-size: 13px; text-decoration: none; max-width: 260px; transition: .2s; }
.log-att-file:hover { background: rgba(255,255,255,.28); }
.log-att-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-del { margin-left: 4px; background: none; border: none; color: #ffd9d9; cursor: pointer; font-size: 14px; }
.empty-tip { text-align: center; padding: 60px 0; color: rgba(230,248,255,.75); font-size: 15px; letter-spacing: 2px; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.pagination button { min-width: 38px; height: 36px; padding: 0 10px; border-radius: 8px;
    border: 1px solid rgba(180,232,255,.5); background: rgba(255,255,255,.14); color: #fff;
    font-size: 14px; cursor: pointer; transition: .2s; font-family: inherit; }
.pagination button:hover { background: rgba(255,255,255,.3); }
.pagination button.active { background: #fff; color: #0269a8; font-weight: 700; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination .page-info { font-size: 13px; color: rgba(230,248,255,.8); margin: 0 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: 20px;
    backdrop-filter: blur(6px); overflow-y: auto; }
.mask.show { display: flex; }
.modal { width: 100%; max-width: 460px;
    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: 30px 28px;
    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; max-height: 92vh; overflow-y: auto; }
@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.modal-lg { max-width: 1200px; height: 74vh; max-height: 92vh; display: flex;
    flex-direction: column; padding: 28px; overflow: visible; }
.modal.modal-lg .form-wrap { flex: 1; overflow-y: auto; padding-right: 8px; }
.form-item { margin-bottom: 16px; }
.form-item label { display: block; font-size: 13px; color: #d6f1ff; margin-bottom: 7px; letter-spacing: 1px; }
.form-item label .label-hint { font-size: 12px; opacity: .7; }
.form-item input[type="text"], .form-item input[type="password"], .form-item input[type="email"],
.form-item textarea, .form-item select {
    width: 100%; padding: 11px 14px; border-radius: 8px; border: 1px solid rgba(180,232,255,.45);
    background: rgba(255,255,255,.13); color: #fff; font-size: 14px; font-family: inherit; outline: none; transition: .2s; }
.form-item input:focus, .form-item textarea:focus, .form-item select:focus {
    border-color: #fff; background: rgba(255,255,255,.2); }
.form-item input::placeholder, .form-item textarea::placeholder { color: rgba(230,248,255,.5); }
.form-item input:disabled { opacity: .6; }
.form-item textarea { min-height: 130px; resize: vertical; line-height: 1.7; }
.form-item select option { color: #0269a8; }
.topic-select-row { display: flex; gap: 10px; }
.topic-select-row select { flex: 1; }
.topic-select-row input { flex: 1; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-row img { height: 44px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(180,232,255,.45); }

/* ===== 认证弹窗 ===== */
.auth-modal { max-width: 420px; position: relative; }
/* 标题右侧留出关闭按钮的位置，避免重叠 */
.auth-modal h2 { padding-right: 40px; }
/* 右上角关闭按钮：淡色不抢眼，仅点此按钮才关闭弹窗 */
.auth-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid rgba(230, 248, 255, 0.22); background: rgba(0, 45, 85, 0.14); color: rgba(233, 249, 255, 0.62);
    font-size: 15px; line-height: 1; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all .22s; z-index: 6; padding: 0; font-family: inherit; }
.auth-close:hover { background: rgba(0, 45, 85, 0.32); border-color: rgba(230, 248, 255, 0.55);
    color: #ffffff; transform: rotate(90deg); }
.auth-links { text-align: right; margin: -6px 0 14px; }
.auth-links a { color: #cbe9ff; font-size: 13px; cursor: pointer; text-decoration: none; }
.auth-links a:hover { color: #fff; text-decoration: underline; }
.auth-submit { width: 100%; margin-top: 6px; padding: 13px; border: none; border-radius: 8px;
    background: linear-gradient(90deg, #fff, #d6f1ff); color: #00639f; font-size: 16px; font-weight: 700;
    cursor: pointer; transition: .25s; font-family: inherit; letter-spacing: 3px; }
.auth-submit:hover { box-shadow: 0 8px 22px rgba(0,45,90,.4); transform: translateY(-1px); }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: #cbe9ff; }
.auth-switch a { color: #fff; font-weight: 600; cursor: pointer; text-decoration: underline; }
.auth-msg { margin-top: 12px; font-size: 13px; color: #ffd9d9; min-height: 18px; text-align: center; }

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

/* ===== 添加日志弹窗附件 ===== */
.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,.6);
    background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 14px; font-family: inherit; transition: .25s; }
.attach-picker button:hover { background: rgba(255,255,255,.26); border-style: solid; }
.attach-hint { margin-top: 8px; font-size: 12px; color: rgba(230,248,255,.7); }
.attach-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.attach-preview:empty { margin-top: 0; }
.pending-att-item { position: relative; background: rgba(255,255,255,.12); border-radius: 8px;
    padding: 8px; border: 1px solid rgba(180,232,255,.28); }
.pending-att-item img { width: 100%; height: 80px; object-fit: cover; border-radius: 5px; display: block; }
.pending-file-icon { height: 80px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.pending-att-name { margin-top: 6px; 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,.6); color: #fff; border: none; cursor: pointer; font-size: 14px; line-height: 1;
    display: flex; align-items: center; justify-content: center; }
.pending-remove:hover { background: rgba(200,40,40,.9); }
.modal-btn-group { display: flex; gap: 14px; justify-content: flex-end; margin-top: 16px; }
.modal-btn-group button { padding: 10px 22px; border-radius: 6px; border: none; cursor: pointer;
    font-size: 15px; transition: all .25s; font-family: inherit; }
#cancelBtn { background: rgba(255,255,255,.16); color: #eaf7ff; border: 1px solid rgba(255,255,255,.35); }
#cancelBtn:hover { background: rgba(255,255,255,.3); }
#submitBtn { background: linear-gradient(90deg, #fff, #d6f1ff); color: #00639f; font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,45,90,.3); }
#submitBtn:hover { box-shadow: 0 6px 20px rgba(0,45,90,.45); transform: translateY(-1px); }
#submitBtn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ===== 灯箱 ===== */
.lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(0,20,40,.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,.65); }

/* ===== 登录页（无头部时的居中卡片） ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-page .mask { position: static; display: block; background: none; backdrop-filter: none; padding: 0; overflow: visible; }
.auth-page .modal { display: block; animation: none; }
.auth-page .back-home { display: block; text-align: center; margin-top: 16px; color: #cbe9ff; font-size: 13px;
    text-decoration: none; }
.auth-page .back-home:hover { color: #fff; text-decoration: underline; }

/* ===== 登录页引导卡片（原型布局） ===== */
.landing-page { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
    padding: 24px; z-index: 10; overflow-y: auto; }
.landing-card { width: 100%; max-width: 620px; text-align: center; background: rgba(3,130,200,.5);
    backdrop-filter: blur(12px); border: 1px solid rgba(180,232,255,.4); border-radius: 22px;
    padding: 54px 44px 46px; box-shadow: 0 24px 70px rgba(0,40,80,.45), inset 0 1px 0 rgba(255,255,255,.25);
    animation: landingIn .5s cubic-bezier(.22,1,.36,1); }
@keyframes landingIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.landing-logo { font-size: 62px; line-height: 1; margin-bottom: 18px;
    filter: drop-shadow(0 8px 20px rgba(0,45,90,.5)); }
.landing-title { font-size: 32px; letter-spacing: 4px; color: #fff; text-shadow: 0 4px 18px rgba(0,45,90,.5); }
.landing-sub { margin-top: 12px; font-size: 15px; color: #d6f1ff; letter-spacing: 2px; }
.landing-tip { display: inline-block; margin: 22px 0 26px; padding: 9px 22px; font-size: 13px; color: #eaf7ff;
    background: rgba(255,255,255,.14); border: 1px solid rgba(180,232,255,.45); border-radius: 20px; }
.landing-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.landing-actions button { min-width: 150px; padding: 14px 34px; border-radius: 10px; font-size: 16px;
    font-weight: 700; cursor: pointer; transition: .25s; font-family: inherit; letter-spacing: 3px; }
.btn-primary { border: none; background: linear-gradient(90deg, #fff, #d6f1ff); color: #00639f; }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(0,45,90,.45); transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.12); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.28); transform: translateY(-2px); }
.landing-foot { margin-top: 24px; font-size: 12px; color: rgba(230,248,255,.65); }
/* 登录页弹窗层级高于引导卡片 */
.auth-page .mask, body > .mask.show { z-index: 100; }

/* ===== 滚动条 / 响应式 ===== */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(0,60,105,.5); }
::-webkit-scrollbar-thumb { background: #56a9e0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #8ecbf0; }
@media (max-width: 560px) {
    .modal { padding: 22px 18px; }
    .header h1 { font-size: 16px; }
    .user-name { display: none; }
    .current-datetime { font-size: 12px; }
}
