.desktop-cockpit .alarm-rule-page {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: calc(100dvh - 60px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(30, 72, 92, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #183349;
}

.desktop-cockpit .alarm-rule-head,
.desktop-cockpit .alarm-rule-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(30, 72, 92, 0.1);
  background: #f7fafb;
}

.desktop-cockpit .alarm-kicker { display: block; margin-bottom: 3px; color: #087ca7; font-size: 13px; font-weight: 700; }
.desktop-cockpit .alarm-rule-head h2 { margin: 0; color: #102f46; font-size: 24px; line-height: 1.25; }
.desktop-cockpit .alarm-rule-head p { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 4px 0 0; color: #687e8d; font-size: 14px; }
.desktop-cockpit .alarm-rule-head p span::before { content: "·"; margin-right: 12px; color: #9aabba; }
.desktop-cockpit .alarm-head-actions { display: flex; flex: 0 0 auto; gap: 8px; }

.desktop-cockpit .alarm-secondary,
.desktop-cockpit .alarm-analyze,
.desktop-cockpit .alarm-save,
.desktop-cockpit .alarm-accept,
.desktop-cockpit .alarm-reject,
.desktop-cockpit .alarm-reject-confirm {
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.desktop-cockpit .alarm-secondary { border: 1px solid rgba(30, 72, 92, 0.18); color: #31536b; background: #fff; }
.desktop-cockpit .alarm-pending strong { display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 5px; border-radius: 10px; color: #fff; background: #b54708; font-size: 11px; }
.desktop-cockpit .alarm-analyze,
.desktop-cockpit .alarm-save,
.desktop-cockpit .alarm-accept { border: 1px solid #087ca7; color: #fff; background: #087ca7; }
.desktop-cockpit .alarm-reject,
.desktop-cockpit .alarm-reject-confirm { border: 1px solid #b42318; color: #b42318; background: #fff; }
.desktop-cockpit .alarm-reject-confirm { color: #fff; background: #b42318; }
.desktop-cockpit button:disabled { cursor: not-allowed; opacity: 0.5; }

.desktop-cockpit .alarm-rule-content { flex: 1 1 auto; min-height: 220px; overflow: auto; padding: 16px 20px; }
.desktop-cockpit .alarm-rule-table-wrap { min-width: 800px; }
.desktop-cockpit .alarm-rule-table,
.desktop-cockpit .alarm-suggestion-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.desktop-cockpit .alarm-rule-table th,
.desktop-cockpit .alarm-suggestion-table th { padding: 9px 8px; border-bottom: 1px solid rgba(30, 72, 92, 0.14); color: #687e8d; font-size: 13px; text-align: left; }
.desktop-cockpit .alarm-rule-table td,
.desktop-cockpit .alarm-suggestion-table td { padding: 7px 6px; border-bottom: 1px solid rgba(30, 72, 92, 0.08); vertical-align: middle; font-size: 13px; }
.desktop-cockpit .alarm-rule-table th:nth-child(1) { width: 18%; }
.desktop-cockpit .alarm-rule-table th:nth-child(2) { width: 15%; }
.desktop-cockpit .alarm-rule-table th:nth-child(3) { width: 16%; }
.desktop-cockpit .alarm-rule-table th:nth-child(4) { width: 15%; }
.desktop-cockpit .alarm-rule-table th:nth-child(6) { width: 42px; }
.desktop-cockpit .alarm-rule-table input { width: 100%; height: 34px; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; color: #263f51; background: transparent; font: inherit; }
.desktop-cockpit .alarm-rule-table input:hover { border-color: rgba(30, 72, 92, 0.18); }
.desktop-cockpit .alarm-rule-table input:focus { outline: none; border-color: #00a8d8; box-shadow: 0 0 0 2px rgba(0, 168, 216, 0.1); }
.desktop-cockpit .alarm-rule-table .alarm-section-cell { vertical-align: top; background: #f5f9fa; }
.desktop-cockpit .alarm-rule-table .alarm-section-cell input { color: #183349; font-weight: 700; }
.desktop-cockpit .alarm-trend { display: block; overflow: hidden; color: #587080; text-overflow: ellipsis; white-space: nowrap; }
.desktop-cockpit .alarm-rule-empty,
.desktop-cockpit .alarm-rule-loading { padding: 48px 12px; color: #687e8d; text-align: center; }
.desktop-cockpit .alarm-icon-button { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 0; border-radius: 5px; color: #607787; background: transparent; font-size: 22px; cursor: pointer; }
.desktop-cockpit .alarm-icon-button:hover { background: #eef5f7; }
.desktop-cockpit .alarm-icon-button.is-danger:hover { color: #b42318; background: #fff2f0; }
.desktop-cockpit .alarm-feedback { margin-top: 10px; padding: 9px 11px; border-radius: 4px; font-size: 13px; }
.desktop-cockpit .alarm-feedback.is-error { color: #b42318; background: #fff2f0; }
.desktop-cockpit .alarm-feedback.is-success { color: #067647; background: #ecfdf3; }
.desktop-cockpit .alarm-rule-foot { border-top: 1px solid rgba(30, 72, 92, 0.1); border-bottom: 0; background: #fff; }

.desktop-cockpit .alarm-modal-backdrop,
.desktop-cockpit .alarm-reject-backdrop { position: fixed; z-index: 1100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(17, 40, 57, 0.48); }
.desktop-cockpit .alarm-suggestion-dialog { display: flex; width: min(1120px, 100%); max-height: min(720px, calc(100dvh - 48px)); flex-direction: column; overflow: hidden; border: 1px solid rgba(30, 72, 92, 0.15); border-radius: 8px; background: #fff; box-shadow: 0 24px 64px rgba(18, 47, 70, 0.26); }
.desktop-cockpit .alarm-dynamic-dialog { display: flex; width: min(860px, 100%); max-height: min(680px, calc(100dvh - 48px)); flex-direction: column; overflow: hidden; border: 1px solid rgba(30, 72, 92, 0.15); border-radius: 8px; background: #fff; box-shadow: 0 24px 64px rgba(18, 47, 70, 0.26); }
.desktop-cockpit .alarm-suggestion-dialog > header,
.desktop-cockpit .alarm-suggestion-dialog > footer,
.desktop-cockpit .alarm-dynamic-dialog > header,
.desktop-cockpit .alarm-dynamic-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid rgba(30, 72, 92, 0.1); background: #f7fafb; }
.desktop-cockpit .alarm-suggestion-dialog h3,
.desktop-cockpit .alarm-dynamic-dialog h3 { margin: 0; color: #102f46; font-size: 20px; }
.desktop-cockpit .alarm-suggestion-dialog header p,
.desktop-cockpit .alarm-suggestion-dialog footer span { margin: 4px 0 0; color: #687e8d; font-size: 13px; }
.desktop-cockpit .alarm-suggestion-dialog > footer { border-top: 1px solid rgba(30, 72, 92, 0.1); border-bottom: 0; background: #fff; }
.desktop-cockpit .alarm-dynamic-dialog > footer { justify-content: flex-end; border-top: 1px solid rgba(30, 72, 92, 0.1); border-bottom: 0; background: #fff; }
.desktop-cockpit .alarm-dynamic-body { min-height: 180px; overflow: auto; padding: 14px 18px; }
.desktop-cockpit .alarm-dynamic-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.desktop-cockpit .alarm-dynamic-table th,
.desktop-cockpit .alarm-dynamic-table td { padding: 12px 14px; border-bottom: 1px solid rgba(30, 72, 92, 0.1); text-align: left; vertical-align: top; font-size: 13px; line-height: 1.65; }
.desktop-cockpit .alarm-dynamic-table th { color: #687e8d; background: #f7fafb; font-weight: 700; }
.desktop-cockpit .alarm-dynamic-table th:first-child { width: 24%; }
.desktop-cockpit .alarm-dynamic-table td:first-child { color: #183349; background: #f8fbfc; font-weight: 700; }
.desktop-cockpit .alarm-dynamic-table tbody tr:first-child td { color: #075f7e; background: #edf8fb; }
.desktop-cockpit .alarm-suggestion-body { min-height: 180px; overflow: auto; padding: 14px 18px; }
.desktop-cockpit .alarm-suggestion-table-wrap { min-width: 900px; }
.desktop-cockpit .alarm-suggestion-table th:nth-child(1) { width: 18%; }
.desktop-cockpit .alarm-suggestion-table th:nth-child(2) { width: 12%; }
.desktop-cockpit .alarm-suggestion-table th:nth-child(3),
.desktop-cockpit .alarm-suggestion-table th:nth-child(4) { width: 12%; }
.desktop-cockpit .alarm-suggestion-table th:nth-child(6) { width: 138px; }
.desktop-cockpit .alarm-suggestion-table tr.is-handled { background: #f8fafb; color: #607787; }
.desktop-cockpit .alarm-operation { display: inline-block; margin-right: 7px; padding: 2px 5px; border-radius: 3px; background: #edf4f6; color: #31536b; font-size: 11px; }
.desktop-cockpit .alarm-operation.is-delete { color: #b42318; background: #fff2f0; }
.desktop-cockpit .alarm-reason-cell { line-height: 1.55; }
.desktop-cockpit .alarm-suggestion-actions { white-space: nowrap; }
.desktop-cockpit .alarm-suggestion-actions button { min-height: 32px; padding: 5px 10px; }
.desktop-cockpit .alarm-suggestion-actions button + button { margin-left: 6px; }
.desktop-cockpit .alarm-decision { font-weight: 700; }
.desktop-cockpit .alarm-decision.is-accepted { color: #067647; }
.desktop-cockpit .alarm-decision.is-rejected { color: #b42318; }
.desktop-cockpit .alarm-decision.is-readonly { color: #687e8d; font-size: 12px; }

.desktop-cockpit .alarm-reject-backdrop { z-index: 1200; background: rgba(17, 40, 57, 0.58); }
.desktop-cockpit .alarm-reject-dialog { width: min(500px, 100%); padding: 20px; border-radius: 8px; background: #fff; box-shadow: 0 24px 64px rgba(18, 47, 70, 0.3); }
.desktop-cockpit .alarm-reject-dialog h3 { margin: 0; color: #102f46; font-size: 19px; }
.desktop-cockpit .alarm-reject-dialog p { margin: 7px 0 14px; color: #687e8d; font-size: 13px; line-height: 1.5; }
.desktop-cockpit .alarm-reject-dialog textarea { width: 100%; min-height: 116px; resize: vertical; padding: 10px; border: 1px solid rgba(30, 72, 92, 0.2); border-radius: 5px; color: #263f51; font: inherit; }
.desktop-cockpit .alarm-reject-dialog textarea:focus { outline: none; border-color: #00a8d8; box-shadow: 0 0 0 2px rgba(0, 168, 216, 0.1); }
.desktop-cockpit .alarm-reject-dialog > div:last-child { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.desktop-cockpit .alarm-edit-backdrop { position: fixed; z-index: 1200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(17, 40, 57, 0.58); }
.desktop-cockpit .alarm-edit-dialog { width: min(520px, 100%); padding: 20px; border-radius: 8px; background: #fff; box-shadow: 0 24px 64px rgba(18, 47, 70, 0.3); }
.desktop-cockpit .alarm-edit-dialog h3 { margin: 0; color: #102f46; font-size: 19px; }
.desktop-cockpit .alarm-edit-dialog p { margin: 7px 0 14px; color: #687e8d; font-size: 13px; line-height: 1.5; }
.desktop-cockpit .alarm-edit-dialog label { display: block; margin-top: 12px; color: #31536b; font-size: 13px; font-weight: 700; }
.desktop-cockpit .alarm-edit-dialog input,
.desktop-cockpit .alarm-edit-dialog textarea { width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid rgba(30, 72, 92, 0.2); border-radius: 5px; color: #263f51; background: #fff; font: inherit; font-weight: 400; }
.desktop-cockpit .alarm-edit-dialog input:focus,
.desktop-cockpit .alarm-edit-dialog textarea:focus { outline: none; border-color: #00a8d8; box-shadow: 0 0 0 2px rgba(0, 168, 216, 0.1); }
.desktop-cockpit .alarm-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.desktop-cockpit .alarm-edit-accept { border: 1px solid #067647; color: #067647; background: #fff; }

@media (max-width: 720px) {
  .desktop-cockpit .alarm-rule-page { min-height: calc(100dvh - 52px); border-radius: 0; }
  .desktop-cockpit .alarm-rule-head { align-items: flex-start; flex-direction: column; padding: 14px; }
  .desktop-cockpit .alarm-head-actions { width: 100%; }
  .desktop-cockpit .alarm-head-actions button { flex: 1 1 0; }
  .desktop-cockpit .alarm-rule-content { padding: 12px; }
  .desktop-cockpit .alarm-modal-backdrop { padding: 0; }
  .desktop-cockpit .alarm-suggestion-dialog { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .desktop-cockpit .alarm-dynamic-dialog { width: 100%; max-height: calc(100dvh - 24px); }
  .desktop-cockpit .alarm-suggestion-dialog > footer { align-items: flex-start; flex-direction: column; }
  .desktop-cockpit .alarm-suggestion-table-wrap { min-width: 0; }
  .desktop-cockpit .alarm-suggestion-table,
  .desktop-cockpit .alarm-suggestion-table tbody,
  .desktop-cockpit .alarm-suggestion-table tr,
  .desktop-cockpit .alarm-suggestion-table td { display: block; width: 100%; }
  .desktop-cockpit .alarm-suggestion-table thead { display: none; }
  .desktop-cockpit .alarm-suggestion-table tr { margin-bottom: 12px; padding: 8px 10px; border: 1px solid rgba(30, 72, 92, 0.12); border-radius: 6px; }
  .desktop-cockpit .alarm-suggestion-table td { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 7px 0; border: 0; white-space: normal; }
  .desktop-cockpit .alarm-suggestion-table td::before { color: #687e8d; font-weight: 700; }
  .desktop-cockpit .alarm-suggestion-table td:nth-child(1)::before { content: "工段"; }
  .desktop-cockpit .alarm-suggestion-table td:nth-child(2)::before { content: "指标"; }
  .desktop-cockpit .alarm-suggestion-table td:nth-child(3)::before { content: "修改前"; }
  .desktop-cockpit .alarm-suggestion-table td:nth-child(4)::before { content: "修改后"; }
  .desktop-cockpit .alarm-suggestion-table td:nth-child(5)::before { content: "原因"; }
  .desktop-cockpit .alarm-suggestion-table td:nth-child(6)::before { content: "操作"; }
  .desktop-cockpit .alarm-suggestion-actions { display: flex; align-items: center; gap: 8px; white-space: normal; }
  .desktop-cockpit .alarm-suggestion-actions::before { flex: 0 0 64px; }
  .desktop-cockpit .alarm-suggestion-actions button + button { margin-left: 0; }
}
