/* Stage 603: In-App Notification Bell, Binding Modal & Boss 12-Switch Control Center */
#notifBellBtn603 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid #ffd4b0;
  background: #fff4e8;
  color: #202124;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#notifBellBtn603:hover {
  background: #ffe8d0;
  border-color: #ff9a47;
}
#notifBellBtn603.hidden {
  display: none !important;
}
#notifBellBtn603 .ntf603-bell-ico {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #b44d00;
}
#notifBellBtn603 .ntf603-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d93025;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
}
#notifBellBtn603 .ntf603-badge.zero {
  display: none;
}

@media (max-width: 520px) {
  #notifBellBtn603 {
    padding: 6px 8px;
    gap: 4px;
    min-width: 40px;
    font-size: 12.5px;
  }
  #notifBellBtn603 .ntf603-bell-label {
    display: none;
  }
}

/* Modal / Drawer */
dialog.ntf603-dialog {
  width: min(680px, calc(100vw - 20px));
  max-height: 88dvh;
  padding: 0;
  border: 1px solid #e6ddd2;
  border-radius: 16px;
  background: #fbfaf7;
  color: #202124;
  box-shadow: 0 18px 50px rgba(24, 20, 16, 0.24);
  overflow: hidden;
}
dialog.ntf603-dialog::backdrop {
  background: rgba(20, 18, 15, 0.45);
}
.ntf603-shell {
  display: flex;
  flex-direction: column;
  max-height: 88dvh;
}
.ntf603-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fff6ec 100%);
  border-bottom: 1px solid #ece3d8;
  flex-wrap: wrap;
}
.ntf603-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ntf603-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ntf603-btn {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid #ddd4c8;
  background: #ffffff;
  color: #202124;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ntf603-btn:hover:not(:disabled) {
  background: #f5efe8;
}
.ntf603-btn.primary {
  background: #ff7100 !important;
  border-color: #ff7100 !important;
  color: #202124 !important;
  font-weight: 800;
}
.ntf603-btn.primary:hover:not(:disabled) {
  background: #f06600 !important;
}
.ntf603-btn.soft {
  background: #fff3e6;
  border-color: #ffd3ad;
  color: #9e4200;
}
.ntf603-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ntf603-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 18px;
  background: #ffffff;
  border-bottom: 1px solid #efe7dd;
  flex-wrap: wrap;
}
.ntf603-tab-group {
  display: flex;
  gap: 6px;
}
.ntf603-tab {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #e4dad0;
  background: #fbfaf7;
  color: #5f6368;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ntf603-tab[aria-selected="true"] {
  background: #202124;
  border-color: #202124;
  color: #ffffff;
}
.ntf603-channel-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5f6368;
  flex-wrap: wrap;
}
.ntf603-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.ntf603-chip.ok {
  background: #ecfaf2;
  color: #067a3d;
  border: 1px solid #bcecd0;
}
.ntf603-chip.warn {
  background: #fff3e6;
  color: #a64600;
  border: 1px solid #ffd4ad;
}
.ntf603-chip.muted {
  background: #f1f3f4;
  color: #5f6368;
  border: 1px solid #dfe2e6;
}

.ntf603-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ntf603-status {
  margin: 0;
  font-size: 13px;
  color: #9e4200;
}
.ntf603-item {
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1px solid #ebe2d8;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ntf603-item:hover {
  border-color: #ffb06b;
  box-shadow: 0 3px 10px rgba(255, 113, 0, 0.08);
}
.ntf603-item.unread {
  background: #fffcf8;
  border-color: #ffd5b0;
}
.ntf603-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff7100;
  margin-top: 6px;
  flex-shrink: 0;
}
.ntf603-item:not(.unread) .ntf603-dot {
  background: #d5d8dc;
}
.ntf603-item-main {
  flex: 1;
  min-width: 0;
}
.ntf603-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ntf603-item-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #202124;
  line-height: 1.35;
}
.ntf603-item-time {
  font-size: 11.5px;
  color: #70757a;
  white-space: nowrap;
  flex-shrink: 0;
}
.ntf603-item-hl {
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #fff2e5;
  border-left: 3px solid #ff7100;
  color: #933a00;
  font-size: 12.5px;
  font-weight: 700;
}
.ntf603-item-desc {
  margin-top: 5px;
  font-size: 13px;
  color: #4a4f55;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ntf603-item-foot {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #1a73e8;
  font-weight: 700;
}
.ntf603-empty {
  text-align: center;
  padding: 36px 14px;
  color: #70757a;
  font-size: 14px;
}

