/* Block Watch – C-end style (Alarms tab) */

/* Main: 与 body 同色；flex 列布局让白卡撑满，底边无灰条 */
.workspace .main.bw-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background-color: #f5f5f5;
  padding-top: 0;
  padding-bottom: 0;
}

/* Tab bar – 固定高度，不参与 flex 伸缩 */
.bw-tabs-wrap {
  flex-shrink: 0;
  background-color: #fff;
  padding: 0 24px;
  margin: 0 -24px;
  min-height: 48px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #e8e8e8;
}

.bw-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.bw-tab {
  padding: 14px 20px 12px;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, font-weight 0.2s;
}

.bw-tab:hover {
  color: #333;
}

.bw-tab.active {
  font-weight: 600;
  color: #1a1a1a;
  border-bottom-color: #edb500;
}

/* Canvas – 用 flex:1 填满主区域；上下灰区一致（各 20px） */
.bw-canvas {
  flex: 1;
  min-height: 0;
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px 8px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  width: 100%;
}

.bw-page {
  width: 100%;
}

/* Tab content */
.bw-tab-panel {
  display: none;
}

.bw-tab-panel.active {
  display: block;
}

/* Toolbar: one row – My/Alarms + filters + search + refresh + Delete + Create Alarm，统一高度 40px */
.bw-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  min-width: 0;
}

.bw-toolbar .bw-segmented {
  height: 40px;
  box-sizing: border-box;
}

.bw-toolbar .bw-segmented button {
  padding: 8px 18px;
}

.bw-toolbar > .bw-user-filter-wrap {
  flex: 1;
  min-width: 140px;
}

.bw-toolbar .bw-user-filter-trigger {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
}

.bw-toolbar > .bw-select-wrap {
  flex: 1;
  min-width: 140px;
}

.bw-toolbar > .bw-select-wrap .bw-form-select-with-arrow {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 28px 0 12px;
}

/* Alarm Time / Mark Time + 日期范围组合：始终同行，不可拆分 */
.bw-notif-timetype-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.bw-notif-timetype-group .bw-select-wrap .bw-form-select-with-arrow {
  height: 40px;
  box-sizing: border-box;
  padding: 0 28px 0 12px;
}

.bw-toolbar .bw-search-wrap .bw-form-input {
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px 0 36px;
}

.bw-toolbar .bw-refresh-btn {
  width: 40px;
  height: 40px;
}

.bw-toolbar .bw-btn-secondary,
.bw-toolbar .bw-btn-primary,
.bw-toolbar a.bw-btn-primary {
  height: 40px;
  box-sizing: border-box;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* My Alarms / All Alarms – segmented: light track, selected = dark pill + white text */
.bw-segmented {
  display: inline-flex;
  background: #e2e2e2;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}

.bw-segmented button {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.bw-segmented button:hover:not(.active) {
  color: #333;
}

.bw-segmented button.active {
  background: #1a1d26;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.bw-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
  min-width: max-content;
}

/* Select with visible dropdown arrow (Resource Type, Alarm Type) */
.bw-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.bw-select-wrap .bw-form-select-with-arrow {
  width: 140px;
  min-width: 140px;
  padding: 8px 28px 8px 12px;
  font-size: 13px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.bw-select-wrap .bw-form-select-with-arrow:focus {
  border-color: #edb500;
}

.bw-select-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
  pointer-events: none;
}

/* Delete – light grey button, dark text */
.bw-btn-secondary {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  background: #f1f3f5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.bw-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
  color: #374151;
}

.bw-btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Create Alarm – 品牌色 #edb500，黄底深色字 */
.bw-btn-primary,
a.bw-btn-primary {
  display: inline-block;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1000;
  background: #edb500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.05s;
  box-sizing: border-box;
}

.bw-btn-primary:hover {
  background: #d4a300;
  color: #1a1000;
}

.bw-btn-primary:active {
  transform: scale(0.98);
}

.bw-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bw-search-wrap {
  flex: 1;
  min-width: 160px;
  position: relative;
}

.bw-search-wrap .bw-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #999;
  pointer-events: none;
}

.bw-search-wrap .bw-form-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.bw-search-wrap .bw-form-input:focus {
  border-color: #edb500;
}

.bw-search-wrap .bw-form-input::placeholder {
  color: #999;
}

.bw-refresh-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.bw-refresh-btn:hover {
  background: #f1f5f9;
  color: #475569;
}

.bw-refresh-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* User filter – multi-select dropdown */
.bw-user-filter-wrap {
  position: relative;
  flex-shrink: 0;
}

.bw-user-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 140px;
  min-width: 140px;
  padding: 8px 12px;
  font-size: 13px;
  color: #333;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.bw-user-filter-trigger:hover {
  border-color: #ccc;
}

.bw-user-filter-trigger[aria-expanded="true"] {
  border-color: #edb500;
}

.bw-user-filter-chevron {
  font-size: 10px;
  color: #666;
  margin-left: 8px;
}

.bw-user-filter-trigger[aria-expanded="true"] .bw-user-filter-chevron {
  transform: rotate(180deg);
}

.bw-user-filter-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  max-height: 280px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
  display: none;
}

