/* stylelint-disable */
html,
body {
  width: 100%;
  height: 100%;
}
input::-ms-clear,
input::-ms-reveal {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-family: sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -ms-overflow-style: scrollbar;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
  margin: 0;
}
[tabindex='-1']:focus {
  outline: none;
}
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 500;
}
p {
  margin-top: 0;
  margin-bottom: 1em;
}
abbr[title],
abbr[data-original-title] {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline;
  text-decoration: underline dotted;
  border-bottom: 0;
  cursor: help;
}
address {
  margin-bottom: 1em;
  font-style: normal;
  line-height: inherit;
}
input[type='text'],
input[type='password'],
input[type='number'],
textarea {
  -webkit-appearance: none;
}
ol,
ul,
dl {
  margin-top: 0;
  margin-bottom: 1em;
}
ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}
dt {
  font-weight: 500;
}
dd {
  margin-bottom: 0.5em;
  margin-left: 0;
}
blockquote {
  margin: 0 0 1em;
}
dfn {
  font-style: italic;
}
b,
strong {
  font-weight: bolder;
}
small {
  font-size: 80%;
}
sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
pre,
code,
kbd,
samp {
  font-size: 1em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
pre {
  margin-top: 0;
  margin-bottom: 1em;
  overflow: auto;
}
figure {
  margin: 0 0 1em;
}
img {
  vertical-align: middle;
  border-style: none;
}
a,
area,
button,
[role='button'],
input:not([type='range']),
label,
select,
summary,
textarea {
  touch-action: manipulation;
}
table {
  border-collapse: collapse;
}
caption {
  padding-top: 0.75em;
  padding-bottom: 0.3em;
  text-align: left;
  caption-side: bottom;
}
input,
button,
select,
optgroup,
textarea {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}
button,
input {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
html [type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
}
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
  padding: 0;
  border-style: none;
}
input[type='radio'],
input[type='checkbox'] {
  box-sizing: border-box;
  padding: 0;
}
input[type='date'],
input[type='time'],
input[type='datetime-local'],
input[type='month'] {
  -webkit-appearance: listbox;
}
textarea {
  overflow: auto;
  resize: vertical;
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
legend {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.5em;
  padding: 0;
  color: inherit;
  font-size: 1.5em;
  line-height: inherit;
  white-space: normal;
}
progress {
  vertical-align: baseline;
}
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}
[type='search'] {
  outline-offset: -2px;
  -webkit-appearance: none;
}
[type='search']::-webkit-search-cancel-button,
[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}
::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}
output {
  display: inline-block;
}
summary {
  display: list-item;
}
template {
  display: none;
}
[hidden] {
  display: none !important;
}
mark {
  padding: 0.2em;
  background-color: #feffe6;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}
.login-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.login-card {
  width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-card .ant-card-head {
  text-align: center;
  font-size: 20px;
  font-weight: 500;
}

.login-tips {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  color: #999;
  font-size: 12px;
}

.login-tips p {
  margin: 4px 0;
}

.login-filing-info {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  font-size: 12px;
  color: #666;
}

.login-filing-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  padding: 16px;
}

.login-filing-footer .filing-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.login-filing-footer .filing-divider {
  color: rgba(255, 255, 255, 0.5);
}

.login-filing-footer .security-filing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.login-filing-footer .beian-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.login-filing-footer .copyright-row {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.login-filing-footer .filing-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.login-filing-footer .filing-link:hover {
  color: #fff;
  text-decoration: underline;
}
.logo {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

.logo-icon {
  font-size: 24px;
  margin-right: 8px;
}

.logo-text {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.header {
  background: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.header-left {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.85);
}

.welcome-text {
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.notification-icon {
  font-size: 18px;
  color: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.3s;
}

.user-info:hover {
  background: rgba(0, 0, 0, 0.05);
}

.username {
  color: rgba(0, 0, 0, 0.85);
}

.content {
  margin: 24px;
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  min-height: 280px;
}
/* Cockpit.css - 运维驾驶舱 V6 样式 */
/* 依赖: Cockpit.tsx */

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

:root {
  --bg: #f5f7fa;
  --card: #fff;
  --text: #1a2b42;
  --text2: #6b7d92;
  --text3: #a3b0c0;
  --border: #e8edf3;
  --blue: #3b82f6;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;
  --blue-bg: #eff6ff;
  --green-bg: #ecfdf5;
  --orange-bg: #fffbeb;
  --red-bg: #fef2f2;
  --purple-bg: #f5f3ff;
}

.cockpit {
  height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
  background: var(--bg);
  color: #1a2b42;
  color: var(--text);
  overflow: hidden;
}

.num { font-family: 'Inter', sans-serif; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* === 顶栏 === */
.topbar {
  height: 52px;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #e8edf3;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.proj-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 8px;
  background: #eff6ff;
  background: var(--blue-bg);
  border: 1px solid #dbeafe;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #1a2b42;
  color: var(--text);
}
.proj-switch:hover { background: #dbeafe; }
.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #1a2b42;
  color: var(--text);
}
.time-filter {
  display: flex;
  gap: 2px;
  background: #f0f3f7;
  border-radius: 8px;
  padding: 3px;
}
.time-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #a3b0c0;
  color: var(--text3);
  cursor: pointer;
  transition: all .2s;
}
.time-btn.active {
  background: #fff;
  color: #3b82f6;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-time { font-size: 14px; color: #6b7d92; color: var(--text2); }
.topbar-user { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #6b7d92; color: var(--text2); }
.role-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #eff6ff;
  background: var(--blue-bg);
  color: #3b82f6;
  color: var(--blue);
}
.btn-backend {
  padding: 7px 16px;
  border-radius: 6px;
  background: #3b82f6;
  background: var(--blue);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn-backend:hover { background: #2563eb; }
.btn-logout {
  padding: 7px 16px; border-radius: 6px; background: #f0f3f7; color: #6b7d92; color: var(--text2);
  border: 1px solid #e8edf3;
  border: 1px solid var(--border); font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 4px; transition: all .2s;
}
.btn-logout:hover { background: #fef2f2; color: #ef4444; color: var(--red); border-color: #fecaca; }

/* === 主体 === */
.main {
  flex: 1 1;
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  grid-gap: 14px;
  gap: 14px;
  padding: 14px;
  overflow: hidden;
  min-height: 0;
}

/* === 面板 === */
.panel {
  background: #fff;
  background: var(--card);
  border-radius: 10px;
  border: 1px solid #e8edf3;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  flex-shrink: 0;
}
.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a2b42;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.panel-body {
  padding: 0 18px 14px;
  flex: 1 1;
  overflow-y: auto;
  min-height: 0;
}
.panel-body::-webkit-scrollbar { width: 3px; }
.panel-body::-webkit-scrollbar-thumb { background: #d1d9e6; border-radius: 2px; }

/* === 左列 === */
.left-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }

/* 故障卡片 */
.fault-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 10px;
  gap: 10px;
  margin-bottom: 14px;
}
.fc {
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}
.fc .n { font-size: 28px; font-weight: 800; line-height: 1; }
.fc .l { font-size: 12px; color: #6b7d92; color: var(--text2); margin-top: 6px; }

/* 图表容器 */
.chart-box { height: 150px; position: relative; }

/* 环形图 */
.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 6px 0;
}
.donut { width: 120px; height: 120px; position: relative; }
.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
}
.donut-num { font-size: 26px; font-weight: 800; }
.donut-label { font-size: 11px; color: #a3b0c0; color: var(--text3); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.dl-item { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6b7d92; color: var(--text2); }
.dl-dot { width: 10px; height: 10px; border-radius: 3px; }

/* 故障列表 */
.fault-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f5f7fa;
  cursor: pointer;
}
.fault-row:hover {
  background: #f8faff;
  margin: 0 -18px;
  padding: 9px 18px;
}
.fault-row:last-child { border: none; }
.fault-sev { width: 4px; height: 32px; border-radius: 2px; flex-shrink: 0; }
.fault-sev.high { background: #ef4444; background: var(--red); }
.fault-sev.mid { background: #f59e0b; background: var(--orange); }
.fault-sev.low { background: #3b82f6; background: var(--blue); }
.fault-info { flex: 1 1; min-width: 0; }
.fault-title { font-size: 14px; color: #1a2b42; color: var(--text); }
.fault-meta { font-size: 12px; color: #a3b0c0; color: var(--text3); margin-top: 2px; }
.fault-st { font-size: 12px; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }
.fault-st.proc { background: #fffbeb; background: var(--orange-bg); color: #f59e0b; color: var(--orange); }
.fault-st.done { background: #ecfdf5; background: var(--green-bg); color: #10b981; color: var(--green); }

/* === 中列 === */
.center-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }

/* KPI */
.kpi-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-gap: 12px;
  gap: 12px;
  flex-shrink: 0;
}
.kpi {
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  cursor: pointer;
  transition: all .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.kpi-label { font-size: 14px; color: #6b7d92; color: var(--text2); margin-bottom: 6px; }
.kpi-val { font-size: 32px; font-weight: 800; line-height: 1; }
.kpi-sub { font-size: 12px; color: #a3b0c0; color: var(--text3); margin-top: 6px; }
.kpi-corner {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 地图 */
.map-panel { flex: 1 1; min-height: 0; }
.map-wrap {
  flex: 1 1;
  position: relative;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: #e8eef5;
}
.map-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  gap: 6px;
}
.map-tag {
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255,255,255,.92);
  border: 1px solid #e8edf3;
  border: 1px solid var(--border);
  font-size: 13px;
  color: #6b7d92;
  color: var(--text2);
  cursor: pointer;
}
.map-tag.active {
  background: #3b82f6;
  background: var(--blue);
  color: #fff;
  border-color: #3b82f6;
  border-color: var(--blue);
}
.map-legend {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255,255,255,.92);
  border: 1px solid #e8edf3;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}
.lg-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; color: #6b7d92; color: var(--text2); }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; }

.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #a3b0c0;
  color: var(--text3);
  font-size: 15px;
  background: #e8eef5;
}

/* === 右列 === */
.right-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; }

/* 换件统计 */
.rp-summary { display: flex; justify-content: space-between; margin-bottom: 12px; }
.rp-summary-item .l { font-size: 13px; color: #6b7d92; color: var(--text2); }
.rp-summary-item .v { font-size: 26px; font-weight: 800; margin-top: 2px; }
.rp-cards { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px; gap: 10px; }
.rp-card { border-radius: 8px; padding: 12px 14px; }
.rp-card.free { background: #ecfdf5; background: var(--green-bg); }
.rp-card.paid { background: #fffbeb; background: var(--orange-bg); }
.rp-card .l { font-size: 12px; color: #6b7d92; color: var(--text2); }
.rp-card .v { font-size: 18px; font-weight: 700; margin-top: 3px; }

/* 记录列表 */
.rec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f5f7fa;
  cursor: pointer;
}
.rec-item:hover { background: #f8faff; margin: 0 -18px; padding: 9px 18px; }
.rec-item:last-child { border: none; }
.rec-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
  width: 38px;
  text-align: center;
}
.rec-tag.ins { background: #eff6ff; background: var(--blue-bg); color: #3b82f6; color: var(--blue); }
.rec-tag.rep { background: #f5f3ff; background: var(--purple-bg); color: #8b5cf6; color: var(--purple); }
.rec-tag.sup { background: #ecfdf5; background: var(--green-bg); color: #10b981; color: var(--green); }
.rec-content { flex: 1 1; min-width: 0; }
.rec-title {
  font-size: 14px;
  color: #1a2b42;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-meta { font-size: 12px; color: #a3b0c0; color: var(--text3); margin-top: 2px; }
.rec-st { font-size: 11px; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }
.rec-st.done { background: #ecfdf5; background: var(--green-bg); color: #10b981; color: var(--green); }
.rec-st.proc { background: #fffbeb; background: var(--orange-bg); color: #f59e0b; color: var(--orange); }
.rec-st.pend { background: #eff6ff; background: var(--blue-bg); color: #3b82f6; color: var(--blue); }

/* 保障 */
.supp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f7fa;
  cursor: pointer;
}
.supp-row:hover { background: #f8faff; margin: 0 -18px; padding: 10px 18px; }
.supp-row:last-child { border: none; }
.supp-date {
  text-align: center;
  flex-shrink: 0;
  width: 46px;
  padding: 5px 0;
  border-radius: 6px;
}
.supp-date .d { font-size: 18px; font-weight: 700; line-height: 1; }
.supp-date .m { font-size: 10px; color: #a3b0c0; color: var(--text3); }
.supp-date.up { background: #eff6ff; background: var(--blue-bg); }
.supp-date.up .d { color: #3b82f6; color: var(--blue); }
.supp-date.dn { background: #f0f3f7; }
.supp-date.dn .d { color: #a3b0c0; color: var(--text3); }
.supp-info { flex: 1 1; }
.supp-name { font-size: 14px; color: #1a2b42; color: var(--text); }
.supp-meta { font-size: 12px; color: #a3b0c0; color: var(--text3); margin-top: 2px; }
.supp-st { font-size: 11px; padding: 3px 8px; border-radius: 4px; flex-shrink: 0; }

/* 加载 */
.cockpit-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-size: 18px;
  color: #a3b0c0;
  color: var(--text3);
}

/* 项目选择下拉 */
.proj-dropdown {
  background: #fff;
  border: 1px solid #e8edf3;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}
.proj-dropdown-item {
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  color: #1a2b42;
  color: var(--text);
}
.proj-dropdown-item:hover { background: #eff6ff; background: var(--blue-bg); }
.proj-dropdown-item.active { background: #eff6ff; background: var(--blue-bg); color: #3b82f6; color: var(--blue); font-weight: 600; }

.dashboard {
  padding: 0;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.stat-row {
  margin-bottom: 24px;
}

.stat-card {
  border-radius: 8px;
  border: none;
}

.stat-card .ant-card-body {
  padding: 20px;
}

.stat-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.chart-row {
  margin-bottom: 24px;
}

.table-row {
  margin-bottom: 24px;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

