/*
 * @Author: Junchen Yi
 * @Date: 2026-01-20 21:22:14
 * @LastEditors: Junchen Yi
 * @LastEditTime: 2026-01-22 02:29:27
 * 
 * Copyright (c) 2026 by Junchen Yi, All Rights Reserved. 
 */
:root {
  --bg1: #fbfcff;
  --bg2: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(17, 24, 39, .08);

  --ok: #16a34a;
  --ok-bg: rgba(22, 163, 74, .10);
  --ok-soft: rgba(22, 163, 74, .06);

  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, .14);
  --warn-soft: rgba(245, 158, 11, .07);

  --bad: #ef4444;
  --bad-bg: rgba(239, 68, 68, .14);
  --bad-soft: rgba(239, 68, 68, .07);

  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, .12);
  --info-soft: rgba(59, 130, 246, .06);

  --shadow: 0 18px 60px rgba(17, 24, 39, .08);
  --shadow-soft: 0 12px 40px rgba(17, 24, 39, .06);

  --r-card: 28px;
  --r-item: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont,
               "SF Pro SC", "PingFang SC",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f6f8fb;
  /* 纯色背景：设计稿无任何渐变 */
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 22px 60px;
}

.page-header {
  display: flex;
  justify-content: center;
  margin: 24px 0 28px;
}

.page-title {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .4px;
  text-align: center;
  line-height: 1.15;
}

.page-title-en,
.page-title-zh {
  display: inline;
}

.alert {
  background: #fff;
  border: 1px solid rgba(239, 68, 68, .22);
  border-radius: var(--r-item);
  padding: 14px;
  color: #7f1d1d;
  box-shadow: var(--shadow-soft);
  margin: 10px auto 14px;
}

.alert-title {
  font-weight: 900;
  margin-bottom: 6px;
}

.alert-body {
  color: #991b1b;
  font-size: 13px;
  white-space: pre-wrap;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px;
  box-shadow: 0 14px 40px rgba(17, 24, 39, .06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}


/* New summary-left layout for label + value vertical stack */
.summary-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.summary-card-label {
  color: var(--muted);
  font-size: 13px;
}

.summary-card-value {
  font-size: 30px;
  font-weight: 900;
}

.summary-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  font-weight: 900;
  flex: 0 0 auto;
}

.summary-ok {
  border-color: rgba(22, 163, 74, .25);
}

.summary-warn {
  border-color: rgba(245, 158, 11, .28);
}

.summary-bad {
  border-color: rgba(239, 68, 68, .28);
}

.summary-info { border-color: rgba(59, 130, 246, .28); }
.summary-icon-info { background: var(--info-bg); color: var(--info); }
.summary-value-info { color: var(--info); }

.summary-icon-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.summary-icon-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.summary-icon-bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.summary-value-ok {
  color: var(--ok);
}

.summary-value-warn {
  color: var(--warn);
}

.summary-value-bad {
  color: var(--bad);
}

.panel {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-head-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(17, 24, 39, .06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.panel-head-title {
  font-weight: 900;
}

.list,
.maint {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row,
.maint-row {
  border-radius: var(--r-item);
  border: 1px solid rgba(17, 24, 39, .06);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: none;
}

/* === 服务行：设计稿（无渐变）：用不透明纯色避免“渐变感” === */
.row {
  background: #fff;
}

.row-normal {
  background: #ECF9F0;
  border-color: #BFE8CF;
}

.row-limited {
  background: #FEF6E7;
  border-color: #F2D6A7;
}

.row-maintenance{
  background:#EEF5FF;
  border-color:rgba(59,130,246,.25);
}

.row-closed {
  background: #FDECEC;
  border-color: #F3B4B4;
}


/* 强制禁止任何 background-image（防止遗留渐变/图片） */

.row,
.row-normal,
.row-limited,
.row-maintenance,
.row-closed { background-image:none !important; }

/* === 维护行：按状态整行着色（设计稿风格：纯色无渐变） === */
.maint-row{
  background:#fff;
  background-image:none !important;
  align-items: center;
}

.maint-row-scheduled{
  background:#EEF5FF;
  border-color:rgba(59,130,246,.25);
}

.maint-row-in_progress{
  background:#FEF6E7;
  border-color:rgba(245,158,11,.28);
}

.maint-row-completed{
  background:#ECF9F0;
  border-color:rgba(22,163,74,.25);
}

.maint-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
}

.row-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
   flex-wrap: nowrap;
}

/* 你现在 row-main 在 HTML 里是 <div class="row-main">，补上这个 */
.row-main{
  min-width:0;
  flex:1 1 auto;
}


.row-title {
  font-weight: 900;
  font-size: 14px;
}

.row-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 560px;
}