.bw-user-filter-dropdown.open {
  display: block;
}

.bw-user-filter-list {
  overflow-y: auto;
  max-height: 220px;
  padding: 6px 0;
}

.bw-user-filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
}

.bw-user-filter-item:hover {
  background: #f5f5f5;
}

.bw-user-filter-item input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.bw-user-filter-item span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-user-filter-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 0;
}

.bw-user-filter-clear {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  color: #555;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.bw-user-filter-clear:hover {
  background: #f5f5f5;
  color: #333;
}

.bw-user-filter-clear-icon {
  flex-shrink: 0;
  color: #666;
}

/* Table */
.bw-table-wrap {
  overflow-x: auto;
  border: 1px solid #eef0f3;
  border-radius: 8px;
}

.bw-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  font-size: 13px;
}

.bw-schedules-table {
  min-width: 560px;
}

.bw-notif-table {
  min-width: 960px;
}

.bw-table th {
  text-align: left;
  padding: 11px 14px;
  font-weight: 500;
  color: #64748b;
  background: #f5f7fb;
  border-bottom: 1px solid #eef0f3;
  white-space: nowrap;
}

.bw-table th.bw-th-sortable {
  cursor: pointer;
  user-select: none;
}

.bw-table th .bw-sort-icon {
  margin-left: 4px;
  font-size: 10px;
  color: #b0b8c4;
}

.bw-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f2f5;
  color: #333;
  white-space: nowrap;
}

.bw-table tbody tr:hover {
  background: #f8f9fc;
}

.bw-table tbody tr:last-child td {
  border-bottom: none;
}

.bw-table .bw-td-checkbox {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}

.bw-table .bw-td-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.bw-table .bw-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bw-table .bw-id-link {
  color: #2563eb;
  font-weight: 400;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, monospace;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.bw-table .bw-id-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Pagination */
.bw-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0;
  margin-top: 14px;
  font-size: 13px;
  color: #94a3b8;
  min-height: 36px;
}

.bw-pagination-total {
  color: #94a3b8;
  line-height: 36px;
  margin-right: 4px;
}

.bw-pagination-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.bw-pagination-nav button {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  box-sizing: border-box;
}

.bw-pagination-nav button:hover:not(:disabled) {
  background: #f1f5f9;
  color: #1e293b;
}

.bw-pagination-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bw-pagination-nav #bw-page-num,
.bw-pagination-nav [id$="-page-num"] {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
  background: #f1f5f9;
  border-radius: 6px;
}

.bw-pagination-perpage {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}

