/* Global reset for icons and buttons */
  svg {/* --- Alert Styles --- */
:root{
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,.12);
  --success-bg: #ecfdf5;
  --success-border: #34d399;
  --success-text: #065f46;

  --danger-bg: #fef2f2;
  --danger-border: #f87171;
  --danger-text: #7f1d1d;
}

.alert{
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  line-height: 1.35;
  font-size: .95rem;
  opacity: 0;
  transform: translateY(-6px);
  animation: alert-in .25s ease forwards;
}

.alert-success{
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert-danger{
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.alert-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
}

.ti{ /* fallback if icon font isn’t loaded */
  font-style: normal;
  display: inline-block;
}
.ti-xs{ font-size: 1.05rem; }

/* Close button */
.alert .btn-close{
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
}
.alert .btn-close:hover{ opacity: 1; }

/* Toast mode (fixed stack) */
#alert-container{
  position: fixed;
  top: 16px;
  right: 16px;
  width: min(420px, 92vw);
  z-index: 9999;
}
#alert-container .alert{
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

/* Hide animation */
.alert.is-hiding{
  animation: alert-out .2s ease forwards;
}

@keyframes alert-in{
  to { opacity: 1; transform: translateY(0); }
}
@keyframes alert-out{
  to { opacity: 0; transform: translateY(-6px); }
}

    width: 24px;
    height: 64px;
    fill: currentColor;
  }

  /* Fade-out animation */
  @keyframes fadeOut {
    from {
      opacity: 0.99;
    }
    to {
      opacity: 0;
    }
  }

  /* Toast Container (Fixed Top Right) */
  .chakra-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    color: #333;
    padding: 12px 20px;
    margin: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: auto;
    opacity: 1;
    animation: fadeIn 0.5s ease-in-out;
  }

  /* Toast Icon */
  .chakra-alert__icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
  }

  .chakra-alert__desc {
    flex-grow: 1;
  }

  .chakra-alert__title {
    font-weight: bold;
    font-size: 1.2rem;
  }

  .chakra-alert__desc {
    font-size: 1rem;
    color: #555;
  }

  /* Toast Close Button */
  .css-1pq15d {
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: 12px;
  }

  .css-1pq15d .chakra-icon {
    width: 9px;
    height: 9px;
  }

  /* Success Alert Styles */
  .chakra-alert[data-status='success'] {
    background-color: #b3ffb8;
    border-left: 5px solid #bbfcc0;
  }

  .chakra-alert[data-status='success'] .chakra-alert__icon svg {
    fill: #bbfcc0;
  }

  /* Error Alert Styles */
  .chakra-alert[data-status='error'] {
    background-color: #fed7d7;
    border-left: 5px solid #f44336;
  }

  .chakra-alert[data-status='error'] .chakra-alert__icon svg {
    fill: #f44336;
  }

  /* Fade-out animation for alerts */
  .fade-out {
    animation: fadeOut 0.5s forwards;
  }