body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background:#0b1220; color:#e5e7eb; margin:0; padding:24px; }
a { color:#7dd3fc; text-decoration:none; }
a:hover { text-decoration:underline; }
.container { max-width: 1200px; margin: 0 auto; }
.card { background:#111827; border:1px solid #1f2937; border-radius:16px; padding:20px; margin-bottom:20px; box-shadow: 0 10px 25px rgba(0,0,0,.25); }
h1,h2,h3 { margin-top:0; }
.muted { color:#9ca3af; }
.grid { display:grid; grid-template-columns: repeat(7, 1fr); gap:12px; }
.cell { min-height:110px; background:#0f172a; border:1px solid #243041; border-radius:14px; padding:12px; }
.cell.empty { opacity:.35; }
.cell.has-data { border-color:#0ea5e9; background:#0b1b2f; }
.daynum { font-weight:700; margin-bottom:8px; }
.pnl-pos { color:#ef4444; font-weight:700 }
.pnl-neg { color:#22c55e; font-weight:700 }
.pnl-none { color:#94a3b8; }
.kpis { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:12px; }
.kpi { background:#0f172a; border:1px solid #243041; border-radius:12px; padding:12px; }
.table { width:100%; border-collapse: collapse; font-size:14px; }
.table th, .table td { border-bottom:1px solid #243041; padding:10px 8px; text-align:left; vertical-align:top; }
.table th { color:#cbd5e1; background:#0f172a; position:sticky; top:0; }
.badge { display:inline-block; padding:4px 10px; border-radius:999px; background:#1e293b; color:#cbd5e1; font-size:12px; margin-right:6px; }
.footer { color:#94a3b8; font-size:13px; margin-top:20px; }
.search-wrap { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.search-input { flex:1; min-width:240px; padding:12px 14px; border-radius:12px; border:1px solid #334155; background:#0f172a; color:#e5e7eb; }
.search-btn { padding:12px 16px; border-radius:12px; border:1px solid #0ea5e9; background:#0369a1; color:white; cursor:pointer; }
.search-result { margin-top:10px; color:#cbd5e1; }
.list { list-style:none; padding:0; margin:0; }
.list li { padding:10px 0; border-bottom:1px solid #243041; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .cell { min-height:auto; } }
/* 熱力圖 */
.hm-neg3{background:#450a0a!important;border-color:#7f1d1d!important}
.hm-neg2{background:#7f1d1d!important;border-color:#991b1b!important}
.hm-neg1{background:#b91c1c!important;border-color:#c2410c!important}
.hm-zero{background:#1f2937!important}
.hm-pos1{background:#15803d!important;border-color:#16a34a!important}
.hm-pos2{background:#166534!important;border-color:#15803d!important}
.hm-pos3{background:#14532d!important;border-color:#166534!important}
/* 月份導航 */
.month-nav{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.month-nav a{padding:8px 16px;background:#1f2937;border-radius:8px;color:#e5e7eb;text-decoration:none;font-weight:600}
.month-nav a:hover{background:#374151;text-decoration:none}
/* 視圖切換 */
.view-toggle{display:flex;gap:8px;margin-bottom:16px}
.view-btn{padding:8px 14px;border-radius:8px;border:1px solid #334155;background:#0f172a;color:#9ca3af;cursor:pointer;font-size:13px}
.view-btn.active{background:#0369a1;border-color:#0ea5e9;color:white}
/* 列表視圖 */
.day-list-item{display:flex;justify-content:space-between;align-items:center;padding:12px;background:#0f172a;border:1px solid #243041;border-radius:12px;margin-bottom:8px;text-decoration:none;color:#e5e7eb}
.day-list-item:hover{background:#1e293b;text-decoration:none}
.day-list-item .dl-date{font-weight:600}
.day-list-item .dl-pnl{font-weight:700}
.day-list-meta{flex:1;margin-left:16px;color:#9ca3af;font-size:13px}
/* 當日總結 */
.month-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-bottom:16px}
.ms-card{background:#0f172a;border:1px solid #243041;border-radius:12px;padding:12px}
.ms-card .ms-label{font-size:12px;color:#94a3b8;margin-bottom:4px}
.ms-card .ms-val{font-size:18px;font-weight:700}
.ms-winner{color:#34d399}
.ms-loser{color:#f87171}
/* 匯出按鈕 */
.export-bar{margin-bottom:12px}
/* 股票代號外部連結 */
.ext-link{color:#7dd3fc;font-size:12px;margin-left:4px}
/* 統計卡 */
.stat-card{background:#0f172a;border:1px solid #243041;border-radius:12px;padding:16px}
.stat-card .sc-label{font-size:12px;color:#94a3b8;margin-bottom:6px}
.stat-card .sc-val{font-size:22px;font-weight:800}
.sc-pos{color:#ef4444}
.sc-neg{color:#22c55e}
.stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:16px}
/* 甜甜圈圖 */
.donut-wrap{display:flex;gap:24px;align-items:center;flex-wrap:wrap}
.donut-wrap canvas{max-width:220px}
/* 備註編輯 */
.note-area{width:100%;min-height:80px;background:#0f172a;border:1px solid #334155;border-radius:10px;color:#e5e7eb;padding:10px;font-family:inherit;font-size:14px;resize:vertical;box-sizing:border-box}
.note-save-btn{margin-top:8px;padding:8px 18px;background:#0369a1;border:none;border-radius:8px;color:white;cursor:pointer;font-size:14px}
.note-saved{color:#34d399;font-size:13px;margin-top:6px}
/* 股標標籤 */
.tag{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;margin-left:6px}
.tag-dt{background:#7c3aed;color:#e5e7eb}
.tag-lt{background:#0369a1;color:#e5e7eb}
.tag-core{background:#b45309;color:#e5e7eb}
/* 價格提醒 */
.alert-row{display:flex;gap:10px;align-items:center;margin-bottom:10px;flex-wrap:wrap}
.alert-row input{padding:8px 12px;border-radius:8px;border:1px solid #334155;background:#0f172a;color:#e5e7eb;flex:1;min-width:100px}
.alert-row select{padding:8px 12px;border-radius:8px;border:1px solid #334155;background:#0f172a;color:#e5e7eb}
.alert-row .btn-add{padding:8px 16px;background:#0369a1;border:none;border-radius:8px;color:white;cursor:pointer}
.alert-item{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#0f172a;border:1px solid #243041;border-radius:8px;margin-bottom:6px}
.alert-item .ai-code{font-weight:700}
.alert-item .ai-price{color:#94a3b8}
.alert-item .ai-del{background:none;border:none;color:#f87171;cursor:pointer;font-size:16px}