.bw-pagination-perpage select {
  height: 32px;
  padding: 0 24px 0 10px;
  font-size: 13px;
  border: 1px solid #e5e9f0;
  border-radius: 6px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: #4b5563;
  cursor: pointer;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

/* Alarm name cell with inline edit */
.bw-cell-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bw-cell-name .bw-name-text {
  flex: 1;
  min-width: 0;
}

.bw-cell-name .bw-edit-pencil {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 2px;
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.bw-cell-name:hover .bw-edit-pencil {
  opacity: 1;
}

.bw-cell-name .bw-edit-pencil:hover {
  color: #edb500;
}

.bw-cell-name .bw-name-input {
  width: 100%;
  min-width: 120px;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #edb500;
  border-radius: 6px;
  outline: none;
}

/* Tags */
.bw-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  white-space: nowrap;
}

.bw-tag-org {
  background: rgba(237, 181, 0, 0.12);
  color: #a07800;
}

.bw-tag-member {
  background: rgba(100, 116, 139, 0.10);
  color: #64748b;
}

/* Type indicator icons in Name column */
.bw-type-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

.bw-type-icon-org {
  fill: #edb500;
}

.bw-type-icon-member {
  fill: #94a3b8;
}

/* Actions column */
.bw-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bw-action-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: #666;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.bw-action-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.bw-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Empty state */
.bw-empty {
  text-align: center;
  padding: 48px 24px;
  background: #fafbfc;
  border: 1px solid #eef0f3;
  border-radius: 10px;
}

.bw-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: #d1d9e6;
}

.bw-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 6px 0;
}

.bw-empty-desc {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 20px 0;
}

/* Modal overlay */
.bw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.bw-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.bw-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.96);
  transition: transform 0.2s;
}

.bw-modal-overlay.open .bw-modal {
  transform: scale(1);
}

.bw-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.bw-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.bw-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.bw-form-group {
  margin-bottom: 20px;
}

.bw-form-group:last-child {
  margin-bottom: 0;
}

.bw-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.bw-form-label .required {
  color: #edb500;
}

.bw-form-input,
.bw-form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.bw-form-input:focus,
.bw-form-select:focus {
  border-color: #edb500;
}

.bw-form-select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding-right: 36px;
}

/* Rule & Schedule pairs */
.bw-pairs {
  margin-top: 8px;
}

.bw-pair-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.bw-pair-row .bw-form-select {
  flex: 1;
  min-width: 0;
}

.bw-pair-row .bw-remove-pair {
  flex-shrink: 0;
  width: 36px;
  height: 38px;
  padding: 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.bw-pair-row .bw-remove-pair:hover {
  background: #fafafa;
  color: #333;
}

.bw-add-pair {
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #edb500;
  background: rgba(237, 181, 0, 0.1);
  border: 1px dashed #edb500;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.bw-add-pair:hover {
  background: rgba(201, 162, 39, 0.15);
}

.bw-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Drawer – 设计稿一比一：白底、左侧圆角、阴影；标题加关闭圈钮；区块标题加粗；键值左/右对齐；Endpoint URL + 复制图标 */
.bw-drawer-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}
.bw-drawer-overlay.open {
  pointer-events: auto;
  cursor: pointer;
}

.bw-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.bw-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 720px;
  pointer-events: auto;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  border-radius: 12px 0 0 12px;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  cursor: default;
}

.bw-drawer-overlay.open .bw-drawer {
  transform: translateX(0);
}

.bw-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.bw-drawer-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.bw-drawer-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: #4a4a4a;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.bw-drawer-close:hover {
  background: #333;
  color: #fff;
}

.bw-drawer-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.bw-drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.bw-drawer-section {
  margin-bottom: 28px;
}

.bw-drawer-section:last-child {
  margin-bottom: 0;
}

.bw-drawer-section-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.bw-drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  font-size: 14px;
}

.bw-drawer-row:last-child {
  margin-bottom: 0;
}

.bw-drawer-label {
  color: #666;
  flex-shrink: 0;
}

.bw-drawer-value {
  color: #1a1a1a;
  text-align: right;
  min-width: 0;
}

