.alarm-history-head p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.alarm-history-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.alarm-stat-card { min-height: 116px; padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.alarm-stat-card small { color: var(--muted); }
.alarm-stat-card strong { display: block; margin-top: 8px; font-size: 27px; }
.alarm-stat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--tone); color: var(--accent); font-size: 22px; font-weight: 800; }
.alarm-history-toolbar { display: flex; gap: 18px; align-items: center; padding: 16px 18px; margin-bottom: 18px; }
.alarm-history-toolbar .search { max-width: none; }
.alarm-filter-tabs { display: flex; flex: none; gap: 8px; }
.alarm-filter-tabs button { padding: 10px 15px; border: 0; border-radius: 10px; background: #f1f3f7; color: #607089; font-size: 12px; font-weight: 700; }
.alarm-filter-tabs button.active { background: #2f80ed; color: #fff; box-shadow: 0 7px 15px rgba(47,128,237,.2); }
.alarm-history-table { padding: 0; overflow: hidden; }
.alarm-history-table table { min-width: 1280px; }
.alarm-history-table th { white-space: nowrap; }
.alarm-history-table td { vertical-align: middle; line-height: 1.45; }
.alarm-history-table td:nth-child(2) strong { font-size: 13px; }
.alarm-history-table td:nth-child(3) { min-width: 280px; }
.alarm-history-table td:nth-child(7) { min-width: 180px; max-width: 260px; color: #687891; }
.alarm-status { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 6px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; }
.alarm-status.processing { background: #fff0df; color: #dc6a09; }
.alarm-status.processed { background: #dcfae9; color: #11945b; }
.alarm-status.closed { background: #eef1f5; color: #59697e; }
.alarm-view-button { width: 34px; height: 34px; border: 1px solid #dbe5f4; border-radius: 9px; background: #fff; color: #2878ee; font-weight: 800; }
.alarm-detail-card { width: min(810px, 100%); max-height: calc(100vh - 38px); overflow: auto; }
.alarm-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 36px; margin: 24px 0; }
.alarm-detail-item { min-width: 0; }
.alarm-detail-item.full { grid-column: 1 / -1; }
.alarm-detail-item small { display: block; margin-bottom: 7px; color: #73839a; }
.alarm-detail-item strong { display: block; overflow-wrap: anywhere; font-size: 15px; line-height: 1.5; }
.alarm-detail-field { display: grid; gap: 8px; margin-top: 18px; color: #61718a; font-size: 12px; font-weight: 700; }
.alarm-detail-field select,
.alarm-detail-field textarea { width: 100%; border: 1px solid #dbe3ee; border-radius: 12px; padding: 12px 14px; outline: 0; background: #fff; color: var(--ink); resize: vertical; }
.alarm-detail-field select { height: 48px; }
.alarm-detail-field textarea:focus,
.alarm-detail-field select:focus { border-color: #2f80ed; box-shadow: 0 0 0 3px rgba(47,128,237,.1); }
.alarm-detail-field small { justify-self: end; color: #8a98aa; }

@media (max-width: 1100px) {
  .alarm-history-summary { grid-template-columns: repeat(2, 1fr); }
  .alarm-history-toolbar { align-items: stretch; flex-direction: column; }
  .alarm-filter-tabs { flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .alarm-history-summary { grid-template-columns: 1fr; }
  .alarm-stat-card { min-height: 96px; }
  .alarm-filter-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .alarm-detail-card { padding: 24px 20px; }
  .alarm-detail-grid { grid-template-columns: 1fr; gap: 15px; }
  .alarm-detail-item.full { grid-column: auto; }
}
