/* =============================================
   LIGHT-COG 月报 — Mobile Web Report Styles
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary:       #1B5E8B;
  --primary-dark:  #0F3D5E;
  --primary-mid:   #2478AE;
  --primary-light: #EBF4FB;
  --accent:        #E76A2C;
  --accent-light:  #FEF0E8;
  --green:         #219653;
  --green-light:   #E9F7EF;
  --amber:         #E2900A;
  --amber-light:   #FEF9EC;
  --gray:          #8C9BAA;
  --gray-light:    #F0F4F8;
  --bg:            #EFF3F7;
  --card:          #FFFFFF;
  --text:          #1A2A38;
  --text-sub:      #556270;
  --border:        #DDE4EC;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.07);
  --shadow:        0 2px 10px rgba(0,0,0,0.09);
  --r:             12px;
  --r-sm:          8px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
  color: #fff;
  padding: 24px 18px 26px;
  position: relative;
  overflow: hidden;
}

.site-header::before,
.site-header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  background: #fff;
}
.site-header::before { width: 160px; height: 160px; top: -50px; right: -40px; }
.site-header::after  { width: 90px;  height: 90px;  bottom: -30px; left: 10px; }

.header-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.header-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 5px;
  position: relative;
}

.header-desc {
  font-size: 11.5px;
  opacity: 0.8;
  line-height: 1.5;
  margin-bottom: 12px;
}

.header-period {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 13px;
  border-radius: 20px;
}

/* ── Sticky Navigation ── */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.sticky-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex-shrink: 0;
  padding: 11px 13px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
  user-select: none;
}
.nav-btn.active,
.nav-btn:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Main ── */
main { padding: 14px 13px 48px; }

/* ── Section wrapper ── */
.section { margin-bottom: 22px; }

.section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}

.section-note {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 11px;
  line-height: 1.7;
  padding: 0 2px;
}
.section-note b  { color: var(--accent);  font-weight: 700; }
.section-note .b2 { color: var(--primary); font-weight: 700; }
.section-note .b3 { color: var(--green);  font-weight: 700; }

/* ── Card ── */
.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 15px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 11px;
}
.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 11px;
}

/* ── KPI Grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 13px;
}

.kpi-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 10px 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.kpi-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.kpi-value.accent { color: var(--accent); }
.kpi-value.green  { color: var(--green);  }

.kpi-unit  { font-size: 13px; color: var(--text-sub); }
.kpi-label { font-size: 11.5px; color: var(--text-sub); margin-top: 3px; }

/* ── Legend ── */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-sub);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Canvas (charts) ── */
canvas {
  display: block;
  width: 100% !important;
}

/* ── CSS Horizontal Bar Chart ── */
.css-bar-list { list-style: none; }

.css-bar-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.css-bar-label {
  width: 68px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-sub);
  text-align: right;
  line-height: 1.3;
}

.css-bar-track {
  flex: 1;
  height: 22px;
  background: var(--gray-light);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.css-bar-fill {
  height: 100%;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
  min-width: 0;
}

.css-bar-fill.c-primary { background: var(--primary); }
.css-bar-fill.c-accent  { background: var(--accent);  }
.css-bar-fill.c-green   { background: var(--green);   }

.css-bar-fill-label {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.css-bar-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  min-width: 36px;
  text-align: left;
}

/* ── Center Progress Accordion ── */
.center-card {
  background: var(--card);
  border-radius: var(--r);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.center-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.center-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.center-crc {
  font-size: 10px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 5px;
  font-weight: 500;
}

.badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}
.badge-on    { background: var(--green-light); color: var(--green); }
.badge-pend  { background: var(--amber-light); color: var(--amber); }
.badge-prep  { background: var(--gray-light);  color: var(--gray);  }

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--gray);
  transition: transform 0.22s;
  flex-shrink: 0;
  margin-left: 6px;
}
.chevron-icon.open { transform: rotate(180deg); }

.center-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.center-card-body.open { max-height: 300px; }

.stage-list { list-style: none; padding: 2px 14px 12px; }

.stage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.stage-row:last-child { border-bottom: none; }

.stage-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}
.si-done  { background: var(--green-light); color: var(--green); }
.si-prog  { background: var(--amber-light); color: var(--amber); }
.si-none  { background: var(--gray-light);  color: var(--gray);  }

.stage-label { flex: 1; color: var(--text-sub); }

.stage-status { font-size: 11px; font-weight: 600; }
.ss-done  { color: var(--green); }
.ss-prog  { color: var(--amber); }
.ss-none  { color: var(--gray);  }

.stage-eta {
  font-size: 10.5px;
  color: var(--gray);
  white-space: nowrap;
}

/* ── SAE / QC Zero Banner ── */
.zero-banner {
  background: linear-gradient(135deg, var(--green-light), #F0FAF4);
  border: 1px solid #B7DFCB;
  border-radius: var(--r);
  padding: 22px 16px;
  text-align: center;
  margin-bottom: 11px;
}
.zero-num   { font-size: 52px; font-weight: 800; color: var(--green); line-height: 1; }
.zero-title { font-size: 14px; color: #27a352; font-weight: 600; margin-top: 4px; }
.zero-sub   { font-size: 12px; color: var(--text-sub); margin-top: 6px; }

/* ── Info Note ── */
.info-note {
  background: var(--amber-light);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 12px;
  font-size: 12px;
  color: #6B4C0A;
  line-height: 1.65;
  margin-top: 10px;
}

/* ── Summary Box ── */
.summary-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 14px;
  margin-bottom: 11px;
}
.summary-text {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.85;
}
.summary-text b { color: var(--primary); }
.summary-text + .summary-text { margin-top: 10px; }

/* ── Next Steps ── */
.next-steps {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px;
  box-shadow: var(--shadow);
}
.next-title { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 10px; }

.next-item {
  display: flex;
  gap: 9px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.55;
}
.next-item:last-child { margin-bottom: 0; }
.next-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  flex-shrink: 0;
}

/* ── Month Summary (small banners) ── */
.summary-list { list-style: none; }
.summary-list-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.summary-list-item:last-child { border-bottom: none; }
.s-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 18px 14px 24px;
  font-size: 11px;
  color: var(--gray);
  border-top: 1px solid var(--border);
  margin-top: 6px;
  line-height: 1.8;
}

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Responsive tweak for small phones ── */
@media (max-width: 360px) {
  .kpi-value    { font-size: 28px; }
  .css-bar-label { width: 56px; font-size: 10px; }
}