.bw-drawer-targets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.bw-drawer-target-tag {
  display: inline-block;
  padding: 6px 10px;
  font-size: 13px;
  color: #333;
  background: #f0f0f0;
  border-radius: 6px;
}

.bw-endpoint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.bw-endpoint-url {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #333;
}

.bw-copy-icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.bw-copy-icon-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.bw-copy-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Rule and Schedule in drawer：标题右侧铅笔图标；只读为灰底下拉样式 + 右侧垃圾桶 */
.bw-rs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bw-rs-header .bw-drawer-section-title {
  margin: 0;
}

.bw-rs-edit-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: #666;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.bw-rs-edit-btn:hover {
  background: #f0f0f0;
  color: #edb500;
}

.bw-rs-edit-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.bw-rs-read-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bw-rs-read-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bw-rs-read-cell {
  flex: 1;
  min-width: 0;
  padding: 10px 12px 10px 14px;
  font-size: 14px;
  color: #333;
  background: #f0f0f0;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.bw-rs-trash-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.bw-rs-trash-btn:hover {
  background: #f5f5f5;
  color: #c00;
}

.bw-rs-read-row .bw-rs-trash-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f5;
}

.bw-rs-read-row .bw-rs-trash-btn:disabled:hover {
  background: #f5f5f5;
  color: #666;
}

.bw-rs-trash-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* 与创建页 Rule and Schedule 一致：行距、白底下拉、带边框删除钮、虚线添加钮 */
.bw-drawer .bw-pairs {
  width: 100%;
  margin-top: 8px;
}

.bw-drawer .bw-pair-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
}

.bw-drawer .bw-pair-row .bw-form-select {
  flex: 1;
  min-width: 200px;
  min-height: 40px;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-sizing: border-box;
}

.bw-drawer .bw-pair-row .bw-form-select:focus {
  border-color: #edb500;
  outline: none;
}

.bw-drawer .bw-pair-row .bw-rs-trash-btn,
.bw-drawer .bw-pair-row .bw-remove-pair {
  flex-shrink: 0;
  align-self: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.bw-drawer .bw-pair-row .bw-rs-trash-btn:hover,
.bw-drawer .bw-pair-row .bw-remove-pair:hover {
  background: #fafafa;
  color: #333;
}

.bw-drawer .bw-pair-row .bw-rs-trash-btn:disabled,
.bw-drawer .bw-pair-row .bw-remove-pair:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f5;
}

.bw-drawer .bw-pair-row .bw-rs-trash-btn:disabled:hover,
.bw-drawer .bw-pair-row .bw-remove-pair:disabled:hover {
  background: #f5f5f5;
  color: #666;
}

.bw-drawer .bw-rs-trash-btn svg,
.bw-drawer .bw-pair-row .bw-remove-pair svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.bw-drawer .bw-add-new-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.bw-drawer .bw-add-new-row:hover {
  border-color: #999;
  background: #fafafa;
}

.bw-drawer .bw-add-new-row:focus {
  outline: 2px solid #edb500;
  outline-offset: 2px;
}

.bw-drawer-rs-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

/* Delete Alarm 二次确认弹窗 */
.bw-delete-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.bw-delete-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  cursor: pointer;
}

.bw-delete-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.bw-delete-modal-header {
  position: relative;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8e8;
}

.bw-delete-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  text-align: center;
}

.bw-delete-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.bw-delete-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.bw-delete-modal-body {
  padding: 20px 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.bw-delete-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
  table-layout: fixed;
}

.bw-delete-modal-table th {
  background: #f5f5f5;
  padding: 10px 12px;
  font-weight: 600;
  color: #555;
  text-align: left;
  border: 1px solid #e8e8e8;
}

.bw-delete-modal-table th:nth-child(1) { width: 28%; }
.bw-delete-modal-table th:nth-child(2) { width: 22%; }
.bw-delete-modal-table th:nth-child(3) { width: 50%; }

.bw-delete-modal-table td {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  color: #333;
  word-break: break-word;
}

.bw-delete-modal-table td:nth-child(3) {
  min-width: 0;
  max-width: 100%;
}