.row-right,
.maint-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(17, 24, 39, .08);
  font-size: 12px;
  font-weight: 800;
  min-width: 58px;
}

.pill-normal {
  background: var(--ok-bg);
  color: var(--ok);
}

.pill-limited {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill-maintenance{ background: var(--info-bg); color: var(--info); }

.pill-closed {
  background: var(--bad-bg);
  color: var(--bad);
}

.pill-m-scheduled {
  background: var(--info-bg);
  color: var(--info);
}

.pill-m-in_progress {
  background: var(--warn-bg);
  color: var(--warn);
}

.pill-m-completed {
  background: var(--ok-bg);
  color: var(--ok);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, .10);
  background: #cbd5e1;
    flex:0 0 auto;
  flex-shrink:0;
}

/* 左侧状态点：小点（符合设计稿与信息层级） */
.status-dot-left{
  width:10px;
  height:10px;
  min-width:10px;
  min-height:10px;
  aspect-ratio:1 / 1;

  border-radius:999px;
  display:inline-block;

  flex:0 0 auto;
  flex-shrink:0;

  border:1px solid rgba(17,24,39,.10);
  background:#cbd5e1;
}


/* 让不同状态的小点颜色跟随 dot-* 规则 */
.dot-normal.status-dot-left {
  background: var(--ok);
  border-color: rgba(22, 163, 74, .35);
}

.dot-limited.status-dot-left {
  background: var(--warn);
  border-color: rgba(245, 158, 11, .40);
}

.dot-maintenance.status-dot-left{ background: var(--info); border-color: rgba(59,130,246,.35); }

.dot-closed.status-dot-left {
  background: var(--bad);
  border-color: rgba(239, 68, 68, .40);
}

.dot-normal {
  background: var(--ok);
  border-color: rgba(22, 163, 74, .35);
}

.dot-limited {
  background: var(--warn);
  border-color: rgba(245, 158, 11, .40);
}

.dot-maintenance{ background: var(--info); border-color: rgba(59,130,246,.35); }

.dot-closed {
  background: var(--bad);
  border-color: rgba(239, 68, 68, .40);
}

.dot-m-scheduled {
  background: var(--info);
  border-color: rgba(59, 130, 246, .35);
}

.dot-m-in_progress {
  background: var(--warn);
  border-color: rgba(245, 158, 11, .40);
}

.dot-m-completed {
  background: var(--ok);
  border-color: rgba(22, 163, 74, .35);
}

/* === 设计稿一致的 info 按钮 === */
.info {
  width: 16px;
  height: 16px;
  border-radius: 50%;

  background: transparent;
  border: 1px solid currentColor;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  cursor: pointer;
  user-select: none;

  font-size: 12px;
  line-height: 1;

  color: #9ca3af;
  /* 默认，会被状态覆盖 */
  border-color: currentColor;

  box-shadow: none !important;
  outline: none;
}


.info:focus {
  outline: none;
}

.info:focus-visible {
  outline: 2px solid rgba(59, 130, 246, .25);
  outline-offset: 2px;
}

/* info 跟随服务状态色 */
.row-normal .info {
  color: var(--ok);
}

.row-limited .info {
  color: var(--warn);
}

.row-maintenance .info{ color: var(--info); }

.row-closed .info {
  color: var(--bad);
}

/* info 跟随维护计划状态色 */
.maint-row-scheduled .info{
  color: var(--info);
}

.maint-row-in_progress .info{
  color: var(--warn);
}

.maint-row-completed .info{
  color: var(--ok);
}

.row .info,
.maint-row .info {
  box-shadow: none !important;
}

.maint-title {
  font-weight: 900;
  font-size: 14px;
}

.maint-time {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
}

.empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
}

/* Modal (match design mock) */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .38);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: saturate(180%) blur(6px);
}

