.alerts-hero {
  text-align: center;
  margin-bottom: 32px;
}
.alerts-hero h1 {
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.alerts-hero p {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}
.price-display {
  text-align: center;
  padding: 28px 20px;
  margin-bottom: 20px;
}
.price-display__label {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.price-display__label .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
.price-display__value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3rem;
  font-weight:600;
  line-height: 1.1;
  transition: color 0.3s;
}
.price-display__value.flash-green {
  color: var(--green);
}
.price-display__value.flash-red {
  color: var(--red);
}
.price-display__change {
  margin-top: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}
.price-display__change.green { color: var(--green); }
.price-display__change.red { color: var(--red); }
.price-display__updated {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* Notification permission bar */
.notif-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.notif-bar--prompt {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.notif-bar--granted {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.notif-bar--denied {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.notif-bar__text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}
.notif-bar__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}
.notif-bar button {
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.notif-bar button:hover {
  opacity: 0.85;
}

/* Add alert form */
.alert-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}
.alert-form__price-wrap {
  flex: 1;
  min-width: 160px;
  position: relative;
}
.alert-form__price-wrap .calc-input-field {
  width: 100%;
  padding-right: 36px;
  box-sizing: border-box;
}
.alert-form__dollar {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-weight: 600;
  pointer-events: none;
}
.alert-form__direction {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.alert-form__direction button {
  padding: 10px 18px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.alert-form__direction button.active {
  background: var(--accent);
  color: var(--text-inverse);
}
.alert-form__direction button:hover:not(.active) {
  background: var(--bg-tertiary, var(--bg-secondary));
  color: var(--text-primary);
}
.alert-form__submit {
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.alert-form__submit:hover {
  opacity: 0.85;
}
.alert-form__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Sound toggle */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.sound-toggle input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Alert list */
.alert-list {
  margin-top: 20px;
}
.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  margin-bottom: 10px;
  transition: border-color 0.3s, background 0.3s;
}
.alert-item:hover {
  border-color: var(--accent);
}
.alert-item--triggered {
  border-color: var(--green);
  background: rgba(34, 197, 94, 0.06);
}
.alert-item__info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.alert-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.alert-item__icon--above {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}
.alert-item__icon--below {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}
.alert-item__details {
  min-width: 0;
}
.alert-item__price {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.05rem;
}
.alert-item__meta {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.alert-item__status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius:var(--radius-md);
  margin-right: 12px;
  flex-shrink: 0;
}
.alert-item__status--active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue);
}
.alert-item__status--triggered {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}
.alert-item__delete {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}
.alert-item__delete:hover {
  color: var(--red);
  background: rgba(239, 68, 68, 0.1);
}
.alert-list__empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}
.alert-list__empty svg {
  display: block;
  margin: 0 auto 12px;
  opacity: 0.3;
}

/* On-page toast alerts */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 40px);
}
.toast {
  background: var(--bg-primary);
  border: 1px solid var(--green);
  border-radius:var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  animation: toastIn 0.35s ease-out;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.toast--removing {
  animation: toastOut 0.3s ease-in forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}
.toast__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
}
.toast__body {
  flex: 1;
}
.toast__title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.toast__text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.toast__close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  line-height: 1;
  flex-shrink: 0;
}

/* History section */
.history-section {
  margin-top: 20px;
}
.history-section h3 {
  font-size: 1rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-section h3 button {
  font-size: 0.75rem;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  text-decoration: underline;
}
.history-section h3 button:hover {
  color: var(--text-secondary);
}
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--border-color);
}
.history-item:last-child {
  border-bottom: none;
}
.history-item__icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}
.history-item__text {
  flex: 1;
  color: var(--text-secondary);
}
.history-item__text strong {
  color: var(--text-primary);
}
.history-item__time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
  .price-display__value {
    font-size: 2.2rem;
  }
  .alert-form {
    flex-direction: column;
  }
  .alert-form__direction {
    width: 100%;
  }
  .alert-form__direction button {
    flex: 1;
    text-align: center;
  }
  .alert-form__submit {
    width: 100%;
  }
  .alert-item {
    flex-wrap: wrap;
    gap: 8px;
  }
  .alert-item__status {
    margin-right: 0;
  }
}

#background-alerts p{line-height:1.7;color:var(--text-secondary)}
.push-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
#background-alerts button{padding:10px 14px;border:1px solid var(--border-color);border-radius:8px;color:var(--text-primary);background:var(--bg-card-hover);cursor:pointer}
#background-alerts button:disabled{opacity:.55;cursor:wait}
.push-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:15px}
.push-fields label{font-size:.9rem}.push-fields input,.push-fields select{display:block;box-sizing:border-box;width:100%;margin-top:6px;padding:12px;background:var(--bg-card);color:var(--text-primary);border:1px solid var(--border-color);border-radius:8px}
.push-alert-card{padding:16px;margin-top:12px;border:1px solid var(--border-color);border-radius:10px}.push-alert-card p{margin:6px 0;font-size:.9rem}
