:root { --bg:#f6f7fb; --card:#fff; --text:#172033; --muted:#6b7280; --line:#e5e7eb; --primary:#2563eb; --ok:#16a34a; --warn:#d97706; --danger:#dc2626; }
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background:var(--bg); color:var(--text); }
.app { display:flex; min-height:100vh; }
.sidebar { width:240px; background:#0f172a; color:white; padding:22px 16px; position:fixed; inset:0 auto 0 0; }
.sidebar h1 { font-size:20px; margin:0 0 24px; }
.nav { width:100%; display:block; margin:8px 0; padding:12px 14px; border:0; border-radius:12px; background:transparent; color:#cbd5e1; text-align:left; cursor:pointer; font-size:15px; }
.nav:hover,.nav.active { background:#1d4ed8; color:#fff; }
.hint { position:absolute; left:16px; right:16px; bottom:18px; color:#94a3b8; font-size:12px; line-height:1.5; }
main { margin-left:240px; flex:1; padding:24px; }
header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
h2 { margin:0; font-size:28px; }
p { color:var(--muted); }
.monthBox { display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px 14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px; box-shadow:0 8px 28px rgba(15,23,42,.04); margin-bottom:18px; }
.grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:16px; }
.grid2 { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:16px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px; }
.stat b { display:block; font-size:30px; margin:8px 0; }
.stat span { color:var(--muted); font-size:14px; }
.toolbar { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0 16px; }
button,.btn { border:0; border-radius:10px; padding:10px 14px; background:var(--primary); color:white; cursor:pointer; font-weight:600; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button.secondary { background:#e5e7eb; color:#111827; }
button.danger { background:var(--danger); }
button.ok { background:var(--ok); }
button.warn { background:var(--warn); }
input,select,textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:10px 12px; font:inherit; background:white; }
textarea { min-height:82px; resize:vertical; }
.form { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px; }
.form .wide { grid-column:1 / -1; }
label { display:block; color:#374151; font-size:13px; margin-bottom:6px; }
table { width:100%; border-collapse:collapse; background:var(--card); border-radius:14px; overflow:hidden; }
th,td { padding:12px; border-bottom:1px solid var(--line); text-align:left; font-size:14px; vertical-align:top; }
th { background:#f8fafc; color:#374151; font-weight:700; }
.badge { display:inline-block; padding:4px 8px; border-radius:999px; font-size:12px; background:#e0e7ff; color:#3730a3; }
.badge.ok { background:#dcfce7; color:#166534; }
.badge.warn { background:#fef3c7; color:#92400e; }
.badge.danger { background:#fee2e2; color:#991b1b; }
.actions { display:flex; gap:6px; flex-wrap:wrap; }
.small { font-size:12px; color:var(--muted); }
#toast { position:fixed; right:24px; bottom:24px; background:#111827; color:white; padding:12px 16px; border-radius:12px; opacity:0; transform:translateY(20px); transition:.2s; }
#toast.show { opacity:1; transform:translateY(0); }
@media (max-width: 1000px) { .sidebar{position:static;width:100%;}.app{display:block;}main{margin-left:0}.grid,.grid2,.form{grid-template-columns:1fr;} header{display:block}.monthBox{margin-top:12px;} }
.loginPage { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#0f172a,#1d4ed8); padding:24px; }
.loginCard { width:min(440px, 100%); background:white; border-radius:24px; padding:32px; box-shadow:0 30px 80px rgba(15,23,42,.35); }
.loginCard .brand { display:inline-block; background:#eff6ff; color:#1d4ed8; border-radius:999px; padding:6px 12px; font-weight:700; margin-bottom:16px; }
.loginCard h1 { margin:0 0 8px; font-size:30px; }
.loginCard p { margin:0 0 20px; line-height:1.6; }
.loginCard input { margin-bottom:14px; }
.loginCard button { width:100%; margin-top:4px; padding:12px 14px; }
.loginMsg { background:#fee2e2; color:#991b1b; border-radius:12px; padding:10px 12px; margin-bottom:14px; }
.demoBox { margin-top:16px; color:#64748b; background:#f8fafc; border:1px solid #e5e7eb; border-radius:14px; padding:12px; font-size:12px; line-height:1.6; }
.logout { background:#334155; color:#e2e8f0; margin-top:10px; padding:8px 10px; font-size:12px; }
.sectionHead { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px; }
.sectionHead h3 { margin:0 0 4px; }
.sectionHead p { margin:0; }
.todoGrid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.todoCard { background:#f8fafc; color:var(--text); border:1px solid var(--line); border-radius:16px; padding:16px; text-align:left; display:block; }
.todoCard:hover { border-color:#93c5fd; background:#eff6ff; }
.todoCard span { color:var(--muted); font-size:13px; display:block; }
.todoCard b { display:block; font-size:28px; margin:6px 0; }
.todoCard em { color:var(--muted); font-style:normal; font-size:12px; line-height:1.4; display:block; }
.todoCard.danger { background:#fef2f2; border-color:#fecaca; }
.projectGrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.projectCard { border:1px solid var(--line); border-radius:16px; padding:14px; background:#fff; }
.projectTop { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.projectMetrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.projectMetrics span { background:#f8fafc; border-radius:12px; padding:10px; color:var(--muted); font-size:12px; }
.projectMetrics b { display:block; color:var(--text); font-size:18px; margin-top:4px; }
.dangerText { color:#991b1b !important; background:#fef2f2 !important; }
.activityList { display:flex; flex-direction:column; gap:10px; }
.activityItem { border-left:3px solid #bfdbfe; background:#f8fafc; border-radius:10px; padding:10px 12px; }
.activityItem span { color:#1d4ed8; font-size:12px; font-weight:700; }
.activityItem b { display:block; margin:3px 0; }
.activityItem em { color:var(--muted); font-style:normal; font-size:12px; }
@media (max-width: 1000px) { .todoGrid,.projectGrid,.projectMetrics{grid-template-columns:1fr;} .sectionHead{display:block;} }
.weekBoard { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; align-items:stretch; }
.dayCol { min-height:220px; background:#f8fafc; border:1px solid var(--line); border-radius:16px; padding:10px; }
.dayCol h4 { margin:0 0 10px; font-size:14px; color:#111827; }
.scheduleItem { background:white; border:1px solid #dbeafe; border-left:4px solid #2563eb; border-radius:12px; padding:9px; margin-bottom:8px; box-shadow:0 4px 12px rgba(15,23,42,.04); }
.scheduleItem.auto { border-left-color:#f59e0b; border-color:#fde68a; }
.scheduleItem b { display:block; font-size:13px; margin-bottom:3px; }
.scheduleItem em { display:block; color:var(--muted); font-style:normal; font-size:11px; line-height:1.4; }
.scheduleItem span { display:inline-block; margin-top:4px; font-size:11px; color:#1d4ed8; font-weight:700; }
.scheduleItem p { margin:5px 0 0; color:#64748b; font-size:12px; line-height:1.4; }
.empty { color:#94a3b8; font-size:12px; margin:0; }
button.mini { margin-top:6px; padding:4px 8px; border-radius:8px; font-size:11px; background:#e5e7eb; color:#374151; }
@media (max-width: 1200px) { .weekBoard { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .weekBoard { grid-template-columns:1fr; } }
