.alert {
  position: fixed;
  z-index: 100;
  top: auto;
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-width: 200px;
  max-width: min(360px, calc(100vw - 32px));
  min-height: 56px;
  padding: 10px 11px 10px 13px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  box-shadow: 0 16px 40px rgba(20, 36, 62, .16), 0 3px 10px rgba(20, 36, 62, .07);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  animation: toast-enter .2s ease-out;
}

.alert-symbol {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: #eaf1ff;
  color: #3465dc;
  font-size: 15px;
  font-weight: 750;
}

.alert-success .alert-symbol { background: #e7f7ed; color: #198754; }
.alert-error .alert-symbol { background: #fff0f0; color: #cf3a46; }
.alert-message { min-width: 0; overflow-wrap: anywhere; }

.alert-dismiss {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8290a5;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.alert-dismiss:hover { background: #f1f5f9; color: #334155; }
.alert-dismiss:focus-visible { outline: 2px solid #3465dc; outline-offset: 2px; }

@keyframes toast-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .alert {
    right: calc(14px + env(safe-area-inset-right));
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
  .technician-mode .alert { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .alert { animation: none; }
}