.modal {
  width: min(560px, 92vw);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 70px rgba(17, 24, 39, .20);
  border: 1px solid rgba(17, 24, 39, .08);
  background: #fff;
}

/* Variant tinted backgrounds */
.modal-warn {
  background: #fff7df;
  border-color: rgba(245, 158, 11, .25);
}

.modal-bad {
  background: #fff1f1;
  border-color: rgba(239, 68, 68, .25);
}

.modal-ok {
  background: #effaf2;
  border-color: rgba(22, 163, 74, .22);
}

.modal-info {
  background: #eef5ff;
  border-color: rgba(59, 130, 246, .22);
}

.modal-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 10px;
}

.modal-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(17, 24, 39, .10);
  color: rgba(17, 24, 39, .72);
}

.modal-icon svg {
  display: block;
}

/* icon color follows variant */
.modal-ok .modal-icon {
  color: rgba(22, 163, 74, .95);
}

.modal-warn .modal-icon {
  color: rgba(245, 158, 11, .95);
}

.modal-bad .modal-icon {
  color: rgba(239, 68, 68, .95);
}

.modal-info .modal-icon {
  color: rgba(59, 130, 246, .95);
}

.modal-top-text {
  min-width: 0;
  flex: 1 1 auto;
}

.modal-title {
  font-weight: 900;
  font-size: 16px;
}

.modal-sub {
  margin-top: 4px;
  color: rgba(17, 24, 39, .70);
  font-size: 13px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(17, 24, 39, .10);
  background: rgba(255, 255, 255, .88);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 10px 18px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.m-row-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(17, 24, 39, .08);
  flex: 0 0 auto;
  color: rgba(17, 24, 39, .68);
}

.m-row-ico svg {
  display: block;
}

.m-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.m-row-title {
  font-weight: 900;
  font-size: 13px;
  margin-top: 2px;
}

.m-row-body {
  margin-top: 4px;
  color: rgba(17, 24, 39, .82);
  font-size: 14px;
}

.m-text {
  white-space: pre-wrap;
}

.m-ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.m-ul li {
  margin: 2px 0;
}

.modal-foot {
  padding: 14px 18px 18px;
  display: flex;
  justify-content: flex-end;
}

.modal-foot .modal-ok {
  border: 1px solid rgba(17, 24, 39, .10);
  background: rgba(255, 255, 255, .88);
  padding: 10px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
}
/* ===== Service modal (match design) ===== */
.modal[data-mode="service"]{
  box-shadow:0 20px 60px rgba(17,24,39,.18);
}

.modal[data-mode="service"].modal-warn{
  background:#FFF8D8;
  border-color:rgba(245,158,11,.35);
}

.modal[data-mode="service"].modal-info{
  background:#EEF5FF;
  border-color:rgba(59,130,246,.30);
}

.modal[data-mode="service"].modal-bad{
  background:#FFF1F1;
  border-color:rgba(239,68,68,.30);
}

.modal[data-mode="service"].modal-ok{
  background:#EFFAF2;
  border-color:rgba(22,163,74,.26);
}

.modal[data-mode="service"] .modal-close{
  display:none;
}

.modal[data-mode="maintenance"] .modal-close{
  display:none;
}

.modal[data-mode="service"] .modal-top{
  padding:18px 18px 8px;
}

.modal[data-mode="service"] .modal-icon{
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(17,24,39,.12);
  display:flex;
  align-items:center;
  justify-content:center;
}

/* 让 body 不再使用 m-row 那套 */
.modal[data-mode="service"] .modal-body{
  padding:8px 18px 10px;
  display:block;
}

/* ===== Maintenance modal (match the same row/block style as service) ===== */
.modal[data-mode="maintenance"]{
  box-shadow:0 20px 60px rgba(17,24,39,.18);
}

.modal[data-mode="maintenance"] .modal-top{
  padding:18px 18px 8px;
}

.modal[data-mode="maintenance"] .modal-icon{
  width:34px;
  height:34px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(17,24,39,.12);
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal[data-mode="maintenance"] .modal-body{
  padding:8px 18px 10px;
  display:block;
}

.modal[data-mode="maintenance"] .modal-foot{
  padding:10px 18px 18px;
  justify-content:flex-end;
}

.modal[data-mode="maintenance"] .modal-ok{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(17,24,39,.12);
  border-radius:14px;
  padding:10px 16px;
  font-weight:900;
}

/* rows like screenshot */
.m2-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:10px 0;
}

