/* Dashboard styles — auth screens, layout, watch cards, settings, modal */
/* Clean Authority color system */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: #F7F8FC;
  color: #1A1A2E;
  min-height: 100%;
  line-height: 1.6;
}
h1,h2,h3,h4 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; line-height: 1.2; }
a { color: #00875A; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* AUTH SCREENS */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #F7F8FC;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border: 1.5px solid #E5E7EB;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(27,43,107,0.08);
}
.auth-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #1B2B6B;
  margin-bottom: 8px;
}
.auth-subtitle { color: #6B7280; font-size: 0.9rem; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.8rem; color: #6B7280; margin-bottom: 6px; font-weight: 500; }
.form-group input {
  width: 100%; padding: 12px 16px; background: #F7F8FC;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
  color: #1A1A2E; font-size: 0.95rem; outline: none; transition: border-color 0.2s;
}
.form-group input:focus { border-color: #FF6B35; }
.form-group input::placeholder { color: #9CA3AF; }
.form-group select {
  width: 100%; padding: 12px 16px; background: #F7F8FC;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
  color: #1A1A2E; font-size: 0.95rem; outline: none; appearance: none;
}
.form-group select:focus { border-color: #FF6B35; }
.btn-primary {
  width: 100%; padding: 14px; background: #FF6B35; color: #FFFFFF;
  font-weight: 700; font-size: 0.95rem; border: none; border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: #e85a27; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 0.85rem; color: #6B7280; }
.auth-switch a { cursor: pointer; }
.auth-error {
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  color: #DC2626; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem;
  margin-bottom: 16px; display: none;
}

/* DASHBOARD LAYOUT */
.dashboard { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; background: #1B2B6B; border-right: none;
  padding: 24px 16px; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-logo {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.2rem; color: #fff;
  padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.sidebar-logo span { color: rgba(255,255,255,0.5); }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 0.9rem; color: rgba(255,255,255,0.55); cursor: pointer; transition: all 0.2s;
  margin-bottom: 4px; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(255,107,53,0.15); color: #FF6B35; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-spacer { flex: 1; }
.sidebar-user {
  padding: 12px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 16px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px; background: rgba(255,107,53,0.2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600; color: #FF6B35; flex-shrink: 0;
}
.sidebar-email { font-size: 0.8rem; color: rgba(255,255,255,0.45); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* FUNNEL WIDGET */
.sidebar-funnel {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
}
.sidebar-funnel-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.funnel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
}
.funnel-row-label { color: rgba(255,255,255,0.45); }
.funnel-row strong { color: rgba(255,255,255,0.8); font-weight: 600; }
.funnel-rate { color: #00E887; }
.funnel-rate.low { color: #FF6B35; }

/* MAIN CONTENT */
.main { flex: 1; padding: 32px 40px; overflow-y: auto; max-height: 100vh; background: #F7F8FC; }
.main-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.main-header h1 { font-size: 1.75rem; color: #1B2B6B; }
.btn-add {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: #FF6B35; color: #fff; font-weight: 600; font-size: 0.85rem;
  border: none; border-radius: 10px; transition: background 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-add:hover { background: #e85a27; }
.btn-add svg { width: 16px; height: 16px; }

/* WATCH CARDS */
.watches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.watch-card {
  background: #FFFFFF; border: 1.5px solid #E5E7EB;
  border-radius: 14px; padding: 20px 24px; transition: border-color 0.2s, box-shadow 0.2s;
}
.watch-card:hover { border-color: #1B2B6B; box-shadow: 0 4px 16px rgba(27,43,107,0.08); }
.watch-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.watch-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 1rem; color: #1B2B6B; }
.watch-url { font-size: 0.8rem; color: #6B7280; margin-top: 4px; word-break: break-all; }
.watch-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-icon {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid #E5E7EB;
  background: #fff; color: #6B7280; display: flex;
  align-items: center; justify-content: center; transition: all 0.2s;
}
.btn-icon:hover { border-color: #1B2B6B; color: #1B2B6B; }
.btn-icon.danger:hover { border-color: rgba(239,68,68,0.4); color: #DC2626; }
.btn-icon svg { width: 14px; height: 14px; }
.watch-meta { display: flex; gap: 20px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #F3F4F6; }
.watch-meta-item { font-size: 0.75rem; color: #6B7280; }
.watch-meta-item strong { color: #1A1A2E; font-weight: 600; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.status-dot.active { background: #00875A; box-shadow: 0 0 6px rgba(0,135,90,0.3); }
.status-dot.inactive { background: #D1D5DB; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon {
  width: 64px; height: 64px; background: rgba(27,43,107,0.06);
  border: 1px solid rgba(27,43,107,0.1); border-radius: 16px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.empty-icon svg { width: 28px; height: 28px; color: #1B2B6B; }
.empty-state h3 { color: #1B2B6B; margin-bottom: 8px; font-size: 1.1rem; }
.empty-state p { color: #6B7280; font-size: 0.9rem; max-width: 400px; margin: 0 auto; }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(27,43,107,0.3); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal { width: 100%; max-width: 500px; background: #FFFFFF; border: 1.5px solid #E5E7EB; border-radius: 20px; padding: 32px; box-shadow: 0 20px 60px rgba(27,43,107,0.15); }
.modal h2 { font-size: 1.25rem; color: #1B2B6B; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.btn-secondary {
  padding: 10px 20px; background: #fff; border: 1.5px solid #E5E7EB;
  color: #6B7280; font-size: 0.85rem; border-radius: 10px; transition: all 0.2s;
}
.btn-secondary:hover { border-color: #1B2B6B; color: #1B2B6B; }

/* SETTINGS PAGE */
.settings-section { background: #FFFFFF; border: 1.5px solid #E5E7EB; border-radius: 14px; padding: 24px; margin-bottom: 20px; }
.settings-section h3 { font-size: 1rem; color: #1B2B6B; margin-bottom: 4px; }
.settings-section p { font-size: 0.85rem; color: #6B7280; margin-bottom: 16px; }
.api-key-display { display: flex; align-items: center; gap: 12px; }
.api-key-value {
  flex: 1; padding: 12px 16px; background: #F7F8FC; border: 1.5px solid #E5E7EB;
  border-radius: 10px; font-family: 'Courier New', monospace; font-size: 0.85rem; color: #1B2B6B;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-copy { padding: 12px 16px; background: rgba(0,135,90,0.08); border: 1px solid rgba(0,135,90,0.2); color: #00875A; font-size: 0.8rem; font-weight: 500; border-radius: 10px; transition: all 0.2s; white-space: nowrap; }
.btn-copy:hover { background: rgba(0,135,90,0.12); }
.btn-regen { padding: 12px 16px; background: rgba(255,107,53,0.06); border: 1px solid rgba(255,107,53,0.15); color: #FF6B35; font-size: 0.8rem; font-weight: 500; border-radius: 10px; transition: all 0.2s; white-space: nowrap; }
.btn-regen:hover { background: rgba(255,107,53,0.1); }
.btn-logout { padding: 10px 20px; background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2); color: #DC2626; font-size: 0.85rem; font-weight: 500; border-radius: 10px; transition: all 0.2s; }
.btn-logout:hover { background: rgba(239,68,68,0.1); }

.toast { position: fixed; bottom: 24px; right: 24px; background: #FFFFFF; border: 1px solid rgba(0,135,90,0.3); color: #00875A; padding: 12px 20px; border-radius: 10px; font-size: 0.85rem; z-index: 300; opacity: 0; transform: translateY(10px); transition: all 0.3s; box-shadow: 0 4px 16px rgba(27,43,107,0.1); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(239,68,68,0.3); color: #DC2626; }

.hidden { display: none !important; }

/* MOBILE */
.mobile-header { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 14px 20px; background: #1B2B6B; border-bottom: 1px solid rgba(255,255,255,0.1); align-items: center; justify-content: space-between; }
.mobile-header .sidebar-logo { padding: 0; border: none; margin: 0; color: #fff; }
.btn-hamburger { background: none; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 8px; color: rgba(255,255,255,0.7); }
.btn-hamburger svg { width: 20px; height: 20px; display: block; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(27,43,107,0.4); z-index: 99; }

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar { position: fixed; left: -280px; top: 0; bottom: 0; z-index: 100; transition: left 0.3s; }
  .sidebar.open { left: 0; }
  .mobile-overlay.open { display: block; }
  .main { padding: 72px 20px 20px; }
  .watches-grid { grid-template-columns: 1fr; }
  .main-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .main-header .btn-add { width: 100%; justify-content: center; }
  .api-key-display { flex-direction: column; }
  .funnel-widget-row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .funnel-widget-label { font-size: 0.9rem; }
  .funnel-widget-cell { flex-direction: row; justify-content: space-between; align-items: center; }
  .funnel-widget-cell-label { text-transform: none; letter-spacing: 0; }
}

/* WATCH STATS BAR */
.watch-stats {
  display: flex; gap: 12px; margin-bottom: 24px;
}
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
  background: #FFFFFF; border: 1.5px solid #E5E7EB;
  border-radius: 8px; font-size: 0.8rem; color: #6B7280;
}
.stat-chip strong { color: #1A1A2E; font-weight: 600; }
.stat-chip .dot { width: 6px; height: 6px; border-radius: 50%; }
.stat-chip .dot.green { background: #00875A; }
.stat-chip .dot.amber { background: #FF6B35; }

/* CONVERSION FUNNEL WIDGET (main view) */
.funnel-widget {
  background: #FFFFFF;
  border: 1.5px solid #E5E7EB;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.funnel-widget-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1B2B6B;
  margin: 0 0 16px;
}
.funnel-widget-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.funnel-widget-row {
  display: grid;
  grid-template-columns: 110px repeat(3, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: #F7F8FC;
  border-radius: 10px;
}
.funnel-widget-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1B2B6B;
}
.funnel-widget-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.funnel-widget-cell-label {
  font-size: 0.7rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.funnel-widget-cell-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1A1A2E;
}
.funnel-widget-cell-value.funnel-rate { color: #00875A; }
.funnel-widget-cell-value.funnel-rate.low { color: #FF6B35; }

/* SEARCH BAR */
.search-bar {
  position: relative; margin-bottom: 20px;
}
.search-bar input {
  width: 100%; padding: 10px 16px 10px 40px; background: #FFFFFF;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
  color: #1A1A2E; font-size: 0.85rem; outline: none; transition: border-color 0.2s;
}
.search-bar input:focus { border-color: #FF6B35; }
.search-bar input::placeholder { color: #9CA3AF; }
.search-bar svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #9CA3AF; pointer-events: none;
}
.search-bar .kbd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  padding: 2px 6px; background: #F7F8FC; border: 1px solid #E5E7EB;
  border-radius: 4px; font-size: 0.65rem; color: #9CA3AF; font-family: 'Inter', sans-serif;
}

/* CHANGES PANEL (slide-out) */
.changes-panel-overlay {
  position: fixed; inset: 0; background: rgba(27,43,107,0.2); backdrop-filter: blur(2px);
  z-index: 150; opacity: 0; transition: opacity 0.25s;
}
.changes-panel-overlay.open { opacity: 1; }
.changes-panel {
  position: fixed; top: 0; right: -480px; bottom: 0; width: 480px; max-width: 100vw;
  background: #FFFFFF; border-left: 1px solid #E5E7EB;
  z-index: 151; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.changes-panel.open { right: 0; }
.changes-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid #F3F4F6;
}
.changes-panel-header h3 { font-size: 1rem; color: #1B2B6B; }
.changes-panel-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.change-item {
  padding: 14px 0; border-bottom: 1px solid #F3F4F6;
}
.change-item:last-child { border-bottom: none; }
.change-time { font-size: 0.75rem; color: #9CA3AF; margin-bottom: 4px; }
.change-hash { font-size: 0.75rem; color: rgba(0,135,90,0.6); font-family: 'Courier New', monospace; }
.change-diff {
  margin-top: 8px; padding: 10px 12px; background: #F7F8FC; border-radius: 8px;
  font-size: 0.8rem; color: #6B7280; font-family: 'Courier New', monospace;
  white-space: pre-wrap; word-break: break-word; max-height: 120px; overflow-y: auto;
}
.changes-empty {
  text-align: center; padding: 40px 20px; color: #9CA3AF; font-size: 0.85rem;
}

/* CONFIRM DIALOG */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(27,43,107,0.3); backdrop-filter: blur(4px);
  z-index: 250; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.confirm-dialog {
  width: 100%; max-width: 400px; background: #FFFFFF; border: 1.5px solid #E5E7EB;
  border-radius: 16px; padding: 28px; text-align: center;
  box-shadow: 0 20px 60px rgba(27,43,107,0.15);
}
.confirm-dialog .confirm-icon {
  width: 48px; height: 48px; background: rgba(239,68,68,0.08); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  color: #DC2626;
}
.confirm-dialog .confirm-icon svg { width: 24px; height: 24px; }
.confirm-dialog h3 { font-size: 1.1rem; color: #1B2B6B; margin-bottom: 8px; }
.confirm-dialog p { font-size: 0.85rem; color: #6B7280; margin-bottom: 24px; }
.confirm-dialog .confirm-actions { display: flex; gap: 12px; }
.confirm-dialog .confirm-actions button { flex: 1; }
.btn-danger {
  padding: 12px 20px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.25);
  color: #DC2626; font-size: 0.85rem; font-weight: 600; border-radius: 10px; transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.12); }

/* ALERTS TABLE */
.stat-chip .dot.red { background: #DC2626; }
.alerts-summary { display: flex; gap: 12px; }
.alerts-filter-bar { flex-wrap: wrap; }
.alerts-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.alerts-table th {
  text-align: left; padding: 10px 16px; font-size: 0.72rem; font-weight: 500;
  color: #9CA3AF; border-bottom: 2px solid #E5E7EB;
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.05em;
}
.alerts-table td {
  padding: 14px 16px; border-bottom: 1px solid #F3F4F6;
  color: #6B7280; vertical-align: middle;
}
.alerts-table tr:hover td { background: #F7F8FC; }
.alerts-table tr:last-child td { border-bottom: none; }
.alert-row-delivered td:first-child { border-left: 3px solid #00875A; }
.alert-row-failed td:first-child { border-left: 3px solid #DC2626; }
.alert-watch-name { font-weight: 600; color: #1B2B6B; }
.alert-watch-url { font-size: 0.72rem; color: #9CA3AF; margin-top: 2px; display: block; }
.alert-status-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 6px; font-size: 0.72rem; font-weight: 600;
}
.alert-status-badge.delivered { background: rgba(0,135,90,0.08); color: #00875A; }
.alert-status-badge.failed { background: rgba(239,68,68,0.08); color: #DC2626; }
.alert-timestamp { font-size: 0.78rem; color: #9CA3AF; white-space: nowrap; }
.alert-response { font-family: 'Courier New', monospace; font-size: 0.75rem; }
.alert-response-code { font-weight: 600; }
.alert-response-ok { color: #00875A; }
.alert-response-err { color: #DC2626; }
.alert-error-msg { font-size: 0.72rem; color: rgba(220,38,38,0.7); margin-top: 2px; display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-diff-preview {
  font-size: 0.75rem; color: #9CA3AF; font-family: 'Courier New', monospace;
  max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.alerts-table .col-timestamp { width: 160px; white-space: nowrap; }
.alerts-table .col-status { width: 110px; }
.alerts-table .col-response { width: 100px; }
.alerts-table .col-diff { width: auto; }
@media (max-width: 768px) {
  .alerts-table th:nth-child(4),
  .alerts-table td:nth-child(4),
  .alerts-table th:nth-child(5),
  .alerts-table td:nth-child(5) { display: none; }
  .alerts-summary { display: none; }
}
.btn-changes {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  background: rgba(0,135,90,0.06); border: 1px solid rgba(0,135,90,0.12);
  border-radius: 6px; font-size: 0.7rem; color: rgba(0,135,90,0.8); transition: all 0.2s;
  cursor: pointer; white-space: nowrap;
}
.btn-changes:hover { background: rgba(0,135,90,0.1); color: #00875A; }

/* ONBOARDING BANNER */
.onboarding-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #FFFFFF;
  border: 1.5px solid #1B2B6B;
  border-radius: 14px;
  margin-bottom: 24px;
  animation: fadeInUp 0.3s ease;
}
.onboarding-banner.hidden { display: none; }
.onboarding-icon {
  width: 40px; height: 40px; background: rgba(255,107,53,0.1);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #FF6B35;
}
.onboarding-icon svg { width: 18px; height: 18px; }
.onboarding-content { flex: 1; }
.onboarding-content strong { display: block; font-size: 0.9rem; color: #1B2B6B; margin-bottom: 4px; font-family: 'Plus Jakarta Sans', sans-serif; }
.onboarding-content p { font-size: 0.8rem; color: #6B7280; }
.onboarding-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.btn-onboard-check {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: #FF6B35; color: #fff; font-weight: 600; font-size: 0.8rem;
  border: none; border-radius: 8px; transition: background 0.2s; white-space: nowrap;
}
.btn-onboard-check:hover { background: #e85a27; }
.btn-onboard-check svg { width: 13px; height: 13px; }
.btn-onboard-check.checking { opacity: 0.7; cursor: not-allowed; }
.btn-onboard-check.checking svg { animation: spin 0.8s linear infinite; }
.btn-onboard-interval {
  padding: 8px 14px; background: #F7F8FC; border: 1.5px solid #E5E7EB;
  color: #6B7280; font-size: 0.78rem; border-radius: 8px;
  transition: all 0.2s; white-space: nowrap;
}
.btn-onboard-interval:hover { border-color: #1B2B6B; color: #1B2B6B; }
.btn-onboard-dismiss {
  width: 28px; height: 28px; border-radius: 6px; border: none; background: #F7F8FC;
  color: #9CA3AF; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.btn-onboard-dismiss:hover { background: #E5E7EB; color: #1B2B6B; }
.btn-onboard-dismiss svg { width: 13px; height: 13px; }

@media (max-width: 768px) {
  .onboarding-banner { flex-wrap: wrap; padding: 14px 16px; }
  .onboarding-content { width: calc(100% - 56px); }
  .onboarding-actions { width: 100%; justify-content: flex-start; }
  .btn-onboard-dismiss { position: absolute; top: 10px; right: 10px; }
  #page-watches { position: relative; }
}
.kbd-hint {
  position: fixed; bottom: 24px; left: 24px; display: flex; gap: 16px;
  font-size: 0.7rem; color: rgba(27,43,107,0.3);
}
.kbd-hint span { display: inline-flex; align-items: center; gap: 4px; }
.kbd-hint kbd {
  padding: 2px 5px; background: #F7F8FC; border: 1px solid #E5E7EB;
  border-radius: 3px; font-family: 'Inter', sans-serif; font-size: 0.65rem; color: #9CA3AF;
}

/* Loading spinner */
.loading { display: flex; justify-content: center; padding: 60px; }
.spinner { width: 32px; height: 32px; border: 3px solid rgba(255,107,53,0.2); border-top-color: #FF6B35; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.watch-card { animation: fadeInUp 0.3s ease both; }
.watch-card:nth-child(2) { animation-delay: 0.05s; }
.watch-card:nth-child(3) { animation-delay: 0.1s; }
.watch-card:nth-child(4) { animation-delay: 0.15s; }
.watch-card:nth-child(5) { animation-delay: 0.2s; }
.watch-card:nth-child(6) { animation-delay: 0.25s; }

/* Modal animation */
.modal-overlay:not(.hidden) .modal,
.confirm-overlay .confirm-dialog {
  animation: fadeInUp 0.2s ease;
}

/* ACTIVITY / MONITOR PAGE */
.activity-select-wrapper {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.activity-select-label {
  font-size: 0.8rem; color: #6B7280; white-space: nowrap; font-weight: 500;
}
#activity-watch-select {
  flex: 1; max-width: 400px; padding: 10px 16px; background: #FFFFFF;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
  color: #1A1A2E; font-size: 0.9rem; outline: none; appearance: none;
}
#activity-watch-select:focus { border-color: #FF6B35; }
.btn-trigger-check {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  background: rgba(255,107,53,0.08); border: 1.5px solid rgba(255,107,53,0.2);
  color: #FF6B35; font-size: 0.85rem; font-weight: 600; border-radius: 10px;
  transition: all 0.2s; white-space: nowrap;
}
.btn-trigger-check:hover:not(:disabled) { background: rgba(255,107,53,0.15); }
.btn-trigger-check:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-trigger-check svg { width: 14px; height: 14px; }
.btn-trigger-check.checking svg { animation: spin 0.8s linear infinite; }

.activity-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid #E5E7EB;
  margin-bottom: 24px;
}
.activity-tab {
  padding: 10px 18px; font-size: 0.85rem; color: #9CA3AF;
  border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.2s; margin-bottom: -2px; font-weight: 500;
}
.activity-tab:hover { color: #6B7280; }
.activity-tab.active { color: #FF6B35; border-bottom-color: #FF6B35; }

.activity-panel { min-height: 200px; }
.activity-loading { display: flex; justify-content: center; padding: 60px; }
.activity-empty {
  text-align: center; padding: 60px 20px;
}
.activity-empty .empty-icon {
  width: 64px; height: 64px; background: rgba(27,43,107,0.06);
  border: 1px solid rgba(27,43,107,0.1); border-radius: 16px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.activity-empty .empty-icon svg { width: 26px; height: 26px; color: #1B2B6B; }
.activity-empty h3 { color: #1B2B6B; margin-bottom: 8px; font-size: 1.05rem; }
.activity-empty p { color: #6B7280; font-size: 0.85rem; max-width: 360px; margin: 0 auto; }

.activity-info {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.activity-stat-card {
  background: #FFFFFF; border: 1.5px solid #E5E7EB;
  border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 14px;
}
.activity-stat-icon {
  width: 36px; height: 36px; background: rgba(255,107,53,0.08); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #FF6B35;
}
.activity-stat-icon.alert { background: rgba(0,135,90,0.08); color: #00875A; }
.activity-stat-icon.hash { background: rgba(27,43,107,0.06); color: #1B2B6B; }
.activity-stat-icon svg { width: 16px; height: 16px; }
.activity-stat-value { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 1.2rem; color: #1B2B6B; }
.activity-stat-label { font-size: 0.72rem; color: #9CA3AF; margin-top: 2px; }

.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-list-item {
  background: #FFFFFF; border: 1.5px solid #E5E7EB;
  border-radius: 12px; padding: 14px 18px; transition: border-color 0.2s;
}
.activity-list-item:hover { border-color: #1B2B6B; }
.activity-list-item.success { border-left: 3px solid #00875A; }
.activity-list-item.changed { border-left: 3px solid #FF6B35; }
.activity-list-item.error { border-left: 3px solid #DC2626; }
.activity-list-item.alert-sent { border-left: 3px solid #7C3AED; }
.activity-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.activity-list-title { font-size: 0.85rem; font-weight: 600; color: #1B2B6B; }
.activity-list-time { font-size: 0.72rem; color: #9CA3AF; }
.activity-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 6px; font-size: 0.7rem; font-weight: 500;
}
.activity-badge.change { background: rgba(255,107,53,0.08); color: #FF6B35; }
.activity-badge.no-change { background: rgba(0,135,90,0.08); color: #00875A; }
.activity-badge.error { background: rgba(239,68,68,0.08); color: #DC2626; }
.activity-badge.alert { background: rgba(124,58,237,0.08); color: #7C3AED; }
.activity-badge.pending { background: #F7F8FC; color: #9CA3AF; border: 1px solid #E5E7EB; }
.activity-list-detail { font-size: 0.8rem; color: #6B7280; margin-top: 6px; }
.activity-diff-block {
  margin-top: 8px; padding: 10px 12px; background: #F7F8FC;
  border-radius: 8px; font-size: 0.75rem; color: #6B7280;
  font-family: 'Courier New', monospace; white-space: pre-wrap; word-break: break-word;
  max-height: 120px; overflow-y: auto;
}

/* ---- Notification Preferences ---- */
.pref-group {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 24px;
}
.pref-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: #FFFFFF;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
}
.pref-toggle-info { flex: 1; }
.pref-label { font-size: 0.85rem; font-weight: 600; color: #1B2B6B; display: block; margin-bottom: 2px; cursor: pointer; }
.pref-desc { font-size: 0.75rem; color: #9CA3AF; }

/* Toggle switch */
.toggle-switch { display: inline-flex; align-items: center; cursor: pointer; position: relative; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  width: 44px; height: 24px; background: #D1D5DB;
  border-radius: 12px; position: relative; transition: background 0.2s;
}
.toggle-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #FFFFFF; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-track { background: #00875A; }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

/* Frequency row */
.pref-frequency-row {
  margin-top: 8px; padding: 16px 18px; background: #F7F8FC;
  border: 1.5px solid #E5E7EB; border-radius: 10px;
}
.pref-frequency-row select {
  width: 100%; margin-top: 8px; padding: 8px 12px;
  border: 1.5px solid #E5E7EB; border-radius: 8px;
  font-size: 0.8rem; background: #FFFFFF; color: #1B2B6B; outline: none;
  appearance: none;
}
.pref-frequency-row select:focus { border-color: #FF6B35; }

/* Save status */
.pref-save-status {
  font-size: 0.78rem; margin-top: 12px; min-height: 18px;
}
.pref-save-status.saving { color: #9CA3AF; }
.pref-save-status.saved { color: #00875A; font-weight: 500; }
.pref-save-status.error { color: #DC2626; }

@media (max-width: 768px) {
  .kbd-hint { display: none; }
  .changes-panel { width: 100vw; }
  .watch-stats { flex-wrap: wrap; }
  .search-bar .kbd { display: none; }
  .activity-select-wrapper { flex-wrap: wrap; }
  #activity-watch-select { max-width: 100%; width: 100%; }
  .btn-trigger-check { width: 100%; justify-content: center; }
  .activity-info { grid-template-columns: 1fr 1fr; }
}

/* ONBOARDING TOUR */
.tour-overlay {
  position: fixed; inset: 0; background: rgba(27,43,107,0.5); z-index: 400;
}
.tour-spotlight {
  position: fixed; z-index: 401; pointer-events: none; border-radius: 10px;
  box-shadow: 0 0 0 3px #FF6B35, 0 0 0 8px rgba(255,107,53,0.2);
  transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s;
}
.tour-tooltip {
  position: fixed; z-index: 402; background: #FFFFFF;
  border: 1.5px solid #E5E7EB; border-radius: 14px; padding: 20px 22px;
  width: 280px; box-shadow: 0 8px 32px rgba(27,43,107,0.18);
  animation: fadeInUp 0.25s ease;
}
.tour-step-indicator {
  font-size: 0.7rem; color: #FF6B35; font-weight: 600;
  margin-bottom: 8px; letter-spacing: 0.05em; text-transform: uppercase;
}
.tour-tooltip h4 {
  font-size: 0.95rem; color: #1B2B6B; margin-bottom: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.tour-tooltip p { font-size: 0.82rem; color: #6B7280; margin-bottom: 18px; line-height: 1.5; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; }
.tour-skip { font-size: 0.78rem; color: #9CA3AF; background: none; border: none; padding: 4px 0; cursor: pointer; }
.tour-skip:hover { color: #6B7280; }
.tour-next { padding: 8px 18px !important; font-size: 0.82rem !important; width: auto !important; }