﻿:root { --bg:#f6f7f9; --panel:#fff; --line:#e3e6ea; --text:#222; --muted:#667; --accent:#2563eb; --danger:#dc2626; }
* { box-sizing:border-box; }
body { margin:0; font-family:system-ui,"Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); }
.topbar { display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:12px 18px; background:var(--panel); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.topbar h1 { font-size:18px; margin:0; }
.trip-bar { display:flex; gap:8px; align-items:center; margin-left:auto; }
select, input, textarea { font:inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:#fff; }
select { min-width:160px; }
.btn { padding:6px 12px; border:1px solid var(--line); background:#fff; border-radius:6px; cursor:pointer; font:inherit; }
.btn:hover { border-color:#c9ced6; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.danger { color:var(--danger); }
.tabs { display:flex; gap:4px; padding:10px 18px 0; flex-wrap:wrap; }
.tabs button { border:1px solid transparent; background:transparent; padding:8px 14px; border-radius:6px 6px 0 0; cursor:pointer; font:inherit; color:var(--muted); }
.tabs button.active { background:var(--panel); border-color:var(--line); border-bottom-color:var(--panel); color:var(--text); font-weight:600; }
.layout { display:grid; grid-template-columns:260px minmax(0,1fr); max-width:1240px; margin:0 auto; min-height:calc(100vh - 108px); }
.trip-list { background:var(--panel); border-right:1px solid var(--line); padding:12px; }
.trip-item { margin-bottom:8px; }
.trip-item button { width:100%; text-align:left; border:1px solid transparent; background:transparent; padding:8px 10px; border-radius:6px; cursor:pointer; font:inherit; color:var(--text); }
.trip-item button:hover { background:#f1f5f9; }
.trip-item.active button { background:#eef2ff; border-color:#c7d2fe; color:#3730a3; }
.trip-item-meta { font-size:12px; color:var(--muted); padding:0 10px 6px; word-break:break-all; }
.view { padding:18px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:12px 14px; margin-bottom:10px; }
.card h3 { margin:0 0 6px; font-size:15px; }
.card .meta { color:var(--muted); font-size:13px; display:flex; gap:12px; flex-wrap:wrap; margin-bottom:6px; }
.card .body { white-space:pre-wrap; font-size:14px; }
.card .row-actions { margin-top:8px; display:flex; gap:8px; }
.tag { display:inline-block; padding:1px 8px; border-radius:10px; background:#eef2ff; color:#3730a3; font-size:12px; }
.overview-stats { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.overview-stats .stat { background:var(--panel); border:1px solid var(--line); border-radius:8px; padding:12px 16px; min-width:120px; }
.overview-stats .stat b { display:block; font-size:22px; }
.overview-stats .stat span { color:var(--muted); font-size:13px; }
.toolbar { display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; align-items:center; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; z-index:20; padding:18px; }
.modal.hidden { display:none; }
.modal-box { background:#fff; border-radius:8px; width:min(560px,100%); max-height:90vh; overflow:auto; }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid var(--line); font-weight:600; }
.modal-head .icon { border:none; background:none; font-size:22px; cursor:pointer; color:var(--muted); }
#form { padding:16px; display:grid; gap:12px; }
#form label { display:block; font-size:13px; color:var(--muted); margin-bottom:4px; }
#form input, #form textarea, #form select { width:100%; }
#form textarea { min-height:80px; resize:vertical; }
.form-actions { display:flex; gap:8px; justify-content:flex-end; }
.empty { color:var(--muted); text-align:center; padding:40px 0; }
.export-result { margin-top:12px; font-size:13px; color:var(--muted); word-break:break-all; }
@media (max-width:760px){
  .layout{grid-template-columns:1fr;}
  .trip-list{border-right:none;border-bottom:1px solid var(--line);max-height:180px;overflow:auto;}
}

.overview-stats .stat-sub { color:var(--muted); font-size:12px; margin-top:4px; }
.progress { height:8px; background:#eef2ff; border-radius:4px; overflow:hidden; margin-top:6px; }
.progress-fill { height:100%; background:var(--accent); }
.events { margin-top:6px; }
.event-row { display:flex; gap:8px; align-items:center; font-size:13px; color:var(--muted); }
.event-row-edit { display:grid; grid-template-columns:150px 1fr 32px; gap:8px; align-items:center; margin-bottom:6px; }
.event-row-edit input { width:100%; }
.event-row-edit .btn.icon { padding:4px 6px; line-height:1; }
.event-date { color:var(--accent); font-weight:600; min-width:86px; }
.event-note { color:var(--text); }
.compact-row { display:flex; gap:10px; align-items:baseline; padding:6px 0; border-bottom:1px solid var(--line); font-size:13px; }
.compact-row:last-child { border-bottom:none; }
.compact-date { color:var(--muted); min-width:90px; }
.tag-row { display:flex; gap:8px; flex-wrap:wrap; }
.body-snippet { color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