.m2-ico{
  width:32px;
  height:32px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(17,24,39,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  position:relative;
}

/* icon drawing: use pure CSS via mask? simplest: use ::before with SVG background */
.m2-ico::before{
  content:"";
  width:18px;
  height:18px;
  display:block;
  background-size:18px 18px;
  background-repeat:no-repeat;
  background-position:center;
}

/* warn triangle */
.m2-ico-warn{ color:rgba(245,158,11,.95); }
.m2-ico-warn::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3l10 18H2L12 3z' fill='none' stroke='%23F59E0B' stroke-width='2' stroke-linejoin='round'/><path d='M12 9v5' fill='none' stroke='%23F59E0B' stroke-width='2' stroke-linecap='round'/><circle cx='12' cy='17' r='1' fill='%23F59E0B'/></svg>");
}

/* info circle */
.m2-ico-info::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='%233B82F6' stroke-width='2'/><path d='M12 10.5v6' fill='none' stroke='%233B82F6' stroke-width='2' stroke-linecap='round'/><circle cx='12' cy='7.5' r='1' fill='%233B82F6'/></svg>");
}

/* ok circle check */
.m2-ico-ok{ color:rgba(22,163,74,.95); }
.m2-ico-ok::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='%2316A34A' stroke-width='2'/><path d='M8 12.5l2.5 2.5L16.5 9' fill='none' stroke='%2316A34A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* bad circle x */
.m2-ico-bad{ color:rgba(239,68,68,.95); }
.m2-ico-bad::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='%23EF4444' stroke-width='2'/><path d='M8 8l8 8M16 8l-8 8' fill='none' stroke='%23EF4444' stroke-width='2' stroke-linecap='round'/></svg>");
}

/* clock */
.m2-ico-clock::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='9' fill='none' stroke='%233B82F6' stroke-width='2'/><path d='M12 7v6l4 2' fill='none' stroke='%233B82F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* bulb */
.m2-ico-bulb::before{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M9 18h6' fill='none' stroke='%2316A34A' stroke-width='2' stroke-linecap='round'/><path d='M10 21h4' fill='none' stroke='%2316A34A' stroke-width='2' stroke-linecap='round'/><path d='M12 3a7 7 0 0 0-4 12c.7.6 1 1.3 1 2h6c0-.7.3-1.4 1-2A7 7 0 0 0 12 3z' fill='none' stroke='%2316A34A' stroke-width='2' stroke-linejoin='round'/></svg>");
}

.m2-main{ flex:1 1 auto; min-width:0; }

.m2-line{
  display:flex;
  gap:6px;
  align-items:baseline;
  font-size:14px;
  font-weight:800;
  color:rgba(17,24,39,.92);
}

.m2-label{ font-weight:800; }
.m2-value{ font-weight:900; }

.m2-sub{
  margin-top:4px;
  font-size:13px;
  line-height:1.45;
  color:rgba(17,24,39,.70);
  white-space:normal;
}

/* 仅对需要保留换行的块生效：所有端都显示为“垂直列出” */
.m2-sub-pre{
  white-space:pre-wrap;
}

/* footer button like screenshot */
.modal[data-mode="service"] .modal-foot{
  padding:10px 18px 18px;
  justify-content:flex-end;
}

.modal[data-mode="service"] .modal-ok{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(17,24,39,.12);
  border-radius:14px;
  padding:10px 16px;
  font-weight:900;
}

@media (max-width: 820px) {
  .summary {
    grid-template-columns: 1fr;
  }

    /* 标题：单行省略号 */
  .row-title,
  .maint-title{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  /* 副标题：两行截断 */
  .row-sub{
    max-width:none;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }

  /* 维护时间：两行截断 */
  .maint-time{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }

  .page-title-en,
  .page-title-zh {
    display: block;
  }

  .page-title-zh {
    margin-top: 6px;
  }

  /* 移动端更紧凑一点 */
  .row,
  .maint-row{
    gap:8px;
    padding:12px;
  }

  .pill{
    padding:6px 10px;
    min-width:54px;
  }
}
/* Maintenance main container for truncation/ellipsis (like .row-main) */
.maint-main{
  min-width:0;
  flex:1 1 auto;
}