/* Labo toast + appearance — adapted from D:\drug pi-toast / authAppearance */

.mylabo-toast-host {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 2147483647;
  pointer-events: none;
}

.mylabo-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(calc(100vw - 40px), 410px);
  padding: 15px 16px 17px;
  color: #17212b;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe6eb;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  animation: mylaboToastSlideIn 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.mylabo-toast.is-success { border-color: #9ec5e8; }
.mylabo-toast.is-logout { border-color: #cbd5e1; }
.mylabo-toast.is-error {
  border-color: #f3c4ca;
  background: rgba(254, 242, 242, 0.96);
}

.mylabo-toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 8px 18px rgba(11, 47, 99, 0.22);
}

.mylabo-toast.is-success .mylabo-toast-icon {
  background: linear-gradient(145deg, #0b2f63, #1d9bd1);
}

.mylabo-toast.is-logout .mylabo-toast-icon {
  background: linear-gradient(145deg, #334155, #64748b);
  box-shadow: 0 8px 18px rgba(51, 65, 85, 0.22);
}

.mylabo-toast.is-error .mylabo-toast-icon {
  background: linear-gradient(145deg, #c82f42, #ed5364);
  box-shadow: 0 8px 18px rgba(200, 47, 66, 0.22);
}

.mylabo-toast-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 6px;
}

.mylabo-toast-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  color: #1d9bd1;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.mylabo-toast.is-logout .mylabo-toast-meta { color: #64748b; }
.mylabo-toast.is-error .mylabo-toast-meta { color: #c82f42; }

.mylabo-toast-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.mylabo-toast-title {
  font-size: 0.94rem;
  line-height: 1.25;
  font-weight: 750;
  color: #17212b;
}

.mylabo-toast-msg {
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #697681;
  word-break: break-word;
}

.mylabo-toast-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #7d8994;
  font-size: 1.05rem;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
}

.mylabo-toast-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}

.mylabo-toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #0b2f63, #1d9bd1);
  transform-origin: left;
  animation: mylaboToastProgress 5s linear forwards;
}

.mylabo-toast.is-logout .mylabo-toast-progress {
  background: linear-gradient(90deg, #475569, #94a3b8);
}

.mylabo-toast.is-error .mylabo-toast-progress {
  background: linear-gradient(90deg, #c82f42, #ff8793);
}

html[data-bs-theme="dark"] .mylabo-toast {
  color: #eef3f6;
  background: rgba(20, 29, 38, 0.94);
  border-color: #35424d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

html[data-bs-theme="dark"] .mylabo-toast.is-error {
  background: rgba(55, 18, 24, 0.94);
  border-color: #7f1d1d;
}

html[data-bs-theme="dark"] .mylabo-toast-title { color: #eef3f6; }
html[data-bs-theme="dark"] .mylabo-toast-msg { color: #aab5be; }
html[data-bs-theme="dark"] .mylabo-toast-close { color: #9da9b3; }

@keyframes mylaboToastSlideIn {
  from {
    opacity: 0;
    transform: translate3d(38px, -6px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes mylaboToastProgress {
  to { transform: scaleX(0); }
}

@media (max-width: 575.98px) {
  .mylabo-toast-host {
    top: 14px;
    right: 12px;
    left: 12px;
  }
  .mylabo-toast { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mylabo-toast,
  .mylabo-toast-progress {
    animation: none;
  }
}

/* App dark-mode surface polish (AdminLTE + Labo shell) */
html[data-bs-theme="dark"] body.mylabo-app {
  color: #e2e8f0;
  background-color: #0f172a;
}

html[data-bs-theme="dark"] body.mylabo-app .app-wrapper,
html[data-bs-theme="dark"] body.mylabo-app .app-main {
  background-color: #0f172a;
  color: #e2e8f0;
}

html[data-bs-theme="dark"] body.mylabo-app .app-header {
  background: #111827 !important;
  border-bottom-color: #1f2937 !important;
}

html[data-bs-theme="dark"] body.mylabo-app .app-content,
html[data-bs-theme="dark"] body.mylabo-app .content-wrapper {
  background: #0f172a;
}

html[data-bs-theme="dark"] body.mylabo-app .card,
html[data-bs-theme="dark"] body.mylabo-app .modal-content {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-bs-theme="dark"] body.mylabo-app .form-control,
html[data-bs-theme="dark"] body.mylabo-app .form-select {
  background-color: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-bs-theme="dark"] body.mylabo-app .table {
  --bs-table-bg: transparent;
  --bs-table-color: #e2e8f0;
  --bs-table-border-color: #334155;
}

html[data-bs-theme="dark"] body.mylabo-app .dropdown-menu {
  background-color: #1e293b;
  border-color: #334155;
}

html[data-bs-theme="dark"] body.mylabo-app .dropdown-item {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] body.mylabo-app .dropdown-item:hover,
html[data-bs-theme="dark"] body.mylabo-app .dropdown-item:focus {
  background-color: #334155;
  color: #fff;
}

.mylabo-theme-toggle {
  color: inherit;
}

.mylabo-theme-toggle .bi {
  font-size: 1.05rem;
}
