* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
       background: #f4f6f9; color: #1f2733; font-size: 14px; }
a { color: #2f7cf6; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display: flex; align-items: center; gap: 18px; background: #12315e;
          color: #fff; padding: 0 20px; height: 52px; flex-wrap: wrap; }
.topbar .brand a { color: #fff; font-weight: 700; font-size: 16px; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: #cdd9ec; padding: 6px 10px; border-radius: 6px; }
.topbar nav a:hover { background: #1d447e; color: #fff; text-decoration: none; }
.usermenu { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.usermenu a { color: #cdd9ec; }
.badge { background: #d54941; color: #fff; border-radius: 9px; padding: 1px 6px;
         font-size: 11px; margin-left: 2px; }

.container { max-width: 1280px; margin: 20px auto; padding: 0 16px; }
.card { background: #fff; border-radius: 10px; padding: 18px 20px;
        box-shadow: 0 1px 3px rgba(16,42,80,.08); margin-bottom: 18px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
.card.wide { overflow-x: auto; }
.pagehead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

h2 { font-size: 19px; margin-bottom: 12px; }
h3 { font-size: 16px; margin-bottom: 10px; }
h4 { margin: 10px 0 6px; }
.muted { color: #8a94a6; font-weight: 400; font-size: 13px; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
            gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 10px; padding: 16px; text-align: center;
        box-shadow: 0 1px 3px rgba(16,42,80,.08); border-top: 3px solid #2f7cf6; }
.stat.green { border-top-color: #2ba471; } .stat.red { border-top-color: #d54941; }
.stat.yellow { border-top-color: #e37318; }
.stat .num { font-size: 30px; font-weight: 700; }
.stat .lbl { color: #8a94a6; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #edf0f5; text-align: left;
         vertical-align: top; }
th { background: #f8fafc; color: #5a6a82; font-weight: 600; white-space: nowrap; }
table.kv th { width: 110px; }
.tasktable td { max-width: 260px; }

.tag { display: inline-block; color: #fff; border-radius: 4px; padding: 2px 8px;
       font-size: 12px; white-space: nowrap; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.rag-red { color: #d54941; } .rag-yellow { color: #e37318; } .rag-green { color: #2ba471; }

.pbar { position: relative; background: #edf0f5; border-radius: 8px; height: 16px;
        min-width: 80px; overflow: hidden; }
.pbar .pfill { background: #2f7cf6; height: 100%; }
.pbar span { position: absolute; inset: 0; text-align: center; font-size: 11px;
             line-height: 16px; color: #1f2733; }
.pbar.big { height: 22px; } .pbar.big span { line-height: 22px; }

.btn { display: inline-block; border: 1px solid #d4dbe6; background: #fff;
       border-radius: 6px; padding: 7px 16px; cursor: pointer; font-size: 14px;
       color: #1f2733; }
.btn.primary { background: #2f7cf6; border-color: #2f7cf6; color: #fff; }
.btn.block { width: 100%; }
.btn:hover { opacity: .9; text-decoration: none; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { padding: 7px 10px; border: 1px solid #d4dbe6;
       border-radius: 6px; font-size: 13px; }

form label { display: block; margin-bottom: 12px; font-size: 13px; color: #5a6a82; }
form input, form select, form textarea { display: block; width: 100%; margin-top: 4px;
       padding: 8px 10px; border: 1px solid #d4dbe6; border-radius: 6px; font-size: 14px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.formgrid .span2 { grid-column: span 2; }
.formgrid .check { display: flex; align-items: center; gap: 8px; }
.formgrid .check input { width: auto; margin: 0; }
.formgrid .actions { margin-top: 8px; display: flex; gap: 10px; }

.alert { border-radius: 6px; padding: 10px 14px; margin-bottom: 12px; }
.alert.error { background: #fdecea; color: #d54941; }
.alert.ok { background: #e6f6ef; color: #2ba471; }

.login-page { display: flex; align-items: center; justify-content: center;
              min-height: 100vh; background: linear-gradient(135deg,#12315e,#2f7cf6); }
.login-box { background: #fff; border-radius: 12px; padding: 36px; width: 380px;
             box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.login-box h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.login-box .sub { color: #8a94a6; font-size: 12px; text-align: center; margin-bottom: 18px; }

.update-item { border: 1px solid #edf0f5; border-radius: 8px; padding: 12px 14px;
               margin-bottom: 10px; }
.update-head { display: flex; gap: 12px; align-items: center; margin-bottom: 6px;
               flex-wrap: wrap; }
.update-item p { margin: 4px 0; font-size: 13px; line-height: 1.7; }

@media (max-width: 768px) {
  .formgrid { grid-template-columns: 1fr; }
  .formgrid .span2 { grid-column: span 1; }
  .topbar { height: auto; padding: 10px 14px; }
}

/* 甘特图 */
.gantt-wrap { padding: 14px; }
.gantt-legend { display: flex; gap: 16px; font-size: 12px; color: #5a6a82;
                margin-bottom: 10px; align-items: center; }
.gantt-grid { min-width: 900px; }
.gantt-head, .gantt-row { display: flex; align-items: stretch; }
.gantt-head { border-bottom: 2px solid #d4dbe6; height: 26px; }
.gantt-label-col { width: 300px; flex-shrink: 0; font-size: 12px; padding: 3px 8px;
                   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gantt-owner { color: #8a94a6; margin-left: 6px; font-size: 11px; }
.gantt-timeline { position: relative; flex: 1; }
.gantt-month { position: absolute; top: 4px; font-size: 12px; color: #5a6a82;
               border-left: 1px solid #d4dbe6; padding-left: 4px; }
.gantt-group { background: #eef3fa; color: #12315e; font-weight: 700; font-size: 13px;
               padding: 5px 10px; margin-top: 8px; border-radius: 4px; }
.gantt-row { height: 26px; border-bottom: 1px solid #f2f5f9; }
.gantt-row:hover { background: #f8fafc; }
.gantt-gridline { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f2f5f9; }
.gantt-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid #d54941;
               opacity: .6; }
.gantt-bar { position: absolute; top: 5px; height: 16px; border-radius: 4px;
             display: block; overflow: hidden; }
.gantt-bar-fill { position: absolute; left: 0; top: 0; bottom: 0;
                  background: rgba(255,255,255,.35); display: block; }

/* 首页 */
.plgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr));
          gap: 12px; }
.plcard { display: block; background: #f8fafc; border-radius: 8px; padding: 12px;
          color: #1f2733; }
.plcard:hover { background: #eef3fa; text-decoration: none; }
.plname { font-weight: 700; font-size: 14px; }
.plavg { font-size: 24px; font-weight: 700; color: #2f7cf6; margin: 4px 0; }
.plmeta { font-size: 12px; color: #5a6a82; margin-top: 6px; }
.plrag { display: flex; gap: 10px; font-size: 12px; margin-top: 6px; color: #5a6a82; }
.col2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.upcoming-item { padding: 5px 0; font-size: 13px; display: flex; gap: 8px;
                 align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) { .col2 { grid-template-columns: 1fr; } }

/* 会议转任务表单 */
.totask-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.totask-form input, .totask-form select { width: auto; margin: 0; padding: 5px 8px;
       font-size: 12px; }
.totask-form .btn { padding: 5px 12px; font-size: 12px; }

/* 全站公告 Banner（原生实现 shadcn Banner 组件） */
.banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center;
          justify-content: center; height: 3rem; padding: 0 3rem; overflow: hidden;
          font-size: 14px; font-weight: 500; text-align: center;
          background: #eef3fa; color: #12315e; }
.banner-rainbow { background: #fff; position: sticky; }
.banner-msg { position: relative; z-index: 1; }
.banner-close { position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
                z-index: 1; border: none; background: transparent; cursor: pointer;
                color: #5a6a82; font-size: 14px; padding: 6px; border-radius: 6px; }
.banner-close:hover { background: rgba(0,0,0,.06); }
@keyframes moving-banner { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.rainbow-banner-gradient-1, .rainbow-banner-gradient-2 {
  position: absolute; inset: 0; z-index: 0;
  mask-image: linear-gradient(to bottom, white, transparent),
              radial-gradient(circle at top center, white, transparent);
  mask-composite: intersect;
  -webkit-mask-image: linear-gradient(to bottom, white, transparent),
              radial-gradient(circle at top center, white, transparent);
  -webkit-mask-composite: source-in;
}
.rainbow-banner-gradient-1 {
  animation: moving-banner 16s linear infinite reverse;
  background-image: repeating-linear-gradient(60deg,
    rgba(255,77,0,0.4), rgba(0,87,255,0.5) 2%, rgba(0,87,255,0.5) 5%,
    transparent 8%, transparent 14%, rgba(164,255,68,0.4) 18%, rgba(164,255,68,0.4) 22%,
    rgba(255,0,166,0.77) 28%, rgba(255,0,166,0.77) 30%, rgba(164,255,68,0.4) 34%,
    rgba(164,255,68,0.4) 36%, transparent, rgba(255,77,0,0.4) calc(50% - 12px));
  background-size: 200% 100%; mix-blend-mode: difference;
}
.rainbow-banner-gradient-2 {
  animation: moving-banner 20s linear infinite;
  background-image: repeating-linear-gradient(45deg,
    rgba(64,0,255,0.51), rgba(255,120,120,0.5) 4%, rgba(255,120,120,0.5) 8%,
    transparent 9%, transparent 14%, rgba(36,188,255,0.4) 16%, rgba(36,188,255,0.4) 20%,
    transparent, rgba(255,89,0,0.56) 36%, rgba(255,89,0,0.56) 40%, transparent 42%,
    rgba(64,0,255,0.51) 46%, rgba(64,0,255,0.51) calc(50% - 16.8px));
  background-size: 200% 100%; mix-blend-mode: color-dodge;
}