.bw-delete-modal-prompt {
  font-size: 14px;
  color: #333;
  margin: 0 0 10px 0;
}

.bw-delete-modal-keyword {
  color: #c62828;
  font-weight: 600;
}

.bw-delete-confirm-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.bw-delete-confirm-input:focus {
  border-color: #edb500;
}

/* Used-by (cannot delete) modal */
.bw-used-by-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.bw-used-by-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  cursor: pointer;
}

.bw-used-by-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.bw-used-by-modal-header {
  position: relative;
  padding: 20px 24px 16px;
}

.bw-used-by-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  padding-right: 40px;
}

.bw-used-by-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.bw-used-by-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.bw-used-by-modal-body {
  padding: 20px 24px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

.bw-used-by-modal-body .bw-used-by-alarm-list {
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
}

.bw-used-by-modal-body .bw-used-by-alarm-list li {
  margin: 8px 0 0 0;
}

.bw-used-by-alarm-link {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.bw-used-by-alarm-link:hover {
  text-decoration: underline;
}

.bw-used-by-modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.bw-used-by-modal-body .bw-used-by-intro {
  margin: 0 0 12px 0;
}

.bw-used-by-alarm-link .bw-used-by-external-icon {
  margin-left: 6px;
  vertical-align: middle;
  display: inline-block;
}

.bw-delete-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.bw-delete-confirm-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #dc2626;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.bw-delete-confirm-btn:hover:not(:disabled) {
  background: #b71c1c;
}

.bw-delete-confirm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toast */
.bw-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #1a1a1a;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.25s, opacity 0.2s, visibility 0.2s;
}

.bw-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Placeholder tab content */
.bw-placeholder-content {
  padding: 48px 24px;
  text-align: center;
  color: #666;
  font-size: 15px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
}

.bw-placeholder-content strong {
  color: #333;
}

/* ========== Create Alarm page：与 Block Watch 一致，顶栏与主体分开 ========== */
.bw-main.bw-create-page {
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  padding: 0 32px 32px;
  min-height: 0;
}

/* 顶栏：与 tab 栏一致，白底、分隔线，与主体分离 */
.bw-create-header {
  background-color: #fff;
  padding: 0;
  margin: 0 -32px 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.bw-create-header .bw-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666;
  margin: 0;
  padding: 14px 32px 14px 32px;
}
.bw-create-header .bw-breadcrumb-sep {
  margin: 0 2px;
}

/* 上下灰区一致（各 20px） */
.bw-create-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 860px;
  width: 100%;
  margin: 20px 0;
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.bw-breadcrumb-link {
  color: #666;
  text-decoration: none;
}

.bw-breadcrumb-link:hover {
  color: #333;
  text-decoration: underline;
}

.bw-breadcrumb-sep {
  color: #999;
}

.bw-breadcrumb-current {
  color: #1a1a1a;
  font-weight: 600;
}

.bw-create-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 24px 0;
}

.bw-create-form {
  flex: 1;
  margin-bottom: 0;
}

/* 字段纵向排列：每行一个，标签在上、输入在下 */
.bw-create-card .bw-form-group {
  margin-bottom: 20px;
}

.bw-create-card .bw-form-group:last-child {
  margin-bottom: 0;
}

.bw-create-card .bw-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.bw-create-card .bw-form-input,
.bw-create-card .bw-form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.bw-create-card .bw-form-input:focus,
.bw-create-card .bw-form-select:focus {
  border-color: #edb500;
}

/* Rule and Schedule：flex 行布局，与表单项同宽，可搜索下拉，删除禁用 */
.bw-create-card .bw-pairs {
  width: 100%;
  margin-top: 8px;
}

.bw-create-card .bw-pair-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
}

.bw-create-card .bw-pair-row .bw-rs-select {
  flex: 1;
  min-width: 0;
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
}

.bw-create-card .bw-rs-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  text-align: left;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  border-radius: 8px;
}

