/* Flash del layout: barra superior fija (no empuja header/sidebar). */
#app-flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  pointer-events: none;
}

#app-flash:empty {
  display: none;
}

.app-flash {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 12px 44px 12px 20px;
  position: relative;
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-flash.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.app-flash__text {
  margin: 0;
  text-align: center;
}

.app-flash__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.app-flash__close:hover {
  opacity: 1;
  background: rgba(15, 23, 42, 0.08);
}

.app-flash--notice {
  background: #e8f8f2;
  color: #1f7a5c;
  border-bottom: 1px solid #b6ebd8;
}

.app-flash--alert {
  background: var(--sandos-accent-soft);
  color: var(--sandos-accent-darker);
  border-bottom: 1px solid var(--sandos-accent-border);
}

html[data-theme="dark"] .app-flash--notice {
  background: rgba(52, 195, 143, 0.14);
  color: #86efc5;
  border-bottom-color: rgba(52, 195, 143, 0.28);
}

html[data-theme="dark"] .app-flash--alert {
  background: rgba(220, 38, 38, 0.14);
  color: #fecaca;
  border-bottom-color: rgba(220, 38, 38, 0.28);
}

html[data-theme="dark"] .app-flash__close:hover {
  background: rgba(255, 255, 255, 0.1);
}