/* Binding view inside dialog */
.ntf603-bind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ntf603-bind-card {
  background: #ffffff;
  border: 1px solid #e9e0d6;
  border-radius: 13px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ntf603-bind-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ntf603-bind-card p {
  margin: 0;
  font-size: 13px;
  color: #52575d;
  line-height: 1.55;
}
.ntf603-qr-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fbfaf7;
  border: 1px dashed #decab6;
  border-radius: 10px;
  padding: 10px;
}
.ntf603-qr-wrap img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #e6ddd2;
  flex-shrink: 0;
}
.ntf603-mode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ntf603-mode-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid #e6ddd2;
  background: #ffffff;
  cursor: pointer;
}
.ntf603-mode-opt input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #ff7100;
  flex-shrink: 0;
}
.ntf603-mode-opt b {
  display: block;
  font-size: 13.5px;
  color: #202124;
}
.ntf603-mode-opt small {
  display: block;
  font-size: 12px;
  color: #5f6368;
  margin-top: 2px;
  line-height: 1.45;
}

/* Boss Settings Panel inside view-management */
.ntf603-settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1040px;
}
.ntf603-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #fff5ea 100%);
  border: 1px solid #ffd4b0;
}
.ntf603-banner h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.ntf603-banner p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #5f6368;
}
.ntf603-sec {
  background: #ffffff;
  border: 1px solid #e9e1d8;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ntf603-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f2eae1;
  padding-bottom: 10px;
}
.ntf603-sec-head h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
}
.ntf603-sec-head small {
  color: #5f6368;
  font-size: 12.5px;
}
.ntf603-wecom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ntf603-wecom-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #3c4043;
}
.ntf603-wecom-grid input[type="text"],
.ntf603-wecom-grid input[type="password"],
.ntf603-wecom-grid input[type="url"] {
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #d8cec2;
  border-radius: 9px;
  font-size: 14.5px;
  background: #fffdf9;
  color: #202124;
  width: 100%;
  box-sizing: border-box;
}
.ntf603-switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ntf603-sw-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid #ede5dc;
  background: #fcfbf9;
}
.ntf603-sw-card.sched {
  background: #fffaf4;
  border-color: #f3dcc4;
  flex-direction: column;
}
.ntf603-sw-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.ntf603-sw-text b {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #202124;
}
.ntf603-sw-text small {
  display: block;
  margin-top: 3px;
  font-size: 12.2px;
  color: #5f6368;
  line-height: 1.45;
}
.ntf603-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  background: #fff0e0;
  color: #b44d00;
  white-space: nowrap;
}
.ntf603-tag.cron {
  background: #fef3c7;
  color: #92400e;
}
.ntf603-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 25px;
  flex-shrink: 0;
  cursor: pointer;
}
.ntf603-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ntf603-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cfd4da;
  transition: background 0.18s ease;
}
.ntf603-slider::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}
.ntf603-toggle input:checked + .ntf603-slider {
  background: #07c160;
}
.ntf603-toggle input:checked + .ntf603-slider::before {
  transform: translateX(19px);
}

.ntf603-cron-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed #edd8c2;
}
.ntf603-cron-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #3c4043;
}
.ntf603-cron-controls input[type="time"],
.ntf603-cron-controls input[type="number"],
.ntf603-cron-controls select {
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid #d8cec2;
  border-radius: 8px;
  font-size: 13.5px;
  background: #ffffff;
  color: #202124;
}
.ntf603-targets-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}
.ntf603-target-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #efe4d7;
  border-radius: 9px;
  padding: 7px 10px;
}
.ntf603-target-row select {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #d8cec2;
  border-radius: 7px;
  font-size: 13px;
  background: #fffdf9;
}

.ntf603-staff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ntf603-staff-table th,
.ntf603-staff-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #efe7dd;
  text-align: left;
  vertical-align: middle;
}
.ntf603-staff-table th {
  font-size: 12px;
  color: #5f6368;
  background: #fbfaf7;
}
.ntf603-staff-table input[type="text"] {
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid #d8cec2;
  border-radius: 7px;
  font-size: 13px;
  width: 130px;
  max-width: 100%;
}
.ntf603-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.ntf603-save-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ntf603-guide {
  background: #fff9f2;
  border: 1px dashed #f0c293;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #6b3d12;
  line-height: 1.6;
}

.ntf603-sec > label:has(#ntf603WecomEnable) {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: fit-content !important;
  margin: 0 !important;
  text-align: left !important;
}
#ntf603WecomEnable {
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  display: inline-block !important;
}

@media (max-width: 760px) {
  .ntf603-bind-grid,
  .ntf603-wecom-grid,
  .ntf603-switch-grid {
    grid-template-columns: 1fr;
  }
  .ntf603-head {
    padding: 11px 14px;
    gap: 8px;
  }
  .ntf603-head h2 {
    font-size: 16.5px;
  }
  .ntf603-head-actions {
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .ntf603-head-actions .ntf603-btn {
    min-height: 36px !important;
    padding: 6px 10px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }
  .ntf603-head-actions #ntf603CloseBtn {
    margin-left: auto;
  }
  .ntf603-tabs {
    padding: 8px 14px;
    gap: 6px;
  }
  .ntf603-body {
    padding: 10px 14px 14px;
  }
}