.bw-create-card .bw-rs-select-trigger:hover {
  background: #fafafa;
}

.bw-create-card .bw-rs-select-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-create-card .bw-rs-select-arrow {
  flex-shrink: 0;
  font-size: 10px;
  color: #666;
  margin-left: 8px;
}

.bw-create-card .bw-rs-select-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: auto;
  min-width: 100%;
  top: 100%;
  z-index: 100;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  margin-top: 2px;
  overflow: hidden;
}

.bw-create-card .bw-rs-select-dropdown.open {
  display: block;
}

.bw-create-card .bw-rs-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  outline: none;
  box-sizing: border-box;
}

.bw-create-card .bw-rs-options {
  max-height: 200px;
  overflow-y: auto;
}

.bw-create-card .bw-rs-option {
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.bw-create-card .bw-rs-option:hover {
  background: #f5f5f5;
}

.bw-create-card .bw-pair-row .bw-rs-remove {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.bw-create-card .bw-rs-remove:hover:not(:disabled) {
  background: #fafafa;
  color: #333;
}

.bw-create-card .bw-rs-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f5;
}

/* Add New Row：虚线框、与表单项同宽、+ 与文字 */
.bw-add-new-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background: #fff;
  border: 1px dashed #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.bw-add-new-row:hover {
  border-color: #999;
  background: #fafafa;
}

.bw-add-new-row:focus {
  outline: 2px solid #edb500;
  outline-offset: 2px;
}

/* 按钮：右对齐；分割线与按钮区靠近卡片底部 */
.bw-create-footer {
  flex-shrink: 0;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 0 0;
  border-top: 1px solid #f0f2f5;
}

.bw-create-footer .bw-btn-secondary,
.bw-create-footer .bw-btn-primary {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  border-radius: 8px;
}

/* ========== Create Rule: Targets 级联多选、Escalation/Snooze、Trigger、Notification ========== */
.bw-targets-wrap {
  position: relative;
  width: 100%;
}

.bw-targets-trigger {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  color: #333;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.bw-targets-trigger:hover {
  border-color: #ccc;
}

.bw-targets-trigger.open {
  border-color: #edb500;
  outline: none;
}

.bw-targets-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.bw-targets-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 13px;
  color: #333;
  background: #f0f0f0;
  border-radius: 6px;
  flex-shrink: 0;
}

.bw-targets-tag-remove {
  padding: 0;
  border: none;
  background: none;
  color: #666;
  cursor: pointer;
  display: inline-flex;
  line-height: 1;
}

.bw-targets-tag-remove:hover {
  color: #333;
}

.bw-targets-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
  pointer-events: none;
}

.bw-targets-trigger.open .bw-targets-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.bw-targets-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 100;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.bw-targets-dropdown.open {
  display: block;
}

.bw-targets-search {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: none;
  border-bottom: 1px solid #e8e8e8;
  outline: none;
  box-sizing: border-box;
}

.bw-targets-cascade {
  display: flex;
  max-height: 280px;
}

.bw-targets-parents,
.bw-targets-children {
  overflow-y: auto;
  min-width: 0;
}

.bw-targets-parents {
  width: 50%;
  border-right: 1px solid #e8e8e8;
}

.bw-targets-children {
  width: 50%;
}

.bw-targets-parent-item,
.bw-targets-child-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  width: 100%;
  text-align: left;
  background: #fff;
}

.bw-targets-parent-item:hover,
.bw-targets-child-item:hover {
  background: #f5f5f5;
}

.bw-targets-parent-item .bw-targets-check,
.bw-targets-child-item .bw-targets-check {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
}

.bw-targets-parent-item.checked .bw-targets-check,
.bw-targets-child-item.checked .bw-targets-check {
  background: #edb500;
  border-color: #edb500;
}

.bw-targets-parent-item.partial .bw-targets-check {
  background: #edb500;
  border-color: #edb500;
  opacity: 0.6;
}

.bw-targets-parent-item .bw-targets-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #666;
}

