* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f7fa; color: #2c3e50; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.btn { display: inline-block; padding: 8px 16px; border-radius: 4px; font-size: 14px; cursor: pointer; background: #fff; color: #606266; border: 1px solid #dcdfe6; }
.btn-primary { background: #409eff; color: #fff; border-color: #409eff; }
.btn-primary:hover { background: #66b1ff; }
.btn-danger { background: #fff; color: #f56c6c; border-color: #fbc4c4; }
.btn-danger:hover { background: #fef0f0; }
.btn-default:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.btn-block { display: block; width: 100%; text-align: center; padding: 10px; margin-top: 8px; }
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert.error { background: #fef0f0; color: #f56c6c; border: 1px solid #fbc4c4; }
.alert.success { background: #f0f9eb; color: #67c23a; border: 1px solid #c2e7b0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: #606266; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 14px; font-family: inherit; background: #fff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: #409eff; }
.hint, .char-count { font-size: 12px; color: #909399; margin-top: 4px; }
.char-count { text-align: right; }
.autosave-status { display: none; font-size: 12px; color: #67c23a; margin-top: 8px; }
.autosave-status.show { display: block; }

.ui-web .navbar { height: 56px; background: #2c3e50; color: #fff; display: flex; align-items: center; padding: 0 32px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.ui-web .navbar .brand { font-size: 18px; font-weight: 600; }
.ui-web .navbar .spacer { flex: 1; }
.ui-web .navbar .nav-item { color: #cfd8dc; margin-left: 24px; font-size: 14px; }
.ui-web .navbar .nav-item:hover { color: #fff; }
.ui-web .navbar .nav-item.muted { color: #909399; cursor: default; }
.ui-web .container { min-height: calc(100vh - 56px); }

.auth-wrap { max-width: 420px; margin: 60px auto; padding: 0 20px; }
.auth-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 32px; }
.auth-title { font-size: 22px; font-weight: 600; margin-bottom: 24px; text-align: center; }
.auth-hint { font-size: 12px; color: #909399; text-align: center; margin-top: 16px; line-height: 1.6; }
.ui-mobile .auth-wrap { margin: 20px auto; }

.ui-web .cal-wrap { display: flex; min-height: calc(100vh - 56px); }
.ui-web .cal-sidebar { width: 240px; background: #fff; border-right: 1px solid #e4e7ed; padding: 24px; }
.ui-web .cal-sidebar h3 { font-size: 13px; color: #909399; letter-spacing: 1px; margin-bottom: 16px; }
.ui-web .cal-picker label { display: block; font-size: 13px; color: #606266; margin: 8px 0 6px; }
.ui-web .cal-picker select { width: 100%; padding: 8px; border: 1px solid #dcdfe6; border-radius: 4px; margin-bottom: 8px; }
.ui-web .cal-side-stats { margin: 16px 0; font-size: 13px; color: #606266; }
.ui-web .cal-main { flex: 1; padding: 32px; overflow: auto; }
.ui-web .cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.ui-web .cal-month-title { font-size: 26px; font-weight: 300; color: #303133; }
.ui-web .cal-nav { display: flex; gap: 8px; }
.ui-web .cal-grid { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); overflow: hidden; }
.ui-web .cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: #fafafa; border-bottom: 1px solid #e4e7ed; }
.ui-web .cal-weekdays div { padding: 12px; text-align: center; font-size: 12px; color: #909399; font-weight: 600; }
.ui-web .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: 130px; }
.ui-web .cal-day { border-right: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; padding: 8px; display: block; color: #606266; transition: background 0.15s; overflow: hidden; min-height: 0; }
.ui-web .cal-day:hover { background: #f5f7fa; color: #409eff; }
.ui-web .cal-day.other { background: #fafafa; }
.ui-web .cal-day .date-num { font-size: 13px; color: #606266; margin-bottom: 4px; }
.ui-web .cal-day.today .date-num { background: #409eff; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.ui-web .cal-day .entry-title { font-size: 12px; color: #409eff; line-height: 2; padding: 2px 4px; background: #ecf5ff; border-radius: 3px; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; overflow-wrap: break-word; width: 0; min-width: 100%; box-sizing: border-box; }

.ui-web .log-view-wrap { max-width: 860px; margin: 0 auto; padding: 0 40px 60px; }
.ui-web .breadcrumb { padding: 20px 0; font-size: 13px; color: #909399; }
.ui-web .breadcrumb a { color: #606266; }
.ui-web .breadcrumb a:hover { color: #409eff; }
.ui-web .log-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 40px; }
.log-date { font-size: 13px; color: #909399; margin-bottom: 8px; }
.log-title { font-size: 26px; font-weight: 600; color: #303133; margin-bottom: 12px; line-height: 1.4; }
.log-meta { font-size: 12px; color: #c0c4cc; margin-bottom: 16px; }
.log-content { font-size: 15px; line-height: 1.85; color: #424242; white-space: pre-wrap; word-wrap: break-word; }
.ui-web .log-actions { display: flex; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #ebeef5; }
.ui-web .log-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.log-form textarea { min-height: 360px; resize: vertical; line-height: 1.7; }

.ui-mobile { background: #f5f7fa; }
.ui-mobile .m-header { height: 52px; background: #2c3e50; color: #fff; display: flex; align-items: center; padding: 0 12px; position: sticky; top: 0; z-index: 10; }
.ui-mobile .m-back, .ui-mobile .m-action { min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; text-decoration: none; }
.ui-mobile .m-title { flex: 1; text-align: center; font-size: 16px; }
.ui-mobile .m-content { min-height: calc(100vh - 52px - 56px); padding-bottom: 56px; }
.ui-mobile .m-tabbar { position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: #fff; border-top: 1px solid #ebeef5; display: flex; z-index: 10; }
.ui-mobile .m-tabbar .m-tab { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #909399; }
.ui-mobile .m-tabbar .m-tab.active { color: #409eff; }

.ui-mobile .m-cal-bar { background: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ebeef5; }
.ui-mobile .m-cal-nav { width: 36px; height: 36px; font-size: 22px; color: #606266; display: flex; align-items: center; justify-content: center; }
.ui-mobile .m-cal-title { font-size: 18px; font-weight: 600; }
.ui-mobile .m-cal-grid { background: #fff; padding: 8px 4px; }
.ui-mobile .m-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 0; }
.ui-mobile .m-cal-weekdays div { text-align: center; font-size: 11px; color: #909399; }
.ui-mobile .m-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.ui-mobile .m-cal-day { aspect-ratio: 1; border-top: 1px solid #f0f2f5; display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.ui-mobile .m-cal-day .num { font-size: 13px; color: #606266; }
.ui-mobile .m-cal-day.other .num { color: #c0c4cc; }
.ui-mobile .m-cal-day.today .num { background: #409eff; color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.ui-mobile .m-cal-day.has-entry .num { color: #409eff; font-weight: 600; }
.ui-mobile .m-cal-day .dot { width: 4px; height: 4px; border-radius: 50%; background: #409eff; margin-top: 3px; }
.ui-mobile .m-list { background: #fff; margin-top: 12px; }
.ui-mobile .m-list-header { padding: 12px 16px; font-size: 13px; color: #909399; border-bottom: 1px solid #ebeef5; }
.ui-mobile .m-list-empty { padding: 32px; text-align: center; color: #c0c4cc; font-size: 14px; }
.ui-mobile .m-list-item { display: block; padding: 16px; border-bottom: 1px solid #f5f7fa; }
.ui-mobile .m-list-item:active { background: #f5f7fa; }
.ui-mobile .m-list-item .li-date { font-size: 12px; color: #909399; margin-bottom: 4px; }
.ui-mobile .m-list-item .li-title { font-size: 15px; color: #303133; font-weight: 500; margin-bottom: 4px; }
.ui-mobile .m-list-item .li-preview { font-size: 13px; color: #909399; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-mobile .m-fab { position: fixed; right: 16px; bottom: 72px; width: 52px; height: 52px; background: #409eff; color: #fff; border-radius: 50%; font-size: 28px; box-shadow: 0 4px 12px rgba(64,158,255,0.4); display: flex; align-items: center; justify-content: center; z-index: 10; }

.ui-mobile .m-log-view, .ui-mobile .m-log-form { padding: 20px 16px; }
.ui-mobile .log-title { font-size: 22px; }
.ui-mobile .log-content { line-height: 1.8; }
.ui-mobile .log-form textarea { min-height: 280px; }
.ui-mobile .m-action-bar { position: fixed; bottom: 56px; left: 0; right: 0; background: #fff; border-top: 1px solid #ebeef5; display: flex; padding: 8px 12px; gap: 8px; box-shadow: 0 -2px 8px rgba(0,0,0,0.04); z-index: 10; }
.ui-mobile .m-action-bar .m-btn { flex: 1; height: 40px; border-radius: 6px; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.ui-mobile .m-btn.primary { background: #409eff; color: #fff; }
.ui-mobile .m-btn.danger { background: #fff; color: #f56c6c; border: 1px solid #fbc4c4; }
.ui-mobile .m-btn.default { background: #fff; color: #606266; border: 1px solid #dcdfe6; }