
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial,"Microsoft YaHei",sans-serif;
  background:#f4f6fb;
  color:#111827;
}
.topbar{
  height:48px;
  background:#111827;
  color:white;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px;
  font-size:15px;
}
.top-stats b{color:#93c5fd}
.top-stats a{color:#bfdbfe;text-decoration:none}
.layout{
  display:grid;
  grid-template-columns:250px 1fr;
  min-height:calc(100vh - 48px);
}
.sidebar{
  background:#ffffff;
  border-right:1px solid #e5e7eb;
  padding:18px;
  position:sticky;
  top:48px;
  height:calc(100vh - 48px);
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:24px;
}
.logo{
  width:40px;
  height:40px;
  border-radius:14px;
  background:#2563eb;
  color:white;
  display:grid;
  place-items:center;
  font-weight:800;
}
.brand h2{margin:0;font-size:18px}
.brand p{margin:3px 0 0;color:#6b7280;font-size:12px}
.menu{display:flex;flex-direction:column;gap:8px}
.menu a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:12px;
  color:#374151;
  text-decoration:none;
  transition:.15s;
}
.menu a:hover{background:#f3f4f6}
.menu a.active{
  background:#eaf1ff;
  color:#1d4ed8;
}
.menu a span{width:22px}
.menu a b{flex:1;font-size:14px}
.menu a em{
  font-style:normal;
  background:#e5e7eb;
  border-radius:999px;
  padding:2px 8px;
  font-size:12px;
}
.menu a.active em{background:#bfdbfe;color:#1e40af}
.main{padding:22px;min-width:0}
.page-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}
.page-head h1{margin:0;font-size:26px}
.page-head p{margin:6px 0 0;color:#6b7280}
.head-btn{
  background:#2563eb;
  color:white;
  border:none;
  border-radius:12px;
  padding:10px 14px;
  text-decoration:none;
  font-size:14px;
  cursor:pointer;
}
.card{
  background:white;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  padding:18px;
}
.pager-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:white;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(15,23,42,.05);
  padding:10px 14px;
  margin-bottom:14px;
  color:#374151;
  font-size:13px;
}
.pager-bar form{
  display:flex;
  align-items:center;
  gap:8px;
}
.pager-bar select{
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:7px 9px;
  background:white;
}
.pager-info{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.pager-info a{
  color:#2563eb;
  text-decoration:none;
  font-weight:800;
}
.holiday-legend{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:-6px 0 14px;
  color:#374151;
  font-size:13px;
}
.holiday-legend span{
  display:flex;
  align-items:center;
  gap:6px;
  background:white;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:6px 10px;
  box-shadow:0 4px 14px rgba(15,23,42,.04);
}
.legend-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}
.legend-dot.cn{background:#fecaca}
.legend-dot.co{background:#fde68a}
.legend-dot.both{background:#ddd6fe}
.stat-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin-bottom:16px;
}
.stat-card{
  background:white;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  padding:18px;
}
.stat-card span{color:#6b7280;font-size:13px}
.stat-card strong{display:block;font-size:30px;margin-top:6px}
.danger-soft strong{color:#dc2626}
.success-soft strong{color:#16a34a}
.monthnav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.monthnav h2{margin:0;font-size:22px}
.monthnav a{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#f3f4f6;
  color:#111827;
  text-decoration:none;
  font-size:22px;
}
.week,.calendar{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:8px;
}
.week{
  margin-bottom:8px;
  color:#6b7280;
  font-weight:700;
  font-size:13px;
}
.week div{text-align:center}
.day{
  background:#f9fafb;
  border:1px solid #edf0f5;
  border-radius:14px;
  min-height:82px;
  padding:8px;
  cursor:pointer;
  transition:.15s;
}
.day:hover{
  background:#eef4ff;
  border-color:#bfdbfe;
  transform:translateY(-1px);
}
.day.mute{opacity:.35}
.day.today{
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.12) inset;
}
.day.holiday-cn{
  background:#fff1f2;
  border-color:#fecdd3;
}
.day.holiday-co{
  background:#fffbeb;
  border-color:#fde68a;
}
.day.holiday-both{
  background:#f5f3ff;
  border-color:#ddd6fe;
}
.holiday-tag{
  margin-top:5px;
  padding:3px 6px;
  border-radius:8px;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.holiday-tag.cn{
  background:#fecaca;
  color:#991b1b;
}
.holiday-tag.co{
  background:#fde68a;
  color:#92400e;
}
.day-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.num{font-weight:800}
.plus{
  width:20px;
  height:20px;
  border-radius:999px;
  background:#e5e7eb;
  display:grid;
  place-items:center;
  font-size:14px;
  color:#374151;
}
.day:hover .plus{
  background:#2563eb;
  color:white;
}
.mini{
  margin-top:5px;
  padding:3px 6px;
  border-radius:8px;
  background:#dbeafe;
  color:#1e3a8a;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mini.ok{
  background:#dcfce7;
  color:#166534;
}
.more{
  margin-top:4px;
  color:#6b7280;
  font-size:12px;
}
.gantt-card{padding:0;overflow:hidden}
.gantt-head{
  display:grid;
  grid-template-columns:300px 1fr 150px;
  gap:14px;
  padding:14px 18px;
  background:#f8fafc;
  border-bottom:1px solid #e5e7eb;
  font-weight:800;
  color:#374151;
}
.gantt-row{
  display:grid;
  grid-template-columns:300px 1fr 150px;
  gap:14px;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid #edf0f5;
  cursor:pointer;
  transition:.12s;
}
.gantt-row:hover{background:#f8fbff}
.gantt-row:last-child{border-bottom:none}
.gantt-info strong{font-size:15px}
.gantt-info span{display:block;color:#6b7280;font-size:12px;margin-top:5px}
.gantt-info p{
  margin:6px 0 0;
  color:#4b5563;
  font-size:13px;
  max-width:260px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.muted-text{color:#9ca3af!important}
.gantt-track{
  height:24px;
  border-radius:999px;
  background:repeating-linear-gradient(
    to right,
    #eef2ff 0,
    #eef2ff 28px,
    #f8fafc 28px,
    #f8fafc 56px
  );
  overflow:hidden;
}
.gantt-bar{
  height:100%;
  border-radius:999px;
  background:#2563eb;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-size:12px;
  font-weight:800;
  min-width:90px;
}
.gantt-actions{display:flex;gap:8px;flex-wrap:wrap}
.gantt-actions button,
.actions button,
button{
  border:none;
  background:#2563eb;
  color:white;
  border-radius:10px;
  padding:8px 12px;
  cursor:pointer;
}
button.danger{background:#dc2626}
button.void{background:#6b7280}
button:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.list-card{padding:8px 18px}
.task-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid #edf0f5;
  cursor:pointer;
}
.task-row:last-child{border-bottom:none}
.task-row:hover{background:#f8fbff}
.task-row.overdue strong{color:#dc2626}
.task-row strong{font-size:15px}
.task-row p{
  margin:5px 0;
  color:#4b5563;
}
.task-row span{
  color:#6b7280;
  font-size:13px;
}
.task-row.done strong{color:#16a34a}
.task-row.voided strong{color:#6b7280;text-decoration:line-through}
.actions{display:flex;gap:8px;flex-wrap:wrap}
.empty{
  padding:24px;
  text-align:center;
  color:#6b7280;
}
.diary-layout{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:16px;
}
.diary-side{
  background:white;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  padding:14px;
  height:calc(100vh - 150px);
  overflow:auto;
}
.diary-new{
  display:block;
  background:#2563eb;
  color:white;
  text-decoration:none;
  padding:11px;
  border-radius:12px;
  text-align:center;
  font-weight:800;
  margin-bottom:12px;
}
.diary-item{
  display:block;
  text-decoration:none;
  color:#111827;
  border-radius:12px;
  padding:10px;
  margin-bottom:8px;
  background:#f9fafb;
}
.diary-item.active{
  background:#eaf1ff;
  color:#1d4ed8;
}
.diary-item strong{display:block;font-size:14px}
.diary-item span{
  display:block;
  color:#6b7280;
  font-size:12px;
  margin-top:5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.diary-empty{
  color:#6b7280;
  text-align:center;
  padding:18px;
}
.diary-editor label,
.user-create label{
  display:block;
  font-weight:800;
  margin:12px 0 6px;
}
.diary-editor input,
.user-create input,
.user-create select{
  width:220px;
  border:1px solid #d1d5db;
  border-radius:12px;
  padding:11px;
  font-family:inherit;
}
.diary-editor textarea{
  width:100%;
  min-height:420px;
  border:1px solid #d1d5db;
  border-radius:14px;
  padding:14px;
  font-family:inherit;
  line-height:1.65;
  resize:vertical;
}
.diary-editor button,
.user-create button{
  margin-top:12px;
}
.delete-diary-form{
  margin-top:10px;
}
.user-layout{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:16px;
}
.user-create h2,
.user-list h2{
  margin-top:0;
}
.user-create input,
.user-create select{
  width:100%;
}
.user-row{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-bottom:1px solid #edf0f5;
}
.user-row:last-child{border-bottom:none}
.user-row p{
  margin:5px 0 0;
  color:#6b7280;
  font-size:13px;
}
.user-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.user-actions form{
  display:flex;
  gap:6px;
  align-items:center;
}
.user-actions input{
  width:120px;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:8px;
}
.modal{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:20;
}
.modal.show{display:flex}
.modal-card{
  width:min(480px,100%);
  background:white;
  border-radius:20px;
  padding:20px;
  box-shadow:0 18px 50px rgba(15,23,42,.20);
}
.detail-card{
  width:min(560px,100%);
}
.modal-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.modal-head h2{margin:0;font-size:20px}
.modal-head p{margin:6px 0 0;color:#6b7280;font-size:13px}
.close{
  width:34px;
  height:34px;
  border-radius:999px;
  background:#f3f4f6;
  color:#111827;
  font-size:20px;
  padding:0;
}
.modal-form label,
.detail-line label{
  display:block;
  margin:12px 0 6px;
  font-weight:700;
  font-size:14px;
}
.modal-form input,
.modal-form textarea{
  width:100%;
  border:1px solid #d1d5db;
  border-radius:12px;
  padding:11px;
  font-family:inherit;
}
.modal-form textarea{
  height:92px;
  resize:vertical;
}
.modal-form button[type="submit"]{
  width:100%;
  padding:12px;
  margin-top:14px;
}
.date-box{
  width:180px;
  border:1px solid #d1d5db;
  border-radius:12px;
  padding:11px;
  background:#f9fafb;
  font-weight:800;
}
.note-box{
  width:100%;
  min-height:56px;
  border:1px solid #d1d5db;
  border-radius:12px;
  padding:12px;
  background:#f9fafb;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.55;
}
.login-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  background:#f4f6fb;
}
.login-card{
  width:min(420px,92vw);
  background:white;
  border-radius:22px;
  box-shadow:0 18px 50px rgba(15,23,42,.12);
  padding:28px;
}
.login-logo{
  width:48px;
  height:48px;
  border-radius:16px;
  background:#2563eb;
  color:white;
  display:grid;
  place-items:center;
  font-weight:900;
  font-size:20px;
}
.login-card h1{
  margin:16px 0 4px;
}
.login-card p{
  margin:0 0 18px;
  color:#6b7280;
}
.login-card label{
  display:block;
  font-weight:800;
  margin:12px 0 6px;
}
.login-card input{
  width:100%;
  border:1px solid #d1d5db;
  border-radius:12px;
  padding:12px;
}
.login-card button{
  width:100%;
  padding:12px;
  margin-top:16px;
}
.login-error{
  background:#fee2e2;
  color:#991b1b;
  border-radius:12px;
  padding:10px;
  margin-bottom:12px;
}
@media(max-width:900px){
  .pager-bar{flex-direction:column;align-items:flex-start}
  .layout{grid-template-columns:1fr}
  .sidebar{
    position:static;
    height:auto;
    border-right:none;
    border-bottom:1px solid #e5e7eb;
  }
  .menu{flex-direction:row;overflow:auto}
  .menu a{min-width:150px}
  .calendar{gap:6px}
  .day{min-height:72px;padding:6px}
  .gantt-head{display:none}
  .gantt-row{grid-template-columns:1fr;gap:8px}
  .stat-grid{grid-template-columns:1fr}
  .diary-layout{grid-template-columns:1fr}
  .diary-side{height:auto}
  .user-layout{grid-template-columns:1fr}
}