.bw-targets-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  color: #2563eb;
  background: none;
  border: none;
  border-top: 1px solid #e8e8e8;
  cursor: pointer;
  transition: background 0.15s;
}

.bw-targets-clear:hover {
  background: #f5f5f5;
}

.bw-input-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bw-input-with-unit .bw-form-input {
  width: 80px;
  flex-shrink: 0;
}

.bw-input-unit {
  font-size: 14px;
  color: #666;
}

.bw-form-textarea {
  resize: vertical;
  min-height: 80px;
}

.bw-checkbox-group {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.bw-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.bw-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #edb500;
}

.bw-required {
  color: #c00;
}

.bw-form-input-readonly {
  min-height: 40px;
  background: #f5f5f5;
  color: #666;
  cursor: default;
}

/* Schedules table – Action column */
.bw-table .bw-th-action {
  width: 140px;
}

.bw-table .bw-action-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bw-table .bw-action-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.bw-table .bw-action-link-detail {
  color: #2563eb;
  font-weight: 500;
}

.bw-table .bw-action-link-detail:hover {
  text-decoration: underline;
}

.bw-table .bw-action-link-delete {
  color: #dc2626;
}

.bw-table .bw-action-link-delete:hover {
  text-decoration: underline;
}

/* Schedule Detail modal */
.bw-schedule-detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1003;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.bw-schedule-detail-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  cursor: pointer;
}

.bw-schedule-detail-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.bw-schedule-detail-modal-header {
  position: relative;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

.bw-schedule-detail-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  padding-right: 40px;
}

.bw-schedule-detail-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.bw-schedule-detail-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.bw-schedule-detail-modal-body {
  padding: 20px 24px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.bw-schedule-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
  min-width: 800px;
}

.bw-schedule-detail-table th,
.bw-schedule-detail-table td {
  padding: 10px 12px;
  border: 1px solid #e8e8e8;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  min-width: 90px;
}

.bw-schedule-detail-table th {
  background: #f5f5f5;
  font-weight: 600;
  color: #555;
}

.bw-schedule-detail-table td {
  color: #1a1a1a;
  cursor: pointer;
  min-height: 40px;
}

.bw-schedule-detail-table td:hover {
  background: #fafafa;
}

.bw-schedule-detail-table .bw-detail-cell-edit input {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #edb500;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.bw-schedule-detail-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Import Schedule modal */
.bw-import-schedule-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.bw-import-schedule-modal-overlay.open {
  opacity: 1;
  visibility: visible;
  cursor: pointer;
}

.bw-import-schedule-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  cursor: default;
}

.bw-import-schedule-modal-header {
  position: relative;
  padding: 20px 24px 16px;
}

.bw-import-schedule-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  text-align: center;
}

.bw-import-schedule-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.bw-import-schedule-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.bw-import-schedule-modal-body {
  padding: 20px 24px;
}

.bw-import-schedule-modal-body .bw-form-group {
  margin-bottom: 20px;
}

.bw-import-schedule-modal-body .bw-form-group:last-child {
  margin-bottom: 0;
}

.bw-import-schedule-modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Upload zone: empty state (dashed border + Upload), one-line height */
.bw-import-upload-zone {
  border: 1px dashed #d0d0d0;
  border-radius: 8px;
  min-height: 40px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.bw-import-upload-zone:hover {
  border-color: #edb500;
  background-color: #fffdf5;
}

/* 点击态：黄橙虚线框 + 浅黄背景 */
.bw-import-upload-zone:active,
.bw-import-upload-zone.bw-import-upload-zone-active {
  border-color: #edb500;
  background-color: #fff8e0;
}

.bw-import-upload-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw-import-upload-placeholder[aria-hidden="true"] {
  display: none;
}

.bw-import-upload-btn {
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

.bw-import-upload-zone:hover .bw-import-upload-btn,
.bw-import-upload-zone:active .bw-import-upload-btn,
.bw-import-upload-zone.bw-import-upload-zone-active .bw-import-upload-btn {
  color: #edb500;
}

/* Upload zone: uploading state */
.bw-import-uploading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: #666;
}

.bw-import-uploading[aria-hidden="false"] {
  display: flex;
}

.bw-import-upload-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e8e8e8;
  border-top-color: #edb500;
  border-radius: 50%;
  animation: bw-import-spin 0.8s linear infinite;
}

