:root {
  --toast-bg: var(--nt-surface, #1e293b);
  --toast-border: var(--nt-border, #334155);
  --toast-text: var(--nt-text, #f8fafc);
  --toast-muted: var(--nt-text-muted, #64748b);
  --toast-radius: var(--nt-radius-lg, 10px);
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--nt-z-toast, 99999);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--toast-radius);
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: var(--toast-text);
    font-size: 0.875rem;
    font-family: var(--nt-font, 'Segoe UI', sans-serif);
    line-height: 1.5;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.removing { transform: translateX(120%); opacity: 0; transition: transform 0.25s ease-in, opacity 0.2s ease; }

.toast-icon {
    flex-shrink: 0;
    width: 20px; height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 0.125rem;
}

.toast-content { flex: 1; min-width: 0; word-break: break-word; }

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--toast-muted);
    cursor: pointer;
    padding: 0.2rem;
    font-size: 0.85rem;
    border-radius: var(--nt-radius-sm, 4px);
    transition: color 0.2s, background 0.2s;
    line-height: 1;
    margin-top: 0.125rem;
}
.toast-close:hover { color: var(--toast-text); background: rgba(255,255,255,0.1); }

.toast-accent {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
}

.toast-success .toast-accent { background: var(--nt-accent, #10b981); }
.toast-success .toast-icon { color: var(--nt-accent, #10b981); }
.toast-success { border-color: rgba(16, 185, 129, 0.3); }

.toast-error .toast-accent { background: var(--nt-danger, #ef4444); }
.toast-error .toast-icon { color: var(--nt-danger, #ef4444); }
.toast-error { border-color: rgba(239, 68, 68, 0.3); }

.toast-warning .toast-accent { background: var(--nt-warning, #f59e0b); }
.toast-warning .toast-icon { color: var(--nt-warning, #f59e0b); }
.toast-warning { border-color: rgba(245, 158, 11, 0.3); }

.toast-info .toast-accent { background: var(--nt-primary, #3b82f6); }
.toast-info .toast-icon { color: var(--nt-primary, #3b82f6); }
.toast-info { border-color: rgba(59, 130, 246, 0.3); }

@media (max-width: 480px) {
    .toast-container { top: 0.5rem; right: 0.5rem; left: 0.5rem; max-width: none; }
    .toast { padding: 0.75rem; font-size: 0.8125rem; }
}