@keyframes bw-import-spin {
  to { transform: rotate(360deg); }
}

/* Upload zone: done state (success icon + filename + remove) */
.bw-import-upload-done {
  display: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}

.bw-import-upload-done[aria-hidden="false"] {
  display: flex;
}

.bw-import-upload-success-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bw-import-upload-success-icon svg {
  width: 14px;
  height: 14px;
}

.bw-import-file-name {
  flex: 1;
  font-size: 14px;
  color: #333;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-import-upload-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.bw-import-upload-remove:hover {
  background: #f0f0f0;
  color: #333;
}

/* ========== Notifications ========== */
.bw-notifications-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.bw-notif-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bw-notif-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.bw-notif-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.bw-notif-section-header .bw-notif-section-title {
  margin: 0;
}

.bw-notif-search-wrap {
  flex: 1;
  min-width: 520px;
}

.bw-notif-search-wrap .bw-form-input {
  width: 100%;
}

/* 时间范围筛选：与 Operation Dashboard Activity Log 一致 */
.bw-notif-daterange-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.bw-notif-daterange {
  display: flex;
  align-items: center;
  min-width: 320px;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  background-color: #fff;
  color: #333;
  position: relative;
}

.bw-notif-daterange .bw-notif-date-picker-hidden {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}

.bw-notif-daterange:focus-within {
  outline: none;
  border-color: #0066cc;
}

.bw-notif-daterange .bw-notif-daterange-start,
.bw-notif-daterange .bw-notif-daterange-end {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.bw-notif-daterange .bw-notif-daterange-start.placeholder,
.bw-notif-daterange .bw-notif-daterange-end.placeholder {
  color: #999;
}

.bw-notif-daterange .bw-notif-daterange-arrow {
  color: #999;
  margin: 0 6px;
  flex-shrink: 0;
}

.bw-notif-daterange .bw-notif-daterange-calendar {
  width: 36px;
  height: 36px;
  margin-left: 4px;
  padding: 0;
  border: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center;
  cursor: pointer;
  flex-shrink: 0;
}

.bw-notif-daterange .bw-notif-daterange-calendar:hover {
  opacity: 0.8;
}

.bw-notif-daterange-refresh {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bw-notif-daterange-refresh:hover {
  background: #f5f5f5;
  color: #333;
}

.bw-notif-table-wrap {
  overflow-x: auto;
}

.bw-notif-table {
  table-layout: auto;
}

.bw-notif-table .bw-notif-action-col {
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
  min-width: 180px;
}

.bw-notif-table thead .bw-notif-action-col {
  background: #f5f5f5;
}

.bw-notif-expand-col {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

.bw-notif-expand-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  line-height: 1;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bw-notif-expand-btn:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.bw-notif-action-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.bw-notif-action-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.bw-notif-action-link:hover {
  color: #1d4ed8;
}

.bw-notif-action-sep {
  color: #ccc;
  font-size: 13px;
}

.bw-notif-link {
  color: #2563eb;
  text-decoration: underline;
}

.bw-notif-link:hover {
  color: #1d4ed8;
}

.bw-notif-link .bw-used-by-external-icon {
  vertical-align: middle;
  margin-left: 2px;
}

.bw-notif-detail-row td {
  background: #fafafa;
  border-bottom: 1px solid #eee;
  padding: 12px 14px;
  vertical-align: top;
}

.bw-notif-detail-cell {
  font-size: 13px;
  color: #333;
  padding-left: 44px;
}

.bw-notif-detail-line {
  margin-bottom: 6px;
}

.bw-notif-detail-line:last-child {
  margin-bottom: 0;
}
